From cc1d2aaade88e4b3f100e4c77e417140b2429804 Mon Sep 17 00:00:00 2001
From: IanM <16573496+imorland@users.noreply.github.com>
Date: Mon, 21 Oct 2024 19:50:41 +0100
Subject: [PATCH 1/7] chore: set appver to 1.8.8 (#4084)

---
 framework/core/src/Foundation/Application.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/framework/core/src/Foundation/Application.php b/framework/core/src/Foundation/Application.php
index 42e9845cf1..aaaa00f100 100644
--- a/framework/core/src/Foundation/Application.php
+++ b/framework/core/src/Foundation/Application.php
@@ -21,7 +21,7 @@ class Application
      *
      * @var string
      */
-    const VERSION = '1.8.7';
+    const VERSION = '1.8.8';
 
     /**
      * The IoC container for the Flarum application.

From 6f48557c3aab6051684352b005de28799a39c08a Mon Sep 17 00:00:00 2001
From: IanM <16573496+imorland@users.noreply.github.com>
Date: Mon, 21 Oct 2024 19:57:55 +0100
Subject: [PATCH 2/7] fix new search term not being passed (#4083)

---
 .../core/js/src/forum/components/DiscussionsSearchSource.tsx    | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/framework/core/js/src/forum/components/DiscussionsSearchSource.tsx b/framework/core/js/src/forum/components/DiscussionsSearchSource.tsx
index 31443760e0..9fc68507f7 100644
--- a/framework/core/js/src/forum/components/DiscussionsSearchSource.tsx
+++ b/framework/core/js/src/forum/components/DiscussionsSearchSource.tsx
@@ -35,6 +35,8 @@ export default class DiscussionsSearchSource implements SearchSource {
   view(query: string): Array<Mithril.Vnode> {
     query = query.toLowerCase();
 
+    this.setQueryString(query);
+
     const results = (this.results.get(query) || []).map((discussion) => {
       const mostRelevantPost = discussion.mostRelevantPost();
 

From 821ca01460b941caa137ac5e04c732431e576adb Mon Sep 17 00:00:00 2001
From: flarum-bot <bot@flarum.org>
Date: Mon, 21 Oct 2024 19:01:58 +0000
Subject: [PATCH 3/7] Bundled output for commit
 6f48557c3aab6051684352b005de28799a39c08a Includes transpiled JS/TS, and
 Typescript declaration files (typings).

[skip ci]
---
 framework/core/js/dist/forum.js     | 2 +-
 framework/core/js/dist/forum.js.map | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/framework/core/js/dist/forum.js b/framework/core/js/dist/forum.js
index 4e2ea061d9..d3bb8f0bfb 100644
--- a/framework/core/js/dist/forum.js
+++ b/framework/core/js/dist/forum.js
@@ -1,3 +1,3 @@
 /*! For license information please see forum.js.LICENSE.txt */
-(()=>{var t={8492:()=>{},1859:()=>{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)})},9043:()=>{!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)},6199:()=>{!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)},7865:()=>{!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)},6935:()=>{!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)},2898: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},4757:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,n="millisecond",r="second",i="minute",o="hour",s="day",a="week",u="month",l="quarter",c="year",d="date",h="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},v=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:v,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+v(r,2,"0")+":"+v(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,u),o=n-i<0,s=e.clone().add(r+(o?-1:1),u);return+(-(r+(n-i)/(o?i-s:s-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:c,w:a,d:s,D:d,h:o,m:i,s:r,ms:n,Q:l}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},y="en",b={};b[y]=m;var w=function(t){return t instanceof A},D=function t(e,n,r){var i;if(!e)return y;if("string"==typeof e){var o=e.toLowerCase();b[o]&&(i=o),n&&(b[o]=n,i=o);var s=e.split("-");if(!i&&s.length>1)return t(s[0])}else{var a=e.name;b[a]=e,i=a}return!r&&i&&(y=i),i||!r&&y},x=function(t,e){if(w(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new A(n)},C=g;C.l=D,C.i=w,C.w=function(t,e){return x(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var A=function(){function m(t){this.$L=D(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(C.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 C},v.isValid=function(){return!(this.$d.toString()===h)},v.isSame=function(t,e){var n=x(t);return this.startOf(e)<=n&&n<=this.endOf(e)},v.isAfter=function(t,e){return x(t)<this.startOf(e)},v.isBefore=function(t,e){return this.endOf(e)<x(t)},v.$g=function(t,e,n){return C.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=!!C.u(e)||e,h=C.p(t),f=function(t,e){var r=C.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 C.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=C.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[C.p(t)]()},v.add=function(n,l){var d,h=this;n=Number(n);var f=C.p(l),p=function(t){var e=x(h);return C.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 C.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=C.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].slice(0,o)},d=function(t){return C.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:C.s(a+1,2,"0"),MMM:c(n.monthsShort,a,l,3),MMMM:c(l,a),D:this.$D,DD:C.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:C.s(o,2,"0"),h:d(1),hh:d(2),a:f(o,s,!0),A:f(o,s,!1),m:String(s),mm:C.s(s,2,"0"),s:String(this.$s),ss:C.s(this.$s,2,"0"),SSS:C.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=C.p(d),m=x(n),v=(m.utcOffset()-this.utcOffset())*t,g=this-m,y=C.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:C.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=D(t,e,!0);return r&&(n.$L=r),n},v.clone=function(){return C.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}(),E=A.prototype;return x.prototype=E,[["$ms",n],["$s",r],["$m",i],["$H",o],["$W",s],["$M",u],["$y",c],["$D",d]].forEach((function(t){E[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),x.extend=function(t,e){return t.$i||(t(e,A,x),t.$i=!0),x},x.locale=D,x.isDayjs=w,x.unix=function(t){return x(1e3*t)},x.en=b[y],x.Ls=b,x.p={},x}()},6982: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)}}}()},5635: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)}}}()},356:(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}()},9411: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)},9152:function(t,e){var n;!function(e,n){"use strict";"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,(function(r,i){"use strict";var o=[],s=Object.getPrototypeOf,a=o.slice,u=o.flat?function(t){return o.flat.call(t)}:function(t){return o.concat.apply([],t)},l=o.push,c=o.indexOf,d={},h=d.toString,f=d.hasOwnProperty,p=f.toString,m=p.call(Object),v={},g=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},y=function(t){return null!=t&&t===t.window},b=r.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function D(t,e,n){var r,i,o=(n=n||b).createElement("script");if(o.text=t,e)for(r in w)(i=e[r]||e.getAttribute&&e.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?d[h.call(t)]||"object":typeof t}var C="3.6.1",A=function t(e,n){return new t.fn.init(e,n)};function E(t){var e=!!t&&"length"in t&&t.length,n=x(t);return!g(t)&&!y(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}A.fn=A.prototype={jquery:C,constructor:A,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=A.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return A.each(this,t)},map:function(t){return this.pushStack(A.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(A.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(A.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},A.extend=A.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&&(A.isPlainObject(r)||(i=Array.isArray(r)))?(n=s[e],o=i&&!Array.isArray(n)?[]:i||A.isPlainObject(n)?n:{},i=!1,s[e]=A.extend(l,o,r)):void 0!==r&&(s[e]=r));return s},A.extend({expando:"jQuery"+(C+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==h.call(t)||(e=s(t))&&("function"!=typeof(n=f.call(e,"constructor")&&e.constructor)||p.call(n)!==m))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){D(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,r=0;if(E(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&&(E(Object(t))?A.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(E(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&&(A.fn[Symbol.iterator]=o[Symbol.iterator]),A.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){d["[object "+e+"]"]=e.toLowerCase()}));var N=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,D=t.document,x=0,C=0,A=ut(),E=ut(),N=ut(),k=ut(),S=function(t,e){return t===e&&(d=!0),0},T={}.hasOwnProperty,F=[],_=F.pop,P=F.push,B=F.push,I=F.slice,O=function(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",$="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",j="\\[[\\x20\\t\\r\\n\\f]*("+$+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+$+"))|)"+M+"*\\]",R=":("+$+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+j+")*)|.*)\\)|)",H=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]*"),V=new RegExp(M+"|>"),W=new RegExp(R),G=new RegExp("^"+$+"$"),Y={ID:new RegExp("^#("+$+")"),CLASS:new RegExp("^\\.("+$+")"),TAG:new RegExp("^("+$+"|[*])"),ATTR:new RegExp("^"+j),PSEUDO:new RegExp("^"+R),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("^(?:"+L+")$","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{B.apply(F=I.call(D.childNodes),D.childNodes),F[D.childNodes.length].nodeType}catch(t){B={apply:F.length?function(t,e){P.apply(t,I.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,D=e?e.nodeType:9;if(r=r||[],"string"!=typeof t||!t||1!==D&&9!==D&&11!==D)return r;if(!i&&(h(e),e=e||f,m)){if(11!==D&&(d=Z.exec(t)))if(o=d[1]){if(9===D){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 B.apply(r,e.getElementsByTagName(t)),r;if((o=d[3])&&n.getElementsByClassName&&e.getElementsByClassName)return B.apply(r,e.getElementsByClassName(o)),r}if(n.qsa&&!k[t+" "]&&(!v||!v.test(t))&&(1!==D||"object"!==e.nodeName.toLowerCase())){if(g=t,y=e,1===D&&(V.test(t)||z.test(t))){for((y=tt.test(t)&&gt(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 B.apply(r,y.querySelectorAll(g)),r}catch(e){k(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:D;return s!=f&&9===s.nodeType&&s.documentElement?(p=(f=s).documentElement,m=!o(f),D!=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|"+L+")"),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("!=",R)})),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},S=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==D&&b(D,t)?-1:e==f||e.ownerDocument==D&&b(D,e)?1:c?O(c,t)-O(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?O(c,t)-O(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]==D?-1:a[r]==D?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&&!k[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){k(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&&T.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(S),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&&W.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=A[t+" "];return e||(e=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+t+"("+M+"|$)"))&&A(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(H," ")+" ").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]===x&&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]=[x,f,b];break}}else if(y&&(b=f=(l=(c=(d=(h=e)[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]||[])[0]===x&&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]=[x,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=O(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=C++;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=[x,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]===x&&l[1]===a)return h[2]=l[2];if(c[o]=h,h[2]=t(e,n,u))return!0}return!1}}function Dt(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 xt(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 Ct(t,e,n,r,i,o){return r&&!r[w]&&(r=Ct(r)),i&&!i[w]&&(i=Ct(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:xt(m,h,t,a,u),g=n?i||(o?t:p||r)?[]:s:v;if(n&&n(v,g,a,u),r)for(l=xt(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?O(o,d):h[c])>-1&&(o[l]=!(s[l]=d))}}else g=xt(g===s?g.splice(p,g.length):g),i?i(null,s,g,u):B.apply(s,g)}))}function At(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 O(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(Dt(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 Ct(u>1&&Dt(h),u>1&&bt(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace(U,"$1"),n,u<i&&At(t.slice(u,i)),i<o&&At(t=t.slice(i)),i<o&&bt(t))}h.push(n)}return Dt(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=E[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):E(t,u).slice(0)},a=at.compile=function(t,e){var n,i=[],o=[],a=N[t+" "];if(!a){for(e||(e=s(t)),n=e.length;n--;)(a=At(e[n]))[w]?i.push(a):o.push(a);a=N(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=[],D=l,C=o||i&&r.find.TAG("*",c),A=x+=null==D?1:Math.random()||.1,E=C.length;for(c&&(l=s==f||s||c);y!==E&&null!=(d=C[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&&(x=A)}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]=_.call(u));w=xt(w)}B.apply(u,w),c&&!o&&w.length>0&&g+e.length>1&&at.uniqueSort(u)}return c&&(x=A,l=D),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)&&gt(e.parentNode)||e))){if(u.splice(o,1),!(t=i.length&&bt(u)))return B.apply(n,i),n;break}}return(h||a(t,f))(i,e,!m,n,!e||tt.test(t)&&gt(e.parentNode)||e),n},n.sortStable=w.split("").sort(S).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(L,(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);A.find=N,(A.expr=N.selectors)[":"]=A.expr.pseudos,A.uniqueSort=A.unique=N.uniqueSort,A.text=N.getText,A.isXMLDoc=N.isXML,A.contains=N.contains,A.escapeSelector=N.escape;var k=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&A(t).is(n))break;r.push(t)}return r},S=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},T=A.expr.match.needsContext;function F(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var _=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function P(t,e,n){return g(e)?A.grep(t,(function(t,r){return!!e.call(t,r,t)!==n})):e.nodeType?A.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?A.grep(t,(function(t){return c.call(e,t)>-1!==n})):A.filter(e,t,n)}A.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?A.find.matchesSelector(r,t)?[r]:[]:A.find.matches(t,A.grep(e,(function(t){return 1===t.nodeType})))},A.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(A(t).filter((function(){for(e=0;e<r;e++)if(A.contains(i[e],this))return!0})));for(n=this.pushStack([]),e=0;e<r;e++)A.find(t,i[e],n);return r>1?A.uniqueSort(n):n},filter:function(t){return this.pushStack(P(this,t||[],!1))},not:function(t){return this.pushStack(P(this,t||[],!0))},is:function(t){return!!P(this,"string"==typeof t&&T.test(t)?A(t):t||[],!1).length}});var B,I=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(A.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||B,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:I.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 A?e[0]:e,A.merge(this,A.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:b,!0)),_.test(r[1])&&A.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(A):A.makeArray(t,this)}).prototype=A.fn,B=A(b);var O=/^(?:parents|prev(?:Until|All))/,L={children:!0,contents:!0,next:!0,prev:!0};function M(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}A.fn.extend({has:function(t){var e=A(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(A.contains(this,e[t]))return!0}))},closest:function(t,e){var n,r=0,i=this.length,o=[],s="string"!=typeof t&&A(t);if(!T.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&&A.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?A.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?c.call(A(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(A.uniqueSort(A.merge(this.get(),A(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),A.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return k(t,"parentNode")},parentsUntil:function(t,e,n){return k(t,"parentNode",n)},next:function(t){return M(t,"nextSibling")},prev:function(t){return M(t,"previousSibling")},nextAll:function(t){return k(t,"nextSibling")},prevAll:function(t){return k(t,"previousSibling")},nextUntil:function(t,e,n){return k(t,"nextSibling",n)},prevUntil:function(t,e,n){return k(t,"previousSibling",n)},siblings:function(t){return S((t.parentNode||{}).firstChild,t)},children:function(t){return S(t.firstChild)},contents:function(t){return null!=t.contentDocument&&s(t.contentDocument)?t.contentDocument:(F(t,"template")&&(t=t.content||t),A.merge([],t.childNodes))}},(function(t,e){A.fn[t]=function(n,r){var i=A.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=A.filter(r,i)),this.length>1&&(L[t]||A.uniqueSort(i),O.test(t)&&i.reverse()),this.pushStack(i)}}));var $=/[^\x20\t\r\n\f]+/g;function j(t){return t}function R(t){throw t}function H(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])}}A.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return A.each(t.match($)||[],(function(t,n){e[n]=!0})),e}(t):A.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){A.each(n,(function(n,r){g(r)?t.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==x(r)&&e(r)}))}(arguments),n&&!e&&u()),this},remove:function(){return A.each(arguments,(function(t,e){for(var n;(n=A.inArray(e,o,n))>-1;)o.splice(n,1),n<=a&&a--})),this},has:function(t){return t?A.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},A.extend({Deferred:function(t){var e=[["notify","progress",A.Callbacks("memory"),A.Callbacks("memory"),2],["resolve","done",A.Callbacks("once memory"),A.Callbacks("once memory"),0,"resolved"],["reject","fail",A.Callbacks("once memory"),A.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 A.Deferred((function(n){A.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,j,i),s(o,e,R,i)):(o++,l.call(r,s(o,e,j,i),s(o,e,R,i),s(o,e,j,e.notifyWith))):(n!==j&&(a=void 0,u=[r]),(i||e.resolveWith)(a,u))}},c=i?l:function(){try{l()}catch(r){A.Deferred.exceptionHook&&A.Deferred.exceptionHook(r,c.stackTrace),t+1>=o&&(n!==R&&(a=void 0,u=[r]),e.rejectWith(a,u))}};t?c():(A.Deferred.getStackHook&&(c.stackTrace=A.Deferred.getStackHook()),r.setTimeout(c))}}return A.Deferred((function(r){e[0][3].add(s(0,r,g(i)?i:j,r.notifyWith)),e[1][3].add(s(0,r,g(t)?t:j)),e[2][3].add(s(0,r,g(n)?n:R))})).promise()},promise:function(t){return null!=t?A.extend(t,i):i}},o={};return A.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=A.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&&(H(t,o.done(s(n)).resolve,o.reject,!e),"pending"===o.state()||g(i[n]&&i[n].then)))return o.then();for(;n--;)H(i[n],s(n),o.reject);return o.promise()}});var U=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;A.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)},A.readyException=function(t){r.setTimeout((function(){throw t}))};var q=A.Deferred();function z(){b.removeEventListener("DOMContentLoaded",z),r.removeEventListener("load",z),A.ready()}A.fn.ready=function(t){return q.then(t).catch((function(t){A.readyException(t)})),this},A.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--A.readyWait:A.isReady)||(A.isReady=!0,!0!==t&&--A.readyWait>0||q.resolveWith(b,[A]))}}),A.ready.then=q.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?r.setTimeout(A.ready):(b.addEventListener("DOMContentLoaded",z),r.addEventListener("load",z));var V=function t(e,n,r,i,o,s,a){var u=0,l=e.length,c=null==r;if("object"===x(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(A(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},W=/^-ms-/,G=/-([a-z])/g;function Y(t,e){return e.toUpperCase()}function K(t){return t.replace(W,"ms-").replace(G,Y)}var X=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function J(){this.expando=A.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($)||[]).length;for(;n--;)delete r[e[n]]}(void 0===e||A.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&&!A.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}A.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)}}),A.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)})):V(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)}))}}),A.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,A.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){var n=A.queue(t,e=e||"fx"),r=n.length,i=n.shift(),o=A._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,(function(){A.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:A.Callbacks("once memory").add((function(){Q.remove(t,[e+"queue",n])}))})}}),A.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?A.queue(this[0],t):void 0===e?this:this.each((function(){var n=A.queue(this,t,e);A._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&A.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){A.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,r=1,i=A.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 A.contains(t.ownerDocument,t)},ut={composed:!0};st.getRootNode&&(at=function(t){return A.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"===A.css(t,"display")};function ct(t,e,n,r){var i,o,s=20,a=r?function(){return r.cur()}:function(){return A.css(t,e,"")},u=a(),l=n&&n[3]||(A.cssNumber[e]?"":"px"),c=t.nodeType&&(A.cssNumber[e]||"px"!==l&&+u)&&it.exec(A.css(t,e));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;s--;)A.style(t,e,c+l),(1-o)*(1-(o=a()/u||.5))<=0&&(s=0),c/=o;A.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=A.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&&lt(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}A.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)?A(this).show():A(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&&F(t,e)?A.merge([t],n):n}function Dt(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 xt=/<|&#?\w+;/;function Ct(t,e,n,r,i){for(var o,s,a,u,l,c,d=e.createDocumentFragment(),h=[],f=0,p=t.length;f<p;f++)if((o=t[f])||0===o)if("object"===x(o))A.merge(h,o.nodeType?[o]:o);else if(xt.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]+A.htmlPrefilter(o)+u[2],c=u[0];c--;)s=s.lastChild;A.merge(h,s.childNodes),(s=d.firstChild).textContent=""}else h.push(e.createTextNode(o));for(d.textContent="",f=0;o=h[f++];)if(r&&A.inArray(o,r)>-1)i&&i.push(o);else if(l=at(o),s=wt(d.appendChild(o),"script"),l&&Dt(s),n)for(c=0;o=s[c++];)yt.test(o.type||"")&&n.push(o);return d}var At=/^([^.]*)(?:\.(.+)|)/;function Et(){return!0}function Nt(){return!1}function kt(t,e){return t===function(){try{return b.activeElement}catch(t){}}()==("focus"===e)}function St(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)St(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=Nt;else if(!i)return t;return 1===o&&(s=i,i=function(t){return A().off(t),s.apply(this,arguments)},i.guid=s.guid||(s.guid=A.guid++)),t.each((function(){A.event.add(this,e,i,r,n)}))}function Tt(t,e,n){n?(Q.set(t,e,!1),A.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)(A.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:A.event.trigger(A.extend(o[0],A.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===Q.get(t,e)&&A.event.add(t,e,Et)}A.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&&A.find.matchesSelector(st,i),n.guid||(n.guid=A.guid++),(u=v.events)||(u=v.events=Object.create(null)),(s=v.handle)||(s=v.handle=function(e){return A.event.triggered!==e.type?A.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match($)||[""]).length;l--;)f=m=(a=At.exec(e[l])||[])[1],p=(a[2]||"").split(".").sort(),f&&(d=A.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,d=A.event.special[f]||{},c=A.extend({type:f,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&A.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),A.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($)||[""]).length;l--;)if(f=m=(a=At.exec(e[l])||[])[1],p=(a[2]||"").split(".").sort(),f){for(d=A.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)||A.removeEvent(t,f,v.handle),delete u[f])}else for(f in u)A.event.remove(t,f+e[l],n,r,!0);A.isEmptyObject(u)&&Q.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,s,a=new Array(arguments.length),u=A.event.fix(t),l=(Q.get(this,"events")||Object.create(null))[u.type]||[],c=A.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=A.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=((A.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?A(i,this).index(l)>-1:A.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(A.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[A.expando]?t:new A.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return vt.test(e.type)&&e.click&&F(e,"input")&&Tt(e,"click",Et),!1},trigger:function(t){var e=this||t;return vt.test(e.type)&&e.click&&F(e,"input")&&Tt(e,"click"),!0},_default:function(t){var e=t.target;return vt.test(e.type)&&e.click&&F(e,"input")&&Q.get(e,"click")||F(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},A.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},(A.Event=function(t,e){if(!(this instanceof A.Event))return new A.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?Et:Nt,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&&A.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[A.expando]=!0}).prototype={constructor:A.Event,isDefaultPrevented:Nt,isPropagationStopped:Nt,isImmediatePropagationStopped:Nt,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=Et,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=Et,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=Et,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},A.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},A.event.addProp),A.each({focus:"focusin",blur:"focusout"},(function(t,e){A.event.special[t]={setup:function(){return Tt(this,t,kt),!1},trigger:function(){return Tt(this,t),!0},_default:function(e){return Q.get(e.target,t)},delegateType:e}})),A.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){A.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=this,i=t.relatedTarget,o=t.handleObj;return i&&(i===r||A.contains(r,i))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}})),A.fn.extend({on:function(t,e,n,r){return St(this,t,e,n,r)},one:function(t,e,n,r){return St(this,t,e,n,r,1)},off:function(t,e,n){var r,i;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,A(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=Nt),this.each((function(){A.event.remove(this,t,n,e)}))}});var Ft=/<script|<style|<link/i,_t=/checked\s*(?:[^=]|=\s*.checked.)/i,Pt=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Bt(t,e){return F(t,"table")&&F(11!==e.nodeType?e:e.firstChild,"tr")&&A(t).children("tbody")[0]||t}function It(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Ot(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Lt(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++)A.event.add(e,i,a[i][n]);Z.hasData(t)&&(o=Z.access(t),s=A.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 $t(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&&_t.test(p))return t.each((function(i){var o=t.eq(i);m&&(e[0]=p.call(this,i,o.html())),$t(o,e,n,r)}));if(h&&(o=(i=Ct(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=(s=A.map(wt(i,"script"),It)).length;d<h;d++)l=i,d!==f&&(l=A.clone(l,!0,!0),a&&A.merge(s,wt(l,"script"))),n.call(t[d],l,d);if(a)for(c=s[s.length-1].ownerDocument,A.map(s,Ot),d=0;d<a;d++)l=s[d],yt.test(l.type||"")&&!Q.access(l,"globalEval")&&A.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?A._evalUrl&&!l.noModule&&A._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},c):D(l.textContent.replace(Pt,""),l,c))}return t}function jt(t,e,n){for(var r,i=e?A.filter(e,t):t,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||A.cleanData(wt(r)),r.parentNode&&(n&&at(r)&&Dt(wt(r,"script")),r.parentNode.removeChild(r));return t}A.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||A.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++)Lt(o[r],s[r]);else Lt(t,a);return(s=wt(a,"script")).length>0&&Dt(s,!u&&wt(t,"script")),a},cleanData:function(t){for(var e,n,r,i=A.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]?A.event.remove(n,r):A.removeEvent(n,r,e.handle);n[Q.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),A.fn.extend({detach:function(t){return jt(this,t,!0)},remove:function(t){return jt(this,t)},text:function(t){return V(this,(function(t){return void 0===t?A.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 $t(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Bt(this,t).appendChild(t)}))},prepend:function(){return $t(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Bt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return $t(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return $t(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&&(A.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 A.clone(this,t,e)}))},html:function(t){return V(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&&!Ft.test(t)&&!bt[(gt.exec(t)||["",""])[1].toLowerCase()]){t=A.htmlPrefilter(t);try{for(;n<r;n++)1===(e=this[n]||{}).nodeType&&(A.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 $t(this,arguments,(function(e){var n=this.parentNode;A.inArray(this,t)<0&&(A.cleanData(wt(this)),n&&n.replaceChild(e,this))}),t)}}),A.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){A.fn[t]=function(t){for(var n,r=[],i=A(t),o=i.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),A(i[s])[e](n),l.apply(r,n.get());return this.pushStack(r)}}));var Rt=new RegExp("^("+rt+")(?!px)[a-z%]+$","i"),Ht=/^--/,Ut=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=r),e.getComputedStyle(t)},qt=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},zt=new RegExp(ot.join("|"),"i"),Vt=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g");function Wt(t,e,n){var r,i,o,s,a=Ht.test(e),u=t.style;return(n=n||Ut(t))&&(s=n.getPropertyValue(e)||n[e],a&&(s=s.replace(Vt,"$1")),""!==s||at(t)||(s=A.style(t,e)),!v.pixelBoxStyles()&&Rt.test(s)&&zt.test(e)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=s,s=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==s?s+"":s}function Gt(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,A.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 Yt=["Webkit","Moz","ms"],Kt=b.createElement("div").style,Xt={};function Jt(t){return A.cssProps[t]||Xt[t]||(t in Kt?t:Xt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Yt.length;n--;)if((t=Yt[n]+e)in Kt)return t}(t)||t)}var Qt=/^(none|table(?!-c[ea]).+)/,Zt={position:"absolute",visibility:"hidden",display:"block"},te={letterSpacing:"0",fontWeight:"400"};function ee(t,e,n){var r=it.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function ne(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+=A.css(t,n+ot[s],!0,i)),r?("content"===n&&(u-=A.css(t,"padding"+ot[s],!0,i)),"margin"!==n&&(u-=A.css(t,"border"+ot[s]+"Width",!0,i))):(u+=A.css(t,"padding"+ot[s],!0,i),"padding"!==n?u+=A.css(t,"border"+ot[s]+"Width",!0,i):a+=A.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 re(t,e,n){var r=Ut(t),i=(!v.boxSizingReliable()||n)&&"border-box"===A.css(t,"boxSizing",!1,r),o=i,s=Wt(t,e,r),a="offset"+e[0].toUpperCase()+e.slice(1);if(Rt.test(s)){if(!n)return s;s="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&F(t,"tr")||"auto"===s||!parseFloat(s)&&"inline"===A.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===A.css(t,"boxSizing",!1,r),(o=a in t)&&(s=t[a])),(s=parseFloat(s)||0)+ne(t,e,n||(i?"border":"content"),o,r,s)+"px"}function ie(t,e,n,r,i){return new ie.prototype.init(t,e,n,r,i)}A.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Wt(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=Ht.test(e),l=t.style;if(u||(e=Jt(a)),s=A.cssHooks[e]||A.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]||(A.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 Ht.test(e)||(e=Jt(a)),(s=A.cssHooks[e]||A.cssHooks[a])&&"get"in s&&(i=s.get(t,!0,n)),void 0===i&&(i=Wt(t,e,r)),"normal"===i&&e in te&&(i=te[e]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),A.each(["height","width"],(function(t,e){A.cssHooks[e]={get:function(t,n,r){if(n)return!Qt.test(A.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?re(t,e,r):qt(t,Zt,(function(){return re(t,e,r)}))},set:function(t,n,r){var i,o=Ut(t),s=!v.scrollboxSize()&&"absolute"===o.position,a=(s||r)&&"border-box"===A.css(t,"boxSizing",!1,o),u=r?ne(t,e,r,a,o):0;return a&&s&&(u-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-ne(t,e,"border",!1,o)-.5)),u&&(i=it.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=A.css(t,e)),ee(0,n,u)}}})),A.cssHooks.marginLeft=Gt(v.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Wt(t,"marginLeft"))||t.getBoundingClientRect().left-qt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),A.each({margin:"",padding:"",border:"Width"},(function(t,e){A.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&&(A.cssHooks[t+e].set=ee)})),A.fn.extend({css:function(t,e){return V(this,(function(t,e,n){var r,i,o={},s=0;if(Array.isArray(e)){for(r=Ut(t),i=e.length;s<i;s++)o[e[s]]=A.css(t,e[s],!1,r);return o}return void 0!==n?A.style(t,e,n):A.css(t,e)}),t,e,arguments.length>1)}}),A.Tween=ie,ie.prototype={constructor:ie,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||A.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(A.cssNumber[n]?"":"px")},cur:function(){var t=ie.propHooks[this.prop];return t&&t.get?t.get(this):ie.propHooks._default.get(this)},run:function(t){var e,n=ie.propHooks[this.prop];return this.options.duration?this.pos=e=A.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):ie.propHooks._default.set(this),this}},ie.prototype.init.prototype=ie.prototype,ie.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=A.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){A.fx.step[t.prop]?A.fx.step[t.prop](t):1!==t.elem.nodeType||!A.cssHooks[t.prop]&&null==t.elem.style[Jt(t.prop)]?t.elem[t.prop]=t.now:A.style(t.elem,t.prop,t.now+t.unit)}}},ie.propHooks.scrollTop=ie.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},A.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},(A.fx=ie.prototype.init).step={};var oe,se,ae=/^(?:toggle|show|hide)$/,ue=/queueHooks$/;function le(){se&&(!1===b.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(le):r.setTimeout(le,A.fx.interval),A.fx.tick())}function ce(){return r.setTimeout((function(){oe=void 0})),oe=Date.now()}function de(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 he(t,e,n){for(var r,i=(fe.tweeners[e]||[]).concat(fe.tweeners["*"]),o=0,s=i.length;o<s;o++)if(r=i[o].call(n,e,t))return r}function fe(t,e,n){var r,i,o=0,s=fe.prefilters.length,a=A.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var e=oe||ce(),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:A.extend({},e),opts:A.extend(!0,{specialEasing:{},easing:A.easing._default},n),originalProperties:e,originalOptions:n,startTime:oe||ce(),duration:n.duration,tweens:[],createTween:function(e,n){var r=A.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=A.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=fe.prefilters[o].call(l,t,c,l.opts))return g(r.stop)&&(A._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return A.map(c,he,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),A.fx.timer(A.extend(u,{elem:t,anim:l,queue:l.opts.queue})),l}A.Animation=A.extend(fe,{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($);for(var n,r=0,i=t.length;r<i;r++)n=t[r],fe.tweeners[n]=fe.tweeners[n]||[],fe.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&&lt(t),v=Q.get(t,"fxshow");for(r in n.queue||(null==(s=A._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--,A.queue(t,"fx").length||s.empty.fire()}))}))),e)if(i=e[r],ae.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]||A.style(t,r)}if((u=!A.isEmptyObject(e))||!A.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=A.css(t,"display"))&&(l?c=l:(ft([t],!0),l=t.style.display||l,c=A.css(t,"display"),ft([t]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===A.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)A.style(t,r,f[r])}))),u=he(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?fe.prefilters.unshift(t):fe.prefilters.push(t)}}),A.speed=function(t,e,n){var r=t&&"object"==typeof t?A.extend({},t):{complete:n||!n&&e||g(t)&&t,duration:t,easing:n&&e||e&&!g(e)&&e};return A.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in A.fx.speeds?r.duration=A.fx.speeds[r.duration]:r.duration=A.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&&A.dequeue(this,r.queue)},r},A.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=A.isEmptyObject(t),o=A.speed(e,n,r),s=function(){var e=fe(this,A.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=A.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&&ue.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||A.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=A.timers,s=r?r.length:0;for(n.finish=!0,A.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}))}}),A.each(["toggle","show","hide"],(function(t,e){var n=A.fn[e];A.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(de(e,!0),t,r,i)}})),A.each({slideDown:de("show"),slideUp:de("hide"),slideToggle:de("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){A.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}})),A.timers=[],A.fx.tick=function(){var t,e=0,n=A.timers;for(oe=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||A.fx.stop(),oe=void 0},A.fx.timer=function(t){A.timers.push(t),A.fx.start()},A.fx.interval=13,A.fx.start=function(){se||(se=!0,le())},A.fx.stop=function(){se=null},A.fx.speeds={slow:600,fast:200,_default:400},A.fn.delay=function(t,e){return t=A.fx&&A.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 pe,me=A.expr.attrHandle;A.fn.extend({attr:function(t,e){return V(this,A.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){A.removeAttr(this,t)}))}}),A.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?A.prop(t,e,n):(1===o&&A.isXMLDoc(t)||(i=A.attrHooks[e.toLowerCase()]||(A.expr.match.bool.test(e)?pe:void 0)),void 0!==n?null===n?void A.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=A.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!v.radioValue&&"radio"===e&&F(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match($);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),pe={set:function(t,e,n){return!1===e?A.removeAttr(t,n):t.setAttribute(n,n),n}},A.each(A.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=me[e]||A.find.attr;me[e]=function(t,e,r){var i,o,s=e.toLowerCase();return r||(o=me[s],me[s]=i,i=null!=n(t,e,r)?s:null,me[s]=o),i}}));var ve=/^(?:input|select|textarea|button)$/i,ge=/^(?:a|area)$/i;function ye(t){return(t.match($)||[]).join(" ")}function be(t){return t.getAttribute&&t.getAttribute("class")||""}function we(t){return Array.isArray(t)?t:"string"==typeof t&&t.match($)||[]}A.fn.extend({prop:function(t,e){return V(this,A.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[A.propFix[t]||t]}))}}),A.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&A.isXMLDoc(t)||(e=A.propFix[e]||e,i=A.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=A.find.attr(t,"tabindex");return e?parseInt(e,10):ve.test(t.nodeName)||ge.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(A.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)}}),A.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){A.propFix[this.toLowerCase()]=this})),A.fn.extend({addClass:function(t){var e,n,r,i,o,s;return g(t)?this.each((function(e){A(this).addClass(t.call(this,e,be(this)))})):(e=we(t)).length?this.each((function(){if(r=be(this),n=1===this.nodeType&&" "+ye(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");s=ye(n),r!==s&&this.setAttribute("class",s)}})):this},removeClass:function(t){var e,n,r,i,o,s;return g(t)?this.each((function(e){A(this).removeClass(t.call(this,e,be(this)))})):arguments.length?(e=we(t)).length?this.each((function(){if(r=be(this),n=1===this.nodeType&&" "+ye(r)+" "){for(o=0;o<e.length;o++)for(i=e[o];n.indexOf(" "+i+" ")>-1;)n=n.replace(" "+i+" "," ");s=ye(n),r!==s&&this.setAttribute("class",s)}})):this:this.attr("class","")},toggleClass:function(t,e){var n,r,i,o,s=typeof t,a="string"===s||Array.isArray(t);return g(t)?this.each((function(n){A(this).toggleClass(t.call(this,n,be(this),e),e)})):"boolean"==typeof e&&a?e?this.addClass(t):this.removeClass(t):(n=we(t),this.each((function(){if(a)for(o=A(this),i=0;i<n.length;i++)r=n[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==t&&"boolean"!==s||((r=be(this))&&Q.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":Q.get(this,"__className__")||""))})))},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+ye(be(n))+" ").indexOf(e)>-1)return!0;return!1}});var De=/\r/g;A.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,A(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=A.map(i,(function(t){return null==t?"":t+""}))),(e=A.valHooks[this.type]||A.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=A.valHooks[i.type]||A.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(De,""):null==n?"":n:void 0}}),A.extend({valHooks:{option:{get:function(t){var e=A.find.attr(t,"value");return null!=e?e:ye(A.text(t))}},select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,s="select-one"===t.type,a=s?null:[],u=s?o+1:i.length;for(r=o<0?u:s?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!F(n.parentNode,"optgroup"))){if(e=A(n).val(),s)return e;a.push(e)}return a},set:function(t,e){for(var n,r,i=t.options,o=A.makeArray(e),s=i.length;s--;)((r=i[s]).selected=A.inArray(A.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),A.each(["radio","checkbox"],(function(){A.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=A.inArray(A(t).val(),e)>-1}},v.checkOn||(A.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),v.focusin="onfocusin"in r;var xe=/^(?:focusinfocus|focusoutblur)$/,Ce=function(t){t.stopPropagation()};A.extend(A.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+A.event.triggered)&&(m.indexOf(".")>-1&&(v=m.split("."),m=v.shift(),v.sort()),l=m.indexOf(":")<0&&"on"+m,(t=t[A.expando]?t:new A.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]:A.makeArray(e,[t]),d=A.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),A.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Ce),n[m](),t.isPropagationStopped()&&h.removeEventListener(m,Ce),A.event.triggered=void 0,a&&(n[l]=a)),t.result}},simulate:function(t,e,n){var r=A.extend(new A.Event,n,{type:t,isSimulated:!0});A.event.trigger(r,null,e)}}),A.fn.extend({trigger:function(t,e){return this.each((function(){A.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return A.event.trigger(t,e,n,!0)}}),v.focusin||A.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){A.event.simulate(e,t.target,A.event.fix(t))};A.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 Ae=r.location,Ee={guid:Date.now()},Ne=/\?/;A.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||A.error("Invalid XML: "+(n?A.map(n.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var ke=/\[\]$/,Se=/\r?\n/g,Te=/^(?:submit|button|image|reset|file)$/i,Fe=/^(?:input|select|textarea|keygen)/i;function _e(t,e,n,r){var i;if(Array.isArray(e))A.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"!==x(e))r(t,e);else for(i in e)_e(t+"["+i+"]",e[i],n,r)}A.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&&!A.isPlainObject(t))A.each(t,(function(){i(this.name,this.value)}));else for(n in t)_e(n,t[n],e,i);return r.join("&")},A.fn.extend({serialize:function(){return A.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=A.prop(this,"elements");return t?A.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!A(this).is(":disabled")&&Fe.test(this.nodeName)&&!Te.test(t)&&(this.checked||!vt.test(t))})).map((function(t,e){var n=A(this).val();return null==n?null:Array.isArray(n)?A.map(n,(function(t){return{name:e.name,value:t.replace(Se,"\r\n")}})):{name:e.name,value:n.replace(Se,"\r\n")}})).get()}});var Pe=/%20/g,Be=/#.*$/,Ie=/([?&])_=[^&]*/,Oe=/^(.*?):[ \t]*([^\r\n]*)$/gm,Le=/^(?:GET|HEAD)$/,Me=/^\/\//,$e={},je={},Re="*/".concat("*"),He=b.createElement("a");function Ue(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match($)||[];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 qe(t,e,n,r){var i={},o=t===je;function s(a){var u;return i[a]=!0,A.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 ze(t,e){var n,r,i=A.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&A.extend(!0,t,r),t}He.href=Ae.href,A.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ae.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ae.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Re,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":A.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?ze(ze(t,A.ajaxSettings),e):ze(A.ajaxSettings,t)},ajaxPrefilter:Ue($e),ajaxTransport:Ue(je),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0);var n,i,o,s,a,u,l,c,d,h,f=A.ajaxSetup({},e=e||{}),p=f.context||f,m=f.context&&(p.nodeType||p.jquery)?A(p):A.event,v=A.Deferred(),g=A.Callbacks("once memory"),y=f.statusCode||{},w={},D={},x="canceled",C={readyState:0,getResponseHeader:function(t){var e;if(l){if(!s)for(s={};e=Oe.exec(o);)s[e[1].toLowerCase()+" "]=(s[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=s[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(t,e){return null==l&&(t=D[t.toLowerCase()]=D[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==l&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(l)C.always(t[C.status]);else for(e in t)y[e]=[y[e],t[e]];return this},abort:function(t){var e=t||x;return n&&n.abort(e),E(0,e),this}};if(v.promise(C),f.url=((t||f.url||Ae.href)+"").replace(Me,Ae.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match($)||[""],null==f.crossDomain){u=b.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=He.protocol+"//"+He.host!=u.protocol+"//"+u.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=A.param(f.data,f.traditional)),qe($e,f,e,C),l)return C;for(d in(c=A.event&&f.global)&&0==A.active++&&A.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Le.test(f.type),i=f.url.replace(Be,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Pe,"+")):(h=f.url.slice(i.length),f.data&&(f.processData||"string"==typeof f.data)&&(i+=(Ne.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(i=i.replace(Ie,"$1"),h=(Ne.test(i)?"&":"?")+"_="+Ee.guid+++h),f.url=i+h),f.ifModified&&(A.lastModified[i]&&C.setRequestHeader("If-Modified-Since",A.lastModified[i]),A.etag[i]&&C.setRequestHeader("If-None-Match",A.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&C.setRequestHeader("Content-Type",f.contentType),C.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Re+"; q=0.01":""):f.accepts["*"]),f.headers)C.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(p,C,f)||l))return C.abort();if(x="abort",g.add(f.complete),C.done(f.success),C.fail(f.error),n=qe(je,f,e,C)){if(C.readyState=1,c&&m.trigger("ajaxSend",[C,f]),l)return C;f.async&&f.timeout>0&&(a=r.setTimeout((function(){C.abort("timeout")}),f.timeout));try{l=!1,n.send(w,E)}catch(t){if(l)throw t;E(-1,t)}}else E(-1,"No Transport");function E(t,e,s,u){var d,h,b,w,D,x=e;l||(l=!0,a&&r.clearTimeout(a),n=void 0,o=u||"",C.readyState=t>0?4:0,d=t>=200&&t<300||304===t,s&&(w=function(t,e,n){for(var r,i,o,s,a=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||t.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}if(o)return o!==u[0]&&u.unshift(o),n[o]}(f,C,s)),!d&&A.inArray("script",f.dataTypes)>-1&&A.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),w=function(t,e,n,r){var i,o,s,a,u,l={},c=t.dataTypes.slice();if(c[1])for(s in t.converters)l[s.toLowerCase()]=t.converters[s];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(s=l[u+" "+o]||l["* "+o]))for(i in l)if((a=i.split(" "))[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){!0===s?s=l[i]:!0!==l[i]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}(f,w,C,d),d?(f.ifModified&&((D=C.getResponseHeader("Last-Modified"))&&(A.lastModified[i]=D),(D=C.getResponseHeader("etag"))&&(A.etag[i]=D)),204===t||"HEAD"===f.type?x="nocontent":304===t?x="notmodified":(x=w.state,h=w.data,d=!(b=w.error))):(b=x,!t&&x||(x="error",t<0&&(t=0))),C.status=t,C.statusText=(e||x)+"",d?v.resolveWith(p,[h,x,C]):v.rejectWith(p,[C,x,b]),C.statusCode(y),y=void 0,c&&m.trigger(d?"ajaxSuccess":"ajaxError",[C,f,d?h:b]),g.fireWith(p,[C,x]),c&&(m.trigger("ajaxComplete",[C,f]),--A.active||A.event.trigger("ajaxStop")))}return C},getJSON:function(t,e,n){return A.get(t,e,n,"json")},getScript:function(t,e){return A.get(t,void 0,e,"script")}}),A.each(["get","post"],(function(t,e){A[e]=function(t,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),A.ajax(A.extend({url:t,type:e,dataType:i,data:n,success:r},A.isPlainObject(t)&&t))}})),A.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),A._evalUrl=function(t,e,n){return A.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){A.globalEval(t,e,n)}})},A.fn.extend({wrapAll:function(t){var e;return this[0]&&(g(t)&&(t=t.call(this[0])),e=A(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){A(this).wrapInner(t.call(this,e))})):this.each((function(){var e=A(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=g(t);return this.each((function(n){A(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){A(this).replaceWith(this.childNodes)})),this}}),A.expr.pseudos.hidden=function(t){return!A.expr.pseudos.visible(t)},A.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},A.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(t){}};var Ve={0:200,1223:204},We=A.ajaxSettings.xhr();v.cors=!!We&&"withCredentials"in We,v.ajax=We=!!We,A.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(Ve[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()}}})),A.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),A.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 A.globalEval(t),t}}}),A.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),A.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,i){e=A("<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 Ge,Ye=[],Ke=/(=)\?(?=&|$)|\?\?/;A.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ye.pop()||A.expando+"_"+Ee.guid++;return this[t]=!0,t}}),A.ajaxPrefilter("json jsonp",(function(t,e,n){var i,o,s,a=!1!==t.jsonp&&(Ke.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ke.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(Ke,"$1"+i):!1!==t.jsonp&&(t.url+=(Ne.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return s||A.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?A(r).removeProp(i):r[i]=o,t[i]&&(t.jsonpCallback=e.jsonpCallback,Ye.push(i)),s&&g(o)&&o(s[0]),s=o=void 0})),"script"})),v.createHTMLDocument=((Ge=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ge.childNodes.length),A.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=_.exec(t))?[e.createElement(i[1])]:(i=Ct([t],e,o),o&&o.length&&A(o).remove(),A.merge([],i.childNodes)));var r,i,o},A.fn.load=function(t,e,n){var r,i,o,s=this,a=t.indexOf(" ");return a>-1&&(r=ye(t.slice(a)),t=t.slice(0,a)),g(e)?(n=e,e=void 0):e&&"object"==typeof e&&(i="POST"),s.length>0&&A.ajax({url:t,type:i||"GET",dataType:"html",data:e}).done((function(t){o=arguments,s.html(r?A("<div>").append(A.parseHTML(t)).find(r):t)})).always(n&&function(t,e){s.each((function(){n.apply(this,o||[t.responseText,e,t])}))}),this},A.expr.pseudos.animated=function(t){return A.grep(A.timers,(function(e){return t===e.elem})).length},A.offset={setOffset:function(t,e,n){var r,i,o,s,a,u,l=A.css(t,"position"),c=A(t),d={};"static"===l&&(t.style.position="relative"),a=c.offset(),o=A.css(t,"top"),u=A.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,A.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)}},A.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){A.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"===A.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"===A.css(t,"position");)t=t.parentNode;t&&t!==r&&1===t.nodeType&&((i=A(t).offset()).top+=A.css(t,"borderTopWidth",!0),i.left+=A.css(t,"borderLeftWidth",!0))}return{top:e.top-i.top-A.css(r,"marginTop",!0),left:e.left-i.left-A.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===A.css(t,"position");)t=t.offsetParent;return t||st}))}}),A.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;A.fn[t]=function(r){return V(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)}})),A.each(["top","left"],(function(t,e){A.cssHooks[e]=Gt(v.pixelPosition,(function(t,n){if(n)return n=Wt(t,e),Rt.test(n)?A(t).position()[e]+"px":n}))})),A.each({Height:"height",Width:"width"},(function(t,e){A.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,r){A.fn[r]=function(i,o){var s=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===o?"margin":"border");return V(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?A.css(e,n,a):A.style(e,n,i,a)}),e,s?i:void 0,s)}}))})),A.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){A.fn[e]=function(t){return this.on(e,t)}})),A.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)}}),A.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){A.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var Xe=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;A.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||A.guid++,i},A.holdReady=function(t){t?A.readyWait++:A.ready(!0)},A.isArray=Array.isArray,A.parseJSON=JSON.parse,A.nodeName=F,A.isFunction=g,A.isWindow=y,A.camelCase=K,A.type=x,A.now=Date.now,A.isNumeric=function(t){var e=A.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},A.trim=function(t){return null==t?"":(t+"").replace(Xe,"$1")},void 0===(n=function(){return A}.apply(e,[]))||(t.exports=n);var Je=r.jQuery,Qe=r.$;return A.noConflict=function(t){return r.$===A&&(r.$=Qe),t&&r.jQuery===A&&(r.jQuery=Je),A},void 0===i&&(r.jQuery=r.$=A),A}))},542:(t,e,n)=>{"use strict";var r=n(1642);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}}},3600:(t,e,n)=>{"use strict";var r=n(1642),i=n(5334),o=n(187),s=n(3690),a=n(1490),u=n(5211),l=n(6797),c={};t.exports=function(t,e){var n;function d(e,r,i){if(e=s(e,r),null!=n){n();var o=i?i.state:null,a=i?i.title:null;i&&i.replace?t.history.replaceState(o,a,y.prefix+e):t.history.pushState(o,a,y.prefix+e)}else t.location.href=y.prefix+e}var h,f,p,m,v=c,g=y.SKIP={};function y(i,s,b){if(null==i)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");var w,D=0,x=Object.keys(b).map((function(t){if("/"!==t[0])throw new SyntaxError("Routes must start with a `/`");if(/:([^\/\.-]+)(\.{3})?:/.test(t))throw new SyntaxError("Route parameter names must be separated with either `/`, `.`, or `-`");return{route:t,component:b[t],check:u(t)}})),C="function"==typeof setImmediate?setImmediate:setTimeout,A=o.resolve(),E=!1;if(n=null,null!=s){var N=a(s);if(!x.some((function(t){return t.check(N)})))throw new ReferenceError("Default route doesn't match any known routes")}function k(){E=!1;var n=t.location.hash;"#"!==y.prefix[0]&&(n=t.location.search+n,"?"!==y.prefix[0]&&"/"!==(n=t.location.pathname+n)[0]&&(n="/"+n));var r=n.concat().replace(/(?:%[a-f89][a-f0-9])+/gim,decodeURIComponent).slice(y.prefix.length),i=a(r);function o(){if(r===s)throw new Error("Could not resolve default route "+s);d(s,null,{replace:!0})}l(i.params,t.history.state),function t(n){for(;n<x.length;n++)if(x[n].check(i)){var s=x[n].component,a=x[n].route,u=s,l=m=function(o){if(l===m){if(o===g)return t(n+1);h=null==o||"function"!=typeof o.view&&"function"!=typeof o?"div":o,f=i.params,p=r,m=null,v=s.render?s:null,2===D?e.redraw():(D=2,e.redraw.sync())}};return void(s.view||"function"==typeof s?(s={},l(u)):s.onmatch?A.then((function(){return s.onmatch(i.params,r,a)})).then(l,o):l("div"))}o()}(0)}return n=function(){E||(E=!0,C(k))},"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",k,!1)},t.addEventListener("hashchange",k,!1)),e.mount(i,{onbeforeupdate:function(){return!(!(D=D?2:1)||c===v)},oncreate:k,onremove:w,view:function(){if(D&&c!==v){var t=[r(h,f.key,f)];return v&&(t=v.render(t[0])),t}}})}return y.set=function(t,e,n){null!=m&&((n=n||{}).replace=!0),m=null,d(t,e,n)},y.get=function(){return p},y.prefix="#!",y.Link={view:function(t){var e,n,r=t.attrs.options,o={};l(o,t.attrs),o.selector=o.options=o.key=o.oninit=o.oncreate=o.onbeforeupdate=o.onupdate=o.onbeforeremove=o.onremove=null;var s=i(t.attrs.selector||"a",o,t.children);return(s.attrs.disabled=Boolean(s.attrs.disabled))?(s.attrs.href=null,s.attrs["aria-disabled"]="true",s.attrs.onclick=null):(e=s.attrs.onclick,n=s.attrs.href,s.attrs.href=y.prefix+n,s.attrs.onclick=function(t){var i;"function"==typeof e?i=e.call(t.currentTarget,t):null==e||"object"!=typeof e||"function"==typeof e.handleEvent&&e.handleEvent(t),!1===i||t.defaultPrevented||0!==t.button&&0!==t.which&&1!==t.which||t.currentTarget.target&&"_self"!==t.currentTarget.target||t.ctrlKey||t.metaKey||t.shiftKey||t.altKey||(t.preventDefault(),t.redraw=!1,y.set(n,null,r))}),s}},y.param=function(t){return f&&null!=t?f[t]:f},y}},589:(t,e,n)=>{"use strict";var r=n(5334);r.trust=n(4031),r.fragment=n(2505),t.exports=r},7945:(t,e,n)=>{"use strict";var r=n(589),i=n(8450),o=n(570),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(2092),s.render=n(2031),s.redraw=o.redraw,s.request=i.request,s.jsonp=i.jsonp,s.parseQueryString=n(5784),s.buildQueryString=n(7477),s.parsePathname=n(1490),s.buildPathname=n(3690),s.vnode=n(1642),s.PromisePolyfill=n(7068),t.exports=s},570:(t,e,n)=>{"use strict";var r=n(2031);t.exports=n(542)(r,requestAnimationFrame,console)},6797:t=>{"use strict";t.exports=Object.assign||function(t,e){e&&Object.keys(e).forEach((function(n){t[n]=e[n]}))}},3690:(t,e,n)=>{"use strict";var r=n(7477),i=n(6797);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}},5211:(t,e,n)=>{"use strict";var r=n(1490);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}}},1490:(t,e,n)=>{"use strict";var r=n(5784);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))}}},7068: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},187:(t,e,n)=>{"use strict";var r=n(7068);"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},7477: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):""))}}},5784: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}},2031:(t,e,n)=>{"use strict";t.exports=n(4615)(window)},2505:(t,e,n)=>{"use strict";var r=n(1642),i=n(8239);t.exports=function(){var t=i.apply(0,arguments);return t.tag="[",t.children=r.normalizeChildren(t.children),t}},5334:(t,e,n)=>{"use strict";var r=n(1642),i=n(8239),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)}},8239:(t,e,n)=>{"use strict";var r=n(1642);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)}},4615:(t,e,n)=>{"use strict";var r=n(1642);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)k(t,r,null,e[r],n)}(e,c,s),w(t,h,a),!D(e)&&(null!=e.text&&(""!==e.text?h.textContent=e.text:e.children=[r("#",void 0,void 0,e.text,void 0,void 0)]),null!=e.children)){var f=e.children;l(h,f,0,f.length,i,null,s),"select"===e.tag&&null!=c&&function(t,e){if("value"in e)if(null===e.value)-1!==t.dom.selectedIndex&&(t.dom.value=null);else{var n=""+e.value;t.dom.value===n&&-1!==t.dom.selectedIndex||(t.dom.value=n)}"selectedIndex"in e&&k(t,"selectedIndex",null,e.selectedIndex,void 0)}(e,c)}}(t,e,i,s,u)}else!function(t,e,n,i,o){(function(t,e){var n;if("function"==typeof t.tag.view){if(t.state=Object.create(t.tag),null!=(n=t.state.view).$$reentrantLock$$)return;n.$$reentrantLock$$=!0}else{if(t.state=void 0,null!=(n=t.tag).$$reentrantLock$$)return;n.$$reentrantLock$$=!0,t.state=null!=t.tag.prototype&&"function"==typeof t.tag.prototype.view?new t.tag(t):t.tag(t)}if(M(t.state,t,e),null!=t.attrs&&M(t.attrs,t,e),t.instance=r.normalize(a.call(t.state.view,t)),t.instance===t)throw Error("A view cannot return the vnode it received as argument");n.$$reentrantLock$$=null})(e,n),null!=e.instance?(c(t,e.instance,n,i,o),e.dom=e.instance.dom,e.domSize=null!=e.dom?e.instance.domSize:0):e.domSize=0}(t,e,i,s,u)}var d={caption:"table",thead:"table",tbody:"table",tfoot:"table",tr:"tbody",th:"tr",td:"tr",colgroup:"table",col:"colgroup"};function h(t,e,r,i){var o=e.children.match(/^\s*?<(\w+)/im)||[],s=n.createElement(d[o[1]]||"div");"http://www.w3.org/2000/svg"===r?(s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+e.children+"</svg>",s=s.firstChild):s.innerHTML=e.children,e.dom=s.firstChild,e.domSize=s.childNodes.length,e.instance=[];for(var a,u=n.createDocumentFragment();a=s.firstChild;)e.instance.push(a),u.appendChild(a);w(t,u,i)}function f(t,e,n,r,i,o){if(e!==n&&(null!=e||null!=n))if(null==e||0===e.length)l(t,n,0,n.length,r,i,o);else if(null==n||0===n.length)x(t,e,0,e.length);else{var s=null!=e[0]&&null!=e[0].key,a=null!=n[0]&&null!=n[0].key,u=0,d=0;if(!s)for(;d<e.length&&null==e[d];)d++;if(!a)for(;u<n.length&&null==n[u];)u++;if(null===a&&null==s)return;if(s!==a)x(t,e,d,e.length),l(t,n,u,n.length,r,i,o);else if(a){for(var h,f,b,w,D,A=e.length-1,E=n.length-1;A>=d&&E>=u&&(b=e[A],w=n[E],b.key===w.key);)b!==w&&p(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),A--,E--;for(;A>=d&&E>=u&&(h=e[d],f=n[u],h.key===f.key);)d++,u++,h!==f&&p(t,h,f,r,g(e,d,i),o);for(;A>=d&&E>=u&&u!==E&&h.key===w.key&&b.key===f.key;)y(t,b,D=g(e,d,i)),b!==f&&p(t,b,f,r,D,o),++u<=--E&&y(t,h,i),h!==w&&p(t,h,w,r,i,o),null!=w.dom&&(i=w.dom),d++,b=e[--A],w=n[E],h=e[d],f=n[u];for(;A>=d&&E>=u&&b.key===w.key;)b!==w&&p(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),E--,b=e[--A],w=n[E];if(u>E)x(t,e,d,A+1);else if(d>A)l(t,n,u,E+1,r,i,o);else{var N,k,S=i,T=E-u+1,F=new Array(T),_=0,P=0,B=2147483647,I=0;for(P=0;P<T;P++)F[P]=-1;for(P=E;P>=u;P--){null==N&&(N=m(e,d,A+1));var O=N[(w=n[P]).key];null!=O&&(B=O<B?O:-1,F[P-u]=O,b=e[O],e[O]=null,b!==w&&p(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),I++)}if(i=S,I!==A-d+1&&x(t,e,d,A+1),0===I)l(t,n,u,E+1,r,i,o);else if(-1===B)for(k=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}(F),_=k.length-1,P=E;P>=u;P--)f=n[P],-1===F[P-u]?c(t,f,r,o,i):k[_]===P-u?_--:y(t,f,i),null!=f.dom&&(i=n[P].dom);else for(P=E;P>=u;P--)f=n[P],-1===F[P-u]&&c(t,f,r,o,i),null!=f.dom&&(i=n[P].dom)}}else{var L=e.length<n.length?e.length:n.length;for(u=u<d?u:d;u<L;u++)(h=e[u])===(f=n[u])||null==h&&null==f||(null==h?c(t,f,r,o,g(e,u+1,i)):null==f?C(t,h):p(t,h,f,r,g(e,u+1,i),o));e.length>L&&x(t,e,u,e.length),n.length>L&&l(t,n,u,n.length,r,i,o)}}}function p(t,e,n,i,s,u){var l=e.tag;if(l===n.tag){if(n.state=e.state,n.events=e.events,function(t,e){do{var n;if(null!=t.attrs&&"function"==typeof t.attrs.onbeforeupdate&&void 0!==(n=a.call(t.attrs.onbeforeupdate,t,e))&&!n)break;if("string"!=typeof t.tag&&"function"==typeof t.state.onbeforeupdate&&void 0!==(n=a.call(t.state.onbeforeupdate,t,e))&&!n)break;return!1}while(0);return t.dom=e.dom,t.domSize=e.domSize,t.instance=e.instance,t.attrs=e.attrs,t.children=e.children,t.text=e.text,!0}(n,e))return;if("string"==typeof l)switch(null!=n.attrs&&$(n.attrs,n,i),l){case"#":!function(t,e){t.children.toString()!==e.children.toString()&&(t.dom.nodeValue=e.children),e.dom=t.dom}(e,n);break;case"<":!function(t,e,n,r,i){e.children!==n.children?(A(t,e),h(t,n,r,i)):(n.dom=e.dom,n.domSize=e.domSize,n.instance=e.instance)}(t,e,n,u,s);break;case"[":!function(t,e,n,r,i,o){f(t,e.children,n.children,r,i,o);var s=0,a=n.children;if(n.dom=null,null!=a){for(var u=0;u<a.length;u++){var l=a[u];null!=l&&null!=l.dom&&(null==n.dom&&(n.dom=l.dom),s+=l.domSize||1)}1!==s&&(n.domSize=s)}}(t,e,n,i,s,u);break;default:!function(t,e,n,i){var s=e.dom=t.dom;i=o(e)||i,"textarea"===e.tag&&(null==e.attrs&&(e.attrs={}),null!=e.text&&(e.attrs.value=e.text,e.text=void 0)),function(t,e,n,r){if(null!=n)for(var i in n)k(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]||S(t,i,o,r)}(e,t.attrs,e.attrs,i),D(e)||(null!=t.text&&null!=e.text&&""!==e.text?t.text.toString()!==e.text.toString()&&(t.dom.firstChild.nodeValue=e.text):(null!=t.text&&(t.children=[r("#",void 0,void 0,t.text,void 0,t.dom.firstChild)]),null!=e.text&&(e.children=[r("#",void 0,void 0,e.text,void 0,void 0)]),f(s,t.children,e.children,n,null,i)))}(e,n,i,u)}else!function(t,e,n,i,o,s){if(n.instance=r.normalize(a.call(n.state.view,n)),n.instance===n)throw Error("A view cannot return the vnode it received as argument");$(n.state,n,i),null!=n.attrs&&$(n.attrs,n,i),null!=n.instance?(null==e.instance?c(t,n.instance,i,s,o):p(t,e.instance,n.instance,i,o,s),n.dom=n.instance.dom,n.domSize=n.instance.domSize):null!=e.instance?(C(t,e.instance),n.dom=void 0,n.domSize=0):(n.dom=e.dom,n.domSize=e.domSize)}(t,e,n,i,s,u)}else C(t,e),c(t,n,i,u,s)}function m(t,e,n){for(var r=Object.create(null);e<n;e++){var i=t[e];if(null!=i){var o=i.key;null!=o&&(r[o]=e)}}return r}var v=[];function g(t,e,n){for(;e<t.length;e++)if(null!=t[e]&&null!=t[e].dom)return t[e].dom;return n}function y(t,e,r){var i=n.createDocumentFragment();b(t,i,e),w(t,i,r)}function b(t,e,n){for(;null!=n.dom&&n.dom.parentNode===t;){if("string"!=typeof n.tag){if(null!=(n=n.instance))continue}else if("<"===n.tag)for(var r=0;r<n.instance.length;r++)e.appendChild(n.instance[r]);else if("["!==n.tag)e.appendChild(n.dom);else if(1===n.children.length){if(null!=(n=n.children[0]))continue}else for(r=0;r<n.children.length;r++){var i=n.children[r];null!=i&&b(t,e,i)}break}}function w(t,e,n){null!=n?t.insertBefore(e,n):t.appendChild(e)}function D(t){if(null==t.attrs||null==t.attrs.contenteditable&&null==t.attrs.contentEditable)return!1;var e=t.children;if(null!=e&&1===e.length&&"<"===e[0].tag){var n=e[0].children;t.dom.innerHTML!==n&&(t.dom.innerHTML=n)}else if(null!=t.text||null!=e&&0!==e.length)throw new Error("Child node of a contenteditable must be trusted");return!0}function x(t,e,n,r){for(var i=n;i<r;i++){var o=e[i];null!=o&&C(t,o)}}function C(t,e){var n,r,i,o=0,u=e.state;if("string"!=typeof e.tag&&"function"==typeof e.state.onbeforeremove&&null!=(i=a.call(e.state.onbeforeremove,e))&&"function"==typeof i.then&&(o=1,n=i),e.attrs&&"function"==typeof e.attrs.onbeforeremove&&null!=(i=a.call(e.attrs.onbeforeremove,e))&&"function"==typeof i.then&&(o|=2,r=i),s(e,u),o){if(null!=n){var l=function(){1&o&&((o&=2)||c())};n.then(l,l)}null!=r&&(l=function(){2&o&&((o&=1)||c())},r.then(l,l))}else N(e),E(t,e);function c(){s(e,u),N(e),E(t,e)}}function A(t,e){for(var n=0;n<e.instance.length;n++)t.removeChild(e.instance[n])}function E(t,e){for(;null!=e.dom&&e.dom.parentNode===t;){if("string"!=typeof e.tag){if(null!=(e=e.instance))continue}else if("<"===e.tag)A(t,e);else{if("["!==e.tag&&(t.removeChild(e.dom),!Array.isArray(e.children)))break;if(1===e.children.length){if(null!=(e=e.children[0]))continue}else for(var n=0;n<e.children.length;n++){var r=e.children[n];null!=r&&E(t,r)}}break}}function N(t){if("string"!=typeof t.tag&&"function"==typeof t.state.onremove&&a.call(t.state.onremove,t),t.attrs&&"function"==typeof t.attrs.onremove&&a.call(t.attrs.onremove,t),"string"!=typeof t.tag)null!=t.instance&&N(t.instance);else{var e=t.children;if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];null!=r&&N(r)}}}function k(t,e,r,i,o){if("key"!==e&&"is"!==e&&null!=i&&!T(e)&&(r!==i||function(t,e){return"value"===e||"checked"===e||"selectedIndex"===e||"selected"===e&&t.dom===u()||"option"===t.tag&&t.dom.parentNode===n.activeElement}(t,e)||"object"==typeof i)){if("o"===e[0]&&"n"===e[1])return L(t,e,i);if("xlink:"===e.slice(0,6))t.dom.setAttributeNS("http://www.w3.org/1999/xlink",e.slice(6),i);else if("style"===e)I(t.dom,r,i);else if(F(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 S(t,e,n,r){if("key"!==e&&"is"!==e&&null!=n&&!T(e))if("o"!==e[0]||"n"!==e[1]||T(e))if("style"===e)I(t.dom,n,null);else if(!F(t,e,r)||"className"===e||"value"===e&&("option"===t.tag||"select"===t.tag&&-1===t.dom.selectedIndex&&t.dom===u())||"input"===t.tag&&"type"===e){var i=e.indexOf(":");-1!==i&&(e=e.slice(i+1)),!1!==n&&t.dom.removeAttribute("className"===e?"class":e)}else t.dom[e]=null;else L(t,e,void 0)}function T(t){return"oninit"===t||"oncreate"===t||"onupdate"===t||"onremove"===t||"onbeforeremove"===t||"onbeforeupdate"===t}function F(t,e,n){return void 0===n&&(t.tag.indexOf("-")>-1||null!=t.attrs&&t.attrs.is||"href"!==e&&"list"!==e&&"form"!==e&&"width"!==e&&"height"!==e)&&e in t.dom}var _=/[A-Z]/g;function P(t){return"-"+t.toLowerCase()}function B(t){return"-"===t[0]&&"-"===t[1]?t:"cssFloat"===t?"float":t.replace(_,P)}function I(t,e,n){if(e===n);else if(null==n)t.style.cssText="";else if("object"!=typeof n)t.style.cssText=n;else if(null==e||"object"!=typeof e)for(var r in t.style.cssText="",n)null!=(i=n[r])&&t.style.setProperty(B(r),String(i));else{for(var r in n){var i;null!=(i=n[r])&&(i=String(i))!==String(e[r])&&t.style.setProperty(B(r),i)}for(var r in e)null!=e[r]&&null==n[r]&&t.style.removeProperty(B(r))}}function O(){this._=e}function L(t,e,n){if(null!=t.events){if(t.events[e]===n)return;null==n||"function"!=typeof n&&"object"!=typeof n?(null!=t.events[e]&&t.dom.removeEventListener(e.slice(2),t.events,!1),t.events[e]=void 0):(null==t.events[e]&&t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}else null==n||"function"!=typeof n&&"object"!=typeof n||(t.events=new O,t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}function M(t,e,n){"function"==typeof t.oninit&&a.call(t.oninit,e),"function"==typeof t.oncreate&&n.push(a.bind(t.oncreate,e))}function $(t,e,n){"function"==typeof t.onupdate&&n.push(a.bind(t.onupdate,e))}return O.prototype=Object.create(null),O.prototype.handleEvent=function(t){var e,n=this["on"+t.type];"function"==typeof n?e=n.call(t.currentTarget,t):"function"==typeof n.handleEvent&&n.handleEvent(t),this._&&!1!==t.redraw&&(0,this._)(),!1===e&&(t.preventDefault(),t.stopPropagation())},function(t,n,i){if(!t)throw new TypeError("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var o=[],s=u(),a=t.namespaceURI;null==t.vnodes&&(t.textContent=""),n=r.normalizeChildren(Array.isArray(n)?n:[n]);var l=e;try{e="function"==typeof i?i:void 0,f(t,t.vnodes,n,o,null,"http://www.w3.org/1999/xhtml"===a?void 0:a)}finally{e=l}t.vnodes=n,null!=s&&u()!==s&&"function"==typeof s.focus&&s.focus();for(var c=0;c<o.length;c++)o[c]()}}},4031:(t,e,n)=>{"use strict";var r=n(1642);t.exports=function(t){return null==t&&(t=""),r("<",void 0,void 0,t,void 0,void 0)}},1642: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},8450:(t,e,n)=>{"use strict";var r=n(187),i=n(570);t.exports=n(1950)(window,r,i.redraw)},1950:(t,e,n)=>{"use strict";var r=n(3690);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)}))}}},2092:(t,e,n)=>{"use strict";var r=n(570);t.exports=n(3600)(window,r)},30:(t,e,n)=>{"use strict";t.exports=n(6807)},6807: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}()},619:(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,{decode:()=>b,default:()=>C,encode:()=>w,toASCII:()=>x,toUnicode:()=>D,ucs2decode:()=>m,ucs2encode:()=>v});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 D=n.length+1;u=y(i-p,D,0==p),d(i/D)>o-a&&f("overflow"),a+=d(i/D),i%=D,n.splice(i++,0,a)}return String.fromCodePoint.apply(String,n)},w=function(t){for(var e,n=[],i=(t=m(t)).length,a=128,u=0,l=72,c=r(t);!(e=c()).done;){var p=e.value;p<128&&n.push(h(p))}var v=n.length,b=v;for(v&&n.push("-");b<i;){for(var w,D=o,x=r(t);!(w=x()).done;){var C=w.value;C>=a&&C<D&&(D=C)}var A=b+1;D-a>d((o-u)/A)&&f("overflow"),u+=(D-a)*A,a=D;for(var E,N=r(t);!(E=N()).done;){var k=E.value;if(k<a&&++u>o&&f("overflow"),k==a){for(var S=u,T=s;;T+=s){var F=T<=l?1:T>=l+26?26:T-l;if(S<F)break;var _=S-F,P=s-F;n.push(h(g(F+_%P,0))),S=d(_/P)}n.push(h(g(S,0))),l=y(u,A,b==v),u=0,++b}}++u,++a}return n.join("")},D=function(t){return p(t,(function(t){return a.test(t)?b(t.slice(4).toLowerCase()):t}))},x=function(t){return p(t,(function(t){return u.test(t)?"xn--"+w(t):t}))};const C={version:"2.1.0",ucs2:{decode:m,encode:v},decode:b,encode:w,toASCII:x,toUnicode:D}},1655: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)}()},391:(t,e,n)=>{var r=n(9152),i=n(356);void 0===i.$&&(i.$=r),void 0===i.jQuery&&(i.jQuery=r),t.exports=r},1683:(t,e,n)=>{var r=n(2898),i=n(356);void 0===i.ColorThief&&(i.ColorThief=r),t.exports=r},982:(t,e,n)=>{var r=n(4757),i=n(356);void 0===i.dayjs&&(i.dayjs=r),t.exports=r},4473:(t,e,n)=>{var r=n(7945),i=n(356);void 0===i.m&&(i.m=r),t.exports=r},1885:(t,e,n)=>{var r=n(619),i=n(356);void 0===i.punycode&&(i.punycode=r),t.exports=r},9882:t=>{t.exports=function(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},t.exports.__esModule=!0,t.exports.default=t.exports},9696:t=>{t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports},230:t=>{t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},1904:t=>{t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},8213:t=>{function e(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)}}t.exports=function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},402:t=>{t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.__esModule=!0,t.exports.default=t.exports},9767:t=>{function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},2061:(t,e,n)=>{var r=n(480);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&r(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},1209:t=>{t.exports=function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],s=!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.exports.__esModule=!0,t.exports.default=t.exports},6067:t=>{t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},8974:(t,e,n)=>{var r=n(2075).default,i=n(230);t.exports=function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return i(t)},t.exports.__esModule=!0,t.exports.default=t.exports},9440:(t,e,n)=>{var r=n(2075).default;function i(){"use strict";t.exports=i=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},n=Object.prototype,o=n.hasOwnProperty,s=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function d(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,n){return t[e]=n}}function h(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new S(r||[]);return s(o,"_invoke",{value:A(t,n,a)}),o}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p={};function m(){}function v(){}function g(){}var y={};d(y,u,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(T([])));w&&w!==n&&o.call(w,u)&&(y=w);var D=g.prototype=m.prototype=Object.create(y);function x(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function n(i,s,a,u){var l=f(t[i],t,s);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==r(d)&&o.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(d).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(l.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function A(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=E(s,n);if(a){if(a===p)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function E(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var r=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,p;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function T(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(o.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:F}}function F(){return{value:void 0,done:!0}}return v.prototype=g,s(D,"constructor",{value:g,configurable:!0}),s(g,"constructor",{value:v,configurable:!0}),v.displayName=d(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,d(t,c,"GeneratorFunction")),t.prototype=Object.create(D),t},e.awrap=function(t){return{__await:t}},x(C.prototype),d(C.prototype,l,(function(){return this})),e.AsyncIterator=C,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var s=new C(h(t,n,r,i),o);return e.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},x(D),d(D,c,"Generator"),d(D,u,(function(){return this})),d(D,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=T,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(a&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):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),p},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),k(n),p}},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;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},480:t=>{function e(n,r){return t.exports=e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n,r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},5387:(t,e,n)=>{var r=n(9696),i=n(1209),o=n(9111),s=n(6067);t.exports=function(t,e){return r(t)||i(t,e)||o(t,e)||s()},t.exports.__esModule=!0,t.exports.default=t.exports},2075:t=>{function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},9111:(t,e,n)=>{var r=n(9882);t.exports=function(t,e){if(t){if("string"==typeof t)return r(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)?r(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},2507:(t,e,n)=>{var r=n(9440)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(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,{app:()=>v,compat:()=>Co});var t={};n.r(t),n.d(t,{camelCaseToSnakeCase:()=>Z,generateRandomString:()=>tt,getPlainContent:()=>J,slug:()=>X,truncate:()=>K,ucfirst:()=>Q});var e={};n.r(e),n.d(e,{default:()=>mt,fireDeprecationWarning:()=>vt});var i={};n.r(i),n.d(i,{createFocusTrap:()=>dr});var o={};n.r(o),n.d(o,{extend:()=>xi,override:()=>Ci});var s={};n.r(s),n.d(s,{debounce:()=>ie,throttle:()=>re}),n(391),n(4473),n(982),n(9043),n(6199),n(7865),n(6935),n(9411);var a=n(5635),u=n.n(a),l=n(6982),c=n.n(l);function d(t,e){var n="select"===t.tag?t.attrs.multi?"multi":"select":t.attrs.type;return t.attrs.onchange="multi"===n?function(){e([].slice.call(this.selectedOptions,(function(t){return t.value})))}:"select"===n?function(t){e(this.selectedOptions[0].value)}:"checkbox"===n?function(t){e(this.checked)}:t.attrs.oninput=function(t){e(this.value)},"select"===t.tag?t.children.forEach((function(t){t.attrs.value!==e()&&t.children[0]!==e()||(t.attrs.selected=!0)})):"checkbox"===n?t.attrs.checked=e():"radio"===n?t.attrs.checked=e()===t.attrs.value:t.attrs.value=e(),t.attrs.bidi=null,t}d.view=function(t,e,n){return d(e,e.attrs.bidi)};const h=d;function f(t){var e=t.m,n=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=e.apply(this,arguments);return o.attrs||(o.attrs={}),o.attrs.bidi&&h(o,o.attrs.bidi),o};Object.keys(e).forEach((function(t){return n[t]=e[t]})),t.m=n}var p=window;const v=new Proxy({},{get:function(t,e){return Reflect.get(p.app,e,p.app)},set:function(t,e,n){return Reflect.set(p.app,e,n,p.app)}});n(1859),dayjs.extend(u()),dayjs.extend(c()),f(window);var g=$.fn.tooltip;function y(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}function w(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,b(t,e)}function D(){return D=Object.assign?Object.assign.bind():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},D.apply(this,arguments)}function x(t,e,n){void 0===e&&(e=null),void 0===n&&(n={});var r=D({},n);r.state=r.state||{},r.state.key=Date.now(),m.route.set(t,e,r)}$.fn.tooltip=function(t,e){["DANGEROUS_tooltip_jquery_fn_deprecation_exempt"].includes(e)||console.warn("Calling `$.tooltip` is now deprecated. Please use the `<Tooltip>` component exposed by flarum/core instead. `$.tooltip` may be removed in a future version of Flarum.\n\nIf this component doesn't meet your requirements, please open an issue: https://github.com/flarum/core/issues/new?assignees=davwheat&labels=type/bug,needs-verification&template=bug-report.md&title=Tooltip%20component%20unsuitable%20for%20use%20case"),g.bind(this)(t)},n(1885),n(1683);var C=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),x("/")},t}(),A=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}(),E=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=D({},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 N(t,e){return t&&(t===e||t.prototype instanceof e)}var k=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={}),!!N(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}(),S=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}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),v.previous=v.current,v.current=new k(this.constructor,{routeName:this.attrs.routeName}),v.drawer.hide(),v.modal.close()},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.bodyClass&&$("#app").addClass(this.bodyClass),this.scrollTopOnCreate&&$(window).scrollTop(0),"scrollRestoration"in history&&(history.scrollRestoration=this.useBrowserScrollRestoration?"auto":"manual")},n.onremove=function(e){t.prototype.onremove.call(this,e),this.bodyClass&&$("#app").removeClass(this.bodyClass)},e}(E);function T(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function F(t,e,n){return e&&T(t.prototype,e),n&&T(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function _(t){var e=typeof t;return"function"===e||"object"===e&&!!t}var P=function(t,e){this.content=void 0,this.priority=void 0,this.content=t,this.priority=e},B=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 P(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 P&&(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||_(i.content)?D({},i,{content:e.createItemContentProxy(_(i.content)?i.content:Object(i.content),n)}):D({},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)}})},F(t,[{key:"items",get:function(){return new Proxy(this._items,{set:function(){return console.warn("Modifying `ItemList.items` is not allowed."),!1}})}}]),t}(),I=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(){return m("li",{className:"Dropdown-separator"})},e}(E);I.isListItem=!0;const O=I;function L(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=L(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}const M=function(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=L(t))&&(r&&(r+=" "),r+=e);return r};function j(t){return"object"==typeof t&&null!==t&&"tag"in t}function R(t){return j(t)&&t.tag===O}function H(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){(!R(t)||i&&!R(i)&&e!==r.length-1)&&(i=t,o.push(t))})),o).map((function(t){var e,r,i=[t.itemName&&"item-"+t.itemName];if(j(t)&&t.tag.isListItem)return t.attrs=t.attrs||{},t.attrs.key=t.attrs.key||t.itemName,t.key=t.attrs.key,t;j(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=j(t)&&(null==t||null==(e=t.attrs)?void 0:e.key)||t.itemName;return m(s,Object.assign({className:M(i),key:o},n),t)}))}var U=function(t){function e(){return t.apply(this,arguments)||this}w(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"},H(this.items().toArray()))))},n.items=function(){var t=new B,e=this.attrs.discussion,n=e.badges().toArray();return n.length&&t.add("badges",m("ul",{className:"DiscussionHero-badges badges"},H(n)),10),t.add("title",m("h1",{className:"DiscussionHero-title"},e.title())),t},e}(E);function q(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 z(t,e){var n=t[e];return delete t[e],n}var V,W=["options"],G=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(t){var e=t.attrs,n=e.options,r=void 0===n?{}:n,i=q(e,W);i.href||(i.href="");var o=t.children||{tag:"#",children:t.text};return i.external?m("a",i,o):(i.href===m.route.get()&&("replace"in r||(r.replace=!0)),z(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}(E);function Y(t,e){var n;void 0===e&&(e={}),e.className=M("Avatar",e.className),null!=(n=e).loading||(n.loading="lazy");var r="",i="undefined"===e.title||e.title;if(i||delete e.title,t){var o=t.displayName()||"?",s=t.avatarUrl();if(i&&(e.title=e.title||o),s)return m("img",Object.assign({},e,{src:s,alt:""}));r=o.charAt(0).toUpperCase(),e.style={"--avatar-bg":t.color()}}return m("span",e,r)}function K(t,e,n){return void 0===n&&(n=0),(n>0?"...":"")+t.substring(n,n+e)+(t.length>n+e?"...":"")}function X(t,e){switch(void 0===e&&(e=V.ALPHANUMERIC),e){case V.UTF8:return t.toLowerCase().replace(/(?:(?![0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088E\u0898-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09F4-\u09F9\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\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A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u17F0-\u17F9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ACE\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u20D0-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA827\uA82C\uA830-\uA835\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\u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70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E-\uDC61\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6\uDF00-\uDF10\uDF12-\uDF3A\uDF3E-\uDF42\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC40-\uDC55]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\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\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC30-\uDC6D\uDC8F\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAE\uDEC0-\uDEF9]|\uD839[\uDCD0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]|\uDB40[\uDD00-\uDDEF])[\s\S])/gi,"-").replace(/-+/g,"-").replace(/-$|^-/g,"");case V.ALPHANUMERIC:default:return t.toLowerCase().replace(/[^a-z0-9]/gi,"-").replace(/-+/g,"-").replace(/-$|^-/g,"")}}function J(t){var e=t.replace(/(<\/p>|<br>)/g,"$1 &nbsp;").replace(/<img\b[^>]*>/gi," "),n=(new DOMParser).parseFromString(e,"text/html").documentElement;return J.removeSelectors.forEach((function(t){n.querySelectorAll(t).forEach((function(t){t.remove()}))})),n.innerText.replace(/\s+/g," ").trim()}function Q(t){return t.substr(0,1).toUpperCase()+t.substr(1)}function Z(t){return t.replace(/[A-Z]/g,(function(t){return"_"+t.toLowerCase()}))}function tt(t){if(t<0)throw new Error("Cannot generate a random string with length less than 0.");if(0===t)return"";var e=new Uint8Array(t/2);return window.crypto.getRandomValues(e),Array.from(e,(function(t){return t.toString(16).padStart(2,"0")})).join("")}function et(t,e,n){if(!e&&!n)return t;var r=e instanceof RegExp?e:new RegExp(null!=e?e:"","gi"),i=t,o=0;return n&&(e&&(o=Math.max(0,t.search(r)-n/2)),i=K(i,n,o)),i=$("<div/>").text(i).html(),e&&(i=i.replace(r,"<mark>$&</mark>")),m.trust(i)}function nt(t,e){return void 0===e&&(e={}),e.className=M("icon",t,e.className),m("i",Object.assign({"aria-hidden":"true"},e))}!function(t){t.ALPHANUMERIC="alphanum",t.UTF8="utf8"}(V||(V={})),J.removeSelectors=["blockquote","script"];var rt=n(4757),it=n.n(rt);function ot(t){return t instanceof Array?t.map((function(t){return ot(t)})).join(""):"object"==typeof t&&null!==t?t.children?ot(t.children):String(t.text):String(t)}function st(t){var e=it()(t),n=it()();return e.isAfter(n)&&(e=n),e.diff(it()())<-2592e6?e.year()===it()().year()?e.format(ot(v.translator.trans("core.lib.datetime_formats.humanTimeShort"))):e.format(ot(v.translator.trans("core.lib.datetime_formats.humanTimeLong"))):e.fromNow()}function at(t){return t>=1e6?Math.floor(t/1e6)+ot(v.translator.trans("core.lib.number_suffix.mega_text")):t>=1e3?(t/1e3).toFixed(1)+ot(v.translator.trans("core.lib.number_suffix.kilo_text")):t.toString()}var ut=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).showing=!1,e}w(e,t),e.initAttrs=function(t){t.className||(t.className=""),t.buttonClassName||(t.buttonClassName=""),t.menuClassName||(t.menuClassName=""),t.label||(t.label=""),null!=t.caretIcon||(t.caretIcon="fas fa-caret-down"),t.accessibleToggleLabel||(t.accessibleToggleLabel=ot(v.translator.trans("core.lib.dropdown.toggle_dropdown_accessible_label")))};var n=e.prototype;return n.view=function(t){var e=t.children?H(t.children):[],n=!this.attrs.lazyDraw||this.showing;return m("div",{className:"ButtonGroup Dropdown dropdown "+this.attrs.className+" itemCount"+e.length+(this.showing?" open":"")},this.getButton(t.children),n&&this.getMenu(e))},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.$().on("shown.bs.dropdown",(function(){var t,e,r,i,o,s,a,u,l,c,d,h=n.attrs,f=h.lazyDraw,p=h.onshow;n.showing=!0,f&&m.redraw.sync(),"function"==typeof p&&p(),f||m.redraw();var v=n.$(".Dropdown-menu"),g=v.hasClass("Dropdown-menu--right"),y=null!=(t=null==(e=v.offset())?void 0:e.top)?t:0,b=null!=(r=v.height())?r:0,w=null!=(i=$(window).scrollTop())?i:0,D=null!=(o=$(window).height())?o:0;v.removeClass("Dropdown-menu--top Dropdown-menu--right"),v.toggleClass("Dropdown-menu--top",y+b>w+D),((null==(s=v.offset())?void 0:s.top)||0)<0&&v.removeClass("Dropdown-menu--top");var x=null!=(a=null==(u=v.offset())?void 0:u.left)?a:0,C=null!=(l=v.width())?l:0,A=null!=(c=$(window).scrollLeft())?c:0,E=null!=(d=$(window).width())?d:0;v.toggleClass("Dropdown-menu--right",g||x+C>A+E)})),this.$().on("hidden.bs.dropdown",(function(){n.showing=!1,n.attrs.onhide&&n.attrs.onhide(),m.redraw()}))},n.getButton=function(t){return m("button",{className:"Dropdown-toggle "+this.attrs.buttonClassName,"aria-haspopup":"menu","aria-label":this.attrs.accessibleToggleLabel,"data-toggle":"dropdown",onclick:this.attrs.onclick},this.getButtonContent(t))},n.getButtonContent=function(t){return[this.attrs.icon?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}(E);function lt(t){var e=it()(t),n=e.format(),r=e.format("LLLL"),i=st(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 w(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")," ",Wi.translator.trans("core.forum.discussion_list."+(e?"replied":"started")+"_text",{user:n,ago:lt(r)}))},e}(E),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 w(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=q(t,ht),u=M("LoadingIndicator",s),l=M("LoadingIndicator-container","unset"!==n&&"LoadingIndicator-container--"+n,i&&"LoadingIndicator-container--"+i,o);return m("div",Object.assign({"aria-label":v.translator.trans("core.lib.loading_indicator.accessible_label"),role:"status"},a.containerAttrs,{"data-size":i,className:l}),m("div",Object.assign({"aria-hidden":"true",className:u},a)))},e}(E),pt=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.handler=function(){return this.attrs.when()||void 0},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.boundHandler=this.handler.bind(this),$(window).on("beforeunload",this.boundHandler)},n.onremove=function(e){t.prototype.onremove.call(this,e),$(window).off("beforeunload",this.boundHandler)},n.view=function(t){return m("[",null,t.children)},e}(E);function mt(){var t;v.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}w(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=q(e,gt);n||(n="button"),i||(i=r),"object"==typeof i&&(i=ot(i)),(s||a)&&delete c.onclick;var d=D({disabled:s,className:u=M(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||ot(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}(E),bt=n(1655),wt=n.n(bt),Dt=null;function xt(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===Dt||!0===Dt){t.contentEditable="true";try{Dt=document.execCommand("insertText",!1,n)}catch(t){Dt=!1}t.contentEditable="false"}Dt&&!t.value.slice(0,t.selectionStart).endsWith(n)&&(Dt=!1),Dt||(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 Ct=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 B;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;xt(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}(),At=["text","tooltipVisible","showOnFocus","position","ignoreTitleWarning","html","delay"],Et=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}w(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,q(n,At),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":M("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)?ot(t):t},n.checkDomNodeChanged=function(){var t=this.firstChild.dom;t&&!t.isSameNode(this.childDomNode)&&(this.childDomNode=t,this.shouldRecreateTooltip=!0)},e}(E),Nt=function(t){function e(){return t.apply(this,arguments)||this}w(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"},H(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 Ct(t,this.buildEditorParams())},n.controlItems=function(){var t=new B;return t.add("submit",m(yt,{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(Et,{text:v.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 B},n.oninput=function(t){this.value=t,this.attrs.onchange(this.value)},n.onsubmit=function(){this.attrs.onsubmit(this.value)},e}(E),kt=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.composer=this.attrs.composer,this.loading=!1,this.attrs.confirmExit&&this.composer.preventClosingWhen((function(){return n.hasChanges()}),this.attrs.confirmExit),this.composer.fields.content(this.attrs.originalContent||"")},n.view=function(){var t;return m(pt,{when:this.hasChanges.bind(this)},m("div",{className:M("ComposerBody",this.attrs.className)},Y(this.attrs.user,{className:"ComposerBody-avatar"}),m("div",{className:"ComposerBody-content"},m("ul",{className:"ComposerBody-header"},H(this.headerItems().toArray())),m("div",{className:"ComposerBody-editor"},m(Nt,{submitLabel:this.attrs.submitLabel,placeholder:this.attrs.placeholder,disabled:this.loading||this.attrs.disabled,composer:this.composer,preview:null==(t=this.jumpToPreview)?void 0:t.bind(this),onchange:this.composer.fields.content,onsubmit:this.onsubmit.bind(this),value:this.composer.fields.content()}))),m(ft,{display:"unset",containerClassName:M("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 B},n.onsubmit=function(){},n.loaded=function(){this.loading=!1,m.redraw()},e}(E);function St(t){Wi.composer.isFullScreen()&&(Wi.composer.minimize(),t.stopPropagation())}var Tt=function(t){function e(){return t.apply(this,arguments)||this}w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.placeholder=e.placeholder||ot(Wi.translator.trans("core.forum.composer_reply.body_placeholder")),e.submitLabel=e.submitLabel||Wi.translator.trans("core.forum.composer_reply.submit_button"),e.confirmExit=e.confirmExit||ot(Wi.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(G,{href:Wi.route.discussion(n),onclick:St},n.title()))),e},n.jumpToPreview=function(t){St(t),m.route.set(Wi.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();Wi.store.createRecord("posts").save(n).then((function(n){if(Wi.viewingDiscussion(e)){var r=Wi.current.get("stream");r.update().then((function(){return r.goToNumber(n.number())}))}else{var i,o=m(yt,{className:"Button Button--link",onclick:function(){m.route.set(Wi.route.post(n)),Wi.alerts.dismiss(i)}},Wi.translator.trans("core.forum.composer_reply.view_button"));i=Wi.alerts.show({type:"success",controls:[o]},Wi.translator.trans("core.forum.composer_reply.posted_message"))}t.composer.hide()}),this.loaded.bind(this))},e}(kt),Ft=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(t){var e=Object.assign({},this.attrs),n=z(e,"type");e.className=M("Alert","Alert--"+n,e.className);var r=z(e,"title"),i=z(e,"icon"),o=z(e,"content")||t.children,s=z(e,"controls")||[],a=z(e,"dismissible"),u=z(e,"ondismiss"),l=[];return(a||void 0===a)&&l.push(m(yt,{"aria-label":v.translator.trans("core.lib.alert.dismiss_a11y_label"),icon:"fas fa-times",className:"Button Button--link Button--icon Alert-dismiss",onclick:u})),m("div",e,!!r&&m("div",{className:"Alert-title"},!!i&&m("span",{className:"Alert-title-icon"},nt(i)),m("span",{className:"Alert-title-text"},r)),m("span",{className:"Alert-body"},o),m("ul",{className:"Alert-controls"},H(s.concat(l))))},e}(E),_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).loading=!1,e.alertAttrs=null,e}w(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 new Promise((function(t){return setTimeout(t,300)}))},n.view=function(){var t=this;return this.alertAttrs&&(this.alertAttrs.dismissible=!1),m("div",{className:M("Modal modal-dialog fade",this.className())},m("div",{className:"Modal-content"},this.dismissibleOptions.viaCloseButton&&m("div",{className:"Modal-close App-backControl"},m(yt,{icon:"fas fa-times",onclick:function(){return t.hide()},className:"Button Button--icon Button--link","aria-label":v.translator.trans("core.lib.modal.close")})),m("form",{onsubmit:this.onsubmit.bind(this)},m("div",{className:"Modal-header"},m("h3",{className:"App-titleControl App-titleControl--text"},this.title())),!!this.alertAttrs&&m("div",{className:"Modal-alert"},m(Ft,this.alertAttrs)),this.content())))},n.onsubmit=function(t){},n.onready=function(){this.$().find("input, select, textarea").first().trigger("focus").trigger("select")},n.hide=function(){this.attrs.animateHide()},n.loaded=function(){this.loading=!1,m.redraw()},n.onerror=function(t){var e;this.alertAttrs=t.alert,m.redraw(),422===t.status&&null!=(e=t.response)&&e.errors?this.$("form [name="+t.response.errors[0].source.pointer.replace("/data/attributes/","")+"]").trigger("select"):this.onready()},F(e,[{key:"dismissibleOptions",get:function(){return this.constructor.dismissibleOptions}}],[{key:"dismissibleOptions",get:function(){return this.isDismissible?{isDismissible:!0,viaCloseButton:this.isDismissibleViaCloseButton,viaEscKey:this.isDismissibleViaEscKey,viaBackdropClick:this.isDismissibleViaBackdropClick}:{isDismissible:!1,viaCloseButton:!1,viaEscKey:!1,viaBackdropClick:!1}}}]),e}(E);_t.isDismissible=!0,_t.isDismissibleViaCloseButton=!0,_t.isDismissibleViaEscKey=!0,_t.isDismissibleViaBackdropClick=!0;var Pt=n(30);const Bt=n.n(Pt)();var It=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}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.email=Bt(this.attrs.email||"")},n.className=function(){return"ForgotPasswordModal Modal--small"},n.title=function(){return Wi.translator.trans("core.forum.forgot_password.title")},n.content=function(){return this.success?m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},Wi.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)},Wi.translator.trans("core.forum.forgot_password.dismiss_button"))))):m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},Wi.translator.trans("core.forum.forgot_password.text")),this.fields().toArray()))},n.fields=function(){var t=new B,e=ot(Wi.translator.trans("core.forum.forgot_password.email_placeholder"));return t.add("email",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"email",type:"email",placeholder:e,"aria-label":e,bidi:this.email,disabled:this.loading})),50),t.add("submit",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Wi.translator.trans("core.forum.forgot_password.submit_button"))),-10),t},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0,Wi.request({method:"POST",url:Wi.forum.attribute("apiUrl")+"/forgot",body:this.requestParams(),errorHandler:this.onerror.bind(this)}).then((function(){e.success=!0,e.alertAttrs=null})).catch((function(){})).then(this.loaded.bind(this))},n.requestParams=function(){return{email:this.email()}},n.onerror=function(e){404===e.status&&e.alert&&(e.alert.content=Wi.translator.trans("core.forum.forgot_password.not_found_message")),t.prototype.onerror.call(this,e)},e}(_t),Ot=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){return m("div",{className:"LogInButtons"},this.items().toArray())},n.items=function(){return new B},e}(E),Lt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).username=void 0,e.email=void 0,e.password=void 0,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.username=Bt(this.attrs.username||""),this.email=Bt(this.attrs.email||""),this.password=Bt(this.attrs.password||"")},n.className=function(){return"Modal--small SignUpModal"},n.title=function(){return Wi.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(Ot,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]},n.fields=function(){var t=new B,e=ot(Wi.translator.trans("core.forum.sign_up.username_placeholder")),n=ot(Wi.translator.trans("core.forum.sign_up.email_placeholder")),r=ot(Wi.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},Wi.translator.trans("core.forum.sign_up.submit_button"))),-10),t},n.footer=function(){return[m("p",{className:"SignUpModal-logIn"},Wi.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()};Wi.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();Wi.request({url:Wi.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 D({username:this.username(),email:this.email()},t)},e}(_t),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}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.identification=Bt(this.attrs.identification||""),this.password=Bt(this.attrs.password||""),this.remember=Bt(!!this.attrs.remember)},n.className=function(){return"LogInModal Modal--small"},n.title=function(){return Wi.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(Ot,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]},n.fields=function(){var t=new B,e=ot(Wi.translator.trans("core.forum.log_in.username_or_email_placeholder")),n=ot(Wi.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}),Wi.translator.trans("core.forum.log_in.remember_me_label")))),10),t.add("submit",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Wi.translator.trans("core.forum.log_in.submit_button"))),-10),t},n.footer=function(){return m("[",null,m("p",{className:"LogInModal-forgotPassword"},m("a",{onclick:this.forgotPassword.bind(this)},Wi.translator.trans("core.forum.log_in.forgot_password_link"))),Wi.forum.attribute("allowSignUp")&&m("p",{className:"LogInModal-signUp"},Wi.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;Wi.modal.show(It,e)},n.signUp=function(){var t,e=this.identification(),n=((t={})[e.includes("@")?"email":"username"]=e,t);Wi.modal.show(Lt,n)},n.onready=function(){this.$("[name="+(this.identification()?"password":"identification")+"]").trigger("select")},n.onsubmit=function(t){t.preventDefault(),this.loading=!0,Wi.session.login(this.loginParams(),{errorHandler:this.onerror.bind(this)}).then((function(){return window.location.reload()}),this.loaded.bind(this))},n.loginParams=function(){return{identification:this.identification(),password:this.password(),remember:this.remember()}},n.onerror=function(e){401===e.status&&e.alert&&(e.alert.content=Wi.translator.trans("core.forum.log_in.invalid_login_message"),this.password("")),t.prototype.onerror.call(this,e)},e}(_t),$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).discussion=void 0,e.currentTitle=void 0,e.newTitle=void 0,e}w(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=Bt(this.currentTitle)},n.className=function(){return"RenameDiscussionModal Modal--small"},n.title=function(){return Wi.translator.trans("core.forum.rename_discussion.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("input",{className:"FormControl",bidi:this.newTitle,type:"text"})),m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Wi.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(){Wi.viewingDiscussion(e.discussion)&&Wi.current.get("stream").update(),m.redraw(),e.hide()})).catch((function(){e.loading=!1,m.redraw()}));this.hide()},e}(_t);const jt={controls:function(t,e){var n=this,r=new B;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(O,null)))})),r},userControls:function(t,e){var n=this,r=new B;return e instanceof ae&&r.add("reply",!Wi.session.user||t.canReply()?m(yt,{icon:"fas fa-reply",onclick:function(){return n.replyAction.bind(t)(!0,!1).catch((function(){}))}},Wi.translator.trans(Wi.session.user?"core.forum.discussion_controls.reply_button":"core.forum.discussion_controls.log_in_to_reply_button")):m(yt,{icon:"fas fa-reply",className:"disabled",title:ot(Wi.translator.trans("core.forum.discussion_controls.cannot_reply_text"))},Wi.translator.trans("core.forum.discussion_controls.cannot_reply_button"))),r},moderationControls:function(t){var e=new B;return t.canRename()&&e.add("rename",m(yt,{icon:"fas fa-pencil-alt",onclick:this.renameAction.bind(t)},Wi.translator.trans("core.forum.discussion_controls.rename_button"))),e},destructiveControls:function(t){var e=new B;return t.isHidden()?(t.canHide()&&e.add("restore",m(yt,{icon:"fas fa-reply",onclick:this.restoreAction.bind(t)},Wi.translator.trans("core.forum.discussion_controls.restore_button"))),t.canDelete()&&e.add("delete",m(yt,{icon:"fas fa-times",onclick:this.deleteAction.bind(t)},Wi.translator.trans("core.forum.discussion_controls.delete_forever_button")))):t.canHide()&&e.add("hide",m(yt,{icon:"far fa-trash-alt",onclick:this.hideAction.bind(t)},Wi.translator.trans("core.forum.discussion_controls.delete_button"))),e},replyAction:function(t,e){var n=this;return new Promise((function(r,i){return Wi.session.user?n.canReply()?(Wi.composer.composingReplyTo(n)&&!e||Wi.composer.load(Tt,{user:Wi.session.user,discussion:n}),Wi.composer.show(),t&&Wi.viewingDiscussion(n)&&!Wi.composer.isFullScreen()&&Wi.current.get("stream").goToNumber("reply"),r(Wi.composer)):i():(Wi.modal.show(Mt),i())}))},hideAction:function(){return this.pushData({attributes:{hiddenAt:new Date},relationships:{hiddenUser:Wi.session.user}}),this.save({isHidden:!0})},restoreAction:function(){return this.pushData({attributes:{hiddenAt:null},relationships:{hiddenUser:null}}),this.save({isHidden:!1})},deleteAction:function(){var t=this;if(confirm(ot(Wi.translator.trans("core.forum.discussion_controls.delete_confirmation"))))return Wi.viewingDiscussion(this)&&Wi.history.back(),this.delete().then((function(){return Wi.discussions.removeDiscussion(t)}))},renameAction:function(){return Wi.modal.show($t,{currentTitle:this.title(),discussion:this})}};function Rt(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 Ht=/[.*+?^${}()|[\]\\]/g;function Ut(t){return t.replace(Ht,"\\$&")}var qt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).subtree=void 0,e.highlightRegExp=void 0,e}w(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=Wi.session.user&&Wi.session.user.markedAllAsReadAt();return t&&t.getTime()}),(function(){return n.active()}))},n.elementAttrs=function(){return{className:M("DiscussionListItem",{active:this.active(),"DiscussionListItem--hidden":this.attrs.discussion.isHidden(),Slidable:"ontouchstart"in window})}},n.view=function(){var t=this.elementAttrs();return m("div",t,this.viewItems().toArray())},n.viewItems=function(){var t=new B,e=this.attrs.discussion,n=jt.controls(e,this).toArray();return t.add("controls",this.controlsView(n),100),t.add("slidableUnderneath",this.slidableUnderneathView(),90),t.add("content",this.contentView(),80),t},n.controlsView=function(t){return m("[",null,!!t.length&&m(ut,{icon:"fas fa-ellipsis-v",className:"DiscussionListItem-controls",buttonClassName:"Button Button--icon Button--flat Slidable-underneath Slidable-underneath--right",accessibleToggleLabel:Wi.translator.trans("core.forum.discussion_controls.toggle_dropdown_accessible_label")},t))},n.slidableUnderneathView=function(){var t=this.attrs.discussion.isUnread();return m("span",{className:M("Slidable-underneath Slidable-underneath--left Slidable-underneath--elastic",{disabled:!t}),onclick:this.markAsRead.bind(this)},nt("fas fa-check"))},n.contentView=function(){var t=this.attrs.discussion,e=t.isUnread(),n=t.isRead();return m("div",{className:M("DiscussionListItem-content","Slidable-content",{unread:e,read:n})},this.contentItems().toArray())},n.contentItems=function(){var t=new B;return t.add("authorAvatar",this.authorAvatarView(),100),t.add("badges",this.badgesView(),90),t.add("main",this.mainView(),80),t.add("replyCount",this.replyCountItem(),70),t},n.authorAvatarView=function(){var t=this.attrs.discussion,e=t.user();return m(Et,{text:Wi.translator.trans("core.forum.discussion_list.started_text",{user:e,ago:st(t.createdAt())}),position:"right"},m(G,{className:"DiscussionListItem-author",href:e?Wi.route.user(e):"#"},Y(e||null,{title:""})))},n.badgesView=function(){var t=this.attrs.discussion;return m("ul",{className:"DiscussionListItem-badges badges"},H(t.badges().toArray()))},n.mainView=function(){var t=this.attrs.discussion,e=this.getJumpTo();return m(G,{href:Wi.route.discussion(t,e),className:"DiscussionListItem-main"},this.mainItems().toArray())},n.mainItems=function(){var t=new B,e=this.attrs.discussion;return t.add("title",m("h2",{className:"DiscussionListItem-title"},et(e.title(),this.highlightRegExp)),100),t.add("info",m("ul",{className:"DiscussionListItem-info"},H(this.infoItems().toArray())),90),t},n.getJumpTo=function(){var t=this.attrs.discussion,e=0;if(this.attrs.params.q){var n=t.mostRelevantPost();n&&(e=n.number());var r=Ut(this.attrs.params.q);this.highlightRegExp=new RegExp(r+"|"+r.trim().replace(/\s+/g,"|"),"gi")}else{var i;e=Math.min(null!=(i=t.lastPostNumber())?i:0,(t.lastReadPostNumber()||0)+1)}return e},n.oncreate=function(e){if(t.prototype.oncreate.call(this,e),"ontouchstart"in window){var n=Rt(this.element);this.$(".DiscussionListItem-controls").on("hidden.bs.dropdown",(function(){return n.reset()}))}},n.onbeforeupdate=function(e){return t.prototype.onbeforeupdate.call(this,e),this.subtree.needsRebuild()},n.active=function(){return Wi.current.matches(ae,{discussion:this.attrs.discussion})},n.showFirstPost=function(){var t;return["newest","oldest"].includes(null!=(t=this.attrs.params.sort)?t:"")},n.showRepliesCount=function(){return"replies"===this.attrs.params.sort},n.markAsRead=function(){var t=this.attrs.discussion;t.isUnread()&&(t.save({lastReadPostNumber:t.lastPostNumber()}),m.redraw())},n.infoItems=function(){var t=new B;if(this.attrs.params.q){var e=this.attrs.discussion.mostRelevantPost()||this.attrs.discussion.firstPost();if(e&&"comment"===e.contentType()){var n,r=et(null!=(n=e.contentPlain())?n:"",this.highlightRegExp,175);t.add("excerpt",r,-100)}}else t.add("terminalPost",m(ct,{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",{className:"visually-hidden"},Wi.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",{className:"visually-hidden"},Wi.translator.trans("core.forum.discussion_list.total_replies_a11y_label",{count:t.replyCount()})))},e}(E),zt=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(){return m("div",{className:"Placeholder"},m("p",null,this.attrs.text))},e}(E),Vt=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(){var t,e=this.attrs.state,n=e.getParams(),r=e.isInitialLoading()||e.isLoadingNext();if(r?t=m(ft,null):e.hasNext()&&(t=m(yt,{className:"Button",onclick:e.loadNext.bind(e)},Wi.translator.trans("core.forum.discussion_list.load_more_button"))),e.isEmpty()){var i=Wi.translator.trans("core.forum.discussion_list.empty_text");return m("div",{className:"DiscussionList"},m(zt,{text:i}))}var o=e.pageSize;return m("div",{className:M("DiscussionList",{"DiscussionList--searchResults":e.isSearchResults()})},m("ul",{role:"feed","aria-busy":r,className:"DiscussionList-discussions"},e.getPages().map((function(t,e){return t.items.map((function(t,r){return m("li",{key:t.id(),"data-id":t.id(),role:"article","aria-setsize":"-1","aria-posinset":e*o+r},m(qt,{discussion:t,params:n}))}))}))),m("div",{className:"DiscussionList-loadMore"},t))},e}(E),Wt=function(t){t.pageX<10&&Wi.pane.show()},Gt=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){if(this.attrs.state.hasItems())return m("aside",{className:"DiscussionPage-list"},this.enoughSpace()&&m(Vt,{state:this.attrs.state}))},n.oncreate=function(e){t.prototype.oncreate.call(this,e);var n=$(e.dom),r=Wi.pane;if(n.hover(r.show.bind(r),r.onmouseleave.bind(r)),$(document).on("mousemove",Wt),Wi.previous.matches(ae)){var i=Wi.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){Wi.cache.discussionListPaneScrollTop=$(t.dom).scrollTop(),$(document).off("mousemove",Wt)},n.enoughSpace=function(){return!$(".App-navigation").is(":visible")},e}(E),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 w(e,t),e.prototype.view=function(){return m("div",{className:"Post CommentPost LoadingPost"},m("header",{className:"Post-header"},Y(null,{className:"PostUser-avatar"}),m("div",{className:"fakeText"})),m("div",{className:"Post-body"},m("div",{className:"fakeText"}),m("div",{className:"fakeText"}),m("div",{className:"fakeText"})))},e}(E);function Xt(t){var e=t&&t.displayName()||v.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}w(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}(E),Qt=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){var t=this;return Wi.composer.composingReplyTo(this.attrs.discussion)?m("article",{className:"Post CommentPost editing","aria-busy":"true"},m("header",{className:"Post-header"},m("div",{className:"PostUser"},m("h3",{className:"PostUser-name"},Y(Wi.session.user,{className:"PostUser-avatar"}),Xt(Wi.session.user)),m("ul",{className:"PostUser-badges badges"},H(Wi.session.user.badges().toArray())))),m(Jt,{className:"Post-body",composer:Wi.composer,surround:this.anchorPreview.bind(this)})):m("button",{className:"Post ReplyPlaceholder",onclick:function(){jt.replyAction.call(t.attrs.discussion,!0).catch((function(){}))}},m("span",{className:"Post-header"},Y(Wi.session.user,{className:"PostUser-avatar"})," ",Wi.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}(E),Zt=function(t){function e(){return t.apply(this,arguments)||this}w(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=Wi.postComponents[n.contentType()];s=!!l&&m(l,{post:n}),a.key="post"+n.id(),a.oncreate=o,a["data-time"]=u.toISOString(),a["data-number"]=n.number(),a["data-id"]=n.id(),a["data-type"]=n.contentType();var c=u-t;c>3456e5&&(s=[m("div",{className:"PostStream-timeGap"},m("span",null,Wi.translator.trans("core.forum.post_stream.time_lapsed_text",{period:dayjs().add(c,"ms").fromNow(!0)}))),s]),t=u}else a.key="post"+i[e.stream.visibleStart+r],s=m(Kt,null);var d=m("div",Object.assign({className:"PostStream-item"},a),s);return 0===r&&e.afterFirstPostItems().toArray().length>0?m.fragment(D({},a),[d,m("div",{className:"PostStream-item PostStream-afterFirstPost",key:"afterFirstPost"},e.afterFirstPostItems().toArray())]):d}));return!n&&r[this.stream.visibleEnd-this.stream.visibleStart-1]&&s.push(m("div",{className:"PostStream-loadMore",key:"loadMore"},m(yt,{className:"Button",onclick:this.stream.loadNext.bind(this.stream)},Wi.translator.trans("core.forum.post_stream.load_more_button")))),n&&s.push.apply(s,this.endItems().toArray()),!n||Wi.session.user&&!this.discussion.canReply()||s.push(m("div",{className:"PostStream-item",key:"reply","data-index":this.stream.count(),oncreate:o},m(Qt,{discussion:this.discussion}))),m("div",{className:"PostStream",role:"feed","aria-live":"off","aria-busy":this.stream.pagesLoading?"true":"false"},s)},n.afterFirstPostItems=function(){return new B},n.endItems=function(){return new B},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(ot(Wi.translator.trans("core.lib.datetime_formats.scrubber"))))},n.calculatePosition=function(t){void 0===t&&(t=window.pageYOffset);var e,n,r=this.getMarginTop(),i=$(window),o=i.height()-r,s=i.scrollTop()+r,a=t+r;this.$(".PostStream-item").each((function(){var t=$(this),r=t.offset().top,i=t.outerHeight(!0),u=Math.max(0,a-r);if(void 0===e&&(u/i<.75||(i-u)/o>.25)&&(e=t.data("number")),r+i>s){if(!(r+i<s+o))return!1;t.data("number")&&(n=t.data("number"))}})),e&&this.attrs.onPositionChange(e||1,n,e)},n.getMarginTop=function(){var t="phone"===Wi.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()+Wi.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()+Wi.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}(E);function te(t,e){return void 0===e&&(e=v.data.locale),new Intl.NumberFormat(e).format(t)}var ee=function(t){function e(){return t.apply(this,arguments)||this}w(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=Wi.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+"%",opacity:r?1:0};t.state.oldStyle?e.stop(!0).css(t.state.oldStyle).animate(n):e.css(n),t.state.oldStyle=n}var o=["PostStreamScrubber","Dropdown"];return this.attrs.className&&o.push(this.attrs.className),m("div",{className:o.join(" ")},m("button",{className:"Button Dropdown-toggle","data-toggle":"dropdown"},e," ",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")," ",this.firstPostLabel()),m("div",{className:"Scrubber-scrollbar"},m("div",{className:"Scrubber-before"}),m("div",{className:"Scrubber-handle"},m("div",{className:"Scrubber-bar"}),m("div",{className:"Scrubber-info"},m("strong",null,e),m("span",{className:"Scrubber-description"}))),m("div",{className:"Scrubber-after"}),m("div",{className:"Scrubber-unread",oncreate:i,onupdate:i},this.unreadLabel(n))),m("a",{className:"Scrubber-last",onclick:this.goToLast.bind(this)},nt("fas fa-angle-double-down")," ",this.lastPostLabel()))))},n.firstPostLabel=function(){return Wi.translator.trans("core.forum.post_scrubber.original_post_link")},n.unreadLabel=function(t){return Wi.translator.trans("core.forum.post_scrubber.unread_text",{count:t})},n.lastPostLabel=function(){return Wi.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}(E),ne=function(t){function e(){return t.apply(this,arguments)||this}w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=M(e.className,"Dropdown--split"),e.menuClassName=M(e.menuClassName,"Dropdown-menu--right")};var n=e.prototype;return n.getButton=function(t){var e=this.getFirstChild(t),n=Object.assign({},null==e?void 0:e.attrs);return n.className=M(n.className,"SplitDropdown-button Button",this.attrs.buttonClassName),m("[",null,m(yt,n,e.children),m("button",{className:"Dropdown-toggle Button Button--icon "+this.attrs.buttonClassName,"aria-haspopup":"menu","aria-label":this.attrs.accessibleToggleLabel,"data-toggle":"dropdown"},this.attrs.icon?nt(this.attrs.icon,{className:"Button-icon"}):null,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=void 0,this.paused=!1,this.loadPageTimeouts={},this.pagesLoading=0,this.index=0,this.number=1,this.visible=1,this.visibleStart=0,this.visibleEnd=0,this.animateScroll=!1,this.needsScroll=!1,this.targetPost=null,this.description="",this.forceUpdateScrubber=!1,this.loadPromise=null,this.loadNext=void 0,this.loadPrevious=void 0,this.discussion=t,this.loadNext=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=D({},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(),Wi.store.find("posts",{filter:{discussion:this.discussion.id()},page:{near:t}}).then(this.show.bind(this)))},e.loadNearIndex=function(e){if(e>=this.visibleStart&&e<this.visibleEnd)return Promise.resolve();var n=this.sanitizeIndex(e-t.loadCount/2),r=n+t.loadCount;return this.reset(n,r),this.loadRange(n,r).then(this.show.bind(this))},e._loadNext=function(){var e=this.visibleEnd,n=this.visibleEnd=this.sanitizeIndex(this.visibleEnd+t.loadCount),r=e-2*t.loadCount;r>this.visibleStart&&r>=0&&(this.visibleStart=r+t.loadCount+1,this.loadPageTimeouts[r]&&(clearTimeout(this.loadPageTimeouts[r]),delete this.loadPageTimeouts[r],this.pagesLoading--)),this.loadPage(e,n)},e._loadPrevious=function(){var e=this.visibleStart,n=this.visibleStart=this.sanitizeIndex(this.visibleStart-t.loadCount),r=n+2*t.loadCount;r<this.visibleEnd&&r<=this.count()&&(this.visibleEnd=r,this.loadPageTimeouts[r]&&(clearTimeout(this.loadPageTimeouts[r]),delete this.loadPageTimeouts[r],this.pagesLoading--)),this.loadPage(n,e,!0)},e.loadPage=function(t,e,n){var r=this;void 0===n&&(n=!1),this.pagesLoading++;var i=function(){t<r.visibleStart||e>r.visibleEnd||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--})),delete r.loadPageTimeouts[t]}),this.pagesLoading-1?1e3:0)},e.loadRange=function(t,e){var n=[],r=[];return this.discussion.postIds().slice(t,e).forEach((function(t){var e=Wi.store.getById("posts",t);e&&e.discussion()&&void 0!==e.canEdit()?r.push(e):n.push(t)})),n.length?Wi.store.find("posts",n).then((function(t){return r.concat(t).sort((function(t,e){return t.number()-e.number()}))})):Promise.resolve(r)},e.show=function(t){var e;this.visibleStart=t.length?this.discussion.postIds().indexOf(null!=(e=t[0].id())?e:"0"):0,this.visibleEnd=this.sanitizeIndex(this.visibleStart+t.length)},e.reset=function(e,n){this.visibleStart=e||0,this.visibleEnd=this.sanitizeIndex(n||t.loadCount)},e.posts=function(){return this.discussion.postIds().slice(this.visibleStart,this.visibleEnd).map((function(t){var e=Wi.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;var ae=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}w(e,t);var n=e.prototype;return n.oninit=function(e){var n,r;t.prototype.oninit.call(this,e),this.load(),(Wi.discussions.hasItems()||Wi.discussions.isLoading())&&(null==(n=Wi.pane)||n.enable(),null==(r=Wi.pane)||r.hide()),this.bodyClass="App--discussion"},n.onremove=function(e){var n,r,i;t.prototype.onremove.call(this,e),null==(n=Wi.pane)||n.disable(),!this.discussion||!Wi.composer.composingReplyTo(this.discussion)||null!=(r=Wi.composer)&&null!=(i=r.fields)&&i.content()?Wi.composer.minimize():Wi.composer.hide()},n.view=function(){return m("div",{className:"DiscussionPage"},this.viewItems().toArray())},n.viewItems=function(){var t=new B;return t.add("pane",m(Gt,{state:Wi.discussions}),100),t.add("discussions",m("div",{className:"DiscussionPage-discussion"},this.discussion?this.pageContent().toArray():this.loadingItems().toArray()),90),t},n.loadingItems=function(){var t=new B;return t.add("spinner",m(ft,null),100),t},n.sidebar=function(){return m("nav",{className:"DiscussionPage-nav"},m("ul",null,H(this.sidebarItems().toArray())))},n.hero=function(){return m(U,{discussion:this.discussion})},n.pageContent=function(){var t=new B;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 B;return t.add("sidebar",this.sidebar(),100),t.add("poststream",m("div",{className:"DiscussionPage-stream"},m(Zt,{discussion:this.discussion,stream:this.stream,onPositionChange:this.positionChanged.bind(this)})),10),t},n.load=function(){var t=Wi.preloadedApiDocument();if(t)setTimeout(this.show.bind(this,t),0);else{var e=this.requestParams();Wi.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;Wi.history.push("discussion",t.title()),Wi.setTitle(t.title()),Wi.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 Wi.store.getById("posts",t.id)})).sort((function(t,e){return t.number()-e.number()})).slice(0,20)}this.stream=new se(t,i);var s=m.route.param("near"),a="reply"===s?"reply":parseInt(s);this.stream.goToNumber(a||(null!=(e=null==(n=i[0])?void 0:n.number())?e:0),!0).then((function(){r.discussion=t,Wi.current.set("discussion",t),Wi.current.set("stream",r.stream)}))},n.sidebarItems=function(){var t=new B;return this.discussion&&t.add("controls",m(ne,{icon:"fas fa-ellipsis-v",className:"App-primaryControl",buttonClassName:"Button--primary",accessibleToggleLabel:Wi.translator.trans("core.forum.discussion_controls.toggle_dropdown_accessible_label")},jt.controls(this.discussion,this).toArray()),100),t.add("scrubber",m(ee,{stream:this.stream,className:"App-titleControl"}),-100),t},n.positionChanged=function(t,e){var n=this.discussion;if(n){var r=Wi.route.discussion(n,this.near=t);window.history.replaceState(null,document.title,r),Wi.history.push("discussion",n.title()),Wi.session.user&&e>(n.lastReadPostNumber()||0)&&(n.save({lastReadPostNumber:e}),m.redraw())}},e}(S),ue=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},H(this.items().toArray()))},n.items=function(){return new B},e}(E),le=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.active=this.isActive(e),void 0===e.force&&(e.force=!0)},e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return n.tag=G,n.attrs.active=String(n.attrs.active),delete n.attrs.type,n},e.isActive=function(t){var e,n;return void 0!==t.active?t.active:(null==(e=m.route.get())?void 0:e.split("?")[0])===(null==(n=t.href)?void 0:n.split("?")[0])},e}(yt),ce=function(t){function e(){return t.apply(this,arguments)||this}w(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=ot(Wi.translator.trans("core.forum.header.session_dropdown_accessible_label"))};var n=e.prototype;return n.view=function(e){return t.prototype.view.call(this,D({},e,{children:this.items().toArray()}))},n.getButtonContent=function(){var t=Wi.session.user;return[Y(t)," ",m("span",{className:"Button-label"},Xt(t))]},n.items=function(){var t=new B,e=Wi.session.user;return t.add("profile",m(le,{icon:"fas fa-user",href:Wi.route.user(e)},Wi.translator.trans("core.forum.header.profile_button")),100),t.add("settings",m(le,{icon:"fas fa-cog",href:Wi.route("settings")},Wi.translator.trans("core.forum.header.settings_button")),50),Wi.forum.attribute("adminUrl")&&t.add("administration",m(le,{icon:"fas fa-wrench",href:Wi.forum.attribute("adminUrl"),target:"_blank"},Wi.translator.trans("core.forum.header.admin_button")),0),t.add("separator",m(O,null),-90),t.add("logOut",m(yt,{icon:"fas fa-sign-out-alt",onclick:Wi.session.logout.bind(Wi.session)},Wi.translator.trans("core.forum.header.log_out_button")),-100),t},e}(ut);function de(t){if(!t||"object"!=typeof t||t instanceof Array)return!1;var e=t.tag;return("string"!=typeof e||"a"===e||"button"===e)&&("object"!=typeof e&&"function"!=typeof e||!("initAttrs"in e)||e.initAttrs(t.attrs),"object"!=typeof e&&"function"!=typeof e||!("isActive"in e)?t.attrs.active:e.isActive(t.attrs))}var he=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.initAttrs=function(e){null!=e.caretIcon||(e.caretIcon="fas fa-sort"),t.initAttrs.call(this,e),e.className=M(e.className,"Dropdown--select")},e.prototype.getButtonContent=function(t){var e=t.find(de),n=e&&"object"==typeof e&&"children"in e&&e.children||this.attrs.defaultLabel;return Array.isArray(n)&&(n=n[0]),[m("span",{className:"Button-label"},n),this.attrs.caretIcon?nt(this.attrs.caretIcon,{className:"Button-caret"}):null]},e}(ut),fe=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=v.store),this.data={},this.freshness=new Date,this.exists=!1,this.store=void 0,this.data=t,this.store=e}var e=t.prototype;return e.id=function(){return"id"in this.data?this.data.id:void 0},e.attribute=function(t){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){if("id"in e&&(this.data.id=e.id),"type"in e&&(this.data.type=e.type),"attributes"in e){var n;for(var r in(n=this.data).attributes||(n.attributes={}),e.attributes){var i=e.attributes[r];i&&i instanceof t&&(vt("Providing models as attributes to `Model.pushData()` or `Model.pushAttributes()` is deprecated.","3249"),delete e.attributes[r],e.relationships||(e.relationships={}),e.relationships[r]={data:t.getIdentifier(i)})}Object.assign(this.data.attributes,e.attributes)}if("relationships"in e){var o,s=null!=(o=this.data.relationships)?o:{};for(var a in e.relationships){var u=e.relationships[a];if(null!==u){var l;l=u instanceof t?{data:t.getIdentifier(u)}:u instanceof Array?{data:u.map(t.getIdentifier)}:u,e.relationships[a]=l,s[a]=l}else delete s[a],delete e.relationships[a]}this.data.relationships=s}return this.freshness=new Date,this},e.pushAttributes=function(t){this.pushData({attributes:t})},e.save=function(e,n){var r=this;void 0===n&&(n={});var i={type:this.data.type,attributes:e};if("id"in this.data&&(i.id=this.data.id),e.relationships){for(var o in i.relationships={},e.relationships){var s=e.relationships[o];null!==s&&(i.relationships[o]={data:s instanceof Array?s.map(t.getIdentifier):t.getIdentifier(s)})}delete e.relationships}var a=this.copyData();this.pushData(i);var u={data:i,meta:n.meta||void 0};return v.request(D({method:this.exists?"PATCH":"POST",url:v.forum.attribute("apiUrl")+this.apiEndpoint(),body:u},n)).then((function(t){return r.store.pushPayload(t)}),(function(t){throw r.pushData(a),m.redraw(),t}))},e.delete=function(t,e){var n=this;return void 0===t&&(t={}),void 0===e&&(e={}),this.exists?v.request(D({method:"DELETE",url:v.forum.attribute("apiUrl")+this.apiEndpoint(),body:t},e)).then((function(){n.exists=!1,n.store.remove(n)})):Promise.resolve()},e.apiEndpoint=function(){return"/"+this.data.type+("id"in this.data?"/"+this.data.id:"")},e.copyData=function(){return JSON.parse(JSON.stringify(this.data))},e.rawRelationship=function(t){var e,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 pe(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i=e.slice(0,-1),o=e.slice(-1)[0],s={};return function(){var t=this,e=!1;return i.forEach((function(n){var r=t[n],i="function"==typeof r?r.call(t):r;s[n]!==i&&(e=!0,s[n]=i)})),e&&(r=o.apply(this,i.map((function(t){return s[t]})))),r}}function me(t){if(!t||t.length<4)return!1;var e=t.replace("#","");return 3===e.length&&(e+=e),(299*parseInt(e.slice(0,2),16)+587*parseInt(e.slice(2,4),16)+114*parseInt(e.slice(4,6),16))/1e3<(parseInt(getComputedStyle(document.body).getPropertyValue("--yiq-threshold").trim())||128)}function ve(t){return t?me(t)?"text-contrast--light":"text-contrast--dark":"text-contrast--unchanged"}var ge,ye=["type","icon","label","color","style"],be=function(t){function e(){return t.apply(this,arguments)||this}return w(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=q(t,ye),u=M("Badge",[e&&"Badge--"+e],a.className,ve(i)),l=n?nt(n,{className:"Badge-icon"}):m.trust("&nbsp;"),c=D({},s,{"--badge-bg":i}),d=D({},a,{className:u,style:c}),h=m("div",d,l);return r?m(Et,{text:r},h):h},e}(E),we=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.title=function(){return fe.attribute("title").call(this)},n.slug=function(){return fe.attribute("slug").call(this)},n.createdAt=function(){return fe.attribute("createdAt",fe.transformDate).call(this)},n.user=function(){return fe.hasOne("user").call(this)},n.firstPost=function(){return fe.hasOne("firstPost").call(this)},n.lastPostedAt=function(){return fe.attribute("lastPostedAt",fe.transformDate).call(this)},n.lastPostedUser=function(){return fe.hasOne("lastPostedUser").call(this)},n.lastPost=function(){return fe.hasOne("lastPost").call(this)},n.lastPostNumber=function(){return fe.attribute("lastPostNumber").call(this)},n.commentCount=function(){return fe.attribute("commentCount").call(this)},n.replyCount=function(){return pe("commentCount",(function(t){var e;return Math.max(0,(null!=(e=t)?e:0)-1)})).call(this)},n.posts=function(){return fe.hasMany("posts").call(this)},n.mostRelevantPost=function(){return fe.hasOne("mostRelevantPost").call(this)},n.lastReadAt=function(){return fe.attribute("lastReadAt",fe.transformDate).call(this)},n.lastReadPostNumber=function(){return fe.attribute("lastReadPostNumber").call(this)},n.isUnread=function(){return pe("unreadCount",(function(t){return!!t})).call(this)},n.isRead=function(){return pe("unreadCount",(function(t){return!(!v.session.user||t)})).call(this)},n.hiddenAt=function(){return fe.attribute("hiddenAt",fe.transformDate).call(this)},n.hiddenUser=function(){return fe.hasOne("hiddenUser").call(this)},n.isHidden=function(){return pe("hiddenAt",(function(t){return!!t})).call(this)},n.canReply=function(){return fe.attribute("canReply").call(this)},n.canRename=function(){return fe.attribute("canRename").call(this)},n.canHide=function(){return fe.attribute("canHide").call(this)},n.canDelete=function(){return fe.attribute("canDelete").call(this)},n.removePost=function(t){var e=this.rawRelationship("posts");e&&e.some((function(n,r){return t===n.id&&(e.splice(r,1),!0)}))},n.unreadCount=function(){var t,e,n,r=v.session.user;if(r&&(null!=(t=null==(e=r.markedAllAsReadAt())?void 0:e.getTime())?t:0)<(null==(n=this.lastPostedAt())?void 0:n.getTime())){var i,o,s=Math.max(0,(null!=(i=this.lastPostNumber())?i:0)-(this.lastReadPostNumber()||0));return Math.min(s,null!=(o=this.commentCount())?o:0)}return 0},n.badges=function(){var t=new B;return this.isHidden()&&t.add("hidden",m(be,{type:"hidden",icon:"fas fa-trash",label:v.translator.trans("core.lib.badge.hidden_tooltip")})),t},n.postIds=function(){var t,e;return null!=(t=null==(e=this.rawRelationship("posts"))?void 0:e.map((function(t){return t.id})))?t:[]},e}(fe),De=function(t){function e(){return t.apply(this,arguments)||this}w(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"},Wi.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 B,e=this.attrs.state;return t.add("mark_all_as_read",m(Et,{text:Wi.translator.trans("core.forum.notifications.mark_all_as_read_tooltip")},m(yt,{className:"Button Button--link","data-container":".NotificationList",icon:"fas fa-check",title:Wi.translator.trans("core.forum.notifications.mark_all_as_read_tooltip"),onclick:e.markAllAsRead.bind(e)})),70),t.add("delete_all",m(Et,{text:Wi.translator.trans("core.forum.notifications.delete_all_tooltip")},m(yt,{className:"Button Button--link","data-container":".NotificationList",icon:"fas fa-trash-alt",title:Wi.translator.trans("core.forum.notifications.delete_all_tooltip"),onclick:function(){confirm(Wi.translator.trans("core.forum.notifications.delete_all_confirm"))&&e.deleteAll.call(e)}})),50),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 we?i=r:r&&r.discussion&&(i=r.discussion());var o=i?i.id():0;n[o]=n[o]||{discussion:i,notifications:[]},n[o].notifications.push(t),-1===e.indexOf(n[o])&&e.push(n[o])}})),e.map((function(t){var e=t.discussion&&t.discussion.badges().toArray();return m("div",{className:"NotificationGroup"},t.discussion?m(G,{className:"NotificationGroup-header",href:Wi.route.discussion(t.discussion)},e&&!!e.length&&m("ul",{className:"NotificationGroup-badges badges"},H(e)),m("span",null,t.discussion.title())):m("div",{className:"NotificationGroup-header"},Wi.forum.attribute("title")),m("ul",{className:"NotificationGroup-content"},t.notifications.map((function(t){var e=Wi.notificationComponents[t.contentType()];return!!e&&m("li",null,m(e,{notification:t}))}))))}))})):m("div",{className:"NotificationList-empty"},Wi.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}(E),xe=function(t){function e(){return t.apply(this,arguments)||this}w(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=ot(Wi.translator.trans("core.forum.notifications.tooltip"))),e.icon||(e.icon="fas fa-bell"),e.accessibleToggleLabel||(e.accessibleToggleLabel=ot(Wi.translator.trans("core.forum.notifications.toggle_dropdown_accessible_label"))),t.initAttrs.call(this,e)};var n=e.prototype;return n.getButton=function(e){var n=this.getNewCount(),r=t.prototype.getButton.call(this,e);return r.attrs.title=this.attrs.label,r.attrs.className=M(r.attrs.className,[n&&"new"]),r.attrs.onclick=this.onclick.bind(this),r},n.getButtonContent=function(){var t=this.getUnreadCount();return[this.attrs.icon?nt(this.attrs.icon,{className:"Button-icon"}):null,0!==t&&m("span",{className:"NotificationsDropdown-unread"},t),m("span",{className:"Button-label"},this.attrs.label)]},n.getMenu=function(){return m("div",{className:M("Dropdown-menu",this.attrs.menuClassName),onclick:this.menuClick.bind(this)},this.showing&&m(De,{state:this.attrs.state}))},n.onclick=function(){Wi.drawer.isOpen()?this.goToRoute():this.attrs.state.load()},n.goToRoute=function(){m.route.set(Wi.route("notifications"))},n.getUnreadCount=function(){return Wi.session.user.unreadNotificationCount()},n.getNewCount=function(){return Wi.session.user.newNotificationCount()},n.menuClick=function(t){(t.shiftKey||t.metaKey||t.ctrlKey||1===t.button)&&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"}(ge||(ge={}));var Ce=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(ge.ArrowUp,(function(e){e.preventDefault(),t(e)})),this},e.onDown=function(t){return this.callbacks.set(ge.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(ge.Tab,n),this.callbacks.set(ge.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(ge.Escape,(function(e){e.stopPropagation(),e.preventDefault(),t(e)})),this},e.onRemove=function(t){return this.callbacks.set(ge.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 Ae(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 Ee(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function s(t){Ae(o,r,i,s,a,"next",t)}function a(t){Ae(o,r,i,s,a,"throw",t)}s(void 0)}))}}var Ne=n(2507),ke=n.n(Ne),Se=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).query=void 0,e.discussion=void 0,e.mostRelevantPost=void 0,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.query=this.attrs.query,this.discussion=this.attrs.discussion,this.mostRelevantPost=this.attrs.mostRelevantPost},n.view=function(){return m("li",{className:"DiscussionSearchResult","data-index":"discussions"+this.discussion.id()},m(G,{href:Wi.route.discussion(this.discussion,this.mostRelevantPost&&this.mostRelevantPost.number()||0)},this.viewItems().toArray()))},n.discussionTitle=function(){return this.discussion.title()},n.mostRelevantPostContent=function(){var t;return null==(t=this.mostRelevantPost)?void 0:t.contentPlain()},n.viewItems=function(){var t,e=new B;return e.add("discussion-title",m("div",{className:"DiscussionSearchResult-title"},et(this.discussionTitle(),this.query)),90),this.mostRelevantPost&&e.add("most-relevant",m("div",{className:"DiscussionSearchResult-excerpt"},et(null!=(t=this.mostRelevantPostContent())?t:"",this.query,100)),80),e},e}(E),Te=function(){function t(){this.results=new Map,this.queryString=null}var e=t.prototype;return e.search=function(){var t=Ee(ke().mark((function t(e){var n,r=this;return ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=e.toLowerCase(),this.results.set(e,[]),this.setQueryString(e),n={filter:{q:this.queryString||e},page:{limit:this.limit()},include:this.includes().join(",")},t.abrupt("return",Wi.store.find("discussions",n).then((function(t){r.results.set(e,t),m.redraw()})));case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.view=function(t){t=t.toLowerCase();var e=(this.results.get(t)||[]).map((function(e){var n=e.mostRelevantPost();return m(Se,{query:t,discussion:e,mostRelevantPost:n})}));return[m("li",{className:"Dropdown-header"},Wi.translator.trans("core.forum.search.discussions_heading")),m("li",null,m(le,{icon:"fas fa-search",href:Wi.route("index",{q:this.queryString})},Wi.translator.trans("core.forum.search.all_discussions_button",{query:t})))].concat(e)},e.includes=function(){return["mostRelevantPost"]},e.limit=function(){return 3},e.queryMutators=function(){return[]},e.setQueryString=function(t){this.queryString=t+" "+this.queryMutators().join(" ")},t}(),Fe=function(){function t(){this.results=new Map}var e=t.prototype;return e.search=function(){var t=Ee(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",Wi.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(Wi.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"},Wi.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(G,{href:Wi.route.user(e)},Y(e),D({},n,{text:void 0,children:r})))}))):[]},t}(),_e=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}w(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=ot(Wi.translator.trans("core.forum.header.search_placeholder")),r=!!e,i=!(!this.searchState.getValue()||!this.hasFocus),o=!(this.loadingSources||!this.searchState.getValue());return m("div",{role:"search","aria-label":Wi.translator.trans("core.forum.header.search_role_label"),className:M("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":Wi.translator.trans("core.forum.header.search_clear_button_accessible_label"),type:"button"},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 Ce,this.navigator.onUp((function(){return r.setIndex(r.getCurrentNumericIndex()-1,!0)})).onDown((function(){return r.setIndex(r.getCurrentNumericIndex()+1,!0)})).onSelect(this.selectResult.bind(this),!0).onCancel(this.clear.bind(this)).bindTo(s),s.on("input focus",(function(){var t=this.value.toLowerCase();t&&(i.searchTimeout&&clearTimeout(i.searchTimeout),i.searchTimeout=window.setTimeout((function(){var e;o.isCached(t)||(t.length>=i.constructor.MIN_SEARCH_LEN&&(null==(e=i.sources)||e.map((function(e){e.search&&(i.loadingSources++,e.search(t).then((function(){i.loadingSources=Math.max(0,i.loadingSources-1),m.redraw()})))}))),o.cache(t),m.redraw())}),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 B;return Wi.forum.attribute("canViewForum")&&t.add("discussions",new Te),Wi.forum.attribute("canSearchUsers")&&t.add("users",new Fe),t},n.selectableItems=function(){return this.$(".Search-results > li:not(.Dropdown-header)")},n.getCurrentNumericIndex=function(){return Math.max(0,this.selectableItems().index(this.getItem(this.index)))},n.getItem=function(t){var e=this.selectableItems(),n=e.filter('[data-index="'+t+'"]');return n.length||(n=e.eq(t)),n},n.setIndex=function(t,e){void 0===e&&(e=!1);var n=this.selectableItems(),r=n.parent(),i=t;t<0?i=n.length-1:t>=n.length&&(i=0);var o=n.removeClass("active").eq(i).addClass("active");if(this.index=parseInt(o.attr("data-index"))||i,e){var s,a=r.scrollTop(),u=r.offset().top,l=u+r.outerHeight(),c=o.offset().top,d=c+o.outerHeight();c<u?s=a-u+c-parseInt(r.css("padding-top"),10):d>l&&(s=a-l+d+parseInt(r.css("padding-bottom"),10)),void 0!==s&&r.stop(!0).animate({scrollTop:s},100)}},F(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}(E);_e.MIN_SEARCH_LEN=3;var Pe=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},H(this.items().toArray()))},n.items=function(){var t=new B;if(t.add("search",m(_e,{state:Wi.search}),30),Wi.forum.attribute("showLanguageSelector")&&Object.keys(Wi.data.locales).length>1){var e=[],n=function(t){e.push(m(yt,{active:Wi.data.locale===t,icon:Wi.data.locale!==t||"fas fa-check",onclick:function(){Wi.session.user?Wi.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())}},Wi.data.locales[t]))};for(var r in Wi.data.locales)n(r);t.add("locale",m(he,{buttonClassName:"Button Button--link",accessibleToggleLabel:Wi.translator.trans("core.forum.header.locale_dropdown_accessible_label")},e),20)}return Wi.session.user?(t.add("notifications",m(xe,{state:Wi.notifications}),10),t.add("session",m(ce,null),0)):(Wi.forum.attribute("allowSignUp")&&t.add("signUp",m(yt,{className:"Button Button--link",onclick:function(){return Wi.modal.show(Lt)}},Wi.translator.trans("core.forum.header.sign_up_link")),10),t.add("logIn",m(yt,{className:"Button Button--link",onclick:function(){return Wi.modal.show(Mt)}},Wi.translator.trans("core.forum.header.log_in_link")),0)),t},e}(E),Be=function(t){function e(){return t.apply(this,arguments)||this}return w(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:Bt("")},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={}),!!N(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"===Wi.screen()},e.composingReplyTo=function(t){return this.isVisible()&&this.bodyMatches(Tt,{discussion:t})},e.preventExit=function(){if(this.isVisible()&&this.onExit)return this.onExit.callback()?!confirm(this.onExit.message):void 0},e.preventClosingWhen=function(t,e){this.onExit={callback:t,message:e}},e.minimumHeight=function(){return 200},e.maximumHeight=function(){return $(window).height()-$("#header").outerHeight()},e.computedHeight=function(){return this.position===t.Position.MINIMIZED?"":this.position===t.Position.FULLSCREEN?$(window).height():Math.max(this.minimumHeight(),Math.min(this.height,this.maximumHeight()))},t}();Ie.Position={HIDDEN:"hidden",NORMAL:"normal",MINIMIZED:"minimized",FULLSCREEN:"fullScreen"};const Oe=Ie;var Le=function(t){function e(){return t.apply(this,arguments)||this}w(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,r=t.componentClass;return m("div",{className:"Composer "+M(e)},m("div",{className:"Composer-handle",oncreate:this.configHandle.bind(this)}),m("ul",{className:"Composer-controls"},H(this.controlItems().toArray())),m("div",{className:"Composer-content",onclick:n},r&&m(r,Object.assign({},t.attrs,{composer:this.state,disabled:e.minimized}))))},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.state.position===this.prevPosition?this.updateHeight():(this.animatePositionChange(),this.prevPosition=this.state.position)},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.initializeHeight(),this.$().hide().css("bottom",-this.state.computedHeight()),this.$().on("focus blur",":input,.TextEditor-editorContainer",(function(t){n.active="focusin"===t.type,m.redraw()})),this.$().on("keydown",":input,.TextEditor-editorContainer","esc",(function(){return n.state.close()})),this.handlers={},$(window).on("resize",this.handlers.onresize=this.updateHeight.bind(this)).resize(),$(document).on("mousemove",this.handlers.onmousemove=this.onmousemove.bind(this)).on("mouseup",this.handlers.onmouseup=this.onmouseup.bind(this))},n.onremove=function(e){t.prototype.onremove.call(this,e),$(window).off("resize",this.handlers.onresize),$(document).off("mousemove",this.handlers.onmousemove).off("mouseup",this.handlers.onmouseup)},n.configHandle=function(t){var e=this;$(t.dom).css("cursor","row-resize").bind("dragstart mousedown",(function(t){return t.preventDefault()})).mousedown((function(t){e.mouseStart=t.clientY,e.heightStart=e.$().height(),e.handle=$(this),$("body").css("cursor","row-resize")}))},n.onmousemove=function(t){if(this.handle){var e=this.mouseStart-t.clientY;this.changeHeight(this.heightStart+e);var n=$(window).scrollTop(),r=n>0&&n+$(window).height()>=$(document).height();this.updateBodyPadding(r)}},n.onmouseup=function(){this.handle&&(this.handle=null,$("body").css("cursor",""))},n.focus=function(){this.$(".Composer-content :input:enabled:visible, .TextEditor-editor").first().focus()},n.updateHeight=function(){var t=this.state.computedHeight(),e=this.$(".Composer-flexible");if(this.$().height(t),e.length){var n=e.offset().top-this.$().offset().top,r=parseInt(e.css("padding-bottom"),10),i=this.$(".Composer-footer").outerHeight(!0);e.height(this.$().outerHeight()-n-r-i)}},n.updateBodyPadding=function(){var t=this.state.position!==Oe.Position.HIDDEN&&this.state.position!==Oe.Position.MINIMIZED&&"phone"!==Wi.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"===Wi.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 B;return this.state.position===Oe.Position.FULLSCREEN?t.add("exitFullScreen",m(Be,{icon:"fas fa-compress",title:Wi.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",m(Be,{icon:"fas fa-minus minimize",title:Wi.translator.trans("core.forum.composer.minimize_tooltip"),onclick:this.state.minimize.bind(this.state),itemClassName:"App-backControl"})),t.add("fullScreen",m(Be,{icon:"fas fa-expand",title:Wi.translator.trans("core.forum.composer.full_screen_tooltip"),onclick:this.state.fullScreen.bind(this.state)}))),t.add("close",m(Be,{icon:"fas fa-times",title:Wi.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}(E),Me=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(t){var e,n,r,i,o,s=this,a=this.attrs.notification,u=null!=(e=null==(n=this.href)?void 0:n.call(this))?e:"",l=a.fromUser();return m(G,{className:M("Notification","Notification--"+a.contentType(),[!a.isRead()&&"unread"]),href:u,external:u.includes("://"),onclick:this.markAsRead.bind(this)},Y(l||null),nt(null==(r=this.icon)?void 0:r.call(this),{className:"Notification-icon"}),m("span",{className:"Notification-title"},m("span",{className:"Notification-content"},null==(i=this.content)?void 0:i.call(this)),m("span",{className:"Notification-title-spring"}),lt(a.createdAt())),!a.isRead()&&m(yt,{className:"Notification-action Button Button--link",icon:"fas fa-check",title:Wi.translator.trans("core.forum.notifications.mark_as_read_tooltip"),onclick:function(t){t.preventDefault(),t.stopPropagation(),s.markAsRead()}}),m("div",{className:"Notification-excerpt"},null==(o=this.excerpt)?void 0:o.call(this)))},n.markAsRead=function(){var t,e;this.attrs.notification.isRead()||(null==(t=Wi.session.user)||t.pushAttributes({unreadNotificationCount:(null!=(e=Wi.session.user.unreadNotificationCount())?e:1)-1}),this.attrs.notification.save({isRead:!0}))},e}(E),$e=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-pencil-alt"},n.href=function(){var t=this.attrs.notification,e=t.subject();return e?Wi.route.discussion(e,t.content().postNumber):"#"},n.content=function(){return Wi.translator.trans("core.forum.notifications.discussion_renamed_text",{user:this.attrs.notification.fromUser()})},n.excerpt=function(){return null},e}(Me);function je(t){Wi.composer.isFullScreen()&&(Wi.composer.minimize(),t.stopPropagation())}var Re=function(t){function e(){return t.apply(this,arguments)||this}w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.submitLabel=e.submitLabel||Wi.translator.trans("core.forum.composer_edit.submit_button"),e.confirmExit=e.confirmExit||Wi.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(G,{href:Wi.route.discussion(n.discussion(),n.number()),onclick:je},Wi.translator.trans("core.forum.composer_edit.post_link",{number:n.number(),discussion:n.discussion().title()})))),e},n.jumpToPreview=function(t){je(t),m.route.set(Wi.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(Wi.viewingDiscussion(e))Wi.current.get("stream").goToNumber(n.number());else var r=Wi.alerts.show({type:"success",controls:[m(yt,{className:"Button Button--link",onclick:function(){m.route.set(Wi.route.post(n)),Wi.alerts.dismiss(r)}},Wi.translator.trans("core.forum.composer_edit.view_button"))]},Wi.translator.trans("core.forum.composer_edit.edited_message"));t.composer.hide()}),this.loaded.bind(this))},e}(kt);const He={controls:function(t,e){var n=this,r=new B;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(O,null)))})),r},userControls:function(t,e){return new B},moderationControls:function(t,e){var n=new B;return"comment"===t.contentType()&&t.canEdit()&&(t.isHidden()||n.add("edit",m(yt,{icon:"fas fa-pencil-alt",onclick:this.editAction.bind(t)},Wi.translator.trans("core.forum.post_controls.edit_button")))),n},destructiveControls:function(t,e){var n=new B;return"comment"!==t.contentType()||t.isHidden()?("comment"===t.contentType()&&t.canHide()&&n.add("restore",m(yt,{icon:"fas fa-reply",onclick:this.restoreAction.bind(t)},Wi.translator.trans("core.forum.post_controls.restore_button"))),t.canDelete()&&n.add("delete",m(yt,{icon:"fas fa-times",onclick:this.deleteAction.bind(t,e)},Wi.translator.trans("core.forum.post_controls.delete_forever_button")))):t.canHide()&&n.add("hide",m(yt,{icon:"far fa-trash-alt",onclick:this.hideAction.bind(t)},Wi.translator.trans("core.forum.post_controls.delete_button"))),n},editAction:function(){var t=this;return new Promise((function(e){return Wi.composer.load(Re,{post:t}),Wi.composer.show(),e()}))},hideAction:function(){if(confirm(ot(Wi.translator.trans("core.forum.post_controls.hide_confirmation"))))return this.pushData({attributes:{hiddenAt:new Date},relationships:{hiddenUser:Wi.session.user}}),this.save({isHidden:!0}).then((function(){return m.redraw()}))},restoreAction:function(){return this.pushData({attributes:{hiddenAt:null},relationships:{hiddenUser:null}}),this.save({isHidden:!1}).then((function(){return m.redraw()}))},deleteAction:function(t){var e=this;if(confirm(ot(Wi.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||(Wi.discussions.removeDiscussion(t),Wi.viewingDiscussion(t)&&Wi.history.back())})).catch((function(){})).then((function(){t&&(t.loading=!1),m.redraw()}))}};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).loading=!1,e.subtree=void 0,e}w(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}))},n.view=function(t){var 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.viewItems(n,r).toArray()))},n.viewItems=function(t,e){var n=this,r=new B;return r.add("content",this.loading?m(ft,null):this.content(),100),r.add("actions",m("aside",{className:"Post-actions"},m("ul",null,H(this.actionItems().toArray()),!!t.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 n.$(".Post-controls").addClass("open")},onhide:function(){return n.$(".Post-controls").removeClass("open")},accessibleToggleLabel:Wi.translator.trans("core.forum.post_controls.toggle_dropdown_accessible_label")},t)))),90),r.add("footer",m("footer",{className:"Post-footer"},e.length>0?m("ul",null,H(e)):m("ul",null)),80),r},n.onbeforeupdate=function(e){return t.prototype.onbeforeupdate.call(this,e),this.subtree.needsRebuild()},n.onupdate=function(e){t.prototype.onupdate.call(this,e);var n=this.$(".Post-actions"),r=this.$(".Post-controls");n.toggleClass("openWithin",r.hasClass("open"))},n.elementAttrs=function(){return{}},n.content=function(){return[]},n.classes=function(t){var e=(t||"").split(" ").concat(["Post"]),n=this.attrs.post.user(),r=this.attrs.post.discussion();return this.loading&&e.push("Post--loading"),n&&n===Wi.session.user&&e.push("Post--by-actor"),n&&n===r.user()&&e.push("Post--by-start-user"),e},n.actionItems=function(){return new B},n.footerItems=function(){return new B},e}(E),qe=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.group&&(e.icon=e.group.icon()||"",e.color=e.group.color()||"",e.label=void 0===e.label?e.group.nameSingular():e.label,e.type="group--"+e.group.id(),delete e.group)},e}(be),ze=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.nameSingular=function(){return fe.attribute("nameSingular").call(this)},n.namePlural=function(){return fe.attribute("namePlural").call(this)},n.color=function(){return fe.attribute("color").call(this)},n.icon=function(){return fe.attribute("icon").call(this)},n.isHidden=function(){return fe.attribute("isHidden").call(this)},e}(fe);ze.ADMINISTRATOR_ID="1",ze.GUEST_ID="2",ze.MEMBER_ID="3";var Ve=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}w(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=Bt(r.username()||""),this.email=Bt(r.email()||""),this.isEmailConfirmed=Bt(r.isEmailConfirmed()||!1),this.setPassword=Bt(!1),this.password=Bt(r.password()||"");var i=r.groups()||[];v.store.all("groups").filter((function(t){return![ze.GUEST_ID,ze.MEMBER_ID].includes(t.id())})).forEach((function(t){return n.groups[t.id()]=Bt(i.includes(t))}))},n.className=function(){return"EditUserModal Modal--small"},n.title=function(){return v.translator.trans("core.lib.edit_user.title")},n.content=function(){var t=this.fields().toArray();return m("div",{className:"Modal-body"},t.length>1?m("div",{className:"Form"},this.fields().toArray()):v.translator.trans("core.lib.edit_user.nothing_available"))},n.fields=function(){var t=this,e=new B;return this.attrs.user.canEditCredentials()&&(e.add("username",m("div",{className:"Form-group"},m("label",null,v.translator.trans("core.lib.edit_user.username_heading")),m("input",{className:"FormControl",placeholder:ot(v.translator.trans("core.lib.edit_user.username_label")),bidi:this.username,disabled:this.nonAdminEditingAdmin()})),40),v.session.user!==this.attrs.user&&(e.add("email",m("div",{className:"Form-group"},m("label",null,v.translator.trans("core.lib.edit_user.email_heading")),m("div",null,m("input",{className:"FormControl",placeholder:ot(v.translator.trans("core.lib.edit_user.email_label")),bidi:this.email,disabled:this.nonAdminEditingAdmin()})),!this.isEmailConfirmed()&&this.userIsAdmin(v.session.user)&&m("div",null,m(yt,{className:"Button Button--block",loading:this.loading,onclick:this.activate.bind(this)},v.translator.trans("core.lib.edit_user.activate_button")))),30),e.add("password",m("div",{className:"Form-group"},m("label",null,v.translator.trans("core.lib.edit_user.password_heading")),m("div",null,m("label",{className:"checkbox"},m("input",{type:"checkbox",onchange:function(e){var n=e.target;t.setPassword(n.checked),m.redraw.sync(),n.checked&&t.$("[name=password]").select(),e.redraw=!1},disabled:this.nonAdminEditingAdmin()}),v.translator.trans("core.lib.edit_user.set_password_label")),this.setPassword()&&m("input",{className:"FormControl",type:"password",name:"password",placeholder:ot(v.translator.trans("core.lib.edit_user.password_label")),bidi:this.password,disabled:this.nonAdminEditingAdmin()}))),20))),this.attrs.user.canEditGroups()&&e.add("groups",m("div",{className:"Form-group EditUserModal-groups"},m("label",null,v.translator.trans("core.lib.edit_user.groups_heading")),m("div",null,Object.keys(this.groups).map((function(t){return v.store.getById("groups",t)})).filter(Boolean).map((function(e){return e&&m("label",{className:"checkbox"},m("input",{type:"checkbox",bidi:t.groups[e.id()],disabled:e.id()===ze.ADMINISTRATOR_ID&&(t.attrs.user===v.session.user||!t.userIsAdmin(v.session.user))}),m(qe,{group:e,label:null})," ",e.nameSingular())})))),10),e.add("submit",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary",type:"submit",loading:this.loading},v.translator.trans("core.lib.edit_user.submit_button"))),-10),e},n.activate=function(){var t=this;this.loading=!0;var e={username:this.username(),isEmailConfirmed:!0};this.attrs.user.save(e,{errorHandler:this.onerror.bind(this)}).then((function(){t.isEmailConfirmed(!0),t.loading=!1,m.redraw()})).catch((function(){t.loading=!1,m.redraw()}))},n.data=function(){var t=this,e={},n={};return this.attrs.user.canEditCredentials()&&!this.nonAdminEditingAdmin()&&(e.username=this.username(),v.session.user!==this.attrs.user&&(e.email=this.email()),this.setPassword()&&(e.password=this.password())),this.attrs.user.canEditGroups()&&(n.groups=Object.keys(this.groups).filter((function(e){return t.groups[e]()})).map((function(t){return v.store.getById("groups",t)})).filter((function(t){return t instanceof ze}))),e.relationships=n,e},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0,this.attrs.user.save(this.data(),{errorHandler:this.onerror.bind(this)}).then(this.hide.bind(this)).catch((function(){e.loading=!1,m.redraw()}))},n.nonAdminEditingAdmin=function(){return this.userIsAdmin(this.attrs.user)&&!this.userIsAdmin(v.session.user)},n.userIsAdmin=function(t){return!!((null==t?void 0:t.groups())||[]).some((function(t){return(null==t?void 0:t.id())===ze.ADMINISTRATOR_ID}))},e}(_t),We=function(t){function e(){return t.apply(this,arguments)||this}w(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}(E),Ge=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).user=null,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.bodyClass="App--user"},n.view=function(){return m("div",{className:"UserPage"},this.user?[m(Xe,{user:this.user,className:"Hero UserHero",editable:this.user.canEdit()||this.user===Wi.session.user,controlsButtonClassName:"Button"}),m("div",{className:"container"},m("div",{className:"sideNavContainer"},m(We,null,m("nav",{className:"sideNav UserPage-nav"},m("ul",null,H(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,Wi.current.set("user",t),Wi.setTitle(t.displayName()),m.redraw()},n.loadUser=function(t){var e=this,n=t.toLowerCase();Wi.preloadedApiDocument(),Wi.store.all("users").some((function(r){return!(r.username().toLowerCase()!==n&&r.id()!==t||!r.joinTime()||(e.show(r),0))})),this.user||Wi.store.find("users",t,{bySlug:!0}).then(this.show.bind(this))},n.sidebarItems=function(){var t=new B;return t.add("nav",m(he,{className:"App-titleControl",buttonClassName:"Button"},this.navItems().toArray())),t},n.navItems=function(){var t=new B,e=this.user,n=Wi.session.user===e;return t.add("posts",m(le,{href:Wi.route("user.posts",{username:e.slug()}),icon:"far fa-comment"},Wi.translator.trans("core.forum.user.posts_link")," ",m("span",{className:"Button-badge"},e.commentCount())),100),t.add("discussions",m(le,{href:Wi.route("user.discussions",{username:e.slug()}),icon:"fas fa-bars"},Wi.translator.trans("core.forum.user.discussions_link")," ",m("span",{className:"Button-badge"},e.discussionCount())),90),n&&(t.add("separator",m(O,null),-90),t.add("settings",m(le,{href:Wi.route("settings"),icon:"fas fa-cog"},Wi.translator.trans("core.forum.user.settings_link")),-100)),(n||Wi.forum.attribute("canModerateAccessTokens"))&&(n||t.add("security-separator",m(O,null),-90),t.add("security",m(le,{href:Wi.route("user.security",{username:e.slug()}),icon:"fas fa-shield-alt"},Wi.translator.trans("core.forum.user.security_link")),-100)),t},e}(S);const Ye={controls:function(t,e){var n=this,r=new B;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(O,null)))})),r},userControls:function(){return new B},moderationControls:function(t){var e=new B;return(t.canEdit()||t.canEditCredentials()||t.canEditGroups())&&e.add("edit",m(yt,{icon:"fas fa-pencil-alt",onclick:this.editAction.bind(this,t)},Wi.translator.trans("core.forum.user_controls.edit_button"))),e},destructiveControls:function(t){var e=new B;return"1"!==t.id()&&t.canDelete()&&e.add("delete",m(yt,{icon:"fas fa-times",onclick:this.deleteAction.bind(this,t)},Wi.translator.trans("core.forum.user_controls.delete_button"))),e},deleteAction:function(t){var e=this;confirm(Wi.translator.trans("core.forum.user_controls.delete_confirmation"))&&t.delete().then((function(){e.showDeletionAlert(t,"success"),Wi.current.matches(Ge,{user:t})?Wi.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];Wi.alerts.show({type:e},Wi.translator.trans(n,{user:t,email:t.email()}))},editAction:function(t){Wi.modal.show(Ve,{user:t})}};var Ke=function(t){function e(){return t.apply(this,arguments)||this}w(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:M(["AvatarEditor","Dropdown",this.attrs.className,this.loading&&"loading",this.isDraggedOver&&"dragover"])},Y(t,{loading:"eager"}),m("a",{className:t.avatarUrl()?"Dropdown-toggle":"Dropdown-toggle AvatarEditor--noAvatar",title:Wi.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"},H(this.controlItems().toArray())))},n.controlItems=function(){var t=new B;return t.add("upload",m(yt,{icon:"fas fa-upload",onclick:this.openPicker.bind(this)},Wi.translator.trans("core.forum.user.avatar_upload_button"))),t.add("remove",m(yt,{icon:"fas fa-times",onclick:this.remove.bind(this)},Wi.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(),Wi.request({method:"POST",url:Wi.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(),Wi.request({method:"DELETE",url:Wi.forum.attribute("apiUrl")+"/users/"+t.id()+"/avatar"}).then(this.success.bind(this),this.failure.bind(this))},n.success=function(t){Wi.store.pushPayload(t),delete this.attrs.user.avatarColor,this.loading=!1,m.redraw()},n.failure=function(t){this.loading=!1,m.redraw()},e}(E),Xe=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.user,e=Ye.controls(t,this).toArray(),n=t.color(),r=t.badges().toArray();return m("div",{className:M("UserCard",this.attrs.className),style:n&&{"--usercard-bg":n}},m("div",{className:"darkenBackground"},m("div",{className:"container"},!!e.length&&m(ut,{className:"UserCard-controls App-primaryControl",menuClassName:"Dropdown-menu--right",buttonClassName:this.attrs.controlsButtonClassName,label:Wi.translator.trans("core.forum.user_controls.button"),accessibleToggleLabel:Wi.translator.trans("core.forum.user_controls.toggle_dropdown_accessible_label"),icon:"fas fa-ellipsis-v"},e),m("div",{className:"UserCard-profile"},m("h1",{className:"UserCard-identity"},this.attrs.editable?m("[",null,m(Ke,{user:t,className:"UserCard-avatar"})," ",Xt(t)):m(G,{href:Wi.route.user(t)},m("div",{className:"UserCard-avatar"},Y(t,{loading:"eager"})),Xt(t))),!!r.length&&m("ul",{className:"UserCard-badges badges"},H(r)),m("ul",{className:"UserCard-info"},H(this.infoItems().toArray()))))))},n.infoItems=function(){var t=new B,e=this.attrs.user,n=e.lastSeenAt();if(n){var r=e.isOnline();t.add("lastSeen",m("span",{className:M("UserCard-lastSeen",{online:r})},r?[nt("fas fa-circle")," ",Wi.translator.trans("core.forum.user.online_text")]:[nt("far fa-clock")," ",st(n)]),100)}return t.add("joined",Wi.translator.trans("core.forum.user.joined_date_text",{ago:st(e.joinTime())}),90),t},e}(E);function Je(t){return t.lastSeenAt()&&t.isOnline()?m("span",{className:"UserOnline"},nt("fas fa-circle")):null}var Qe=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.post,e=t.user();return e?m("div",{className:"PostUser"},m("h3",{className:"PostUser-name"},m(G,{href:Wi.route.user(e)},Y(e,{className:"PostUser-avatar"}),Je(e),Xt(e))),m("ul",{className:"PostUser-badges badges"},H(e.badges().toArray())),!t.isHidden()&&this.attrs.cardVisible&&m(Xe,{user:e,className:"UserCard--popover",controlsButtonClassName:"Button Button--icon Button--flat"})):m("div",{className:"PostUser"},m("h3",{className:"PostUser-name"},Y(e,{className:"PostUser-avatar"})," ",Xt(e)))},n.oncreate=function(e){var n,r=this;t.prototype.oncreate.call(this,e),this.$().on("mouseover",".PostUser-name a, .UserCard",(function(){clearTimeout(n),n=setTimeout(r.showCard.bind(r),500)})).on("mouseout",".PostUser-name a, .UserCard",(function(){clearTimeout(n),n=setTimeout(r.hideCard.bind(r),250)}))},n.showCard=function(){var t=this;this.attrs.oncardshow(),setTimeout((function(){return t.$(".UserCard").addClass("in")}))},n.hideCard=function(){var t=this;this.$(".UserCard").removeClass("in").one("transitionend webkitTransitionEnd oTransitionEnd",(function(){t.attrs.oncardhide()}))},e}(E);function Ze(t){var e=it()(t),n=e.format(),r=e.format("LLLL");return m("time",{pubdate:!0,datetime:n},r)}var tn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).ip=void 0,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.ip=this.attrs.ip||""},n.view=function(){return m("span",{className:"IPAddress"},this.viewItems().toArray())},n.viewItems=function(){var t=new B;return t.add("ip",m("span",null,this.ip),100),t},e}(E),en=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){return m("div",{className:"Dropdown PostMeta"},this.viewItems().toArray())},n.getPermalink=function(t){return Wi.forum.attribute("baseOrigin")+Wi.route.post(t)},n.selectPermalink=function(t){var e=this;setTimeout((function(){return $(e.element).parent().find(".PostMeta-permalink").select()})),t.redraw=!1},n.viewItems=function(){var t=this,e=new B,n=this.attrs.post.createdAt();return e.add("time",m("a",{className:"Dropdown-toggle",onclick:function(e){return t.selectPermalink(e)},"data-toggle":"dropdown"},lt(n)),100),e.add("meta-dropdown",m("div",{className:"Dropdown-menu dropdown-menu"},this.metaItems().toArray()),90),e},n.metaItems=function(){var t=new B,e=this.attrs.post,n="ontouchstart"in document.documentElement,r=this.getPermalink(e),i=e.createdAt();return t.add("post-number",m("span",{className:"PostMeta-number"},Wi.translator.trans("core.forum.post.number_tooltip",{number:e.number()})," "),100),t.add("post-time",m("span",{className:"PostMeta-time"},Ze(i)),90),t.add("post-ip",m("span",{className:"PostMeta-ip"},m(tn,{ip:e.data.attributes.ipAddress})),80),t.add("permalink",n?m("a",{className:"Button PostMeta-permalink",href:r},r):m("input",{className:"FormControl PostMeta-permalink",value:r,onclick:function(t){return t.stopPropagation()}}),0),t},e}(E),nn=function(t){function e(){return t.apply(this,arguments)||this}w(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=Wi.translator.trans("core.forum.post.edited_tooltip",{user:e,ago:st(t.editedAt())});return m(Et,{text:n},m("span",{className:"PostEdited"},Wi.translator.trans("core.forum.post.edited_text")))},n.oncreate=function(e){t.prototype.oncreate.call(this,e)},e}(E),rn=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.revealContent=!1,this.cardVisible=!1,this.subtree.check((function(){return n.cardVisible}),(function(){return n.isEditing()}),(function(){return n.revealContent}))},n.content=function(){return t.prototype.content.call(this).concat(this.contentItems().toArray())},n.contentItems=function(){var t=new B;return t.add("header",m("header",{className:"Post-header"},m("ul",null,H(this.headerItems().toArray()))),100),t.add("body",m("div",{className:"Post-body"},this.bodyItems().toArray()),90),t},n.bodyItems=function(){var t=new B;return t.add("content",this.isEditing()?m(Jt,{className:"Post-preview",composer:Wi.composer}):m.trust(this.attrs.post.contentHtml()),100),t},n.refreshContent=function(){var t=this.isEditing()?"":this.attrs.post.contentHtml();this.contentHtml!==t&&this.$(".Post-body script").each((function(){var t=document.createElement("script");t.textContent=this.textContent,Array.from(this.attributes).forEach((function(e){return t.setAttribute(e.name,e.value)})),this.parentNode.replaceChild(t,this)})),this.contentHtml=t},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.refreshContent()},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.refreshContent()},n.isEditing=function(){return Wi.composer.bodyMatches(Re,{post:this.attrs.post})},n.elementAttrs=function(){var e=this.attrs.post,n=t.prototype.elementAttrs.call(this);return n.className=M(n.className,"CommentPost",{"Post--renderFailed":e.renderFailed(),"Post--hidden":e.isHidden(),"Post--edited":e.isEdited(),revealContent:this.revealContent,editing:this.isEditing()}),this.isEditing()&&(n["aria-busy"]="true"),n},n.toggleContent=function(){this.revealContent=!this.revealContent},n.headerItems=function(){var t=this,e=new B,n=this.attrs.post;return e.add("user",m(Qe,{post:n,cardVisible:this.cardVisible,oncardshow:function(){t.cardVisible=!0,m.redraw()},oncardhide:function(){t.cardVisible=!1,m.redraw()}}),100),e.add("meta",m(en,{post:n})),n.isEdited()&&!n.isHidden()&&e.add("edited",m(nn,{post:n})),n.isHidden()&&e.add("toggle",m(yt,{className:"Button Button--default Button--more",icon:"fas fa-ellipsis-h",onclick:this.toggleContent.bind(this)})),e},e}(Ue),on=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.elementAttrs=function(){var e=t.prototype.elementAttrs.call(this);return e.className=M(e.className,"EventPost",Q(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(G,{className:"EventPost-user",href:Wi.route.user(e)},n):n,time:lt(this.attrs.post.createdAt())});return t.prototype.content.call(this).concat([nt(this.icon(),{className:"EventPost-icon"}),m("div",{className:"EventPost-info"},this.description(r))])},n.icon=function(){return""},n.description=function(t){return Wi.translator.trans(this.descriptionKey(),t)},n.descriptionKey=function(){return""},n.descriptionData=function(){return{}},e}(Ue),sn=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-pencil-alt"},n.description=function(t){var e=Wi.translator.trans("core.forum.post_stream.discussion_renamed_text",t);return m("span",null,e)},n.descriptionData=function(){var t=this.attrs.post,e=t.content()[0],n=t.content()[1];return{new:m(Et,{text:ot(Wi.translator.trans("core.forum.post_stream.discussion_renamed_old_tooltip",{old:e}))},m("strong",{className:"DiscussionRenamedPost-new"},n))}},e}(on),an="welcomeHidden",un=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}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e)},n.view=function(t){return this.isHidden()?null:m("header",{className:"Hero WelcomeHero"},m("div",{className:"container"},this.viewItems().toArray()))},n.hide=function(){localStorage.setItem(an,"true")},n.isHidden=function(){var t;return null==(t=Wi.forum.attribute("welcomeTitle"))||!t.trim()||!!localStorage.getItem(an)||!!this.hidden},n.viewItems=function(){var t=this,e=new B;return e.add("dismiss-button",m(yt,{icon:"fas fa-times",onclick:function(){t.$().slideUp(t.hide.bind(t))},className:"Hero-close Button Button--icon Button--link","aria-label":Wi.translator.trans("core.forum.welcome_hero.hide")}),100),e.add("content",m("div",{className:"containerNarrow"},this.contentItems().toArray()),80),e},n.contentItems=function(){var t=new B;return t.add("title",m("h1",{className:"Hero-title"},Wi.forum.attribute("welcomeTitle")),100),t.add("subtitle",m("div",{className:"Hero-subtitle"},m.trust(Wi.forum.attribute("welcomeMessage")))),t},e}(E),ln=function(t){function e(){return t.apply(this,arguments)||this}w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.placeholder=e.placeholder||ot(Wi.translator.trans("core.forum.composer_discussion.body_placeholder")),e.submitLabel=e.submitLabel||Wi.translator.trans("core.forum.composer_discussion.submit_button"),e.confirmExit=e.confirmExit||ot(Wi.translator.trans("core.forum.composer_discussion.discard_confirmation")),e.titlePlaceholder=e.titlePlaceholder||ot(Wi.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||Bt(""),this.title=this.composer.fields.title},n.headerItems=function(){var e=t.prototype.headerItems.call(this);return e.add("title",m("h3",null,Wi.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();Wi.store.createRecord("discussions").save(e).then((function(e){t.composer.hide(),Wi.discussions.refresh(),m.route.set(Wi.route.discussion(e))}),this.loaded.bind(this))},e}(kt),cn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).lastDiscussion=void 0,e}w(e,t);var n=e.prototype;return n.oninit=function(n){t.prototype.oninit.call(this,n),Wi.previous.matches(ae)&&(this.lastDiscussion=Wi.previous.get("discussion")),Wi.previous.matches(e)&&Wi.discussions.clear(),Wi.discussions.refreshParams(Wi.search.params(),m.route.param("page")&&Number(m.route.param("page"))||1),Wi.history.push("index",ot(Wi.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,H(this.sidebarItems().toArray()))),m("div",{className:"IndexPage-results sideNavOffset"},this.contentItems().toArray()))))},n.contentItems=function(){var t=new B;return t.add("toolbar",m("div",{className:"IndexPage-toolbar"},this.toolbarItems().toArray()),100),t.add("discussionList",m(Vt,{state:Wi.discussions}),90),t},n.toolbarItems=function(){var t=new B;return t.add("view",m("ul",{className:"IndexPage-toolbar-view"},H(this.viewItems().toArray())),100),t.add("action",m("ul",{className:"IndexPage-toolbar-action"},H(this.actionItems().toArray())),90),t},n.setTitle=function(){Wi.setTitle(ot(Wi.translator.trans("core.forum.index.meta_title_text"))),Wi.setTitleCount(0)},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.setTitle();var n=Wi.cache.heroHeight,r=Wi.cache.heroHeight=this.$(".Hero").outerHeight()||0,i=Wi.cache.scrollTop;if($("#app").css("min-height",($(window).height()||0)+r),null!=Wi.previous.type&&(this.lastDiscussion?$(window).scrollTop(i-n+r):$(window).scrollTop(0),this.lastDiscussion)){var o=this.$('li[data-id="'+this.lastDiscussion.id()+'"] .DiscussionListItem');if(o.length){var s=$("#header").outerHeight()||0,a=$(window).height()||0,u=o.offset(),l=u&&u.top||0,c=l+(o.outerHeight()||0);(l<i+s||c>i+a)&&$(window).scrollTop(l-s)}}},n.onbeforeremove=function(e){t.prototype.onbeforeremove.call(this,e),Wi.cache.scrollTop=$(window).scrollTop()},n.onremove=function(e){t.prototype.onremove.call(this,e),$("#app").css("min-height","")},n.hero=function(){return m(un,null)},n.sidebarItems=function(){var t=this,e=new B,n=Wi.forum.attribute("canStartDiscussion")||!Wi.session.user;return e.add("newDiscussion",m(yt,{icon:"fas fa-edit",className:"Button Button--primary IndexPage-newDiscussion",itemClassName:"App-primaryControl",onclick:function(){return t.newDiscussionAction().catch((function(){}))},disabled:!n},Wi.translator.trans("core.forum.index."+(n?"start_discussion_button":"cannot_start_discussion_button")))),e.add("nav",m(he,{buttonClassName:"Button",className:"App-titleControl",accessibleToggleLabel:Wi.translator.trans("core.forum.index.toggle_sidenav_dropdown_accessible_label")},this.navItems().toArray())),e},n.navItems=function(){var t=new B,e=Wi.search.stickyParams();return t.add("allDiscussions",m(le,{href:Wi.route("index",e),icon:"far fa-comments"},Wi.translator.trans("core.forum.index.all_discussions_link")),100),t},n.viewItems=function(){var t=new B,e=Wi.discussions.sortMap(),n=Object.keys(e).reduce((function(t,e){return t[e]=Wi.translator.trans("core.forum.index_sort."+e+"_button"),t}),{});return t.add("sort",m(ut,{buttonClassName:"Button",label:n[Wi.search.params().sort]||Object.keys(e).map((function(t){return n[t]}))[0],accessibleToggleLabel:Wi.translator.trans("core.forum.index_sort.toggle_dropdown_accessible_label")},Object.keys(n).map((function(t){var r=n[t],i=(Wi.search.params().sort||Object.keys(e)[0])===t;return m(yt,{icon:!i||"fas fa-check",onclick:Wi.search.changeSort.bind(Wi.search,t),active:i},r)})))),t},n.actionItems=function(){var t=new B;return t.add("refresh",m(yt,{title:Wi.translator.trans("core.forum.index.refresh_tooltip"),icon:"fas fa-sync",className:"Button Button--icon",onclick:function(){Wi.discussions.refresh(),Wi.session.user&&(Wi.store.find("users",Wi.session.user.id()),m.redraw())}})),Wi.session.user&&t.add("markAllAsRead",m(yt,{title:Wi.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 Wi.session.user?(Wi.composer.load(ln,{user:Wi.session.user}),Wi.composer.show(),t(Wi.composer)):(Wi.modal.show(Mt),e())}))},n.markAllAsRead=function(){var t;confirm(ot(Wi.translator.trans("core.forum.index.mark_all_as_read_confirmation")))&&(null==(t=Wi.session.user)||t.save({markedAllAsReadAt:new Date}))},e}(S);cn.providesInitialSearch=!0;var dn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).loading=!0,e.moreResults=!1,e.posts=[],e.loadLimit=20,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.loadUser(m.route.param("username"))},n.content=function(){var t,e=this;return 0!==this.posts.length||this.loading?(this.loading?t=m(ft,null):this.moreResults&&(t=m("div",{className:"PostsUserPage-loadMore"},m(yt,{className:"Button",onclick:this.loadMore.bind(this)},Wi.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"},Wi.translator.trans("core.forum.user.in_discussion_text",{discussion:m(G,{href:Wi.route.post(t)},e.discussionTitle(t))})),m(rn,{post:t}))}))),m("div",{className:"PostsUserPage-loadMore"},t))):m("div",{className:"PostsUserPage"},m(zt,{text:Wi.translator.trans("core.forum.user.posts_empty_text")}))},n.show=function(e){t.prototype.show.call(this,e),this.refresh()},n.refresh=function(){this.loading=!0,this.posts=[],m.redraw(),this.loadResults().then(this.parseResults.bind(this))},n.loadResults=function(t){return void 0===t&&(t=0),Wi.store.find("posts",{filter:{author:this.user.username(),type:"comment"},page:{offset:t,limit:this.loadLimit},sort:"-createdAt"})},n.loadMore=function(){this.loading=!0,this.loadResults(this.posts.length).then(this.parseResults.bind(this))},n.parseResults=function(t){var e;return this.loading=!1,(e=this.posts).push.apply(e,t),this.moreResults=t.length>=this.loadLimit,m.redraw(),t},n.discussionTitle=function(t){return t.discussion().title()},e}(Ge),hn=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=D({},e,{page:D({},e.page,{offset:this.pageSize*(t-1)}),include:n});return v.store.find(this.type,r)},e.requestParams=function(){return this.params},e.refreshParams=function(t,e){return this.isEmpty()||this.paramsChanged(t)?(this.params=t,this.refresh(e)):Promise.resolve()},e.refresh=function(t){var e=this;return void 0===t&&(t=1),this.initialLoading=!0,this.loadingPrev=!1,this.loadingNext=!1,this.clear(),this.location={page:t},this.loadPage().then((function(t){e.pages=[],e.parseResults(e.location.page,t)})).finally((function(){return e.initialLoading=!1}))},e.getPages=function(){return this.pages},e.getLocation=function(){return this.location},e.isLoading=function(){return this.initialLoading||this.loadingNext||this.loadingPrev},e.isInitialLoading=function(){return this.initialLoading},e.isLoadingPrev=function(){return this.loadingPrev},e.isLoadingNext=function(){return this.loadingNext},e.hasItems=function(){return!!this.getAllItems().length},e.isEmpty=function(){return!this.isInitialLoading()&&!this.hasItems()},e.hasPrev=function(){var t;return!(null==(t=this.pages[0])||!t.hasPrev)},e.hasNext=function(){var t;return!(null==(t=this.pages[this.pages.length-1])||!t.hasNext)},e.getParams=function(){return this.params},e.getNextPageNumber=function(){var t,e=null==(t=this.pages[this.pages.length-1])?void 0:t.number;return e&&!isNaN(e)?e+1:this.location.page},e.getPrevPageNumber=function(){var t,e=null==(t=this.pages[0])?void 0:t.number;return e&&!isNaN(e)?Math.max(e-1,1):this.location.page},e.paramsChanged=function(t){var e=this;return Object.keys(t).some((function(n){return e.getParams()[n]!==t[n]}))},e.getAllItems=function(){return this.getPages().map((function(t){return t.items})).flat()},t}(),fn=function(){function t(){this.events={},this.events={}}var e=t.prototype;return e.on=function(t,e){return this.events[t]||(this.events[t]=[]),this.events[t].push(e),this},e.emit=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.events[t]&&this.events[t].forEach((function(t){return t.apply(void 0,n)}))},t}();function pn(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 mn=new fn,vn=function(t){function e(e,n){var r;return void 0===n&&(n=1),(r=t.call(this,e,n,20)||this).extraDiscussions=[],r.eventEmitter=void 0,r.eventEmitter=mn.on("discussion.deleted",r.deleteDiscussion.bind(y(r))),r}w(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=Wi.preloadedApiDocument();return n?(this.initialLoading=!1,Promise.resolve(n)):t.prototype.loadPage.call(this,e)},n.clear=function(){t.prototype.clear.call(this),this.extraDiscussions=[]},n.sortMap=function(){var t={};return this.params.q&&(t.relevance=""),t.latest="-lastPostedAt",t.top="-commentCount",t.newest="-createdAt",t.oldest="createdAt",t},n.isSearchResults=function(){return!!this.params.q},n.removeDiscussion=function(t){this.eventEmitter.emit("discussion.deleted",t)},n.deleteDiscussion=function(t){for(var e,n=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return pn(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)?pn(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},F(e,[{key:"type",get:function(){return"discussions"}}]),e}(hn),gn=function(t){function e(){return t.apply(this,arguments)||this}w(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 vn({filter:{author:e.username()},sort:"newest"}),this.state.refresh()},n.content=function(){return m("div",{className:"DiscussionsUserPage"},m(Vt,{state:this.state}))},e}(Ge);const yn=function(t,e){return function(){e(this.getAttribute(t)||this[t])}};var bn=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(t){var e=M(["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:yn("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}(E),wn=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=M(e.className,"Checkbox--switch")},e.prototype.getDisplay=function(){return!!this.attrs.loading&&t.prototype.getDisplay.call(this)},e}(bn),Dn=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(t){return m("fieldset",{className:this.attrs.className},m("legend",null,this.attrs.label),m("ul",null,H(t.children)))},e}(E),xn=function(t){function e(){return t.apply(this,arguments)||this}w(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(bn,{state:!!e[i],loading:t.loading[i],disabled:!(i in e),onchange:t.toggle.bind(t,[i])},m("span",{className:"sr-only"},Wi.translator.trans("core.forum.settings.notification_checkbox_a11y_label_template",{description:n.label,method:r.label}))))})))}))))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$("thead .NotificationGrid-groupToggle").bind("mouseenter mouseleave",(function(t){var e=parseInt($(this).index(),10)+1;$(this).parents("table").find("td:nth-child("+e+")").toggleClass("highlighted","mouseenter"===t.type)})),this.$("tbody .NotificationGrid-groupToggle").bind("mouseenter mouseleave",(function(t){$(this).parent().find("td").toggleClass("highlighted","mouseenter"===t.type)}))},n.toggle=function(t){var e=this,n=this.attrs.user,r=n.preferences(),i=!r[t[0]];t.forEach((function(t){e.loading[t]=!0,r[t]=i})),m.redraw(),n.save({preferences:r}).then((function(){t.forEach((function(t){return e.loading[t]=!1})),m.redraw()}))},n.toggleMethod=function(t){var e=this,n=this.types.map((function(n){return e.preferenceKey(n.name,t)})).filter((function(t){return t in e.attrs.user.preferences()}));this.toggle(n)},n.toggleType=function(t){var e=this,n=this.methods.map((function(n){return e.preferenceKey(t,n.name)})).filter((function(t){return t in e.attrs.user.preferences()}));this.toggle(n)},n.preferenceKey=function(t,e){return"notify_"+t+"_"+e},n.notificationMethods=function(){var t=new B;return t.add("alert",{name:"alert",icon:"fas fa-bell",label:Wi.translator.trans("core.forum.settings.notify_by_web_heading")}),t.add("email",{name:"email",icon:"far fa-envelope",label:Wi.translator.trans("core.forum.settings.notify_by_email_heading")}),t},n.notificationTypes=function(){var t=new B;return t.add("discussionRenamed",{name:"discussionRenamed",icon:"fas fa-pencil-alt",label:Wi.translator.trans("core.forum.settings.notify_discussion_renamed_label")}),t},e}(E),Cn=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.className=function(){return"ChangePasswordModal Modal--small"},n.title=function(){return Wi.translator.trans("core.forum.change_password.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},this.fields().toArray()))},n.fields=function(){var t=new B;return t.add("help",m("p",{className:"helpText"},Wi.translator.trans("core.forum.change_password.text"))),t.add("submit",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Wi.translator.trans("core.forum.change_password.send_button")))),t},n.onsubmit=function(t){t.preventDefault(),this.loading=!0,Wi.request({method:"POST",url:Wi.forum.attribute("apiUrl")+"/forgot",body:this.requestBody()}).then(this.hide.bind(this),this.loaded.bind(this))},n.requestBody=function(){return{email:Wi.session.user.email()}},e}(_t),An=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).email=void 0,e.password=void 0,e.success=!1,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.email=Bt(Wi.session.user.email()||""),this.password=Bt("")},n.className=function(){return"ChangeEmailModal Modal--small"},n.title=function(){return Wi.translator.trans("core.forum.change_email.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},this.fields().toArray()))},n.fields=function(){var t=new B;return this.success?(t.add("help",m("p",{className:"helpText"},Wi.translator.trans("core.forum.change_email.confirmation_message",{email:m("strong",null,this.email())}))),t.add("dismiss",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},Wi.translator.trans("core.forum.change_email.dismiss_button"))))):(t.add("email",m("div",{className:"Form-group"},m("input",{type:"email",name:"email",className:"FormControl",placeholder:Wi.session.user.email(),bidi:this.email,disabled:this.loading}))),t.add("password",m("div",{className:"Form-group"},m("input",{type:"password",name:"password",className:"FormControl",autocomplete:"current-password",placeholder:Wi.translator.trans("core.forum.change_email.confirm_password_placeholder"),bidi:this.password,disabled:this.loading}))),t.add("submit",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Wi.translator.trans("core.forum.change_email.submit_button"))))),t},n.onsubmit=function(t){var e=this;t.preventDefault(),this.email()!==Wi.session.user.email()?(this.loading=!0,this.alertAttrs=null,Wi.session.user.save(this.requestAttributes(),{errorHandler:this.onerror.bind(this),meta:{password:this.password()}}).then((function(){e.success=!0})).catch((function(){})).then(this.loaded.bind(this))):this.hide()},n.requestAttributes=function(){return{email:this.email()}},n.onerror=function(e){401===e.status&&e.alert&&(e.alert.content=Wi.translator.trans("core.forum.change_email.incorrect_password_message")),t.prototype.onerror.call(this,e)},e}(_t),En=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).discloseOnlineLoading=void 0,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.show(Wi.session.user),Wi.setTitle(ot(Wi.translator.trans("core.forum.settings.title")))},n.content=function(){return m("div",{className:"SettingsPage"},m("ul",null,H(this.settingsItems().toArray())))},n.settingsItems=function(){var t=this,e=new B;return["account","notifications","privacy"].forEach((function(n,r){var i=n+"Items";e.add(n,m(Dn,{className:"Settings-"+n,label:Wi.translator.trans("core.forum.settings."+n+"_heading")},t[i]().toArray()),100-10*r)})),e},n.accountItems=function(){var t=new B;return t.add("changePassword",m(yt,{className:"Button",onclick:function(){return Wi.modal.show(Cn)}},Wi.translator.trans("core.forum.settings.change_password_button")),100),t.add("changeEmail",m(yt,{className:"Button",onclick:function(){return Wi.modal.show(An)}},Wi.translator.trans("core.forum.settings.change_email_button")),90),t},n.notificationsItems=function(){var t=new B;return t.add("notificationGrid",m(xn,{user:this.user}),100),t},n.privacyItems=function(){var t,e=this,n=new B;return n.add("discloseOnline",m(wn,{state:null==(t=this.user.preferences())?void 0:t.discloseOnline,onchange:function(t){e.discloseOnlineLoading=!0,e.user.savePreferences({discloseOnline:t}).then((function(){e.discloseOnlineLoading=!1,m.redraw()}))},loading:this.discloseOnlineLoading},Wi.translator.trans("core.forum.settings.privacy_disclose_online_label")),100),n},e}(Ge),Nn=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),Wi.history.push("notifications",ot(Wi.translator.trans("core.forum.notifications.title"))),Wi.notifications.load(),this.bodyClass="App--notifications"},n.view=function(){return m("div",{className:"NotificationsPage"},m(De,{state:Wi.notifications}))},e}(S),kn=function(){function t(t,e){this.component=void 0,this.routeName=void 0,this.component=t,this.routeName=e}var e=t.prototype;return e.makeKey=function(){return this.routeName+JSON.stringify(m.route.param())},e.makeAttrs=function(t){return D({},t.attrs,{routeName:this.routeName})},e.onmatch=function(t,e,n){return this.component},e.render=function(t){return[D({},t,{attrs:this.makeAttrs(t),key:this.makeKey()})]},t}(),Sn=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.canonicalizeDiscussionSlug=function(t){if(t)return t.split("-")[0]},n.makeKey=function(){var t=D({},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 Wi.current.matches(ae)&&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 Wi.current.get("stream").goToNumber(r)})),e.scrollToPostNumber=null}return t.prototype.render.call(this,n)},e}(kn);Sn.scrollToPostNumber=null;var Tn=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(t){return m("div",{className:"LabelValue"},m("div",{className:"LabelValue-label"},v.translator.trans("core.lib.data_segment.label",{label:this.attrs.label})),m("div",{className:"LabelValue-value"},this.attrs.value))},e}(E),Fn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).loading={},e.showingTokens={},e}w(e,t);var n=e.prototype;return n.view=function(t){return m("div",{className:"AccessTokensList"},this.attrs.tokens.length?this.attrs.tokens.map(this.tokenView.bind(this)):m("div",{className:"AccessTokensList--empty"},Wi.translator.trans("core.forum.security.empty_text")))},n.tokenView=function(t){return m("div",{className:M("AccessTokensList-item",{"AccessTokensList-item--active":t.isCurrent()}),key:t.id()},this.tokenViewItems(t).toArray())},n.tokenViewItems=function(t){var e=new B;return e.add("icon",m("div",{className:"AccessTokensList-item-icon"},nt(this.attrs.icon||"fas fa-key")),50),e.add("info",m("div",{className:"AccessTokensList-item-info"},this.tokenInfoItems(t).toArray()),40),e.add("actions",m("div",{className:"AccessTokensList-item-actions"},this.tokenActionItems(t).toArray()),30),e},n.tokenInfoItems=function(t){var e=new B;return"session"===this.attrs.type?e.add("title",m("div",{className:"AccessTokensList-item-title"},m("span",{className:"AccessTokensList-item-title-main"},t.device()),t.isCurrent()&&[" — ",m("span",{className:"AccessTokensList-item-title-sub"},Wi.translator.trans("core.forum.security.current_active_session"))])):e.add("title",m("div",{className:"AccessTokensList-item-title"},m("span",{className:"AccessTokensList-item-title-main"},this.generateTokenTitle(t)))),e.add("createdAt",m("div",{className:"AccessTokensList-item-createdAt"},m(Tn,{label:Wi.translator.trans("core.forum.security.created"),value:lt(t.createdAt())}))),e.add("lastActivityAt",m("div",{className:"AccessTokensList-item-lastActivityAt"},m(Tn,{label:Wi.translator.trans("core.forum.security.last_activity"),value:t.lastActivityAt()?m("[",null,lt(t.lastActivityAt()),t.lastIpAddress()&&m("span",null," ","— ",m(tn,{ip:t.lastIpAddress()})),"developer_token"===this.attrs.type&&t.device()&&m("[",null," ","— ",m("span",{className:"AccessTokensList-item-title-sub"},t.device()))):Wi.translator.trans("core.forum.security.never")}))),e},n.tokenActionItems=function(t){var e=this,n=new B,r={session:"terminate_session",developer_token:"revoke_access_token"}[this.attrs.type];if("developer_token"===this.attrs.type){var i=!this.showingTokens[t.id()],o=i?"show_access_token":"hide_access_token";n.add("toggleDisplay",m(yt,{className:"Button Button--inverted",icon:i?"fas fa-eye":"fas fa-eye-slash",onclick:function(){e.showingTokens[t.id()]=i,m.redraw()}},Wi.translator.trans("core.forum.security."+o)))}var s=m(yt,{className:"Button Button--danger",disabled:t.isCurrent(),loading:!!this.loading[t.id()],onclick:function(){return e.revoke(t)}},Wi.translator.trans("core.forum.security."+r));return t.isCurrent()&&(s=m(Et,{text:Wi.translator.trans("core.forum.security.cannot_terminate_current_session")},m("div",{tabindex:"0"},s))),n.add("revoke",s),n},n.revoke=function(){var t=Ee(ke().mark((function t(e){var n,r,i;return ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(confirm(ot(Wi.translator.trans("core.forum.security.revoke_access_token_confirmation")))){t.next=2;break}return t.abrupt("return");case 2:return this.loading[e.id()]=!0,t.next=5,e.delete();case 5:this.loading[e.id()]=!1,null==(n=(r=this.attrs).ondelete)||n.call(r,e),i="session"===this.attrs.type?"session_terminated":"token_revoked",Wi.alerts.show({type:"success"},Wi.translator.trans("core.forum.security."+i,{count:1})),m.redraw();case 10:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),n.generateTokenTitle=function(t){var e=t.title()||Wi.translator.trans("core.forum.security.token_title_placeholder"),n=this.tokenValueDisplay(t);return Wi.translator.trans("core.forum.security.token_item_title",{title:e,token:n})},n.tokenValueDisplay=function(t){var e=Array(12).fill("*").join(""),n=this.showingTokens[t.id()]?t.token():e;return m("code",{className:"AccessTokensList-item-token"},n)},e}(E),_n=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).titleInput=Bt(""),e}w(e,t);var n=e.prototype;return n.className=function(){return"Modal--small NewAccessTokenModal"},n.title=function(){return Wi.translator.trans("core.forum.security.new_access_token_modal.title")},n.content=function(){var t=Wi.translator.trans("core.forum.security.new_access_token_modal.title_placeholder");return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("input",{type:"text",className:"FormControl",bidi:this.titleInput,placeholder:t,"aria-label":t})),m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Wi.translator.trans("core.forum.security.new_access_token_modal.submit_button")))))},n.submitData=function(){return{title:this.titleInput()}},n.onsubmit=function(e){var n=this;t.prototype.onsubmit.call(this,e),e.preventDefault(),this.loading=!0,Wi.store.createRecord("access-tokens").save(this.submitData()).then((function(t){n.attrs.onsuccess(t),Wi.modal.close()})).finally(this.loaded.bind(this))},e}(_t),Pn=function(){function t(){this.tokens=null,this.loadingTerminateSessions=!1,this.loadingGlobalLogout=!1}var e=t.prototype;return e.hasLoadedTokens=function(){return null!==this.tokens},e.getTokens=function(){return this.tokens},e.setTokens=function(t){this.tokens=t},e.pushToken=function(t){var e;null==(e=this.tokens)||e.push(t)},e.removeToken=function(t){this.tokens=this.tokens.filter((function(e){return e!==t}))},e.getSessionTokens=function(){var t;return(null==(t=this.tokens)?void 0:t.filter((function(t){return t.isSessionToken()})).sort((function(t,e){return e.isCurrent()?1:-1})))||[]},e.getDeveloperTokens=function(){var t;return(null==(t=this.tokens)?void 0:t.filter((function(t){return!t.isSessionToken()})))||null},e.getOtherSessionTokens=function(){var t;return(null==(t=this.tokens)?void 0:t.filter((function(t){return t.isSessionToken()&&!t.isCurrent()})))||[]},e.hasOtherActiveSessions=function(){return(this.getOtherSessionTokens()||[]).length>0},e.removeOtherSessionTokens=function(){this.tokens=this.tokens.filter((function(t){return!t.isSessionToken()||t.isCurrent()}))},t}(),Bn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).state=new Pn,e}w(e,t);var n=e.prototype;return n.oninit=function(e){var n;t.prototype.oninit.call(this,e);var r=m.route.param("username");r===(null==(n=Wi.session.user)?void 0:n.slug())||Wi.forum.attribute("canModerateAccessTokens")||m.route.set("/"),this.loadUser(r),Wi.setTitle(ot(Wi.translator.trans("core.forum.security.title"))),this.loadTokens()},n.content=function(){return m("div",{className:"UserSecurityPage"},m("ul",null,H(this.settingsItems().toArray())))},n.settingsItems=function(){var t,e=new B;return Wi.forum.attribute("canCreateAccessToken")||Wi.forum.attribute("canModerateAccessTokens")||this.state.hasLoadedTokens()&&null!=(t=this.state.getDeveloperTokens())&&t.length?e.add("developerTokens",m(Dn,{className:"UserSecurityPage-developerTokens",label:Wi.translator.trans("core.forum.security.developer_tokens_heading")},this.developerTokensItems().toArray())):this.state.hasLoadedTokens()||e.add("developerTokens",m(ft,null)),e.add("sessions",m(Dn,{className:"UserSecurityPage-sessions",label:Wi.translator.trans("core.forum.security.sessions_heading")},this.sessionsItems().toArray())),this.user.id()===Wi.session.user.id()&&e.add("globalLogout",m(Dn,{className:"UserSecurityPage-globalLogout",label:Wi.translator.trans("core.forum.security.global_logout.heading")},m("span",{className:"helpText"},Wi.translator.trans("core.forum.security.global_logout.help_text")),m(yt,{className:"Button",icon:"fas fa-sign-out-alt",onclick:this.globalLogout.bind(this),loading:this.state.loadingGlobalLogout,disabled:this.state.loadingTerminateSessions},Wi.translator.trans("core.forum.security.global_logout.log_out_button")))),e},n.developerTokensItems=function(){var t=this,e=new B;return e.add("accessTokenList",this.state.hasLoadedTokens()?m(Fn,{type:"developer_token",ondelete:function(e){t.state.removeToken(e),m.redraw()},tokens:this.state.getDeveloperTokens(),icon:"fas fa-key",hideTokens:!1}):m(ft,null)),this.user.id()===Wi.session.user.id()&&e.add("newAccessToken",m(yt,{className:"Button",disabled:!Wi.forum.attribute("canCreateAccessToken"),onclick:function(){return Wi.modal.show(_n,{onsuccess:function(e){t.state.pushToken(e),m.redraw()}})}},Wi.translator.trans("core.forum.security.new_access_token_button"))),e},n.sessionsItems=function(){var t=this,e=new B;if(e.add("sessionsList",this.state.hasLoadedTokens()?m(Fn,{type:"session",ondelete:function(e){t.state.removeToken(e),m.redraw()},tokens:this.state.getSessionTokens(),icon:"fas fa-laptop",hideTokens:!0}):m(ft,null)),this.user.id()===Wi.session.user.id()){var n=!this.state.hasOtherActiveSessions(),r=m(yt,{className:"Button",onclick:this.terminateAllOtherSessions.bind(this),loading:this.state.loadingTerminateSessions,disabled:this.state.loadingGlobalLogout||n},Wi.translator.trans("core.forum.security.terminate_all_other_sessions"));n&&(r=m(Et,{text:Wi.translator.trans("core.forum.security.cannot_terminate_current_session")},m("span",{tabindex:"0"},r))),e.add("terminateAllOtherSessions",r)}return e},n.loadTokens=function(){var t=this;return Wi.store.find("access-tokens",{filter:{user:this.user.id()}}).then((function(e){t.state.setTokens(e),m.redraw()}))},n.terminateAllOtherSessions=function(){var t=this;if(confirm(ot(Wi.translator.trans("core.forum.security.terminate_all_other_sessions_confirmation"))))return this.state.loadingTerminateSessions=!0,Wi.request({method:"DELETE",url:Wi.forum.attribute("apiUrl")+"/sessions"}).then((function(){var e=t.state.getOtherSessionTokens().length;t.state.removeOtherSessionTokens(),Wi.alerts.show({type:"success"},Wi.translator.trans("core.forum.security.session_terminated",{count:e}))})).catch((function(){Wi.alerts.show({type:"error"},Wi.translator.trans("core.forum.security.session_termination_failed"))})).finally((function(){t.state.loadingTerminateSessions=!1,m.redraw()}))},n.globalLogout=function(){var t=this;return this.state.loadingGlobalLogout=!0,Wi.request({method:"POST",url:Wi.forum.attribute("baseUrl")+"/global-logout"}).then((function(){return window.location.reload()})).finally((function(){t.state.loadingGlobalLogout=!1,m.redraw()}))},e}(Ge);function In(t){t.routes={index:{path:"/all",component:cn},discussion:{path:"/d/:id",component:ae,resolverClass:Sn},"discussion.near":{path:"/d/:id/:near",component:ae,resolverClass:Sn},user:{path:"/u/:username",component:dn},"user.posts":{path:"/u/:username",component:dn},"user.discussions":{path:"/u/:username/discussions",component:gn},settings:{path:"/settings",component:En},"user.security":{path:"/u/:username/security",component:Bn},notifications:{path:"/notifications",component:Nn}}}function On(t){var e=t.session.user;if(e&&!e.isEmailConfirmed()){var n=function(n){function r(){return n.apply(this,arguments)||this}w(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,{className:"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}(E),r=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return D({},n,{children:[m("div",{className:"container"},n.children)]})},e}(Ft);m.mount($('<div className="App-notices"/>').insertBefore("#content")[0],{view:function(){return m(r,{dismissible:!1,controls:[m(n,null)],className:"Alert--emailConfirmation"},t.translator.trans("core.forum.user_email_confirmation.alert_message",{email:m("strong",null,e.email())}))}})}}var Ln=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],Mn=Ln.join(","),$n="undefined"==typeof Element,jn=$n?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Rn=!$n&&Element.prototype.getRootNode?function(t){return t.getRootNode()}:function(t){return t.ownerDocument},Hn=function(t,e,n){var r=Array.prototype.slice.apply(t.querySelectorAll(Mn));return e&&jn.call(t,Mn)&&r.unshift(t),r.filter(n)},Un=function t(e,n,r){for(var i=[],o=Array.from(e);o.length;){var s=o.shift();if("SLOT"===s.tagName){var a=s.assignedElements(),u=t(a.length?a:s.children,!0,r);r.flatten?i.push.apply(i,u):i.push({scope:s,candidates:u})}else{jn.call(s,Mn)&&r.filter(s)&&(n||!e.includes(s))&&i.push(s);var l=s.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(s),c=!r.shadowRootFilter||r.shadowRootFilter(s);if(l&&c){var d=t(!0===l?s.children:l.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scope:s,candidates:d})}else o.unshift.apply(o,s.children)}}return i},qn=function(t,e){return t.tabIndex<0&&(e||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||t.isContentEditable)&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},zn=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Vn=function(t){return"INPUT"===t.tagName},Wn=function(t){var e=t.getBoundingClientRect(),n=e.width,r=e.height;return 0===n&&0===r},Gn=function(t,e){return!(e.disabled||function(t){return Vn(t)&&"hidden"===t.type}(e)||function(t,e){var n=e.displayCheck,r=e.getShadowRoot;if("hidden"===getComputedStyle(t).visibility)return!0;var i=jn.call(t,"details>summary:first-of-type")?t.parentElement:t;if(jn.call(i,"details:not([open]) *"))return!0;var o=Rn(t).host,s=(null==o?void 0:o.ownerDocument.contains(o))||t.ownerDocument.contains(t);if(n&&"full"!==n){if("non-zero-area"===n)return Wn(t)}else{if("function"==typeof r){for(var a=t;t;){var u=t.parentElement,l=Rn(t);if(u&&!u.shadowRoot&&!0===r(u))return Wn(t);t=t.assignedSlot?t.assignedSlot:u||l===t.ownerDocument?u:l.host}t=a}if(s)return!t.getClientRects().length}return!1}(e,t)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var n=0;n<e.children.length;n++){var r=e.children.item(n);if("LEGEND"===r.tagName)return!!jn.call(e,"fieldset[disabled] *")||!r.contains(t)}return!0}e=e.parentElement}return!1}(e))},Yn=function(t,e){return!(function(t){return function(t){return Vn(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,n=t.form||Rn(t),r=function(t){return n.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=r(window.CSS.escape(t.name));else try{e=r(t.name)}catch(t){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message),!1}var i=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]}(e,t.form);return!i||i===t}(t)}(e)||qn(e)<0||!Gn(t,e))},Kn=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Xn=function t(e){var n=[],r=[];return e.forEach((function(e,i){var o=!!e.scope,s=o?e.scope:e,a=qn(s,o),u=o?t(e.candidates):s;0===a?o?n.push.apply(n,u):n.push(s):r.push({documentOrder:i,tabIndex:a,item:e,isScope:o,content:u})})),r.sort(zn).reduce((function(t,e){return e.isScope?t.push.apply(t,e.content):t.push(e.content),t}),[]).concat(n)},Jn=function(t,e){var n;return n=(e=e||{}).getShadowRoot?Un([t],e.includeContainer,{filter:Yn.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:Kn}):Hn(t,e.includeContainer,Yn.bind(null,e)),Xn(n)},Qn=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==jn.call(t,Mn)&&Yn(e,t)},Zn=Ln.concat("iframe").join(","),tr=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==jn.call(t,Zn)&&Gn(e,t)};function er(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 nr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?er(Object(n),!0).forEach((function(e){rr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):er(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function rr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ir,or=(ir=[],{activateTrap:function(t){if(ir.length>0){var e=ir[ir.length-1];e!==t&&e.pause()}var n=ir.indexOf(t);-1===n||ir.splice(n,1),ir.push(t)},deactivateTrap:function(t){var e=ir.indexOf(t);-1!==e&&ir.splice(e,1),ir.length>0&&ir[ir.length-1].unpause()}}),sr=function(t){return setTimeout(t,0)},ar=function(t,e){var n=-1;return t.every((function(t,r){return!e(t)||(n=r,!1)})),n},ur=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},lr=function(t){return t.target.shadowRoot&&"function"==typeof t.composedPath?t.composedPath()[0]:t.target},cr=function(t,e){var n,r=(null==e?void 0:e.document)||document,i=nr({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},e),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s=function(t,e,n){return t&&void 0!==t[e]?t[e]:i[n||e]},a=function(t){return o.containerGroups.findIndex((function(e){var n=e.container,r=e.tabbableNodes;return n.contains(t)||r.find((function(e){return e===t}))}))},u=function(t){var e=i[t];if("function"==typeof e){for(var n=arguments.length,o=new Array(n>1?n-1:0),s=1;s<n;s++)o[s-1]=arguments[s];e=e.apply(void 0,o)}if(!0===e&&(e=void 0),!e){if(void 0===e||!1===e)return e;throw new Error("`".concat(t,"` was specified but was not a node, or did not return a node"))}var a=e;if("string"==typeof e&&!(a=r.querySelector(e)))throw new Error("`".concat(t,"` as selector refers to no known node"));return a},l=function(){var t=u("initialFocus");if(!1===t)return!1;if(void 0===t)if(a(r.activeElement)>=0)t=r.activeElement;else{var e=o.tabbableGroups[0];t=e&&e.firstTabbableNode||u("fallbackFocus")}if(!t)throw new Error("Your focus-trap needs to have at least one focusable element");return t},c=function(){if(o.containerGroups=o.containers.map((function(t){var e,n,r=Jn(t,i.tabbableOptions),o=(e=t,(n=(n=i.tabbableOptions)||{}).getShadowRoot?Un([e],n.includeContainer,{filter:Gn.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):Hn(e,n.includeContainer,Gn.bind(null,n)));return{container:t,tabbableNodes:r,focusableNodes:o,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=o.findIndex((function(e){return e===t}));if(!(n<0))return e?o.slice(n+1).find((function(t){return Qn(t,i.tabbableOptions)})):o.slice(0,n).reverse().find((function(t){return Qn(t,i.tabbableOptions)}))}}})),o.tabbableGroups=o.containerGroups.filter((function(t){return t.tabbableNodes.length>0})),o.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},d=function t(e){!1!==e&&e!==r.activeElement&&(e&&e.focus?(e.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=e,function(t){return t.tagName&&"input"===t.tagName.toLowerCase()&&"function"==typeof t.select}(e)&&e.select()):t(l()))},h=function(t){var e=u("setReturnFocus",t);return e||!1!==e&&t},f=function(t){var e=lr(t);a(e)>=0||(ur(i.clickOutsideDeactivates,t)?n.deactivate({returnFocus:i.returnFocusOnDeactivate&&!tr(e,i.tabbableOptions)}):ur(i.allowOutsideClick,t)||t.preventDefault())},p=function(t){var e=lr(t),n=a(e)>=0;n||e instanceof Document?n&&(o.mostRecentlyFocusedNode=e):(t.stopImmediatePropagation(),d(o.mostRecentlyFocusedNode||l()))},m=function(t){if(function(t){return"Escape"===t.key||"Esc"===t.key||27===t.keyCode}(t)&&!1!==ur(i.escapeDeactivates,t))return t.preventDefault(),void n.deactivate();(function(t){return"Tab"===t.key||9===t.keyCode})(t)&&function(t){var e=lr(t);c();var n=null;if(o.tabbableGroups.length>0){var r=a(e),s=r>=0?o.containerGroups[r]:void 0;if(r<0)n=t.shiftKey?o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:o.tabbableGroups[0].firstTabbableNode;else if(t.shiftKey){var l=ar(o.tabbableGroups,(function(t){var n=t.firstTabbableNode;return e===n}));if(l<0&&(s.container===e||tr(e,i.tabbableOptions)&&!Qn(e,i.tabbableOptions)&&!s.nextTabbableNode(e,!1))&&(l=r),l>=0){var h=0===l?o.tabbableGroups.length-1:l-1;n=o.tabbableGroups[h].lastTabbableNode}}else{var f=ar(o.tabbableGroups,(function(t){var n=t.lastTabbableNode;return e===n}));if(f<0&&(s.container===e||tr(e,i.tabbableOptions)&&!Qn(e,i.tabbableOptions)&&!s.nextTabbableNode(e))&&(f=r),f>=0){var p=f===o.tabbableGroups.length-1?0:f+1;n=o.tabbableGroups[p].firstTabbableNode}}}else n=u("fallbackFocus");n&&(t.preventDefault(),d(n))}(t)},v=function(t){var e=lr(t);a(e)>=0||ur(i.clickOutsideDeactivates,t)||ur(i.allowOutsideClick,t)||(t.preventDefault(),t.stopImmediatePropagation())},g=function(){if(o.active)return or.activateTrap(n),o.delayInitialFocusTimer=i.delayInitialFocus?sr((function(){d(l())})):d(l()),r.addEventListener("focusin",p,!0),r.addEventListener("mousedown",f,{capture:!0,passive:!1}),r.addEventListener("touchstart",f,{capture:!0,passive:!1}),r.addEventListener("click",v,{capture:!0,passive:!1}),r.addEventListener("keydown",m,{capture:!0,passive:!1}),n},y=function(){if(o.active)return r.removeEventListener("focusin",p,!0),r.removeEventListener("mousedown",f,!0),r.removeEventListener("touchstart",f,!0),r.removeEventListener("click",v,!0),r.removeEventListener("keydown",m,!0),n};return(n={get active(){return o.active},get paused(){return o.paused},activate:function(t){if(o.active)return this;var e=s(t,"onActivate"),n=s(t,"onPostActivate"),i=s(t,"checkCanFocusTrap");i||c(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,e&&e();var a=function(){i&&c(),g(),n&&n()};return i?(i(o.containers.concat()).then(a,a),this):(a(),this)},deactivate:function(t){if(!o.active)return this;var e=nr({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},t);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,y(),o.active=!1,o.paused=!1,or.deactivateTrap(n);var r=s(e,"onDeactivate"),a=s(e,"onPostDeactivate"),u=s(e,"checkCanReturnFocus"),l=s(e,"returnFocus","returnFocusOnDeactivate");r&&r();var c=function(){sr((function(){l&&d(h(o.nodeFocusedBeforeActivation)),a&&a()}))};return l&&u?(u(h(o.nodeFocusedBeforeActivation)).then(c,c),this):(c(),this)},pause:function(){return o.paused||!o.active||(o.paused=!0,y()),this},unpause:function(){return o.paused&&o.active?(o.paused=!1,c(),g(),this):this},updateContainerElements:function(t){var e=[].concat(t).filter(Boolean);return o.containers=e.map((function(t){return"string"==typeof t?r.querySelector(t):t})),o.active&&c(),this}}).updateContainerElements(t),n};function dr(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e[1]=D({escapeDeactivates:!1},e[1]),cr.apply(void 0,e)}var hr=!1;if("undefined"!=typeof window){var fr={get passive(){hr=!0}};window.addEventListener("testPassive",null,fr),window.removeEventListener("testPassive",null,fr)}var pr,mr="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),vr=[],gr=!1,yr=-1,br=void 0,wr=void 0,Dr=void 0,xr=function(t){return vr.some((function(e){return!(!e.options.allowTouchMove||!e.options.allowTouchMove(t))}))},Cr=function(t){var e=t||window.event;return!!xr(e.target)||e.touches.length>1||(e.preventDefault&&e.preventDefault(),!1)},Ar=function(){mr&&(vr.forEach((function(t){t.targetElement.ontouchstart=null,t.targetElement.ontouchmove=null})),gr&&(document.removeEventListener("touchmove",Cr,hr?{passive:!1}:void 0),gr=!1),yr=-1),mr?function(){if(void 0!==wr){var t=-parseInt(document.body.style.top,10),e=-parseInt(document.body.style.left,10);document.body.style.position=wr.position,document.body.style.top=wr.top,document.body.style.left=wr.left,window.scrollTo(e,t),wr=void 0}}():(void 0!==Dr&&(document.body.style.paddingRight=Dr,Dr=void 0),void 0!==br&&(document.body.style.overflow=br,br=void 0)),vr=[]},Er=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).focusTrap=void 0,e.lastSetFocusTrap=void 0,e.modalClosing=!1,e.keyUpListener=null,e}w(e,t);var n=e.prototype;return n.view=function(t){var e=this;return m("[",null,this.attrs.state.modalList.map((function(t,n){var r=null==t?void 0:t.componentClass;return m("div",{key:t.key,className:"ModalManager modal","data-modal-key":t.key,"data-modal-number":n,role:"dialog","aria-modal":"true",style:{"--modal-number":n},"aria-hidden":e.attrs.state.modal!==t&&"true"},!!r&&[m(r,Object.assign({key:t.key},t.attrs,{animateShow:e.animateShow.bind(e),animateHide:e.animateHide.bind(e),state:e.attrs.state})),m("div",{key:t.key,className:"ModalManager-invisibleBackdrop",onclick:e.handlePossibleBackdropClick.bind(e)})])})),this.attrs.state.backdropShown&&m("div",{className:"Modal-backdrop backdrop",ontransitionend:this.onBackdropTransitionEnd.bind(this),"data-showing":!!this.attrs.state.modalList.length,style:{"--modal-count":this.attrs.state.modalList.length}}))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.keyUpListener=this.handleEscPress.bind(this),document.body.addEventListener("keyup",this.keyUpListener)},n.onbeforeremove=function(e){t.prototype.onbeforeremove.call(this,e),this.keyUpListener&&document.body.removeEventListener("keyup",this.keyUpListener),this.keyUpListener=null},n.onupdate=function(e){var n=this;t.prototype.onupdate.call(this,e),requestAnimationFrame((function(){try{var t,e;if(!n.attrs.state.isModalOpen())return null==(e=document.getElementById("app"))||e.setAttribute("aria-hidden","false"),null==n.focusTrap.deactivate||n.focusTrap.deactivate(),void Ar();null==(t=document.getElementById("app"))||t.setAttribute("aria-hidden","true");var r=n.attrs.state.modal.key;n.focusTrap&&n.lastSetFocusTrap!==r&&(null==n.focusTrap.deactivate||n.focusTrap.deactivate(),Ar()),n.activeDialogElement&&n.lastSetFocusTrap!==r&&(n.focusTrap=dr(n.activeDialogElement,{allowOutsideClick:!0}),null==n.focusTrap.activate||n.focusTrap.activate(),function(t,e){if(t){if(!vr.some((function(e){return e.targetElement===t}))){var n={targetElement:t,options:e||{}};vr=[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(vr),[n]),mr?window.requestAnimationFrame((function(){if(void 0===wr){wr={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var t=window,e=t.scrollY,n=t.scrollX,r=t.innerHeight;document.body.style.position="fixed",document.body.style.top=-e,document.body.style.left=-n,setTimeout((function(){return window.requestAnimationFrame((function(){var t=r-window.innerHeight;t&&e>=r&&(document.body.style.top=-(e+t))}))}),300)}})):function(t){if(void 0===Dr){var e=!!t&&!0===t.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;if(e&&n>0){var r=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);Dr=document.body.style.paddingRight,document.body.style.paddingRight=r+n+"px"}}void 0===br&&(br=document.body.style.overflow,document.body.style.overflow="hidden")}(e),mr&&(t.ontouchstart=function(t){1===t.targetTouches.length&&(yr=t.targetTouches[0].clientY)},t.ontouchmove=function(e){1===e.targetTouches.length&&function(t,e){var n=t.targetTouches[0].clientY-yr;!xr(t.target)&&(e&&0===e.scrollTop&&n>0||function(t){return!!t&&t.scrollHeight-t.scrollTop<=t.clientHeight}(e)&&n<0?Cr(t):t.stopPropagation())}(e,t)},gr||(document.addEventListener("touchmove",Cr,hr?{passive:!1}:void 0),gr=!0))}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")}(n.activeDialogManagerElement,{reserveScrollBarGap:!0})),n.lastSetFocusTrap=r}catch(t){}}))},n.animateShow=function(t){var e=this;void 0===t&&(t=function(){}),this.attrs.state.modal&&(this.activeDialogElement.addEventListener("transitionend",(function(){t()}),{once:!0}),requestAnimationFrame((function(){e.activeDialogElement.classList.add("in")})))},n.animateHide=function(t){var e=this;void 0===t&&(t=function(){}),this.modalClosing||(this.modalClosing=!0,this.activeDialogElement.addEventListener("transitionend",(function(){e.modalClosing=!1,e.attrs.state.close(),t()}),{once:!0}),this.activeDialogElement.classList.remove("in"),this.activeDialogElement.classList.add("out"))},n.handleEscPress=function(t){if(this.attrs.state.modal){var e=this.attrs.state.modal.componentClass.dismissibleOptions;"Escape"===t.key&&e.viaEscKey&&(t.preventDefault(),this.animateHide())}},n.handlePossibleBackdropClick=function(t){this.attrs.state.modal&&this.attrs.state.modal.componentClass.dismissibleOptions.viaBackdropClick&&this.animateHide()},n.onBackdropTransitionEnd=function(t){"opacity"===t.propertyName&&null===t.currentTarget.getAttribute("data-showing")&&(this.attrs.state.backdropShown=!1,m.redraw())},F(e,[{key:"activeDialogElement",get:function(){var t;return document.body.querySelector('.ModalManager[data-modal-key="'+(null==(t=this.attrs.state.modal)?void 0:t.key)+'"] .Modal')}},{key:"activeDialogManagerElement",get:function(){var t;return document.body.querySelector('.ModalManager[data-modal-key="'+(null==(t=this.attrs.state.modal)?void 0:t.key)+'"]')}}]),e}(E),Nr=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state},n.view=function(){var t=this,e=this.state.getActiveAlerts();return m("div",{className:"AlertManager"},Object.keys(e).map(Number).map((function(n){var r=e[n],i="error"===r.attrs.type;return m("div",{className:"AlertManager-alert",role:"alert","aria-live":i?"assertive":"polite"},m(r.componentClass,Object.assign({},r.attrs,{ondismiss:t.state.dismiss.bind(t.state,n)}),r.children))})))},e}(E),kr=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.className=function(){return"RequestErrorModal Modal--large"},n.title=function(){return!!this.attrs.error.xhr&&this.attrs.error.xhr.status+" "+this.attrs.error.xhr.statusText},n.content=function(){var t,e=this.attrs,n=e.error,r=e.formattedError;return t=r.length?r.join("\n\n"):n.response?JSON.stringify(n.response,null,2):n.responseText,m("div",{className:"Modal-body"},m("pre",null,this.attrs.error.options.method," ",this.attrs.error.options.url,m("br",null),m("br",null),t))},e}(_t),Sr=n(5387),Tr=n.n(Sr),Fr=n(1904),_r=n.n(Fr),Pr=n(8213),Br=n.n(Pr),Ir=n(2061),Or=n.n(Ir),Lr=n(8974),Mr=n.n(Lr),$r=n(9767),jr=n.n($r),Rr=n(402),Hr=n.n(Rr);function Ur(t){return t.reduce((function(t,e){return t.concat(Array.isArray(e)?Ur(e):e)}),[])}function qr(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 zr(t){for(var e=function(t){return/\s/.test(t)},n=[],r={},i=0,o=null,s=!1,a=0;a<t.length;){if(s&&(e(t[a])||"{"===t[a]))s=!1,o=t.slice(i,a),"{"===t[a]&&a--;else if(!s&&!e(t[a])){var u="{"===t[a];if(o&&u){var l=Vr(t,a);if(-1===l)throw new Error('Unbalanced curly braces in string: "'.concat(t,'"'));r[o]=t.slice(a+1,l),a=l,o=null}else o&&(n.push(o),o=null),s=!0,i=a}a++}return s&&(o=t.slice(i)),o&&n.push(o),{args:n,cases:r}}function Vr(t,e){for(var n=0,r=e+1;r<t.length;r++){var i=t.charAt(r);if("}"===i){if(0===n)return r;n--}else"{"===i&&n++}return-1}function Wr(t){return Gr(t.slice(1,-1),",",3)}function Gr(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(!t)return r;if(1===n)return r.push(t),r;var i=t.indexOf(e);if(-1===i)return r.push(t),r;var o=t.substring(0,i).trim(),s=t.substring(i+e.length+1).trim();return r.push(o),Gr(s,e,n-1,r)}function Yr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Kr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Yr(Object(n),!0).forEach((function(e){Hr()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Xr=0,Jr="other";function Qr(t,e){for(var n=0,r="",i=0,o={};n<t.length;){if("#"!==t[n]||i)r+=t[n];else{var s="__hashToken".concat(Xr++);r+="{".concat(s,", number}"),o[s]=e}"{"===t[n]?i++:"}"===t[n]&&i--,n++}return{caseBody:r,numberValues:o}}function Zr(t){var e=arguments.length>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=zr(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!==pr&&pr.resolvedOptions().locale===n||(pr=new Intl.PluralRules(n));var c=pr.select(u);c!==Jr&&l.push(c)}1===u&&l.push("one"),l.push("=".concat(u),Jr);for(var d=0;d<l.length;d++){var h=l[d];if(h in a){var f=Qr(a[h],u),p=f.caseBody,m=f.numberValues;return i(p,Kr(Kr({},r),m))}}return t}var ti="other";function ei(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=zr(e),o=i.cases;return t in o?r(o[t],n):ti in o?r(o.other,n):t}function ni(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=[],o=function(r,o,s,a,u,l){if(o)return{break:!0};var c=ri(t,s,a,u);if(!c)return i;var d=c.segmentIndex===a,h=t[c.segmentIndex],f=[];if(d)f.push(r.slice(u+1,c.segmentStart));else{f.push(r.slice(u+1));for(var p=a+1;p<c.segmentIndex;p++)f.push(t[p]);f.push(h.slice(0,c.segmentStart))}return i.push(r.slice(0,l)),i.push(n(s,e,ni(f.filter((function(t){return""!==t})),e,n))),t.splice(c.segmentIndex+1,0,h.slice(c.segmentEnd+1)),{processedSegment:!0,newSegmentIndex:c.segmentIndex,break:!0}};return ii(t,0,0,i,o),i.filter((function(t){return""!==t})).map((function(t,e){return r.includes(e)?t:si(t)}))}function ri(t,e,n,r){var i,o=1;return ii(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}function ii(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 oi(t){return Object.keys(t).reduce((function(e,n){return e[n]=ai(t[n]),e}),{})}function si(t){return"string"!=typeof t?t:t.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#039;/g,"'").replace(/&amp;/g,"&")}function ai(t){return"string"==typeof t||t instanceof String?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"):Array.isArray(t)?t.map(ai):t}function ui(t,e,n){return"<".concat(t,">").concat(si(n),"</").concat(t,">")}var li=function(t){Or()(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=jr()(e);if(n){var i=jr()(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return Mr()(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 _r()(this,i),(e=r.call(this,t,n)).richHandler=o||ui,e}return Br()(i,[{key:"rich",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=oi(e),r=Ur(this.process(t,n)),i=Math.random().toString(36)+Math.random().toString(36)+Math.random().toString(36),o=Object.fromEntries(Object.entries(e).map((function(t){var e=Tr()(t,2),n=e[0];return e[1],[n,i]}))),s=Ur(this.process(t,o)),a=ni(s,o,(function(){return i})),u=a.map((function(t,e){return t===i?null:e})).filter((function(t){return null!==t}));return ni(r,n,this.richHandler,u)}}]),i}(function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_r()(this,t),Hr()(this,"format",qr((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ur(n.process(t,e)).join("")}))),this.locale=e,this.typeHandlers=r}return Br()(t,[{key:"process",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)return[];var n=t.indexOf("{");if(-1!==n){var r=Vr(t,n);if(-1===r)throw new Error('Unbalanced curly braces in string: "'.concat(t,'"'));var i=t.substring(n,r+1);if(i){var o=[],s=t.substring(0,n);s&&o.push(s);var a=Wr(i),u=Tr()(a,3),l=u[0],c=u[1],d=u[2],h=e[l];null==h&&(h="");var f=c&&this.typeHandlers[c];o.push(f?f(h,d,this.locale,e,this.process.bind(this)):h);var p=t.substring(r+1);return p&&o.push(this.process(p,e)),o}}return[t]}}]),t}());function ci(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 di(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ci(Object(n),!0).forEach((function(e){Hr()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ci(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function hi(t,e,n){var r=e[t]||m(t),i=si(m.fragment(n).children);return di(di({},r),{},{children:i})}var fi=function(){function t(){this.translations={},this.formatter=new li(null,this.formatterTypeHandlers(),hi)}var e=t.prototype;return e.setLocale=function(t){this.formatter.locale=t},e.getLocale=function(){return this.formatter.locale},e.addTranslations=function(t){Object.assign(this.translations,t)},e.formatterTypeHandlers=function(){return{plural:Zr,select:ei}},e.preprocessParameters=function(t){if("user"in t){var e=z(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 pi(t){return Array.isArray(t.data)}var mi=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=Ee(ke().mark((function t(e,n,r,i){var o,s,a=this;return ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===r&&(r={}),void 0===i&&(i={}),o=r,s=v.forum.attribute("apiUrl")+"/"+e,n instanceof Array?s+="?filter[id]="+n.join(","):"object"==typeof n?o=n:n&&(s+="/"+n),t.abrupt("return",v.request(D({method:"GET",url:s,params:o},i)).then((function(t){return pi(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}(),vi=function(){function t(t,e){this.user=void 0,this.csrfToken=void 0,this.user=t,this.csrfToken=e}var e=t.prototype;return e.login=function(t,e){return void 0===e&&(e={}),v.request(D({method:"POST",url:v.forum.attribute("baseUrl")+"/login",body:t},e))},e.logout=function(){window.location.href=v.forum.attribute("baseUrl")+"/logout?token="+this.csrfToken},t}(),gi=function(){function t(){var t=this;this.focusTrap=void 0,this.appElement=void 0,this.resizeHandler=function(e){!e.matches&&t.isOpen()&&t.hide()}.bind(this),this.drawerAvailableMediaQuery=void 0,document.getElementById("content").addEventListener("click",(function(e){t.isOpen()&&(e.preventDefault(),t.hide())})),this.appElement=document.getElementById("app"),this.focusTrap=dr("#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 yi(t,e){void 0===e&&(e="");var n={};for(var r in t){var i=t[r];if("resolver"in i)n[e+i.path]=i.resolver;else{if(!("component"in i))throw new Error("Either a resolver or a component must be provided for the route ["+r+"]");var o="resolverClass"in i?i.resolverClass:kn;n[e+i.path]=new o(i.component,r)}}return n}var bi=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 wi(){$("[data-humantime]").each((function(){var t=$(this),e=st(t.attr("datetime"));t.html(e)}))}function Di(){setInterval(wi,1e4)}function xi(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 Ci(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 Ai=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.apiEndpoint=function(){return"/"},e}(fe),Ei=n(2898),Ni=n.n(Ei);function ki(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 Si=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}w(e,t);var n=e.prototype;return n.username=function(){return fe.attribute("username").call(this)},n.slug=function(){return fe.attribute("slug").call(this)},n.displayName=function(){return fe.attribute("displayName").call(this)},n.email=function(){return fe.attribute("email").call(this)},n.isEmailConfirmed=function(){return fe.attribute("isEmailConfirmed").call(this)},n.password=function(){return fe.attribute("password").call(this)},n.avatarUrl=function(){return fe.attribute("avatarUrl").call(this)},n.preferences=function(){return fe.attribute("preferences").call(this)},n.groups=function(){return fe.hasMany("groups").call(this)},n.isAdmin=function(){return fe.attribute("isAdmin").call(this)},n.joinTime=function(){return fe.attribute("joinTime",fe.transformDate).call(this)},n.lastSeenAt=function(){return fe.attribute("lastSeenAt",fe.transformDate).call(this)},n.markedAllAsReadAt=function(){return fe.attribute("markedAllAsReadAt",fe.transformDate).call(this)},n.unreadNotificationCount=function(){return fe.attribute("unreadNotificationCount").call(this)},n.newNotificationCount=function(){return fe.attribute("newNotificationCount").call(this)},n.discussionCount=function(){return fe.attribute("discussionCount").call(this)},n.commentCount=function(){return fe.attribute("commentCount").call(this)},n.canEdit=function(){return fe.attribute("canEdit").call(this)},n.canEditCredentials=function(){return fe.attribute("canEditCredentials").call(this)},n.canEditGroups=function(){return fe.attribute("canEditGroups").call(this)},n.canDelete=function(){return fe.attribute("canDelete").call(this)},n.color=function(){var t=this;return pe("displayName","avatarUrl","avatarColor",(function(e,n,r){return r?"rgb("+r.join(", ")+")":n?(t.calculateAvatarColor(),""):"#"+ki(e)})).call(this)},n.isOnline=function(){return dayjs().subtract(5,"minutes").isBefore(this.lastSeenAt())},n.badges=function(){var t=new B,e=this.groups();return e&&e.forEach((function(e){t.add("group"+(null==e?void 0:e.id()),m(qe,{group:e}))})),t},n.calculateAvatarColor=function(){var t,e=new Image,n=this;e.addEventListener("load",(function(){try{var t=new(Ni());n.avatarColor=t.getColor(this)}catch(t){if(!(t instanceof TypeError))throw t;n.avatarColor=[255,255,255]}n.freshness=new Date,m.redraw()})),e.crossOrigin="anonymous",e.src=null!=(t=this.avatarUrl())?t:""},n.savePreferences=function(t){var e=this.preferences();return Object.assign(null!=e?e:{},t),this.save({preferences:e})},e}(fe),Ti=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.number=function(){return fe.attribute("number").call(this)},n.discussion=function(){return fe.hasOne("discussion").call(this)},n.createdAt=function(){return fe.attribute("createdAt",fe.transformDate).call(this)},n.user=function(){return fe.hasOne("user").call(this)},n.contentType=function(){return fe.attribute("contentType").call(this)},n.content=function(){return fe.attribute("content").call(this)},n.contentHtml=function(){return fe.attribute("contentHtml").call(this)},n.renderFailed=function(){return fe.attribute("renderFailed").call(this)},n.contentPlain=function(){return pe("contentHtml",(function(t){return"string"==typeof t?J(t):t})).call(this)},n.editedAt=function(){return fe.attribute("editedAt",fe.transformDate).call(this)},n.editedUser=function(){return fe.hasOne("editedUser").call(this)},n.isEdited=function(){return pe("editedAt",(function(t){return!!t})).call(this)},n.hiddenAt=function(){return fe.attribute("hiddenAt",fe.transformDate).call(this)},n.hiddenUser=function(){return fe.hasOne("hiddenUser").call(this)},n.isHidden=function(){return pe("hiddenAt",(function(t){return!!t})).call(this)},n.canEdit=function(){return fe.attribute("canEdit").call(this)},n.canHide=function(){return fe.attribute("canHide").call(this)},n.canDelete=function(){return fe.attribute("canDelete").call(this)},e}(fe),Fi=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.contentType=function(){return fe.attribute("contentType").call(this)},n.content=function(){return fe.attribute("content").call(this)},n.createdAt=function(){return fe.attribute("createdAt",fe.transformDate).call(this)},n.isRead=function(){return fe.attribute("isRead").call(this)},n.user=function(){return fe.hasOne("user").call(this)},n.fromUser=function(){return fe.hasOne("fromUser").call(this)},n.subject=function(){return fe.hasOne("subject").call(this)},e}(fe),_i=function(){function t(){this.modal=null,this.modalList=[],this.backdropShown=!1,this.key=0}var e=t.prototype;return e.show=function(t,e,n){var r=this;if(void 0===e&&(e={}),void 0===n&&(n=!1),!(t.prototype instanceof _t)){var i="The ModalManager can only show Modals.";throw console.error(i),new Error(i)}this.backdropShown=!0,m.redraw.sync(),requestAnimationFrame((function(){r.modal={componentClass:t,attrs:e,key:r.key++},n?r.modalList.push(r.modal):r.modalList=[r.modal],m.redraw()}))},e.close=function(){this.modal&&(this.modalList.length>1?(this.modalList.pop(),this.modal=this.modalList[this.modalList.length-1]):(this.modal=null,this.modalList=[]),m.redraw())},e.isModalOpen=function(){return!!this.modal},t}(),Pi=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=Ft,o={};return 1==arguments.length?r=t:2==arguments.length?(o=t,r=e):3==arguments.length&&(i=t,o=e,r=n),this.activeAlerts[++this.alertId]={children:r,attrs:o,componentClass:i},m.redraw(),this.alertId},e.dismiss=function(t){t&&t in this.activeAlerts&&(delete this.activeAlerts[t],m.redraw())},e.clear=function(){this.activeAlerts={},m.redraw()},t}();function Bi(t,e,n){var r,i;console.group("%c"+e,"background-color: #d83e3e; color: #ffffff; font-weight: bold;"),console.error(n),console.groupEnd(),null!=(r=v.session)&&null!=(i=r.user)&&i.isAdmin()&&v.alerts.show({type:"error"},""+t)}var Ii=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.token=function(){return fe.attribute("token").call(this)},n.userId=function(){return fe.attribute("userId").call(this)},n.title=function(){return fe.attribute("title").call(this)},n.type=function(){return fe.attribute("type").call(this)},n.createdAt=function(){return fe.attribute("createdAt",fe.transformDate).call(this)},n.lastActivityAt=function(){return fe.attribute("lastActivityAt",fe.transformDate).call(this)},n.lastIpAddress=function(){return fe.attribute("lastIpAddress").call(this)},n.device=function(){return fe.attribute("device").call(this)},n.isCurrent=function(){return fe.attribute("isCurrent").call(this)},n.isSessionToken=function(){return fe.attribute("isSessionToken").call(this)},e}(fe),Oi=["background","deserialize","extract","modifyText"];function Li(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 Mi=function(){function t(){this.forum=void 0,this.routes={},this.initializers=new B,this.session=void 0,this.translator=new fi,this.store=new mi({"access-tokens":Ii,forums:Ai,users:Si,discussions:we,posts:Ti,groups:ze,notifications:Fi}),this.cache={},this.booted=!1,this.current=new k(null),this.previous=new k(null),this.modal=new _i,this.alerts=new Pi,this.drawer=void 0,this.history=null,this.pane=null,this.data=void 0,this.refs={fontawesome:"https://fontawesome.com/v5/search?o=r&m=free"},this._title="",this._titleCount=0,this.requestErrorAlert=null,this.initialRoute=void 0}var e=t.prototype;return e.load=function(t){this.data=t,this.translator.setLocale(t.locale)},e.boot=function(){var t,e=this,n=[];this.initializers.toArray().forEach((function(t){try{t(e)}catch(e){var r=t.itemName.includes("/")?t.itemName.replace(/(\/flarum-ext-)|(\/flarum-)/g,"-"):t.itemName;n.push((function(){return Bi(ot(v.translator.trans("core.lib.error.extension_initialiation_failed_message",{extension:r})),r+" failed to initialize",e)}))}})),this.store.pushPayload({data:this.data.resources}),this.forum=this.store.getById("forums","1"),this.session=new vi(null!=(t=this.store.getById("users",String(this.data.session.userId)))?t:null,this.data.session.csrfToken),this.mount(),this.initialRoute=window.location.href,n.forEach((function(t){return t()}))},e.bootExtensions=function(t){var e=this;Object.keys(t).forEach((function(n){var r=t[n];if(r.extend)for(var i,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Li(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)?Li(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r.extend.flat(1/0));!(i=o()).done;)i.value.extend(e,{name:n,exports:r})}))},e.mount=function(t){var e=this;void 0===t&&(t=""),m.mount(document.getElementById("modal"),{view:function(){return m(Er,{state:e.modal})}}),m.mount(document.getElementById("alerts"),{view:function(){return m(Nr,{state:e.alerts})}}),this.drawer=new gi,m.route(document.getElementById("content"),t+"/",yi(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"),Di()},e.preloadedApiDocument=function(){if(this.data.apiDocument&&window.location.href===this.initialRoute){var t=(pi(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?ot(v.translator.trans("core.lib.meta_titles.without_page_title",n)):ot(v.translator.trans("core.lib.meta_titles.with_page_title",n));r=t+r;var i=new DOMParser;document.title=i.parseFromString(r,"text/html").body.innerText},e.transformRequestOptions=function(t){var e=this,n=D({},t),r=n.background,i=n.deserialize,o=n.extract,s=n.modifyText,a=q(n,Oi),u=s||o,l=D({background:null==r||r,deserialize:null!=i?i:function(t){return t}},a);if(xi(l,"config",(function(t,n){n.setRequestHeader("X-CSRF-Token",e.session.csrfToken)})),l.method&&!["GET","POST"].includes(l.method)){var c=l.method;xi(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 bi(n,""+e,l,t);if(t.getResponseHeader){var r=t.getResponseHeader("X-CSRF-Token");r&&(v.session.csrfToken=r)}try{return""===e?null:JSON.parse(e)}catch(n){throw new bi(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=v.translator.trans("core.lib.error.permission_denied_message");break;case 404:case 410:o=v.translator.trans("core.lib.error.not_found_message");break;case 413:o=v.translator.trans("core.lib.error.payload_too_large_message");break;case 429:o=v.translator.trans("core.lib.error.rate_limit_exceeded_message");break;default:o=this.requestWasCrossOrigin(t)?v.translator.trans("core.lib.error.generic_cross_origin_message"):v.translator.trans("core.lib.error.generic_message")}var a=v.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)},v.translator.trans("core.lib.debug_button"))]},e?e(t):this.requestErrorDefaultHandler(t,a,s),Promise.reject(t)},e.requestWasCrossOrigin=function(t){return new URL(t.options.url,document.baseURI).origin!==window.location.origin},e.requestErrorDefaultHandler=function(t,e,n){if(!(t instanceof bi))throw t;if(e&&t.xhr){var r,i=t.options,o=i.method,s=i.url,a=t.xhr.status,u=void 0===a?"":a;console.group(o+" "+s+" "+u),n.length?(r=console).error.apply(r,n):console.error(t),console.groupEnd()}t.alert&&(this.requestErrorAlert=this.alerts.show(t.alert,t.alert.content))},e.showDebug=function(t,e){null!==this.requestErrorAlert&&this.alerts.dismiss(this.requestErrorAlert),this.modal.show(kr,{error:t,formattedError:e})},e.route=function(t,e){void 0===e&&(e={});var n=this.routes[t];if(!n)throw new Error("Route '"+t+"' does not exist");var r=n.path.replace(/:([^\/]+)/g,(function(t,n){return""+z(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:"")},F(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}(),$i=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){var t=v.history,e=v.pane;return m("div",{className:M("Navigation ButtonGroup",this.attrs.className),onmouseenter:e&&e.show.bind(e),onmouseleave:e&&e.onmouseleave.bind(e)},null!=t&&t.canGoBack()?[this.getBackButton(),this.getPaneButton()]:this.getDrawerButton())},n.getBackButton=function(){var t=v.history,e=null==t?void 0:t.getPrevious();return m(le,{className:"Button Navigation-back Button--icon",href:null==t?void 0:t.backUrl(),icon:"fas fa-chevron-left","aria-label":null==e?void 0:e.title,onclick:function(e){e.shiftKey||e.ctrlKey||e.metaKey||2===e.which||(e.preventDefault(),null==t||t.back())}})},n.getPaneButton=function(){var t=v.pane;return t&&t.active?m(yt,{className:M("Button Button--icon Navigation-pin",{active:t.pinned}),onclick:t.togglePinned.bind(t),icon:"fas fa-thumbtack"}):null},n.getDrawerButton=function(){if(!this.attrs.drawer)return null;var t=v.drawer,e=v.session.user;return m(yt,{className:M("Button Button--icon Navigation-drawer",{new:null==e?void 0:e.newNotificationCount()}),onclick:function(e){e.stopPropagation(),t.show()},icon:"fas fa-bars","aria-label":v.translator.trans("core.lib.nav.drawer_button")})},e}(E),ji=function(t){function e(){return t.call(this,{},1,20)||this}w(e,t);var n=e.prototype;return n.load=function(){var e,n;return null!=(e=Wi.session.user)&&e.newNotificationCount()&&(this.pages=[],this.location={page:1}),this.pages.length>0?Promise.resolve():(null==(n=Wi.session.user)||n.pushAttributes({newNotificationCount:0}),t.prototype.loadNext.call(this))},n.markAllAsRead=function(){var t;if(0!==this.pages.length)return null==(t=Wi.session.user)||t.pushAttributes({unreadNotificationCount:0}),this.pages.forEach((function(t){t.items.forEach((function(t){return t.pushAttributes({isRead:!0})}))})),Wi.request({url:Wi.forum.attribute("apiUrl")+"/notifications/read",method:"POST"})},n.deleteAll=function(){var t;if(0!==this.pages.length)return null==(t=Wi.session.user)||t.pushAttributes({unreadNotificationCount:0}),this.pages=[],Wi.request({url:Wi.forum.attribute("apiUrl")+"/notifications",method:"DELETE"})},F(e,[{key:"type",get:function(){return"notifications"}}]),e}(hn),Ri=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}(),Hi=["q"],Ui=function(t){function e(e){var n;return void 0===e&&(e=[]),(n=t.call(this,e)||this).initialValueSet=!1,n}w(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 Wi.current.type&&Wi.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,q(t,Hi));x(Wi.route(Wi.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(Wi.discussions.sortMap())[0]?delete e.sort:e.sort=t,x(Wi.route(Wi.current.get("routeName"),e))},e}(Ri);function qi(){return"ontouchstart"in window&&null!=navigator.vendor&&navigator.vendor.includes("Apple")&&null!=navigator.userAgent&&!navigator.userAgent.includes("CriOS")&&!navigator.userAgent.includes("FxiOS")}var zi=function(t){function e(){var e;return(e=t.call(this)||this).notificationComponents={discussionRenamed:$e},e.postComponents={comment:rn,discussionRenamed:sn},e.pane=null,e.history=new C,e.notifications=new ji,e.search=new Ui,e.composer=new Oe,e.discussions=new vn({}),e.route=void 0,e.data=void 0,In(y(e)),e.route=Object.assign(Object.getPrototypeOf(Object.getPrototypeOf(y(e))).route.bind(y(e)),function(t){return{discussion:function(t){function e(e,n){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(e,n){return t.route(n&&1!==n?"discussion.near":"discussion",{id:e.slug(),near:n&&1!==n?n:void 0})})),post:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(e){return t.route.discussion(e.discussion(),e.number())})),user:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(e){return t.route("user",{username:e.slug()})}))}}(y(e))),e}w(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,ot(this.translator.trans("core.forum.header.back_to_index_tooltip")),"/"),this.pane=new A(document.getElementById("app")),m.route.prefix="",t.prototype.mount.call(this,this.forum.attribute("basePath")),m.mount(document.getElementById("app-navigation"),{view:function(){return m($i,{className:"App-backControl",drawer:!0})}}),m.mount(document.getElementById("header-navigation"),$i),m.mount(document.getElementById("header-primary"),ue),m.mount(document.getElementById("header-secondary"),Pe),m.mount(document.getElementById("composer"),{view:function(){return m(Le,{state:e.composer})}}),On(this),document.getElementById("home-link").addEventListener("click",(function(t){var e;if(!t.ctrlKey&&!t.metaKey&&1!==t.button){t.preventDefault(),Wi.history.home();var n=null==(e=Wi.session.user)?void 0:e.id();n&&(Wi.store.find("users",n),m.redraw())}})),qi()&&$((function(){$(".App").addClass("mobile-safari")}))},n.viewingDiscussion=function(t){return this.current.matches(ae,{discussion:t})},n.authenticationComplete=function(t){t.loggedIn?window.location.reload():this.modal.show(Lt,t)},e}(Mi),Vi=new zi;window.app=Vi;const Wi=Vi;function Gi(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 Yi=function(){function t(t){this.model=void 0,this.callbacks=[],this.model=t}var e=t.prototype;return e.attribute=function(t,e){var n=this;return void 0===e&&(e=null),this.callbacks.push((function(){n.model.prototype[t]=e?fe.attribute(t,e):fe.attribute(t)})),this},e.hasOne=function(t){var e=this;return this.callbacks.push((function(){e.model.prototype[t]=fe.hasOne(t)})),this},e.hasMany=function(t){var e=this;return this.callbacks.push((function(){e.model.prototype[t]=fe.hasMany(t)})),this},e.extend=function(t,e){for(var n,r=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Gi(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)?Gi(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.callbacks);!(n=r()).done;)n.value.call(this)},t}(),Ki=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}(),Xi=function(){function t(){this.routes={},this.helpers={}}var e=t.prototype;return e.add=function(t,e,n){return this.routes[t]={path:e,component:n},this},e.helper=function(t,e){return this.helpers[t]=e,this},e.extend=function(t,e){Object.assign(t.routes,this.routes),Object.assign(t.route,this.helpers)},t}(),Ji=function(){function t(){this.models={}}var e=t.prototype;return e.add=function(t,e){return this.models[t]=e,this},e.extend=function(t,e){for(var n in this.models){if(t.store.models[n])throw new Error('The model type "'+n+'" has already been registered with the class "'+t.store.models[n].name+'".');t.store.models[n]=this.models[n]}},t}();const Qi={Model:Yi,PostTypes:Ki,Routes:Xi,Store:Ji};var Zi="The `evented` util is deprecated and no longer supported.",to="2547";const eo={handlers:null,getHandlers:function(t){return vt(Zi,to),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(Zi,to),this.getHandlers(t).forEach((function(t){return t.apply(e,r)}))},on:function(t,e){vt(Zi,to),this.getHandlers(t).push(e)},one:function(t,e){vt(Zi,to),this.getHandlers(t).push((function n(){e.apply(this,arguments),this.off(t,n)}))},off:function(t,e){vt(Zi,to);var n=this.getHandlers(t),r=n.indexOf(e);-1!==r&&n.splice(r,1)}};var no={prefix:"",suffix:"",blockPrefix:"",blockSuffix:"",multiline:!1,replaceNext:"",prefixSpace:!1,scanFor:"",surroundWithNewlines:!1,orderedList:!1,unorderedList:!1,trimFirst:!1};function ro(t){return t.trim().split("\n").length>1}function io(t,e){return Array(e+1).join(t)}function oo(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=io("\n",2-a)),i.match(/\S/)&&u<2&&(n=io("\n",2-u)),null==e&&(e=""),null==n&&(n=""),{newlinesToAppend:e,newlinesToPrepend:n}}function so(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 ao(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 uo(t,e){return e?"- ":t+1+". "}var lo,co=n(8492);function ho(t,e){var n,r,i=new RegExp(String.raw(lo||(n=["(w+/)?(","|common)/"],(r=["(\\w+\\/)?(","|common)\\/"])||(r=n.slice(0)),n.raw=r,lo=n),e)),o=/(\.js|\.tsx?)$/;return new Proxy(t,{get:function(t,e){return t[e]||t[e.replace(i,"$1").replace(o,"")]}})}var fo=["className","class"],po=["options","onchange","value","disabled","className","class","wrapperAttrs"],mo=function(t){function e(){return t.apply(this,arguments)||this}return w(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=q(a,fo),d=q(t,po);return m("span",Object.assign({className:M("Select",u,l)},c),m("select",Object.assign({className:M("Select-input FormControl",o,s),onchange:n?yn("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}(E),vo=["className","id"],go=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(t){var e=this.attrs,n=e.className,r=e.id,i=q(e,vo);return i.type||(i.type="text"),4===i.value.length&&(i.value=i.value.replace(/#([a-f0-9])([a-f0-9])([a-f0-9])/,"#$1$1$2$2$3$3")),m("div",{className:"ColorInput"},m("input",Object.assign({className:M("FormControl",n),id:r},i)),m("span",{className:"ColorInput-icon",role:"presentation"},nt("fas fa-exclamation-circle")),m("input",Object.assign({className:"ColorInput-preview"},i,{type:"color"})))},e}(E),yo=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return m(Et,{text:this.attrs.tooltipText||ot(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 bo={extenders:Qi,extend:o,Session:vi,Store:mi,"utils/BasicEditorDriver":Ct,"utils/bidi":h,"utils/evented":eo,"utils/EventEmitter":fn,"utils/KeyboardNavigatable":Ce,"utils/liveHumanTimes":Di,"utils/ItemList":B,"utils/mixin":function(t){for(var e=function(t){function e(){return t.apply(this,arguments)||this}return w(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":st,"utils/computed":pe,"utils/insertText":xt,"utils/styleSelectedText":function(t,e){t.focus(),e=Object.assign({},no,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=ao((r=so(e)).text)).text:(n=so((r=ao(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""+uo(n,e.unorderedList)+t})),d=c.reduce((function(t,n,r){return t+uo(r,e.unorderedList).length}),0),h=c.reduce((function(t,n,r){return t+uo(r,!e.unorderedList).length}),0);if(a.processed)return n?i=r=Math.max(r-uo(0,e.unorderedList).length,0):(r=t.selectionStart,i=t.selectionEnd-d),{text:l,selectionStart:r,selectionEnd:i};var f=oo(t),p=f.newlinesToAppend,m=f.newlinesToPrepend,v=p+c.join("\n")+m;return n?i=r=Math.max(r+uo(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&&ro(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=oo(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=ro(h)&&i.length>0?i+"\n":n,p=ro(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=oo(t);f=b.newlinesToAppend+n,p+=b.newlinesToPrepend}if(h.startsWith(f)&&h.endsWith(p)){var w=h.slice(f.length,h.length-p.length);if(c===d){var D=c-f.length;D=Math.max(D,v),v=g=D=Math.min(D,v+w.length)}else g=v+w.length;return{text:w,selectionStart:v,selectionEnd:g}}if(y)return u.length>0&&h.match(u)?{text:f+(p=p.replace(s,h)),selectionStart:v=g=v+f.length,selectionEnd:g}:{text:f+h+p,selectionStart:v=v+f.length+h.length+p.indexOf(s),selectionEnd:g=v+s.length};var x=f+h+p;v=c+f.length,g=d+f.length;var C=h.match(/^\s*|\s*$/g);if(e.trimFirst&&C){var A=C[0]||"",E=C[1]||"";x=A+f+h.trim()+p+E,v+=A.length,g-=E.length}return{text:x,selectionStart:v,selectionEnd:g}}(t,e),xt(t,n)},"utils/Drawer":gi,"utils/EditorDriverInterface":co,"utils/anchorScroll":oe,"utils/RequestError":bi,"utils/abbreviateNumber":at,"utils/string":t,"utils/SubtreeRetainer":dt,"utils/escapeRegExp":Ut,"utils/extract":z,"utils/ScrollListener":Yt,"utils/stringToColor":ki,"utils/Stream":Bt,"utils/subclassOf":N,"utils/setRouteWithForcedRefresh":x,"utils/patchMithril":f,"utils/proxifyCompat":ho,"utils/classList":M,"utils/extractText":ot,"utils/formatNumber":te,"utils/mapRoutes":yi,"utils/withAttr":yn,"utils/throttleDebounce":s,"utils/isObject":_,"utils/focusTrap":i,"utils/isDark":me,"models/AccessToken":Ii,"models/Notification":Fi,"models/User":Si,"models/Post":Ti,"models/Discussion":we,"models/Group":ze,"models/Forum":Ai,Component:E,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:fi,"components/AlertManager":Nr,"components/Page":S,"components/Switch":wn,"components/Badge":be,"components/LoadingIndicator":ft,"components/Placeholder":zt,"components/Separator":O,"components/Dropdown":ut,"components/SplitDropdown":ne,"components/RequestErrorModal":kr,"components/FieldSet":Dn,"components/Select":mo,"components/Navigation":$i,"components/Alert":Ft,"components/Link":G,"components/LinkButton":le,"components/Checkbox":bn,"components/ColorPreviewInput":go,"components/ConfirmDocumentUnload":pt,"components/SelectDropdown":he,"components/ModalManager":Er,"components/Button":yt,"components/Modal":_t,"components/GroupBadge":qe,"components/TextEditor":Nt,"components/TextEditorButton":yo,"components/Tooltip":Et,"components/EditUserModal":Ve,"components/LabelValue":Tn,"components/IPAddress":tn,Model:fe,Application:Mi,"helpers/fullTime":Ze,"helpers/avatar":Y,"helpers/fireApplicationError":Bi,"helpers/fireDebugWarning":e,"helpers/icon":nt,"helpers/humanTime":lt,"helpers/punctuateSeries":function(t){if(2===t.length)return v.translator.trans("core.lib.series.two_text",{first:t[0],second:t[1]});if(t.length>=3){var e=t.slice(1,t.length-1).reduce((function(t,e){return t.concat([e,v.translator.trans("core.lib.series.glue_text")])}),[]).slice(0,-1);return v.translator.trans("core.lib.series.three_text",{first:t[0],second:e,third:t[t.length-1]})}return t},"helpers/highlight":et,"helpers/username":Xt,"helpers/userOnline":Je,"helpers/listItems":H,"helpers/textContrastClass":ve,"resolvers/DefaultResolver":kn,"states/PaginatedListState":hn,"states/AlertManagerState":Pi,"states/ModalManagerState":_i,"states/PageState":k};var wo=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.initAttrs=function(e){e.className=M(e.className,"LogInButton"),e.onclick=function(){var t=$(window);window.open(Wi.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),Do=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.post,e=t.user();return m(G,{className:"PostPreview",href:Wi.route.post(t),onclick:this.attrs.onclick},m("span",{className:"PostPreview-content"},Y(e),Xt(e)," ",m("span",{className:"PostPreview-excerpt"},this.excerpt())))},n.content=function(){return"comment"===this.attrs.post.contentType()&&this.attrs.post.contentPlain()},n.excerpt=function(){return this.content()?et(this.content(),this.attrs.highlight,300):""},e}(E);const xo=Object.assign(bo,{"utils/PostControls":He,"utils/KeyboardNavigatable":Ce,"utils/slidable":Rt,"utils/History":C,"utils/DiscussionControls":jt,"utils/alertEmailConfirmation":On,"utils/UserControls":Ye,"utils/Pane":A,"utils/BasicEditorDriver":Ct,"utils/isSafariMobile":qi,"states/ComposerState":Oe,"states/DiscussionListState":vn,"states/GlobalSearchState":Ui,"states/NotificationListState":ji,"states/PostStreamState":se,"states/SearchState":Ri,"states/UserSecurityPageState":Pn,"components/AffixedSidebar":We,"components/DiscussionPage":ae,"components/DiscussionListPane":Gt,"components/LogInModal":Mt,"components/NewAccessTokenModal":_n,"components/ComposerBody":kt,"components/ForgotPasswordModal":It,"components/Notification":Me,"components/LogInButton":wo,"components/DiscussionsUserPage":gn,"components/Composer":Le,"components/SessionDropdown":ce,"components/HeaderPrimary":ue,"components/PostEdited":nn,"components/PostStream":Zt,"components/ChangePasswordModal":Cn,"components/IndexPage":cn,"components/DiscussionRenamedNotification":$e,"components/DiscussionsSearchSource":Te,"components/DiscussionsSearchItem":Se,"components/HeaderSecondary":Pe,"components/ComposerButton":Be,"components/DiscussionList":Vt,"components/ReplyPlaceholder":Qt,"components/AvatarEditor":Ke,"components/Post":Ue,"components/SettingsPage":En,"components/TerminalPost":ct,"components/ChangeEmailModal":An,"components/NotificationsDropdown":xe,"components/UserPage":Ge,"components/PostUser":Qe,"components/UserCard":Xe,"components/UsersSearchSource":Fe,"components/UserSecurityPage":Bn,"components/NotificationGrid":xn,"components/PostPreview":Do,"components/EventPost":on,"components/DiscussionHero":U,"components/PostMeta":en,"components/DiscussionRenamedPost":sn,"components/DiscussionComposer":ln,"components/LogInButtons":Ot,"components/NotificationList":De,"components/WelcomeHero":un,"components/SignUpModal":Lt,"components/CommentPost":rn,"components/ComposerPostPreview":Jt,"components/ReplyComposer":Tt,"components/NotificationsPage":Nn,"components/PostStreamScrubber":ee,"components/EditPostComposer":Re,"components/RenameDiscussionModal":$t,"components/Search":_e,"components/DiscussionListItem":qt,"components/LoadingPost":Kt,"components/PostsUserPage":dn,"components/AccessTokensList":Fn,"resolvers/DiscussionPageResolver":Sn,routes:In,ForumApplication:zi});xo.app=Wi;var Co=ho(xo,"forum")})(),flarum.core=r})();
+(()=>{var t={8492:()=>{},1859:()=>{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)})},9043:()=>{!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)},6199:()=>{!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)},7865:()=>{!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)},6935:()=>{!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)},2898: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},4757:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,n="millisecond",r="second",i="minute",o="hour",s="day",a="week",u="month",l="quarter",c="year",d="date",h="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},v=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:v,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+v(r,2,"0")+":"+v(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,u),o=n-i<0,s=e.clone().add(r+(o?-1:1),u);return+(-(r+(n-i)/(o?i-s:s-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:c,w:a,d:s,D:d,h:o,m:i,s:r,ms:n,Q:l}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},y="en",b={};b[y]=m;var w=function(t){return t instanceof A},D=function t(e,n,r){var i;if(!e)return y;if("string"==typeof e){var o=e.toLowerCase();b[o]&&(i=o),n&&(b[o]=n,i=o);var s=e.split("-");if(!i&&s.length>1)return t(s[0])}else{var a=e.name;b[a]=e,i=a}return!r&&i&&(y=i),i||!r&&y},x=function(t,e){if(w(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new A(n)},C=g;C.l=D,C.i=w,C.w=function(t,e){return x(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var A=function(){function m(t){this.$L=D(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(C.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 C},v.isValid=function(){return!(this.$d.toString()===h)},v.isSame=function(t,e){var n=x(t);return this.startOf(e)<=n&&n<=this.endOf(e)},v.isAfter=function(t,e){return x(t)<this.startOf(e)},v.isBefore=function(t,e){return this.endOf(e)<x(t)},v.$g=function(t,e,n){return C.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=!!C.u(e)||e,h=C.p(t),f=function(t,e){var r=C.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 C.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=C.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[C.p(t)]()},v.add=function(n,l){var d,h=this;n=Number(n);var f=C.p(l),p=function(t){var e=x(h);return C.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 C.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=C.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].slice(0,o)},d=function(t){return C.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:C.s(a+1,2,"0"),MMM:c(n.monthsShort,a,l,3),MMMM:c(l,a),D:this.$D,DD:C.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:C.s(o,2,"0"),h:d(1),hh:d(2),a:f(o,s,!0),A:f(o,s,!1),m:String(s),mm:C.s(s,2,"0"),s:String(this.$s),ss:C.s(this.$s,2,"0"),SSS:C.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=C.p(d),m=x(n),v=(m.utcOffset()-this.utcOffset())*t,g=this-m,y=C.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:C.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=D(t,e,!0);return r&&(n.$L=r),n},v.clone=function(){return C.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}(),E=A.prototype;return x.prototype=E,[["$ms",n],["$s",r],["$m",i],["$H",o],["$W",s],["$M",u],["$y",c],["$D",d]].forEach((function(t){E[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),x.extend=function(t,e){return t.$i||(t(e,A,x),t.$i=!0),x},x.locale=D,x.isDayjs=w,x.unix=function(t){return x(1e3*t)},x.en=b[y],x.Ls=b,x.p={},x}()},6982: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)}}}()},5635: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)}}}()},356:(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}()},9411: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)},9152:function(t,e){var n;!function(e,n){"use strict";"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,(function(r,i){"use strict";var o=[],s=Object.getPrototypeOf,a=o.slice,u=o.flat?function(t){return o.flat.call(t)}:function(t){return o.concat.apply([],t)},l=o.push,c=o.indexOf,d={},h=d.toString,f=d.hasOwnProperty,p=f.toString,m=p.call(Object),v={},g=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},y=function(t){return null!=t&&t===t.window},b=r.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function D(t,e,n){var r,i,o=(n=n||b).createElement("script");if(o.text=t,e)for(r in w)(i=e[r]||e.getAttribute&&e.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?d[h.call(t)]||"object":typeof t}var C="3.6.1",A=function t(e,n){return new t.fn.init(e,n)};function E(t){var e=!!t&&"length"in t&&t.length,n=x(t);return!g(t)&&!y(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}A.fn=A.prototype={jquery:C,constructor:A,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=A.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return A.each(this,t)},map:function(t){return this.pushStack(A.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(A.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(A.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},A.extend=A.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&&(A.isPlainObject(r)||(i=Array.isArray(r)))?(n=s[e],o=i&&!Array.isArray(n)?[]:i||A.isPlainObject(n)?n:{},i=!1,s[e]=A.extend(l,o,r)):void 0!==r&&(s[e]=r));return s},A.extend({expando:"jQuery"+(C+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==h.call(t)||(e=s(t))&&("function"!=typeof(n=f.call(e,"constructor")&&e.constructor)||p.call(n)!==m))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){D(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,r=0;if(E(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&&(E(Object(t))?A.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(E(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&&(A.fn[Symbol.iterator]=o[Symbol.iterator]),A.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){d["[object "+e+"]"]=e.toLowerCase()}));var N=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,D=t.document,x=0,C=0,A=ut(),E=ut(),N=ut(),k=ut(),S=function(t,e){return t===e&&(d=!0),0},T={}.hasOwnProperty,F=[],_=F.pop,P=F.push,B=F.push,I=F.slice,O=function(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",$="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",j="\\[[\\x20\\t\\r\\n\\f]*("+$+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+$+"))|)"+M+"*\\]",R=":("+$+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+j+")*)|.*)\\)|)",H=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]*"),V=new RegExp(M+"|>"),W=new RegExp(R),G=new RegExp("^"+$+"$"),Y={ID:new RegExp("^#("+$+")"),CLASS:new RegExp("^\\.("+$+")"),TAG:new RegExp("^("+$+"|[*])"),ATTR:new RegExp("^"+j),PSEUDO:new RegExp("^"+R),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("^(?:"+L+")$","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{B.apply(F=I.call(D.childNodes),D.childNodes),F[D.childNodes.length].nodeType}catch(t){B={apply:F.length?function(t,e){P.apply(t,I.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,D=e?e.nodeType:9;if(r=r||[],"string"!=typeof t||!t||1!==D&&9!==D&&11!==D)return r;if(!i&&(h(e),e=e||f,m)){if(11!==D&&(d=Z.exec(t)))if(o=d[1]){if(9===D){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 B.apply(r,e.getElementsByTagName(t)),r;if((o=d[3])&&n.getElementsByClassName&&e.getElementsByClassName)return B.apply(r,e.getElementsByClassName(o)),r}if(n.qsa&&!k[t+" "]&&(!v||!v.test(t))&&(1!==D||"object"!==e.nodeName.toLowerCase())){if(g=t,y=e,1===D&&(V.test(t)||z.test(t))){for((y=tt.test(t)&&gt(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 B.apply(r,y.querySelectorAll(g)),r}catch(e){k(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:D;return s!=f&&9===s.nodeType&&s.documentElement?(p=(f=s).documentElement,m=!o(f),D!=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|"+L+")"),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("!=",R)})),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},S=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==D&&b(D,t)?-1:e==f||e.ownerDocument==D&&b(D,e)?1:c?O(c,t)-O(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?O(c,t)-O(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]==D?-1:a[r]==D?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&&!k[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){k(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&&T.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(S),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&&W.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=A[t+" "];return e||(e=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+t+"("+M+"|$)"))&&A(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(H," ")+" ").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]===x&&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]=[x,f,b];break}}else if(y&&(b=f=(l=(c=(d=(h=e)[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]||[])[0]===x&&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]=[x,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=O(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=C++;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=[x,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]===x&&l[1]===a)return h[2]=l[2];if(c[o]=h,h[2]=t(e,n,u))return!0}return!1}}function Dt(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 xt(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 Ct(t,e,n,r,i,o){return r&&!r[w]&&(r=Ct(r)),i&&!i[w]&&(i=Ct(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:xt(m,h,t,a,u),g=n?i||(o?t:p||r)?[]:s:v;if(n&&n(v,g,a,u),r)for(l=xt(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?O(o,d):h[c])>-1&&(o[l]=!(s[l]=d))}}else g=xt(g===s?g.splice(p,g.length):g),i?i(null,s,g,u):B.apply(s,g)}))}function At(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 O(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(Dt(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 Ct(u>1&&Dt(h),u>1&&bt(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace(U,"$1"),n,u<i&&At(t.slice(u,i)),i<o&&At(t=t.slice(i)),i<o&&bt(t))}h.push(n)}return Dt(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=E[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):E(t,u).slice(0)},a=at.compile=function(t,e){var n,i=[],o=[],a=N[t+" "];if(!a){for(e||(e=s(t)),n=e.length;n--;)(a=At(e[n]))[w]?i.push(a):o.push(a);a=N(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=[],D=l,C=o||i&&r.find.TAG("*",c),A=x+=null==D?1:Math.random()||.1,E=C.length;for(c&&(l=s==f||s||c);y!==E&&null!=(d=C[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&&(x=A)}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]=_.call(u));w=xt(w)}B.apply(u,w),c&&!o&&w.length>0&&g+e.length>1&&at.uniqueSort(u)}return c&&(x=A,l=D),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)&&gt(e.parentNode)||e))){if(u.splice(o,1),!(t=i.length&&bt(u)))return B.apply(n,i),n;break}}return(h||a(t,f))(i,e,!m,n,!e||tt.test(t)&&gt(e.parentNode)||e),n},n.sortStable=w.split("").sort(S).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(L,(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);A.find=N,(A.expr=N.selectors)[":"]=A.expr.pseudos,A.uniqueSort=A.unique=N.uniqueSort,A.text=N.getText,A.isXMLDoc=N.isXML,A.contains=N.contains,A.escapeSelector=N.escape;var k=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&A(t).is(n))break;r.push(t)}return r},S=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},T=A.expr.match.needsContext;function F(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var _=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function P(t,e,n){return g(e)?A.grep(t,(function(t,r){return!!e.call(t,r,t)!==n})):e.nodeType?A.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?A.grep(t,(function(t){return c.call(e,t)>-1!==n})):A.filter(e,t,n)}A.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?A.find.matchesSelector(r,t)?[r]:[]:A.find.matches(t,A.grep(e,(function(t){return 1===t.nodeType})))},A.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(A(t).filter((function(){for(e=0;e<r;e++)if(A.contains(i[e],this))return!0})));for(n=this.pushStack([]),e=0;e<r;e++)A.find(t,i[e],n);return r>1?A.uniqueSort(n):n},filter:function(t){return this.pushStack(P(this,t||[],!1))},not:function(t){return this.pushStack(P(this,t||[],!0))},is:function(t){return!!P(this,"string"==typeof t&&T.test(t)?A(t):t||[],!1).length}});var B,I=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(A.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||B,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:I.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 A?e[0]:e,A.merge(this,A.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:b,!0)),_.test(r[1])&&A.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(A):A.makeArray(t,this)}).prototype=A.fn,B=A(b);var O=/^(?:parents|prev(?:Until|All))/,L={children:!0,contents:!0,next:!0,prev:!0};function M(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}A.fn.extend({has:function(t){var e=A(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(A.contains(this,e[t]))return!0}))},closest:function(t,e){var n,r=0,i=this.length,o=[],s="string"!=typeof t&&A(t);if(!T.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&&A.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?A.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?c.call(A(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(A.uniqueSort(A.merge(this.get(),A(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),A.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return k(t,"parentNode")},parentsUntil:function(t,e,n){return k(t,"parentNode",n)},next:function(t){return M(t,"nextSibling")},prev:function(t){return M(t,"previousSibling")},nextAll:function(t){return k(t,"nextSibling")},prevAll:function(t){return k(t,"previousSibling")},nextUntil:function(t,e,n){return k(t,"nextSibling",n)},prevUntil:function(t,e,n){return k(t,"previousSibling",n)},siblings:function(t){return S((t.parentNode||{}).firstChild,t)},children:function(t){return S(t.firstChild)},contents:function(t){return null!=t.contentDocument&&s(t.contentDocument)?t.contentDocument:(F(t,"template")&&(t=t.content||t),A.merge([],t.childNodes))}},(function(t,e){A.fn[t]=function(n,r){var i=A.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=A.filter(r,i)),this.length>1&&(L[t]||A.uniqueSort(i),O.test(t)&&i.reverse()),this.pushStack(i)}}));var $=/[^\x20\t\r\n\f]+/g;function j(t){return t}function R(t){throw t}function H(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])}}A.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return A.each(t.match($)||[],(function(t,n){e[n]=!0})),e}(t):A.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){A.each(n,(function(n,r){g(r)?t.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==x(r)&&e(r)}))}(arguments),n&&!e&&u()),this},remove:function(){return A.each(arguments,(function(t,e){for(var n;(n=A.inArray(e,o,n))>-1;)o.splice(n,1),n<=a&&a--})),this},has:function(t){return t?A.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},A.extend({Deferred:function(t){var e=[["notify","progress",A.Callbacks("memory"),A.Callbacks("memory"),2],["resolve","done",A.Callbacks("once memory"),A.Callbacks("once memory"),0,"resolved"],["reject","fail",A.Callbacks("once memory"),A.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 A.Deferred((function(n){A.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,j,i),s(o,e,R,i)):(o++,l.call(r,s(o,e,j,i),s(o,e,R,i),s(o,e,j,e.notifyWith))):(n!==j&&(a=void 0,u=[r]),(i||e.resolveWith)(a,u))}},c=i?l:function(){try{l()}catch(r){A.Deferred.exceptionHook&&A.Deferred.exceptionHook(r,c.stackTrace),t+1>=o&&(n!==R&&(a=void 0,u=[r]),e.rejectWith(a,u))}};t?c():(A.Deferred.getStackHook&&(c.stackTrace=A.Deferred.getStackHook()),r.setTimeout(c))}}return A.Deferred((function(r){e[0][3].add(s(0,r,g(i)?i:j,r.notifyWith)),e[1][3].add(s(0,r,g(t)?t:j)),e[2][3].add(s(0,r,g(n)?n:R))})).promise()},promise:function(t){return null!=t?A.extend(t,i):i}},o={};return A.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=A.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&&(H(t,o.done(s(n)).resolve,o.reject,!e),"pending"===o.state()||g(i[n]&&i[n].then)))return o.then();for(;n--;)H(i[n],s(n),o.reject);return o.promise()}});var U=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;A.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)},A.readyException=function(t){r.setTimeout((function(){throw t}))};var q=A.Deferred();function z(){b.removeEventListener("DOMContentLoaded",z),r.removeEventListener("load",z),A.ready()}A.fn.ready=function(t){return q.then(t).catch((function(t){A.readyException(t)})),this},A.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--A.readyWait:A.isReady)||(A.isReady=!0,!0!==t&&--A.readyWait>0||q.resolveWith(b,[A]))}}),A.ready.then=q.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?r.setTimeout(A.ready):(b.addEventListener("DOMContentLoaded",z),r.addEventListener("load",z));var V=function t(e,n,r,i,o,s,a){var u=0,l=e.length,c=null==r;if("object"===x(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(A(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},W=/^-ms-/,G=/-([a-z])/g;function Y(t,e){return e.toUpperCase()}function K(t){return t.replace(W,"ms-").replace(G,Y)}var X=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function J(){this.expando=A.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($)||[]).length;for(;n--;)delete r[e[n]]}(void 0===e||A.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&&!A.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}A.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)}}),A.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)})):V(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)}))}}),A.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,A.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){var n=A.queue(t,e=e||"fx"),r=n.length,i=n.shift(),o=A._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,(function(){A.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:A.Callbacks("once memory").add((function(){Q.remove(t,[e+"queue",n])}))})}}),A.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?A.queue(this[0],t):void 0===e?this:this.each((function(){var n=A.queue(this,t,e);A._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&A.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){A.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,r=1,i=A.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 A.contains(t.ownerDocument,t)},ut={composed:!0};st.getRootNode&&(at=function(t){return A.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"===A.css(t,"display")};function ct(t,e,n,r){var i,o,s=20,a=r?function(){return r.cur()}:function(){return A.css(t,e,"")},u=a(),l=n&&n[3]||(A.cssNumber[e]?"":"px"),c=t.nodeType&&(A.cssNumber[e]||"px"!==l&&+u)&&it.exec(A.css(t,e));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;s--;)A.style(t,e,c+l),(1-o)*(1-(o=a()/u||.5))<=0&&(s=0),c/=o;A.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=A.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&&lt(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}A.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)?A(this).show():A(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&&F(t,e)?A.merge([t],n):n}function Dt(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 xt=/<|&#?\w+;/;function Ct(t,e,n,r,i){for(var o,s,a,u,l,c,d=e.createDocumentFragment(),h=[],f=0,p=t.length;f<p;f++)if((o=t[f])||0===o)if("object"===x(o))A.merge(h,o.nodeType?[o]:o);else if(xt.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]+A.htmlPrefilter(o)+u[2],c=u[0];c--;)s=s.lastChild;A.merge(h,s.childNodes),(s=d.firstChild).textContent=""}else h.push(e.createTextNode(o));for(d.textContent="",f=0;o=h[f++];)if(r&&A.inArray(o,r)>-1)i&&i.push(o);else if(l=at(o),s=wt(d.appendChild(o),"script"),l&&Dt(s),n)for(c=0;o=s[c++];)yt.test(o.type||"")&&n.push(o);return d}var At=/^([^.]*)(?:\.(.+)|)/;function Et(){return!0}function Nt(){return!1}function kt(t,e){return t===function(){try{return b.activeElement}catch(t){}}()==("focus"===e)}function St(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)St(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=Nt;else if(!i)return t;return 1===o&&(s=i,i=function(t){return A().off(t),s.apply(this,arguments)},i.guid=s.guid||(s.guid=A.guid++)),t.each((function(){A.event.add(this,e,i,r,n)}))}function Tt(t,e,n){n?(Q.set(t,e,!1),A.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)(A.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:A.event.trigger(A.extend(o[0],A.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===Q.get(t,e)&&A.event.add(t,e,Et)}A.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&&A.find.matchesSelector(st,i),n.guid||(n.guid=A.guid++),(u=v.events)||(u=v.events=Object.create(null)),(s=v.handle)||(s=v.handle=function(e){return A.event.triggered!==e.type?A.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match($)||[""]).length;l--;)f=m=(a=At.exec(e[l])||[])[1],p=(a[2]||"").split(".").sort(),f&&(d=A.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,d=A.event.special[f]||{},c=A.extend({type:f,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&A.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),A.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($)||[""]).length;l--;)if(f=m=(a=At.exec(e[l])||[])[1],p=(a[2]||"").split(".").sort(),f){for(d=A.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)||A.removeEvent(t,f,v.handle),delete u[f])}else for(f in u)A.event.remove(t,f+e[l],n,r,!0);A.isEmptyObject(u)&&Q.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,s,a=new Array(arguments.length),u=A.event.fix(t),l=(Q.get(this,"events")||Object.create(null))[u.type]||[],c=A.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=A.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=((A.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?A(i,this).index(l)>-1:A.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(A.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[A.expando]?t:new A.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return vt.test(e.type)&&e.click&&F(e,"input")&&Tt(e,"click",Et),!1},trigger:function(t){var e=this||t;return vt.test(e.type)&&e.click&&F(e,"input")&&Tt(e,"click"),!0},_default:function(t){var e=t.target;return vt.test(e.type)&&e.click&&F(e,"input")&&Q.get(e,"click")||F(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},A.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},(A.Event=function(t,e){if(!(this instanceof A.Event))return new A.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?Et:Nt,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&&A.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[A.expando]=!0}).prototype={constructor:A.Event,isDefaultPrevented:Nt,isPropagationStopped:Nt,isImmediatePropagationStopped:Nt,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=Et,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=Et,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=Et,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},A.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},A.event.addProp),A.each({focus:"focusin",blur:"focusout"},(function(t,e){A.event.special[t]={setup:function(){return Tt(this,t,kt),!1},trigger:function(){return Tt(this,t),!0},_default:function(e){return Q.get(e.target,t)},delegateType:e}})),A.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){A.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=this,i=t.relatedTarget,o=t.handleObj;return i&&(i===r||A.contains(r,i))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}})),A.fn.extend({on:function(t,e,n,r){return St(this,t,e,n,r)},one:function(t,e,n,r){return St(this,t,e,n,r,1)},off:function(t,e,n){var r,i;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,A(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=Nt),this.each((function(){A.event.remove(this,t,n,e)}))}});var Ft=/<script|<style|<link/i,_t=/checked\s*(?:[^=]|=\s*.checked.)/i,Pt=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Bt(t,e){return F(t,"table")&&F(11!==e.nodeType?e:e.firstChild,"tr")&&A(t).children("tbody")[0]||t}function It(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Ot(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Lt(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++)A.event.add(e,i,a[i][n]);Z.hasData(t)&&(o=Z.access(t),s=A.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 $t(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&&_t.test(p))return t.each((function(i){var o=t.eq(i);m&&(e[0]=p.call(this,i,o.html())),$t(o,e,n,r)}));if(h&&(o=(i=Ct(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=(s=A.map(wt(i,"script"),It)).length;d<h;d++)l=i,d!==f&&(l=A.clone(l,!0,!0),a&&A.merge(s,wt(l,"script"))),n.call(t[d],l,d);if(a)for(c=s[s.length-1].ownerDocument,A.map(s,Ot),d=0;d<a;d++)l=s[d],yt.test(l.type||"")&&!Q.access(l,"globalEval")&&A.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?A._evalUrl&&!l.noModule&&A._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},c):D(l.textContent.replace(Pt,""),l,c))}return t}function jt(t,e,n){for(var r,i=e?A.filter(e,t):t,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||A.cleanData(wt(r)),r.parentNode&&(n&&at(r)&&Dt(wt(r,"script")),r.parentNode.removeChild(r));return t}A.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||A.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++)Lt(o[r],s[r]);else Lt(t,a);return(s=wt(a,"script")).length>0&&Dt(s,!u&&wt(t,"script")),a},cleanData:function(t){for(var e,n,r,i=A.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]?A.event.remove(n,r):A.removeEvent(n,r,e.handle);n[Q.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),A.fn.extend({detach:function(t){return jt(this,t,!0)},remove:function(t){return jt(this,t)},text:function(t){return V(this,(function(t){return void 0===t?A.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 $t(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Bt(this,t).appendChild(t)}))},prepend:function(){return $t(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Bt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return $t(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return $t(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&&(A.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 A.clone(this,t,e)}))},html:function(t){return V(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&&!Ft.test(t)&&!bt[(gt.exec(t)||["",""])[1].toLowerCase()]){t=A.htmlPrefilter(t);try{for(;n<r;n++)1===(e=this[n]||{}).nodeType&&(A.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 $t(this,arguments,(function(e){var n=this.parentNode;A.inArray(this,t)<0&&(A.cleanData(wt(this)),n&&n.replaceChild(e,this))}),t)}}),A.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){A.fn[t]=function(t){for(var n,r=[],i=A(t),o=i.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),A(i[s])[e](n),l.apply(r,n.get());return this.pushStack(r)}}));var Rt=new RegExp("^("+rt+")(?!px)[a-z%]+$","i"),Ht=/^--/,Ut=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=r),e.getComputedStyle(t)},qt=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},zt=new RegExp(ot.join("|"),"i"),Vt=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g");function Wt(t,e,n){var r,i,o,s,a=Ht.test(e),u=t.style;return(n=n||Ut(t))&&(s=n.getPropertyValue(e)||n[e],a&&(s=s.replace(Vt,"$1")),""!==s||at(t)||(s=A.style(t,e)),!v.pixelBoxStyles()&&Rt.test(s)&&zt.test(e)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=s,s=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==s?s+"":s}function Gt(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,A.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 Yt=["Webkit","Moz","ms"],Kt=b.createElement("div").style,Xt={};function Jt(t){return A.cssProps[t]||Xt[t]||(t in Kt?t:Xt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Yt.length;n--;)if((t=Yt[n]+e)in Kt)return t}(t)||t)}var Qt=/^(none|table(?!-c[ea]).+)/,Zt={position:"absolute",visibility:"hidden",display:"block"},te={letterSpacing:"0",fontWeight:"400"};function ee(t,e,n){var r=it.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function ne(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+=A.css(t,n+ot[s],!0,i)),r?("content"===n&&(u-=A.css(t,"padding"+ot[s],!0,i)),"margin"!==n&&(u-=A.css(t,"border"+ot[s]+"Width",!0,i))):(u+=A.css(t,"padding"+ot[s],!0,i),"padding"!==n?u+=A.css(t,"border"+ot[s]+"Width",!0,i):a+=A.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 re(t,e,n){var r=Ut(t),i=(!v.boxSizingReliable()||n)&&"border-box"===A.css(t,"boxSizing",!1,r),o=i,s=Wt(t,e,r),a="offset"+e[0].toUpperCase()+e.slice(1);if(Rt.test(s)){if(!n)return s;s="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&F(t,"tr")||"auto"===s||!parseFloat(s)&&"inline"===A.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===A.css(t,"boxSizing",!1,r),(o=a in t)&&(s=t[a])),(s=parseFloat(s)||0)+ne(t,e,n||(i?"border":"content"),o,r,s)+"px"}function ie(t,e,n,r,i){return new ie.prototype.init(t,e,n,r,i)}A.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Wt(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=Ht.test(e),l=t.style;if(u||(e=Jt(a)),s=A.cssHooks[e]||A.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]||(A.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 Ht.test(e)||(e=Jt(a)),(s=A.cssHooks[e]||A.cssHooks[a])&&"get"in s&&(i=s.get(t,!0,n)),void 0===i&&(i=Wt(t,e,r)),"normal"===i&&e in te&&(i=te[e]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),A.each(["height","width"],(function(t,e){A.cssHooks[e]={get:function(t,n,r){if(n)return!Qt.test(A.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?re(t,e,r):qt(t,Zt,(function(){return re(t,e,r)}))},set:function(t,n,r){var i,o=Ut(t),s=!v.scrollboxSize()&&"absolute"===o.position,a=(s||r)&&"border-box"===A.css(t,"boxSizing",!1,o),u=r?ne(t,e,r,a,o):0;return a&&s&&(u-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-ne(t,e,"border",!1,o)-.5)),u&&(i=it.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=A.css(t,e)),ee(0,n,u)}}})),A.cssHooks.marginLeft=Gt(v.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Wt(t,"marginLeft"))||t.getBoundingClientRect().left-qt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),A.each({margin:"",padding:"",border:"Width"},(function(t,e){A.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&&(A.cssHooks[t+e].set=ee)})),A.fn.extend({css:function(t,e){return V(this,(function(t,e,n){var r,i,o={},s=0;if(Array.isArray(e)){for(r=Ut(t),i=e.length;s<i;s++)o[e[s]]=A.css(t,e[s],!1,r);return o}return void 0!==n?A.style(t,e,n):A.css(t,e)}),t,e,arguments.length>1)}}),A.Tween=ie,ie.prototype={constructor:ie,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||A.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(A.cssNumber[n]?"":"px")},cur:function(){var t=ie.propHooks[this.prop];return t&&t.get?t.get(this):ie.propHooks._default.get(this)},run:function(t){var e,n=ie.propHooks[this.prop];return this.options.duration?this.pos=e=A.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):ie.propHooks._default.set(this),this}},ie.prototype.init.prototype=ie.prototype,ie.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=A.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){A.fx.step[t.prop]?A.fx.step[t.prop](t):1!==t.elem.nodeType||!A.cssHooks[t.prop]&&null==t.elem.style[Jt(t.prop)]?t.elem[t.prop]=t.now:A.style(t.elem,t.prop,t.now+t.unit)}}},ie.propHooks.scrollTop=ie.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},A.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},(A.fx=ie.prototype.init).step={};var oe,se,ae=/^(?:toggle|show|hide)$/,ue=/queueHooks$/;function le(){se&&(!1===b.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(le):r.setTimeout(le,A.fx.interval),A.fx.tick())}function ce(){return r.setTimeout((function(){oe=void 0})),oe=Date.now()}function de(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 he(t,e,n){for(var r,i=(fe.tweeners[e]||[]).concat(fe.tweeners["*"]),o=0,s=i.length;o<s;o++)if(r=i[o].call(n,e,t))return r}function fe(t,e,n){var r,i,o=0,s=fe.prefilters.length,a=A.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var e=oe||ce(),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:A.extend({},e),opts:A.extend(!0,{specialEasing:{},easing:A.easing._default},n),originalProperties:e,originalOptions:n,startTime:oe||ce(),duration:n.duration,tweens:[],createTween:function(e,n){var r=A.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=A.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=fe.prefilters[o].call(l,t,c,l.opts))return g(r.stop)&&(A._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return A.map(c,he,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),A.fx.timer(A.extend(u,{elem:t,anim:l,queue:l.opts.queue})),l}A.Animation=A.extend(fe,{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($);for(var n,r=0,i=t.length;r<i;r++)n=t[r],fe.tweeners[n]=fe.tweeners[n]||[],fe.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&&lt(t),v=Q.get(t,"fxshow");for(r in n.queue||(null==(s=A._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--,A.queue(t,"fx").length||s.empty.fire()}))}))),e)if(i=e[r],ae.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]||A.style(t,r)}if((u=!A.isEmptyObject(e))||!A.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=A.css(t,"display"))&&(l?c=l:(ft([t],!0),l=t.style.display||l,c=A.css(t,"display"),ft([t]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===A.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)A.style(t,r,f[r])}))),u=he(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?fe.prefilters.unshift(t):fe.prefilters.push(t)}}),A.speed=function(t,e,n){var r=t&&"object"==typeof t?A.extend({},t):{complete:n||!n&&e||g(t)&&t,duration:t,easing:n&&e||e&&!g(e)&&e};return A.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in A.fx.speeds?r.duration=A.fx.speeds[r.duration]:r.duration=A.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&&A.dequeue(this,r.queue)},r},A.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=A.isEmptyObject(t),o=A.speed(e,n,r),s=function(){var e=fe(this,A.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=A.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&&ue.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||A.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=A.timers,s=r?r.length:0;for(n.finish=!0,A.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}))}}),A.each(["toggle","show","hide"],(function(t,e){var n=A.fn[e];A.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(de(e,!0),t,r,i)}})),A.each({slideDown:de("show"),slideUp:de("hide"),slideToggle:de("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){A.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}})),A.timers=[],A.fx.tick=function(){var t,e=0,n=A.timers;for(oe=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||A.fx.stop(),oe=void 0},A.fx.timer=function(t){A.timers.push(t),A.fx.start()},A.fx.interval=13,A.fx.start=function(){se||(se=!0,le())},A.fx.stop=function(){se=null},A.fx.speeds={slow:600,fast:200,_default:400},A.fn.delay=function(t,e){return t=A.fx&&A.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 pe,me=A.expr.attrHandle;A.fn.extend({attr:function(t,e){return V(this,A.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){A.removeAttr(this,t)}))}}),A.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?A.prop(t,e,n):(1===o&&A.isXMLDoc(t)||(i=A.attrHooks[e.toLowerCase()]||(A.expr.match.bool.test(e)?pe:void 0)),void 0!==n?null===n?void A.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=A.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!v.radioValue&&"radio"===e&&F(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match($);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),pe={set:function(t,e,n){return!1===e?A.removeAttr(t,n):t.setAttribute(n,n),n}},A.each(A.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=me[e]||A.find.attr;me[e]=function(t,e,r){var i,o,s=e.toLowerCase();return r||(o=me[s],me[s]=i,i=null!=n(t,e,r)?s:null,me[s]=o),i}}));var ve=/^(?:input|select|textarea|button)$/i,ge=/^(?:a|area)$/i;function ye(t){return(t.match($)||[]).join(" ")}function be(t){return t.getAttribute&&t.getAttribute("class")||""}function we(t){return Array.isArray(t)?t:"string"==typeof t&&t.match($)||[]}A.fn.extend({prop:function(t,e){return V(this,A.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[A.propFix[t]||t]}))}}),A.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&A.isXMLDoc(t)||(e=A.propFix[e]||e,i=A.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=A.find.attr(t,"tabindex");return e?parseInt(e,10):ve.test(t.nodeName)||ge.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(A.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)}}),A.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){A.propFix[this.toLowerCase()]=this})),A.fn.extend({addClass:function(t){var e,n,r,i,o,s;return g(t)?this.each((function(e){A(this).addClass(t.call(this,e,be(this)))})):(e=we(t)).length?this.each((function(){if(r=be(this),n=1===this.nodeType&&" "+ye(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");s=ye(n),r!==s&&this.setAttribute("class",s)}})):this},removeClass:function(t){var e,n,r,i,o,s;return g(t)?this.each((function(e){A(this).removeClass(t.call(this,e,be(this)))})):arguments.length?(e=we(t)).length?this.each((function(){if(r=be(this),n=1===this.nodeType&&" "+ye(r)+" "){for(o=0;o<e.length;o++)for(i=e[o];n.indexOf(" "+i+" ")>-1;)n=n.replace(" "+i+" "," ");s=ye(n),r!==s&&this.setAttribute("class",s)}})):this:this.attr("class","")},toggleClass:function(t,e){var n,r,i,o,s=typeof t,a="string"===s||Array.isArray(t);return g(t)?this.each((function(n){A(this).toggleClass(t.call(this,n,be(this),e),e)})):"boolean"==typeof e&&a?e?this.addClass(t):this.removeClass(t):(n=we(t),this.each((function(){if(a)for(o=A(this),i=0;i<n.length;i++)r=n[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==t&&"boolean"!==s||((r=be(this))&&Q.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":Q.get(this,"__className__")||""))})))},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+ye(be(n))+" ").indexOf(e)>-1)return!0;return!1}});var De=/\r/g;A.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,A(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=A.map(i,(function(t){return null==t?"":t+""}))),(e=A.valHooks[this.type]||A.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=A.valHooks[i.type]||A.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(De,""):null==n?"":n:void 0}}),A.extend({valHooks:{option:{get:function(t){var e=A.find.attr(t,"value");return null!=e?e:ye(A.text(t))}},select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,s="select-one"===t.type,a=s?null:[],u=s?o+1:i.length;for(r=o<0?u:s?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!F(n.parentNode,"optgroup"))){if(e=A(n).val(),s)return e;a.push(e)}return a},set:function(t,e){for(var n,r,i=t.options,o=A.makeArray(e),s=i.length;s--;)((r=i[s]).selected=A.inArray(A.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),A.each(["radio","checkbox"],(function(){A.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=A.inArray(A(t).val(),e)>-1}},v.checkOn||(A.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),v.focusin="onfocusin"in r;var xe=/^(?:focusinfocus|focusoutblur)$/,Ce=function(t){t.stopPropagation()};A.extend(A.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+A.event.triggered)&&(m.indexOf(".")>-1&&(v=m.split("."),m=v.shift(),v.sort()),l=m.indexOf(":")<0&&"on"+m,(t=t[A.expando]?t:new A.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]:A.makeArray(e,[t]),d=A.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),A.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Ce),n[m](),t.isPropagationStopped()&&h.removeEventListener(m,Ce),A.event.triggered=void 0,a&&(n[l]=a)),t.result}},simulate:function(t,e,n){var r=A.extend(new A.Event,n,{type:t,isSimulated:!0});A.event.trigger(r,null,e)}}),A.fn.extend({trigger:function(t,e){return this.each((function(){A.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return A.event.trigger(t,e,n,!0)}}),v.focusin||A.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){A.event.simulate(e,t.target,A.event.fix(t))};A.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 Ae=r.location,Ee={guid:Date.now()},Ne=/\?/;A.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||A.error("Invalid XML: "+(n?A.map(n.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var ke=/\[\]$/,Se=/\r?\n/g,Te=/^(?:submit|button|image|reset|file)$/i,Fe=/^(?:input|select|textarea|keygen)/i;function _e(t,e,n,r){var i;if(Array.isArray(e))A.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"!==x(e))r(t,e);else for(i in e)_e(t+"["+i+"]",e[i],n,r)}A.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&&!A.isPlainObject(t))A.each(t,(function(){i(this.name,this.value)}));else for(n in t)_e(n,t[n],e,i);return r.join("&")},A.fn.extend({serialize:function(){return A.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=A.prop(this,"elements");return t?A.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!A(this).is(":disabled")&&Fe.test(this.nodeName)&&!Te.test(t)&&(this.checked||!vt.test(t))})).map((function(t,e){var n=A(this).val();return null==n?null:Array.isArray(n)?A.map(n,(function(t){return{name:e.name,value:t.replace(Se,"\r\n")}})):{name:e.name,value:n.replace(Se,"\r\n")}})).get()}});var Pe=/%20/g,Be=/#.*$/,Ie=/([?&])_=[^&]*/,Oe=/^(.*?):[ \t]*([^\r\n]*)$/gm,Le=/^(?:GET|HEAD)$/,Me=/^\/\//,$e={},je={},Re="*/".concat("*"),He=b.createElement("a");function Ue(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match($)||[];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 qe(t,e,n,r){var i={},o=t===je;function s(a){var u;return i[a]=!0,A.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 ze(t,e){var n,r,i=A.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&A.extend(!0,t,r),t}He.href=Ae.href,A.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ae.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ae.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Re,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":A.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?ze(ze(t,A.ajaxSettings),e):ze(A.ajaxSettings,t)},ajaxPrefilter:Ue($e),ajaxTransport:Ue(je),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0);var n,i,o,s,a,u,l,c,d,h,f=A.ajaxSetup({},e=e||{}),p=f.context||f,m=f.context&&(p.nodeType||p.jquery)?A(p):A.event,v=A.Deferred(),g=A.Callbacks("once memory"),y=f.statusCode||{},w={},D={},x="canceled",C={readyState:0,getResponseHeader:function(t){var e;if(l){if(!s)for(s={};e=Oe.exec(o);)s[e[1].toLowerCase()+" "]=(s[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=s[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(t,e){return null==l&&(t=D[t.toLowerCase()]=D[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==l&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(l)C.always(t[C.status]);else for(e in t)y[e]=[y[e],t[e]];return this},abort:function(t){var e=t||x;return n&&n.abort(e),E(0,e),this}};if(v.promise(C),f.url=((t||f.url||Ae.href)+"").replace(Me,Ae.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match($)||[""],null==f.crossDomain){u=b.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=He.protocol+"//"+He.host!=u.protocol+"//"+u.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=A.param(f.data,f.traditional)),qe($e,f,e,C),l)return C;for(d in(c=A.event&&f.global)&&0==A.active++&&A.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Le.test(f.type),i=f.url.replace(Be,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Pe,"+")):(h=f.url.slice(i.length),f.data&&(f.processData||"string"==typeof f.data)&&(i+=(Ne.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(i=i.replace(Ie,"$1"),h=(Ne.test(i)?"&":"?")+"_="+Ee.guid+++h),f.url=i+h),f.ifModified&&(A.lastModified[i]&&C.setRequestHeader("If-Modified-Since",A.lastModified[i]),A.etag[i]&&C.setRequestHeader("If-None-Match",A.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&C.setRequestHeader("Content-Type",f.contentType),C.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Re+"; q=0.01":""):f.accepts["*"]),f.headers)C.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(p,C,f)||l))return C.abort();if(x="abort",g.add(f.complete),C.done(f.success),C.fail(f.error),n=qe(je,f,e,C)){if(C.readyState=1,c&&m.trigger("ajaxSend",[C,f]),l)return C;f.async&&f.timeout>0&&(a=r.setTimeout((function(){C.abort("timeout")}),f.timeout));try{l=!1,n.send(w,E)}catch(t){if(l)throw t;E(-1,t)}}else E(-1,"No Transport");function E(t,e,s,u){var d,h,b,w,D,x=e;l||(l=!0,a&&r.clearTimeout(a),n=void 0,o=u||"",C.readyState=t>0?4:0,d=t>=200&&t<300||304===t,s&&(w=function(t,e,n){for(var r,i,o,s,a=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||t.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}if(o)return o!==u[0]&&u.unshift(o),n[o]}(f,C,s)),!d&&A.inArray("script",f.dataTypes)>-1&&A.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),w=function(t,e,n,r){var i,o,s,a,u,l={},c=t.dataTypes.slice();if(c[1])for(s in t.converters)l[s.toLowerCase()]=t.converters[s];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(s=l[u+" "+o]||l["* "+o]))for(i in l)if((a=i.split(" "))[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){!0===s?s=l[i]:!0!==l[i]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}(f,w,C,d),d?(f.ifModified&&((D=C.getResponseHeader("Last-Modified"))&&(A.lastModified[i]=D),(D=C.getResponseHeader("etag"))&&(A.etag[i]=D)),204===t||"HEAD"===f.type?x="nocontent":304===t?x="notmodified":(x=w.state,h=w.data,d=!(b=w.error))):(b=x,!t&&x||(x="error",t<0&&(t=0))),C.status=t,C.statusText=(e||x)+"",d?v.resolveWith(p,[h,x,C]):v.rejectWith(p,[C,x,b]),C.statusCode(y),y=void 0,c&&m.trigger(d?"ajaxSuccess":"ajaxError",[C,f,d?h:b]),g.fireWith(p,[C,x]),c&&(m.trigger("ajaxComplete",[C,f]),--A.active||A.event.trigger("ajaxStop")))}return C},getJSON:function(t,e,n){return A.get(t,e,n,"json")},getScript:function(t,e){return A.get(t,void 0,e,"script")}}),A.each(["get","post"],(function(t,e){A[e]=function(t,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),A.ajax(A.extend({url:t,type:e,dataType:i,data:n,success:r},A.isPlainObject(t)&&t))}})),A.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),A._evalUrl=function(t,e,n){return A.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){A.globalEval(t,e,n)}})},A.fn.extend({wrapAll:function(t){var e;return this[0]&&(g(t)&&(t=t.call(this[0])),e=A(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){A(this).wrapInner(t.call(this,e))})):this.each((function(){var e=A(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=g(t);return this.each((function(n){A(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){A(this).replaceWith(this.childNodes)})),this}}),A.expr.pseudos.hidden=function(t){return!A.expr.pseudos.visible(t)},A.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},A.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(t){}};var Ve={0:200,1223:204},We=A.ajaxSettings.xhr();v.cors=!!We&&"withCredentials"in We,v.ajax=We=!!We,A.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(Ve[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()}}})),A.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),A.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 A.globalEval(t),t}}}),A.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),A.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,i){e=A("<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 Ge,Ye=[],Ke=/(=)\?(?=&|$)|\?\?/;A.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ye.pop()||A.expando+"_"+Ee.guid++;return this[t]=!0,t}}),A.ajaxPrefilter("json jsonp",(function(t,e,n){var i,o,s,a=!1!==t.jsonp&&(Ke.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ke.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(Ke,"$1"+i):!1!==t.jsonp&&(t.url+=(Ne.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return s||A.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?A(r).removeProp(i):r[i]=o,t[i]&&(t.jsonpCallback=e.jsonpCallback,Ye.push(i)),s&&g(o)&&o(s[0]),s=o=void 0})),"script"})),v.createHTMLDocument=((Ge=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ge.childNodes.length),A.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=_.exec(t))?[e.createElement(i[1])]:(i=Ct([t],e,o),o&&o.length&&A(o).remove(),A.merge([],i.childNodes)));var r,i,o},A.fn.load=function(t,e,n){var r,i,o,s=this,a=t.indexOf(" ");return a>-1&&(r=ye(t.slice(a)),t=t.slice(0,a)),g(e)?(n=e,e=void 0):e&&"object"==typeof e&&(i="POST"),s.length>0&&A.ajax({url:t,type:i||"GET",dataType:"html",data:e}).done((function(t){o=arguments,s.html(r?A("<div>").append(A.parseHTML(t)).find(r):t)})).always(n&&function(t,e){s.each((function(){n.apply(this,o||[t.responseText,e,t])}))}),this},A.expr.pseudos.animated=function(t){return A.grep(A.timers,(function(e){return t===e.elem})).length},A.offset={setOffset:function(t,e,n){var r,i,o,s,a,u,l=A.css(t,"position"),c=A(t),d={};"static"===l&&(t.style.position="relative"),a=c.offset(),o=A.css(t,"top"),u=A.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,A.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)}},A.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){A.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"===A.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"===A.css(t,"position");)t=t.parentNode;t&&t!==r&&1===t.nodeType&&((i=A(t).offset()).top+=A.css(t,"borderTopWidth",!0),i.left+=A.css(t,"borderLeftWidth",!0))}return{top:e.top-i.top-A.css(r,"marginTop",!0),left:e.left-i.left-A.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===A.css(t,"position");)t=t.offsetParent;return t||st}))}}),A.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;A.fn[t]=function(r){return V(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)}})),A.each(["top","left"],(function(t,e){A.cssHooks[e]=Gt(v.pixelPosition,(function(t,n){if(n)return n=Wt(t,e),Rt.test(n)?A(t).position()[e]+"px":n}))})),A.each({Height:"height",Width:"width"},(function(t,e){A.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,r){A.fn[r]=function(i,o){var s=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===o?"margin":"border");return V(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?A.css(e,n,a):A.style(e,n,i,a)}),e,s?i:void 0,s)}}))})),A.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){A.fn[e]=function(t){return this.on(e,t)}})),A.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)}}),A.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){A.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var Xe=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;A.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||A.guid++,i},A.holdReady=function(t){t?A.readyWait++:A.ready(!0)},A.isArray=Array.isArray,A.parseJSON=JSON.parse,A.nodeName=F,A.isFunction=g,A.isWindow=y,A.camelCase=K,A.type=x,A.now=Date.now,A.isNumeric=function(t){var e=A.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},A.trim=function(t){return null==t?"":(t+"").replace(Xe,"$1")},void 0===(n=function(){return A}.apply(e,[]))||(t.exports=n);var Je=r.jQuery,Qe=r.$;return A.noConflict=function(t){return r.$===A&&(r.$=Qe),t&&r.jQuery===A&&(r.jQuery=Je),A},void 0===i&&(r.jQuery=r.$=A),A}))},542:(t,e,n)=>{"use strict";var r=n(1642);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}}},3600:(t,e,n)=>{"use strict";var r=n(1642),i=n(5334),o=n(187),s=n(3690),a=n(1490),u=n(5211),l=n(6797),c={};t.exports=function(t,e){var n;function d(e,r,i){if(e=s(e,r),null!=n){n();var o=i?i.state:null,a=i?i.title:null;i&&i.replace?t.history.replaceState(o,a,y.prefix+e):t.history.pushState(o,a,y.prefix+e)}else t.location.href=y.prefix+e}var h,f,p,m,v=c,g=y.SKIP={};function y(i,s,b){if(null==i)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");var w,D=0,x=Object.keys(b).map((function(t){if("/"!==t[0])throw new SyntaxError("Routes must start with a `/`");if(/:([^\/\.-]+)(\.{3})?:/.test(t))throw new SyntaxError("Route parameter names must be separated with either `/`, `.`, or `-`");return{route:t,component:b[t],check:u(t)}})),C="function"==typeof setImmediate?setImmediate:setTimeout,A=o.resolve(),E=!1;if(n=null,null!=s){var N=a(s);if(!x.some((function(t){return t.check(N)})))throw new ReferenceError("Default route doesn't match any known routes")}function k(){E=!1;var n=t.location.hash;"#"!==y.prefix[0]&&(n=t.location.search+n,"?"!==y.prefix[0]&&"/"!==(n=t.location.pathname+n)[0]&&(n="/"+n));var r=n.concat().replace(/(?:%[a-f89][a-f0-9])+/gim,decodeURIComponent).slice(y.prefix.length),i=a(r);function o(){if(r===s)throw new Error("Could not resolve default route "+s);d(s,null,{replace:!0})}l(i.params,t.history.state),function t(n){for(;n<x.length;n++)if(x[n].check(i)){var s=x[n].component,a=x[n].route,u=s,l=m=function(o){if(l===m){if(o===g)return t(n+1);h=null==o||"function"!=typeof o.view&&"function"!=typeof o?"div":o,f=i.params,p=r,m=null,v=s.render?s:null,2===D?e.redraw():(D=2,e.redraw.sync())}};return void(s.view||"function"==typeof s?(s={},l(u)):s.onmatch?A.then((function(){return s.onmatch(i.params,r,a)})).then(l,o):l("div"))}o()}(0)}return n=function(){E||(E=!0,C(k))},"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",k,!1)},t.addEventListener("hashchange",k,!1)),e.mount(i,{onbeforeupdate:function(){return!(!(D=D?2:1)||c===v)},oncreate:k,onremove:w,view:function(){if(D&&c!==v){var t=[r(h,f.key,f)];return v&&(t=v.render(t[0])),t}}})}return y.set=function(t,e,n){null!=m&&((n=n||{}).replace=!0),m=null,d(t,e,n)},y.get=function(){return p},y.prefix="#!",y.Link={view:function(t){var e,n,r=t.attrs.options,o={};l(o,t.attrs),o.selector=o.options=o.key=o.oninit=o.oncreate=o.onbeforeupdate=o.onupdate=o.onbeforeremove=o.onremove=null;var s=i(t.attrs.selector||"a",o,t.children);return(s.attrs.disabled=Boolean(s.attrs.disabled))?(s.attrs.href=null,s.attrs["aria-disabled"]="true",s.attrs.onclick=null):(e=s.attrs.onclick,n=s.attrs.href,s.attrs.href=y.prefix+n,s.attrs.onclick=function(t){var i;"function"==typeof e?i=e.call(t.currentTarget,t):null==e||"object"!=typeof e||"function"==typeof e.handleEvent&&e.handleEvent(t),!1===i||t.defaultPrevented||0!==t.button&&0!==t.which&&1!==t.which||t.currentTarget.target&&"_self"!==t.currentTarget.target||t.ctrlKey||t.metaKey||t.shiftKey||t.altKey||(t.preventDefault(),t.redraw=!1,y.set(n,null,r))}),s}},y.param=function(t){return f&&null!=t?f[t]:f},y}},589:(t,e,n)=>{"use strict";var r=n(5334);r.trust=n(4031),r.fragment=n(2505),t.exports=r},7945:(t,e,n)=>{"use strict";var r=n(589),i=n(8450),o=n(570),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(2092),s.render=n(2031),s.redraw=o.redraw,s.request=i.request,s.jsonp=i.jsonp,s.parseQueryString=n(5784),s.buildQueryString=n(7477),s.parsePathname=n(1490),s.buildPathname=n(3690),s.vnode=n(1642),s.PromisePolyfill=n(7068),t.exports=s},570:(t,e,n)=>{"use strict";var r=n(2031);t.exports=n(542)(r,requestAnimationFrame,console)},6797:t=>{"use strict";t.exports=Object.assign||function(t,e){e&&Object.keys(e).forEach((function(n){t[n]=e[n]}))}},3690:(t,e,n)=>{"use strict";var r=n(7477),i=n(6797);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}},5211:(t,e,n)=>{"use strict";var r=n(1490);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}}},1490:(t,e,n)=>{"use strict";var r=n(5784);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))}}},7068: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},187:(t,e,n)=>{"use strict";var r=n(7068);"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},7477: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):""))}}},5784: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}},2031:(t,e,n)=>{"use strict";t.exports=n(4615)(window)},2505:(t,e,n)=>{"use strict";var r=n(1642),i=n(8239);t.exports=function(){var t=i.apply(0,arguments);return t.tag="[",t.children=r.normalizeChildren(t.children),t}},5334:(t,e,n)=>{"use strict";var r=n(1642),i=n(8239),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)}},8239:(t,e,n)=>{"use strict";var r=n(1642);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)}},4615:(t,e,n)=>{"use strict";var r=n(1642);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)k(t,r,null,e[r],n)}(e,c,s),w(t,h,a),!D(e)&&(null!=e.text&&(""!==e.text?h.textContent=e.text:e.children=[r("#",void 0,void 0,e.text,void 0,void 0)]),null!=e.children)){var f=e.children;l(h,f,0,f.length,i,null,s),"select"===e.tag&&null!=c&&function(t,e){if("value"in e)if(null===e.value)-1!==t.dom.selectedIndex&&(t.dom.value=null);else{var n=""+e.value;t.dom.value===n&&-1!==t.dom.selectedIndex||(t.dom.value=n)}"selectedIndex"in e&&k(t,"selectedIndex",null,e.selectedIndex,void 0)}(e,c)}}(t,e,i,s,u)}else!function(t,e,n,i,o){(function(t,e){var n;if("function"==typeof t.tag.view){if(t.state=Object.create(t.tag),null!=(n=t.state.view).$$reentrantLock$$)return;n.$$reentrantLock$$=!0}else{if(t.state=void 0,null!=(n=t.tag).$$reentrantLock$$)return;n.$$reentrantLock$$=!0,t.state=null!=t.tag.prototype&&"function"==typeof t.tag.prototype.view?new t.tag(t):t.tag(t)}if(M(t.state,t,e),null!=t.attrs&&M(t.attrs,t,e),t.instance=r.normalize(a.call(t.state.view,t)),t.instance===t)throw Error("A view cannot return the vnode it received as argument");n.$$reentrantLock$$=null})(e,n),null!=e.instance?(c(t,e.instance,n,i,o),e.dom=e.instance.dom,e.domSize=null!=e.dom?e.instance.domSize:0):e.domSize=0}(t,e,i,s,u)}var d={caption:"table",thead:"table",tbody:"table",tfoot:"table",tr:"tbody",th:"tr",td:"tr",colgroup:"table",col:"colgroup"};function h(t,e,r,i){var o=e.children.match(/^\s*?<(\w+)/im)||[],s=n.createElement(d[o[1]]||"div");"http://www.w3.org/2000/svg"===r?(s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+e.children+"</svg>",s=s.firstChild):s.innerHTML=e.children,e.dom=s.firstChild,e.domSize=s.childNodes.length,e.instance=[];for(var a,u=n.createDocumentFragment();a=s.firstChild;)e.instance.push(a),u.appendChild(a);w(t,u,i)}function f(t,e,n,r,i,o){if(e!==n&&(null!=e||null!=n))if(null==e||0===e.length)l(t,n,0,n.length,r,i,o);else if(null==n||0===n.length)x(t,e,0,e.length);else{var s=null!=e[0]&&null!=e[0].key,a=null!=n[0]&&null!=n[0].key,u=0,d=0;if(!s)for(;d<e.length&&null==e[d];)d++;if(!a)for(;u<n.length&&null==n[u];)u++;if(null===a&&null==s)return;if(s!==a)x(t,e,d,e.length),l(t,n,u,n.length,r,i,o);else if(a){for(var h,f,b,w,D,A=e.length-1,E=n.length-1;A>=d&&E>=u&&(b=e[A],w=n[E],b.key===w.key);)b!==w&&p(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),A--,E--;for(;A>=d&&E>=u&&(h=e[d],f=n[u],h.key===f.key);)d++,u++,h!==f&&p(t,h,f,r,g(e,d,i),o);for(;A>=d&&E>=u&&u!==E&&h.key===w.key&&b.key===f.key;)y(t,b,D=g(e,d,i)),b!==f&&p(t,b,f,r,D,o),++u<=--E&&y(t,h,i),h!==w&&p(t,h,w,r,i,o),null!=w.dom&&(i=w.dom),d++,b=e[--A],w=n[E],h=e[d],f=n[u];for(;A>=d&&E>=u&&b.key===w.key;)b!==w&&p(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),E--,b=e[--A],w=n[E];if(u>E)x(t,e,d,A+1);else if(d>A)l(t,n,u,E+1,r,i,o);else{var N,k,S=i,T=E-u+1,F=new Array(T),_=0,P=0,B=2147483647,I=0;for(P=0;P<T;P++)F[P]=-1;for(P=E;P>=u;P--){null==N&&(N=m(e,d,A+1));var O=N[(w=n[P]).key];null!=O&&(B=O<B?O:-1,F[P-u]=O,b=e[O],e[O]=null,b!==w&&p(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),I++)}if(i=S,I!==A-d+1&&x(t,e,d,A+1),0===I)l(t,n,u,E+1,r,i,o);else if(-1===B)for(k=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}(F),_=k.length-1,P=E;P>=u;P--)f=n[P],-1===F[P-u]?c(t,f,r,o,i):k[_]===P-u?_--:y(t,f,i),null!=f.dom&&(i=n[P].dom);else for(P=E;P>=u;P--)f=n[P],-1===F[P-u]&&c(t,f,r,o,i),null!=f.dom&&(i=n[P].dom)}}else{var L=e.length<n.length?e.length:n.length;for(u=u<d?u:d;u<L;u++)(h=e[u])===(f=n[u])||null==h&&null==f||(null==h?c(t,f,r,o,g(e,u+1,i)):null==f?C(t,h):p(t,h,f,r,g(e,u+1,i),o));e.length>L&&x(t,e,u,e.length),n.length>L&&l(t,n,u,n.length,r,i,o)}}}function p(t,e,n,i,s,u){var l=e.tag;if(l===n.tag){if(n.state=e.state,n.events=e.events,function(t,e){do{var n;if(null!=t.attrs&&"function"==typeof t.attrs.onbeforeupdate&&void 0!==(n=a.call(t.attrs.onbeforeupdate,t,e))&&!n)break;if("string"!=typeof t.tag&&"function"==typeof t.state.onbeforeupdate&&void 0!==(n=a.call(t.state.onbeforeupdate,t,e))&&!n)break;return!1}while(0);return t.dom=e.dom,t.domSize=e.domSize,t.instance=e.instance,t.attrs=e.attrs,t.children=e.children,t.text=e.text,!0}(n,e))return;if("string"==typeof l)switch(null!=n.attrs&&$(n.attrs,n,i),l){case"#":!function(t,e){t.children.toString()!==e.children.toString()&&(t.dom.nodeValue=e.children),e.dom=t.dom}(e,n);break;case"<":!function(t,e,n,r,i){e.children!==n.children?(A(t,e),h(t,n,r,i)):(n.dom=e.dom,n.domSize=e.domSize,n.instance=e.instance)}(t,e,n,u,s);break;case"[":!function(t,e,n,r,i,o){f(t,e.children,n.children,r,i,o);var s=0,a=n.children;if(n.dom=null,null!=a){for(var u=0;u<a.length;u++){var l=a[u];null!=l&&null!=l.dom&&(null==n.dom&&(n.dom=l.dom),s+=l.domSize||1)}1!==s&&(n.domSize=s)}}(t,e,n,i,s,u);break;default:!function(t,e,n,i){var s=e.dom=t.dom;i=o(e)||i,"textarea"===e.tag&&(null==e.attrs&&(e.attrs={}),null!=e.text&&(e.attrs.value=e.text,e.text=void 0)),function(t,e,n,r){if(null!=n)for(var i in n)k(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]||S(t,i,o,r)}(e,t.attrs,e.attrs,i),D(e)||(null!=t.text&&null!=e.text&&""!==e.text?t.text.toString()!==e.text.toString()&&(t.dom.firstChild.nodeValue=e.text):(null!=t.text&&(t.children=[r("#",void 0,void 0,t.text,void 0,t.dom.firstChild)]),null!=e.text&&(e.children=[r("#",void 0,void 0,e.text,void 0,void 0)]),f(s,t.children,e.children,n,null,i)))}(e,n,i,u)}else!function(t,e,n,i,o,s){if(n.instance=r.normalize(a.call(n.state.view,n)),n.instance===n)throw Error("A view cannot return the vnode it received as argument");$(n.state,n,i),null!=n.attrs&&$(n.attrs,n,i),null!=n.instance?(null==e.instance?c(t,n.instance,i,s,o):p(t,e.instance,n.instance,i,o,s),n.dom=n.instance.dom,n.domSize=n.instance.domSize):null!=e.instance?(C(t,e.instance),n.dom=void 0,n.domSize=0):(n.dom=e.dom,n.domSize=e.domSize)}(t,e,n,i,s,u)}else C(t,e),c(t,n,i,u,s)}function m(t,e,n){for(var r=Object.create(null);e<n;e++){var i=t[e];if(null!=i){var o=i.key;null!=o&&(r[o]=e)}}return r}var v=[];function g(t,e,n){for(;e<t.length;e++)if(null!=t[e]&&null!=t[e].dom)return t[e].dom;return n}function y(t,e,r){var i=n.createDocumentFragment();b(t,i,e),w(t,i,r)}function b(t,e,n){for(;null!=n.dom&&n.dom.parentNode===t;){if("string"!=typeof n.tag){if(null!=(n=n.instance))continue}else if("<"===n.tag)for(var r=0;r<n.instance.length;r++)e.appendChild(n.instance[r]);else if("["!==n.tag)e.appendChild(n.dom);else if(1===n.children.length){if(null!=(n=n.children[0]))continue}else for(r=0;r<n.children.length;r++){var i=n.children[r];null!=i&&b(t,e,i)}break}}function w(t,e,n){null!=n?t.insertBefore(e,n):t.appendChild(e)}function D(t){if(null==t.attrs||null==t.attrs.contenteditable&&null==t.attrs.contentEditable)return!1;var e=t.children;if(null!=e&&1===e.length&&"<"===e[0].tag){var n=e[0].children;t.dom.innerHTML!==n&&(t.dom.innerHTML=n)}else if(null!=t.text||null!=e&&0!==e.length)throw new Error("Child node of a contenteditable must be trusted");return!0}function x(t,e,n,r){for(var i=n;i<r;i++){var o=e[i];null!=o&&C(t,o)}}function C(t,e){var n,r,i,o=0,u=e.state;if("string"!=typeof e.tag&&"function"==typeof e.state.onbeforeremove&&null!=(i=a.call(e.state.onbeforeremove,e))&&"function"==typeof i.then&&(o=1,n=i),e.attrs&&"function"==typeof e.attrs.onbeforeremove&&null!=(i=a.call(e.attrs.onbeforeremove,e))&&"function"==typeof i.then&&(o|=2,r=i),s(e,u),o){if(null!=n){var l=function(){1&o&&((o&=2)||c())};n.then(l,l)}null!=r&&(l=function(){2&o&&((o&=1)||c())},r.then(l,l))}else N(e),E(t,e);function c(){s(e,u),N(e),E(t,e)}}function A(t,e){for(var n=0;n<e.instance.length;n++)t.removeChild(e.instance[n])}function E(t,e){for(;null!=e.dom&&e.dom.parentNode===t;){if("string"!=typeof e.tag){if(null!=(e=e.instance))continue}else if("<"===e.tag)A(t,e);else{if("["!==e.tag&&(t.removeChild(e.dom),!Array.isArray(e.children)))break;if(1===e.children.length){if(null!=(e=e.children[0]))continue}else for(var n=0;n<e.children.length;n++){var r=e.children[n];null!=r&&E(t,r)}}break}}function N(t){if("string"!=typeof t.tag&&"function"==typeof t.state.onremove&&a.call(t.state.onremove,t),t.attrs&&"function"==typeof t.attrs.onremove&&a.call(t.attrs.onremove,t),"string"!=typeof t.tag)null!=t.instance&&N(t.instance);else{var e=t.children;if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];null!=r&&N(r)}}}function k(t,e,r,i,o){if("key"!==e&&"is"!==e&&null!=i&&!T(e)&&(r!==i||function(t,e){return"value"===e||"checked"===e||"selectedIndex"===e||"selected"===e&&t.dom===u()||"option"===t.tag&&t.dom.parentNode===n.activeElement}(t,e)||"object"==typeof i)){if("o"===e[0]&&"n"===e[1])return L(t,e,i);if("xlink:"===e.slice(0,6))t.dom.setAttributeNS("http://www.w3.org/1999/xlink",e.slice(6),i);else if("style"===e)I(t.dom,r,i);else if(F(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 S(t,e,n,r){if("key"!==e&&"is"!==e&&null!=n&&!T(e))if("o"!==e[0]||"n"!==e[1]||T(e))if("style"===e)I(t.dom,n,null);else if(!F(t,e,r)||"className"===e||"value"===e&&("option"===t.tag||"select"===t.tag&&-1===t.dom.selectedIndex&&t.dom===u())||"input"===t.tag&&"type"===e){var i=e.indexOf(":");-1!==i&&(e=e.slice(i+1)),!1!==n&&t.dom.removeAttribute("className"===e?"class":e)}else t.dom[e]=null;else L(t,e,void 0)}function T(t){return"oninit"===t||"oncreate"===t||"onupdate"===t||"onremove"===t||"onbeforeremove"===t||"onbeforeupdate"===t}function F(t,e,n){return void 0===n&&(t.tag.indexOf("-")>-1||null!=t.attrs&&t.attrs.is||"href"!==e&&"list"!==e&&"form"!==e&&"width"!==e&&"height"!==e)&&e in t.dom}var _=/[A-Z]/g;function P(t){return"-"+t.toLowerCase()}function B(t){return"-"===t[0]&&"-"===t[1]?t:"cssFloat"===t?"float":t.replace(_,P)}function I(t,e,n){if(e===n);else if(null==n)t.style.cssText="";else if("object"!=typeof n)t.style.cssText=n;else if(null==e||"object"!=typeof e)for(var r in t.style.cssText="",n)null!=(i=n[r])&&t.style.setProperty(B(r),String(i));else{for(var r in n){var i;null!=(i=n[r])&&(i=String(i))!==String(e[r])&&t.style.setProperty(B(r),i)}for(var r in e)null!=e[r]&&null==n[r]&&t.style.removeProperty(B(r))}}function O(){this._=e}function L(t,e,n){if(null!=t.events){if(t.events[e]===n)return;null==n||"function"!=typeof n&&"object"!=typeof n?(null!=t.events[e]&&t.dom.removeEventListener(e.slice(2),t.events,!1),t.events[e]=void 0):(null==t.events[e]&&t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}else null==n||"function"!=typeof n&&"object"!=typeof n||(t.events=new O,t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}function M(t,e,n){"function"==typeof t.oninit&&a.call(t.oninit,e),"function"==typeof t.oncreate&&n.push(a.bind(t.oncreate,e))}function $(t,e,n){"function"==typeof t.onupdate&&n.push(a.bind(t.onupdate,e))}return O.prototype=Object.create(null),O.prototype.handleEvent=function(t){var e,n=this["on"+t.type];"function"==typeof n?e=n.call(t.currentTarget,t):"function"==typeof n.handleEvent&&n.handleEvent(t),this._&&!1!==t.redraw&&(0,this._)(),!1===e&&(t.preventDefault(),t.stopPropagation())},function(t,n,i){if(!t)throw new TypeError("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var o=[],s=u(),a=t.namespaceURI;null==t.vnodes&&(t.textContent=""),n=r.normalizeChildren(Array.isArray(n)?n:[n]);var l=e;try{e="function"==typeof i?i:void 0,f(t,t.vnodes,n,o,null,"http://www.w3.org/1999/xhtml"===a?void 0:a)}finally{e=l}t.vnodes=n,null!=s&&u()!==s&&"function"==typeof s.focus&&s.focus();for(var c=0;c<o.length;c++)o[c]()}}},4031:(t,e,n)=>{"use strict";var r=n(1642);t.exports=function(t){return null==t&&(t=""),r("<",void 0,void 0,t,void 0,void 0)}},1642: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},8450:(t,e,n)=>{"use strict";var r=n(187),i=n(570);t.exports=n(1950)(window,r,i.redraw)},1950:(t,e,n)=>{"use strict";var r=n(3690);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)}))}}},2092:(t,e,n)=>{"use strict";var r=n(570);t.exports=n(3600)(window,r)},30:(t,e,n)=>{"use strict";t.exports=n(6807)},6807: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}()},619:(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,{decode:()=>b,default:()=>C,encode:()=>w,toASCII:()=>x,toUnicode:()=>D,ucs2decode:()=>m,ucs2encode:()=>v});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 D=n.length+1;u=y(i-p,D,0==p),d(i/D)>o-a&&f("overflow"),a+=d(i/D),i%=D,n.splice(i++,0,a)}return String.fromCodePoint.apply(String,n)},w=function(t){for(var e,n=[],i=(t=m(t)).length,a=128,u=0,l=72,c=r(t);!(e=c()).done;){var p=e.value;p<128&&n.push(h(p))}var v=n.length,b=v;for(v&&n.push("-");b<i;){for(var w,D=o,x=r(t);!(w=x()).done;){var C=w.value;C>=a&&C<D&&(D=C)}var A=b+1;D-a>d((o-u)/A)&&f("overflow"),u+=(D-a)*A,a=D;for(var E,N=r(t);!(E=N()).done;){var k=E.value;if(k<a&&++u>o&&f("overflow"),k==a){for(var S=u,T=s;;T+=s){var F=T<=l?1:T>=l+26?26:T-l;if(S<F)break;var _=S-F,P=s-F;n.push(h(g(F+_%P,0))),S=d(_/P)}n.push(h(g(S,0))),l=y(u,A,b==v),u=0,++b}}++u,++a}return n.join("")},D=function(t){return p(t,(function(t){return a.test(t)?b(t.slice(4).toLowerCase()):t}))},x=function(t){return p(t,(function(t){return u.test(t)?"xn--"+w(t):t}))};const C={version:"2.1.0",ucs2:{decode:m,encode:v},decode:b,encode:w,toASCII:x,toUnicode:D}},1655: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)}()},391:(t,e,n)=>{var r=n(9152),i=n(356);void 0===i.$&&(i.$=r),void 0===i.jQuery&&(i.jQuery=r),t.exports=r},1683:(t,e,n)=>{var r=n(2898),i=n(356);void 0===i.ColorThief&&(i.ColorThief=r),t.exports=r},982:(t,e,n)=>{var r=n(4757),i=n(356);void 0===i.dayjs&&(i.dayjs=r),t.exports=r},4473:(t,e,n)=>{var r=n(7945),i=n(356);void 0===i.m&&(i.m=r),t.exports=r},1885:(t,e,n)=>{var r=n(619),i=n(356);void 0===i.punycode&&(i.punycode=r),t.exports=r},9882:t=>{t.exports=function(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},t.exports.__esModule=!0,t.exports.default=t.exports},9696:t=>{t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports},230:t=>{t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},1904:t=>{t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},8213:t=>{function e(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)}}t.exports=function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},402:t=>{t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.__esModule=!0,t.exports.default=t.exports},9767:t=>{function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},2061:(t,e,n)=>{var r=n(480);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&r(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},1209:t=>{t.exports=function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],s=!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.exports.__esModule=!0,t.exports.default=t.exports},6067:t=>{t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},8974:(t,e,n)=>{var r=n(2075).default,i=n(230);t.exports=function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return i(t)},t.exports.__esModule=!0,t.exports.default=t.exports},9440:(t,e,n)=>{var r=n(2075).default;function i(){"use strict";t.exports=i=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},n=Object.prototype,o=n.hasOwnProperty,s=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function d(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,n){return t[e]=n}}function h(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new S(r||[]);return s(o,"_invoke",{value:A(t,n,a)}),o}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p={};function m(){}function v(){}function g(){}var y={};d(y,u,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(T([])));w&&w!==n&&o.call(w,u)&&(y=w);var D=g.prototype=m.prototype=Object.create(y);function x(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function n(i,s,a,u){var l=f(t[i],t,s);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==r(d)&&o.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(d).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(l.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function A(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=E(s,n);if(a){if(a===p)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function E(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var r=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,p;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function T(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(o.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:F}}function F(){return{value:void 0,done:!0}}return v.prototype=g,s(D,"constructor",{value:g,configurable:!0}),s(g,"constructor",{value:v,configurable:!0}),v.displayName=d(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,d(t,c,"GeneratorFunction")),t.prototype=Object.create(D),t},e.awrap=function(t){return{__await:t}},x(C.prototype),d(C.prototype,l,(function(){return this})),e.AsyncIterator=C,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var s=new C(h(t,n,r,i),o);return e.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},x(D),d(D,c,"Generator"),d(D,u,(function(){return this})),d(D,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=T,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(a&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):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),p},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),k(n),p}},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;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},480:t=>{function e(n,r){return t.exports=e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n,r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},5387:(t,e,n)=>{var r=n(9696),i=n(1209),o=n(9111),s=n(6067);t.exports=function(t,e){return r(t)||i(t,e)||o(t,e)||s()},t.exports.__esModule=!0,t.exports.default=t.exports},2075:t=>{function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},9111:(t,e,n)=>{var r=n(9882);t.exports=function(t,e){if(t){if("string"==typeof t)return r(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)?r(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},2507:(t,e,n)=>{var r=n(9440)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(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,{app:()=>v,compat:()=>Co});var t={};n.r(t),n.d(t,{camelCaseToSnakeCase:()=>Z,generateRandomString:()=>tt,getPlainContent:()=>J,slug:()=>X,truncate:()=>K,ucfirst:()=>Q});var e={};n.r(e),n.d(e,{default:()=>mt,fireDeprecationWarning:()=>vt});var i={};n.r(i),n.d(i,{createFocusTrap:()=>dr});var o={};n.r(o),n.d(o,{extend:()=>xi,override:()=>Ci});var s={};n.r(s),n.d(s,{debounce:()=>ie,throttle:()=>re}),n(391),n(4473),n(982),n(9043),n(6199),n(7865),n(6935),n(9411);var a=n(5635),u=n.n(a),l=n(6982),c=n.n(l);function d(t,e){var n="select"===t.tag?t.attrs.multi?"multi":"select":t.attrs.type;return t.attrs.onchange="multi"===n?function(){e([].slice.call(this.selectedOptions,(function(t){return t.value})))}:"select"===n?function(t){e(this.selectedOptions[0].value)}:"checkbox"===n?function(t){e(this.checked)}:t.attrs.oninput=function(t){e(this.value)},"select"===t.tag?t.children.forEach((function(t){t.attrs.value!==e()&&t.children[0]!==e()||(t.attrs.selected=!0)})):"checkbox"===n?t.attrs.checked=e():"radio"===n?t.attrs.checked=e()===t.attrs.value:t.attrs.value=e(),t.attrs.bidi=null,t}d.view=function(t,e,n){return d(e,e.attrs.bidi)};const h=d;function f(t){var e=t.m,n=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=e.apply(this,arguments);return o.attrs||(o.attrs={}),o.attrs.bidi&&h(o,o.attrs.bidi),o};Object.keys(e).forEach((function(t){return n[t]=e[t]})),t.m=n}var p=window;const v=new Proxy({},{get:function(t,e){return Reflect.get(p.app,e,p.app)},set:function(t,e,n){return Reflect.set(p.app,e,n,p.app)}});n(1859),dayjs.extend(u()),dayjs.extend(c()),f(window);var g=$.fn.tooltip;function y(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}function w(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,b(t,e)}function D(){return D=Object.assign?Object.assign.bind():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},D.apply(this,arguments)}function x(t,e,n){void 0===e&&(e=null),void 0===n&&(n={});var r=D({},n);r.state=r.state||{},r.state.key=Date.now(),m.route.set(t,e,r)}$.fn.tooltip=function(t,e){["DANGEROUS_tooltip_jquery_fn_deprecation_exempt"].includes(e)||console.warn("Calling `$.tooltip` is now deprecated. Please use the `<Tooltip>` component exposed by flarum/core instead. `$.tooltip` may be removed in a future version of Flarum.\n\nIf this component doesn't meet your requirements, please open an issue: https://github.com/flarum/core/issues/new?assignees=davwheat&labels=type/bug,needs-verification&template=bug-report.md&title=Tooltip%20component%20unsuitable%20for%20use%20case"),g.bind(this)(t)},n(1885),n(1683);var C=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),x("/")},t}(),A=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}(),E=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=D({},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 N(t,e){return t&&(t===e||t.prototype instanceof e)}var k=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={}),!!N(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}(),S=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}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),v.previous=v.current,v.current=new k(this.constructor,{routeName:this.attrs.routeName}),v.drawer.hide(),v.modal.close()},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.bodyClass&&$("#app").addClass(this.bodyClass),this.scrollTopOnCreate&&$(window).scrollTop(0),"scrollRestoration"in history&&(history.scrollRestoration=this.useBrowserScrollRestoration?"auto":"manual")},n.onremove=function(e){t.prototype.onremove.call(this,e),this.bodyClass&&$("#app").removeClass(this.bodyClass)},e}(E);function T(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function F(t,e,n){return e&&T(t.prototype,e),n&&T(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function _(t){var e=typeof t;return"function"===e||"object"===e&&!!t}var P=function(t,e){this.content=void 0,this.priority=void 0,this.content=t,this.priority=e},B=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 P(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 P&&(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||_(i.content)?D({},i,{content:e.createItemContentProxy(_(i.content)?i.content:Object(i.content),n)}):D({},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)}})},F(t,[{key:"items",get:function(){return new Proxy(this._items,{set:function(){return console.warn("Modifying `ItemList.items` is not allowed."),!1}})}}]),t}(),I=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(){return m("li",{className:"Dropdown-separator"})},e}(E);I.isListItem=!0;const O=I;function L(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=L(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}const M=function(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=L(t))&&(r&&(r+=" "),r+=e);return r};function j(t){return"object"==typeof t&&null!==t&&"tag"in t}function R(t){return j(t)&&t.tag===O}function H(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){(!R(t)||i&&!R(i)&&e!==r.length-1)&&(i=t,o.push(t))})),o).map((function(t){var e,r,i=[t.itemName&&"item-"+t.itemName];if(j(t)&&t.tag.isListItem)return t.attrs=t.attrs||{},t.attrs.key=t.attrs.key||t.itemName,t.key=t.attrs.key,t;j(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=j(t)&&(null==t||null==(e=t.attrs)?void 0:e.key)||t.itemName;return m(s,Object.assign({className:M(i),key:o},n),t)}))}var U=function(t){function e(){return t.apply(this,arguments)||this}w(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"},H(this.items().toArray()))))},n.items=function(){var t=new B,e=this.attrs.discussion,n=e.badges().toArray();return n.length&&t.add("badges",m("ul",{className:"DiscussionHero-badges badges"},H(n)),10),t.add("title",m("h1",{className:"DiscussionHero-title"},e.title())),t},e}(E);function q(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 z(t,e){var n=t[e];return delete t[e],n}var V,W=["options"],G=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(t){var e=t.attrs,n=e.options,r=void 0===n?{}:n,i=q(e,W);i.href||(i.href="");var o=t.children||{tag:"#",children:t.text};return i.external?m("a",i,o):(i.href===m.route.get()&&("replace"in r||(r.replace=!0)),z(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}(E);function Y(t,e){var n;void 0===e&&(e={}),e.className=M("Avatar",e.className),null!=(n=e).loading||(n.loading="lazy");var r="",i="undefined"===e.title||e.title;if(i||delete e.title,t){var o=t.displayName()||"?",s=t.avatarUrl();if(i&&(e.title=e.title||o),s)return m("img",Object.assign({},e,{src:s,alt:""}));r=o.charAt(0).toUpperCase(),e.style={"--avatar-bg":t.color()}}return m("span",e,r)}function K(t,e,n){return void 0===n&&(n=0),(n>0?"...":"")+t.substring(n,n+e)+(t.length>n+e?"...":"")}function X(t,e){switch(void 0===e&&(e=V.ALPHANUMERIC),e){case V.UTF8:return t.toLowerCase().replace(/(?:(?![0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088E\u0898-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09F4-\u09F9\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71-\u0B77\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BF2\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C78-\u0C7E\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D63\u0D66-\u0D78\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u17F0-\u17F9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ACE\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u20D0-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA827\uA82C\uA830-\uA835\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\u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DDA0-\uDDA9\uDEE0-\uDEF6\uDF00-\uDF10\uDF12-\uDF3A\uDF3E-\uDF42\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC40-\uDC55]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFE4\uDFF0\uDFF1]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\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DFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]|\uDB40[\uDD00-\uDDEF])[\s\S])/gi,"-").replace(/-+/g,"-").replace(/-$|^-/g,"");case V.ALPHANUMERIC:default:return t.toLowerCase().replace(/[^a-z0-9]/gi,"-").replace(/-+/g,"-").replace(/-$|^-/g,"")}}function J(t){var e=t.replace(/(<\/p>|<br>)/g,"$1 &nbsp;").replace(/<img\b[^>]*>/gi," "),n=(new DOMParser).parseFromString(e,"text/html").documentElement;return J.removeSelectors.forEach((function(t){n.querySelectorAll(t).forEach((function(t){t.remove()}))})),n.innerText.replace(/\s+/g," ").trim()}function Q(t){return t.substr(0,1).toUpperCase()+t.substr(1)}function Z(t){return t.replace(/[A-Z]/g,(function(t){return"_"+t.toLowerCase()}))}function tt(t){if(t<0)throw new Error("Cannot generate a random string with length less than 0.");if(0===t)return"";var e=new Uint8Array(t/2);return window.crypto.getRandomValues(e),Array.from(e,(function(t){return t.toString(16).padStart(2,"0")})).join("")}function et(t,e,n){if(!e&&!n)return t;var r=e instanceof RegExp?e:new RegExp(null!=e?e:"","gi"),i=t,o=0;return n&&(e&&(o=Math.max(0,t.search(r)-n/2)),i=K(i,n,o)),i=$("<div/>").text(i).html(),e&&(i=i.replace(r,"<mark>$&</mark>")),m.trust(i)}function nt(t,e){return void 0===e&&(e={}),e.className=M("icon",t,e.className),m("i",Object.assign({"aria-hidden":"true"},e))}!function(t){t.ALPHANUMERIC="alphanum",t.UTF8="utf8"}(V||(V={})),J.removeSelectors=["blockquote","script"];var rt=n(4757),it=n.n(rt);function ot(t){return t instanceof Array?t.map((function(t){return ot(t)})).join(""):"object"==typeof t&&null!==t?t.children?ot(t.children):String(t.text):String(t)}function st(t){var e=it()(t),n=it()();return e.isAfter(n)&&(e=n),e.diff(it()())<-2592e6?e.year()===it()().year()?e.format(ot(v.translator.trans("core.lib.datetime_formats.humanTimeShort"))):e.format(ot(v.translator.trans("core.lib.datetime_formats.humanTimeLong"))):e.fromNow()}function at(t){return t>=1e6?Math.floor(t/1e6)+ot(v.translator.trans("core.lib.number_suffix.mega_text")):t>=1e3?(t/1e3).toFixed(1)+ot(v.translator.trans("core.lib.number_suffix.kilo_text")):t.toString()}var ut=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).showing=!1,e}w(e,t),e.initAttrs=function(t){t.className||(t.className=""),t.buttonClassName||(t.buttonClassName=""),t.menuClassName||(t.menuClassName=""),t.label||(t.label=""),null!=t.caretIcon||(t.caretIcon="fas fa-caret-down"),t.accessibleToggleLabel||(t.accessibleToggleLabel=ot(v.translator.trans("core.lib.dropdown.toggle_dropdown_accessible_label")))};var n=e.prototype;return n.view=function(t){var e=t.children?H(t.children):[],n=!this.attrs.lazyDraw||this.showing;return m("div",{className:"ButtonGroup Dropdown dropdown "+this.attrs.className+" itemCount"+e.length+(this.showing?" open":"")},this.getButton(t.children),n&&this.getMenu(e))},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.$().on("shown.bs.dropdown",(function(){var t,e,r,i,o,s,a,u,l,c,d,h=n.attrs,f=h.lazyDraw,p=h.onshow;n.showing=!0,f&&m.redraw.sync(),"function"==typeof p&&p(),f||m.redraw();var v=n.$(".Dropdown-menu"),g=v.hasClass("Dropdown-menu--right"),y=null!=(t=null==(e=v.offset())?void 0:e.top)?t:0,b=null!=(r=v.height())?r:0,w=null!=(i=$(window).scrollTop())?i:0,D=null!=(o=$(window).height())?o:0;v.removeClass("Dropdown-menu--top Dropdown-menu--right"),v.toggleClass("Dropdown-menu--top",y+b>w+D),((null==(s=v.offset())?void 0:s.top)||0)<0&&v.removeClass("Dropdown-menu--top");var x=null!=(a=null==(u=v.offset())?void 0:u.left)?a:0,C=null!=(l=v.width())?l:0,A=null!=(c=$(window).scrollLeft())?c:0,E=null!=(d=$(window).width())?d:0;v.toggleClass("Dropdown-menu--right",g||x+C>A+E)})),this.$().on("hidden.bs.dropdown",(function(){n.showing=!1,n.attrs.onhide&&n.attrs.onhide(),m.redraw()}))},n.getButton=function(t){return m("button",{className:"Dropdown-toggle "+this.attrs.buttonClassName,"aria-haspopup":"menu","aria-label":this.attrs.accessibleToggleLabel,"data-toggle":"dropdown",onclick:this.attrs.onclick},this.getButtonContent(t))},n.getButtonContent=function(t){return[this.attrs.icon?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}(E);function lt(t){var e=it()(t),n=e.format(),r=e.format("LLLL"),i=st(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 w(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")," ",Wi.translator.trans("core.forum.discussion_list."+(e?"replied":"started")+"_text",{user:n,ago:lt(r)}))},e}(E),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 w(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=q(t,ht),u=M("LoadingIndicator",s),l=M("LoadingIndicator-container","unset"!==n&&"LoadingIndicator-container--"+n,i&&"LoadingIndicator-container--"+i,o);return m("div",Object.assign({"aria-label":v.translator.trans("core.lib.loading_indicator.accessible_label"),role:"status"},a.containerAttrs,{"data-size":i,className:l}),m("div",Object.assign({"aria-hidden":"true",className:u},a)))},e}(E),pt=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.handler=function(){return this.attrs.when()||void 0},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.boundHandler=this.handler.bind(this),$(window).on("beforeunload",this.boundHandler)},n.onremove=function(e){t.prototype.onremove.call(this,e),$(window).off("beforeunload",this.boundHandler)},n.view=function(t){return m("[",null,t.children)},e}(E);function mt(){var t;v.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}w(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=q(e,gt);n||(n="button"),i||(i=r),"object"==typeof i&&(i=ot(i)),(s||a)&&delete c.onclick;var d=D({disabled:s,className:u=M(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||ot(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}(E),bt=n(1655),wt=n.n(bt),Dt=null;function xt(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===Dt||!0===Dt){t.contentEditable="true";try{Dt=document.execCommand("insertText",!1,n)}catch(t){Dt=!1}t.contentEditable="false"}Dt&&!t.value.slice(0,t.selectionStart).endsWith(n)&&(Dt=!1),Dt||(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 Ct=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 B;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;xt(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}(),At=["text","tooltipVisible","showOnFocus","position","ignoreTitleWarning","html","delay"],Et=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}w(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,q(n,At),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":M("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)?ot(t):t},n.checkDomNodeChanged=function(){var t=this.firstChild.dom;t&&!t.isSameNode(this.childDomNode)&&(this.childDomNode=t,this.shouldRecreateTooltip=!0)},e}(E),Nt=function(t){function e(){return t.apply(this,arguments)||this}w(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"},H(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 Ct(t,this.buildEditorParams())},n.controlItems=function(){var t=new B;return t.add("submit",m(yt,{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(Et,{text:v.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 B},n.oninput=function(t){this.value=t,this.attrs.onchange(this.value)},n.onsubmit=function(){this.attrs.onsubmit(this.value)},e}(E),kt=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.composer=this.attrs.composer,this.loading=!1,this.attrs.confirmExit&&this.composer.preventClosingWhen((function(){return n.hasChanges()}),this.attrs.confirmExit),this.composer.fields.content(this.attrs.originalContent||"")},n.view=function(){var t;return m(pt,{when:this.hasChanges.bind(this)},m("div",{className:M("ComposerBody",this.attrs.className)},Y(this.attrs.user,{className:"ComposerBody-avatar"}),m("div",{className:"ComposerBody-content"},m("ul",{className:"ComposerBody-header"},H(this.headerItems().toArray())),m("div",{className:"ComposerBody-editor"},m(Nt,{submitLabel:this.attrs.submitLabel,placeholder:this.attrs.placeholder,disabled:this.loading||this.attrs.disabled,composer:this.composer,preview:null==(t=this.jumpToPreview)?void 0:t.bind(this),onchange:this.composer.fields.content,onsubmit:this.onsubmit.bind(this),value:this.composer.fields.content()}))),m(ft,{display:"unset",containerClassName:M("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 B},n.onsubmit=function(){},n.loaded=function(){this.loading=!1,m.redraw()},e}(E);function St(t){Wi.composer.isFullScreen()&&(Wi.composer.minimize(),t.stopPropagation())}var Tt=function(t){function e(){return t.apply(this,arguments)||this}w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.placeholder=e.placeholder||ot(Wi.translator.trans("core.forum.composer_reply.body_placeholder")),e.submitLabel=e.submitLabel||Wi.translator.trans("core.forum.composer_reply.submit_button"),e.confirmExit=e.confirmExit||ot(Wi.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(G,{href:Wi.route.discussion(n),onclick:St},n.title()))),e},n.jumpToPreview=function(t){St(t),m.route.set(Wi.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();Wi.store.createRecord("posts").save(n).then((function(n){if(Wi.viewingDiscussion(e)){var r=Wi.current.get("stream");r.update().then((function(){return r.goToNumber(n.number())}))}else{var i,o=m(yt,{className:"Button Button--link",onclick:function(){m.route.set(Wi.route.post(n)),Wi.alerts.dismiss(i)}},Wi.translator.trans("core.forum.composer_reply.view_button"));i=Wi.alerts.show({type:"success",controls:[o]},Wi.translator.trans("core.forum.composer_reply.posted_message"))}t.composer.hide()}),this.loaded.bind(this))},e}(kt),Ft=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(t){var e=Object.assign({},this.attrs),n=z(e,"type");e.className=M("Alert","Alert--"+n,e.className);var r=z(e,"title"),i=z(e,"icon"),o=z(e,"content")||t.children,s=z(e,"controls")||[],a=z(e,"dismissible"),u=z(e,"ondismiss"),l=[];return(a||void 0===a)&&l.push(m(yt,{"aria-label":v.translator.trans("core.lib.alert.dismiss_a11y_label"),icon:"fas fa-times",className:"Button Button--link Button--icon Alert-dismiss",onclick:u})),m("div",e,!!r&&m("div",{className:"Alert-title"},!!i&&m("span",{className:"Alert-title-icon"},nt(i)),m("span",{className:"Alert-title-text"},r)),m("span",{className:"Alert-body"},o),m("ul",{className:"Alert-controls"},H(s.concat(l))))},e}(E),_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).loading=!1,e.alertAttrs=null,e}w(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 new Promise((function(t){return setTimeout(t,300)}))},n.view=function(){var t=this;return this.alertAttrs&&(this.alertAttrs.dismissible=!1),m("div",{className:M("Modal modal-dialog fade",this.className())},m("div",{className:"Modal-content"},this.dismissibleOptions.viaCloseButton&&m("div",{className:"Modal-close App-backControl"},m(yt,{icon:"fas fa-times",onclick:function(){return t.hide()},className:"Button Button--icon Button--link","aria-label":v.translator.trans("core.lib.modal.close")})),m("form",{onsubmit:this.onsubmit.bind(this)},m("div",{className:"Modal-header"},m("h3",{className:"App-titleControl App-titleControl--text"},this.title())),!!this.alertAttrs&&m("div",{className:"Modal-alert"},m(Ft,this.alertAttrs)),this.content())))},n.onsubmit=function(t){},n.onready=function(){this.$().find("input, select, textarea").first().trigger("focus").trigger("select")},n.hide=function(){this.attrs.animateHide()},n.loaded=function(){this.loading=!1,m.redraw()},n.onerror=function(t){var e;this.alertAttrs=t.alert,m.redraw(),422===t.status&&null!=(e=t.response)&&e.errors?this.$("form [name="+t.response.errors[0].source.pointer.replace("/data/attributes/","")+"]").trigger("select"):this.onready()},F(e,[{key:"dismissibleOptions",get:function(){return this.constructor.dismissibleOptions}}],[{key:"dismissibleOptions",get:function(){return this.isDismissible?{isDismissible:!0,viaCloseButton:this.isDismissibleViaCloseButton,viaEscKey:this.isDismissibleViaEscKey,viaBackdropClick:this.isDismissibleViaBackdropClick}:{isDismissible:!1,viaCloseButton:!1,viaEscKey:!1,viaBackdropClick:!1}}}]),e}(E);_t.isDismissible=!0,_t.isDismissibleViaCloseButton=!0,_t.isDismissibleViaEscKey=!0,_t.isDismissibleViaBackdropClick=!0;var Pt=n(30);const Bt=n.n(Pt)();var It=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}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.email=Bt(this.attrs.email||"")},n.className=function(){return"ForgotPasswordModal Modal--small"},n.title=function(){return Wi.translator.trans("core.forum.forgot_password.title")},n.content=function(){return this.success?m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},Wi.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)},Wi.translator.trans("core.forum.forgot_password.dismiss_button"))))):m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},Wi.translator.trans("core.forum.forgot_password.text")),this.fields().toArray()))},n.fields=function(){var t=new B,e=ot(Wi.translator.trans("core.forum.forgot_password.email_placeholder"));return t.add("email",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"email",type:"email",placeholder:e,"aria-label":e,bidi:this.email,disabled:this.loading})),50),t.add("submit",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Wi.translator.trans("core.forum.forgot_password.submit_button"))),-10),t},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0,Wi.request({method:"POST",url:Wi.forum.attribute("apiUrl")+"/forgot",body:this.requestParams(),errorHandler:this.onerror.bind(this)}).then((function(){e.success=!0,e.alertAttrs=null})).catch((function(){})).then(this.loaded.bind(this))},n.requestParams=function(){return{email:this.email()}},n.onerror=function(e){404===e.status&&e.alert&&(e.alert.content=Wi.translator.trans("core.forum.forgot_password.not_found_message")),t.prototype.onerror.call(this,e)},e}(_t),Ot=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){return m("div",{className:"LogInButtons"},this.items().toArray())},n.items=function(){return new B},e}(E),Lt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).username=void 0,e.email=void 0,e.password=void 0,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.username=Bt(this.attrs.username||""),this.email=Bt(this.attrs.email||""),this.password=Bt(this.attrs.password||"")},n.className=function(){return"Modal--small SignUpModal"},n.title=function(){return Wi.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(Ot,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]},n.fields=function(){var t=new B,e=ot(Wi.translator.trans("core.forum.sign_up.username_placeholder")),n=ot(Wi.translator.trans("core.forum.sign_up.email_placeholder")),r=ot(Wi.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},Wi.translator.trans("core.forum.sign_up.submit_button"))),-10),t},n.footer=function(){return[m("p",{className:"SignUpModal-logIn"},Wi.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()};Wi.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();Wi.request({url:Wi.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 D({username:this.username(),email:this.email()},t)},e}(_t),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}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.identification=Bt(this.attrs.identification||""),this.password=Bt(this.attrs.password||""),this.remember=Bt(!!this.attrs.remember)},n.className=function(){return"LogInModal Modal--small"},n.title=function(){return Wi.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(Ot,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]},n.fields=function(){var t=new B,e=ot(Wi.translator.trans("core.forum.log_in.username_or_email_placeholder")),n=ot(Wi.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}),Wi.translator.trans("core.forum.log_in.remember_me_label")))),10),t.add("submit",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Wi.translator.trans("core.forum.log_in.submit_button"))),-10),t},n.footer=function(){return m("[",null,m("p",{className:"LogInModal-forgotPassword"},m("a",{onclick:this.forgotPassword.bind(this)},Wi.translator.trans("core.forum.log_in.forgot_password_link"))),Wi.forum.attribute("allowSignUp")&&m("p",{className:"LogInModal-signUp"},Wi.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;Wi.modal.show(It,e)},n.signUp=function(){var t,e=this.identification(),n=((t={})[e.includes("@")?"email":"username"]=e,t);Wi.modal.show(Lt,n)},n.onready=function(){this.$("[name="+(this.identification()?"password":"identification")+"]").trigger("select")},n.onsubmit=function(t){t.preventDefault(),this.loading=!0,Wi.session.login(this.loginParams(),{errorHandler:this.onerror.bind(this)}).then((function(){return window.location.reload()}),this.loaded.bind(this))},n.loginParams=function(){return{identification:this.identification(),password:this.password(),remember:this.remember()}},n.onerror=function(e){401===e.status&&e.alert&&(e.alert.content=Wi.translator.trans("core.forum.log_in.invalid_login_message"),this.password("")),t.prototype.onerror.call(this,e)},e}(_t),$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).discussion=void 0,e.currentTitle=void 0,e.newTitle=void 0,e}w(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=Bt(this.currentTitle)},n.className=function(){return"RenameDiscussionModal Modal--small"},n.title=function(){return Wi.translator.trans("core.forum.rename_discussion.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("input",{className:"FormControl",bidi:this.newTitle,type:"text"})),m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Wi.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(){Wi.viewingDiscussion(e.discussion)&&Wi.current.get("stream").update(),m.redraw(),e.hide()})).catch((function(){e.loading=!1,m.redraw()}));this.hide()},e}(_t);const jt={controls:function(t,e){var n=this,r=new B;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(O,null)))})),r},userControls:function(t,e){var n=this,r=new B;return e instanceof ae&&r.add("reply",!Wi.session.user||t.canReply()?m(yt,{icon:"fas fa-reply",onclick:function(){return n.replyAction.bind(t)(!0,!1).catch((function(){}))}},Wi.translator.trans(Wi.session.user?"core.forum.discussion_controls.reply_button":"core.forum.discussion_controls.log_in_to_reply_button")):m(yt,{icon:"fas fa-reply",className:"disabled",title:ot(Wi.translator.trans("core.forum.discussion_controls.cannot_reply_text"))},Wi.translator.trans("core.forum.discussion_controls.cannot_reply_button"))),r},moderationControls:function(t){var e=new B;return t.canRename()&&e.add("rename",m(yt,{icon:"fas fa-pencil-alt",onclick:this.renameAction.bind(t)},Wi.translator.trans("core.forum.discussion_controls.rename_button"))),e},destructiveControls:function(t){var e=new B;return t.isHidden()?(t.canHide()&&e.add("restore",m(yt,{icon:"fas fa-reply",onclick:this.restoreAction.bind(t)},Wi.translator.trans("core.forum.discussion_controls.restore_button"))),t.canDelete()&&e.add("delete",m(yt,{icon:"fas fa-times",onclick:this.deleteAction.bind(t)},Wi.translator.trans("core.forum.discussion_controls.delete_forever_button")))):t.canHide()&&e.add("hide",m(yt,{icon:"far fa-trash-alt",onclick:this.hideAction.bind(t)},Wi.translator.trans("core.forum.discussion_controls.delete_button"))),e},replyAction:function(t,e){var n=this;return new Promise((function(r,i){return Wi.session.user?n.canReply()?(Wi.composer.composingReplyTo(n)&&!e||Wi.composer.load(Tt,{user:Wi.session.user,discussion:n}),Wi.composer.show(),t&&Wi.viewingDiscussion(n)&&!Wi.composer.isFullScreen()&&Wi.current.get("stream").goToNumber("reply"),r(Wi.composer)):i():(Wi.modal.show(Mt),i())}))},hideAction:function(){return this.pushData({attributes:{hiddenAt:new Date},relationships:{hiddenUser:Wi.session.user}}),this.save({isHidden:!0})},restoreAction:function(){return this.pushData({attributes:{hiddenAt:null},relationships:{hiddenUser:null}}),this.save({isHidden:!1})},deleteAction:function(){var t=this;if(confirm(ot(Wi.translator.trans("core.forum.discussion_controls.delete_confirmation"))))return Wi.viewingDiscussion(this)&&Wi.history.back(),this.delete().then((function(){return Wi.discussions.removeDiscussion(t)}))},renameAction:function(){return Wi.modal.show($t,{currentTitle:this.title(),discussion:this})}};function Rt(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 Ht=/[.*+?^${}()|[\]\\]/g;function Ut(t){return t.replace(Ht,"\\$&")}var qt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).subtree=void 0,e.highlightRegExp=void 0,e}w(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=Wi.session.user&&Wi.session.user.markedAllAsReadAt();return t&&t.getTime()}),(function(){return n.active()}))},n.elementAttrs=function(){return{className:M("DiscussionListItem",{active:this.active(),"DiscussionListItem--hidden":this.attrs.discussion.isHidden(),Slidable:"ontouchstart"in window})}},n.view=function(){var t=this.elementAttrs();return m("div",t,this.viewItems().toArray())},n.viewItems=function(){var t=new B,e=this.attrs.discussion,n=jt.controls(e,this).toArray();return t.add("controls",this.controlsView(n),100),t.add("slidableUnderneath",this.slidableUnderneathView(),90),t.add("content",this.contentView(),80),t},n.controlsView=function(t){return m("[",null,!!t.length&&m(ut,{icon:"fas fa-ellipsis-v",className:"DiscussionListItem-controls",buttonClassName:"Button Button--icon Button--flat Slidable-underneath Slidable-underneath--right",accessibleToggleLabel:Wi.translator.trans("core.forum.discussion_controls.toggle_dropdown_accessible_label")},t))},n.slidableUnderneathView=function(){var t=this.attrs.discussion.isUnread();return m("span",{className:M("Slidable-underneath Slidable-underneath--left Slidable-underneath--elastic",{disabled:!t}),onclick:this.markAsRead.bind(this)},nt("fas fa-check"))},n.contentView=function(){var t=this.attrs.discussion,e=t.isUnread(),n=t.isRead();return m("div",{className:M("DiscussionListItem-content","Slidable-content",{unread:e,read:n})},this.contentItems().toArray())},n.contentItems=function(){var t=new B;return t.add("authorAvatar",this.authorAvatarView(),100),t.add("badges",this.badgesView(),90),t.add("main",this.mainView(),80),t.add("replyCount",this.replyCountItem(),70),t},n.authorAvatarView=function(){var t=this.attrs.discussion,e=t.user();return m(Et,{text:Wi.translator.trans("core.forum.discussion_list.started_text",{user:e,ago:st(t.createdAt())}),position:"right"},m(G,{className:"DiscussionListItem-author",href:e?Wi.route.user(e):"#"},Y(e||null,{title:""})))},n.badgesView=function(){var t=this.attrs.discussion;return m("ul",{className:"DiscussionListItem-badges badges"},H(t.badges().toArray()))},n.mainView=function(){var t=this.attrs.discussion,e=this.getJumpTo();return m(G,{href:Wi.route.discussion(t,e),className:"DiscussionListItem-main"},this.mainItems().toArray())},n.mainItems=function(){var t=new B,e=this.attrs.discussion;return t.add("title",m("h2",{className:"DiscussionListItem-title"},et(e.title(),this.highlightRegExp)),100),t.add("info",m("ul",{className:"DiscussionListItem-info"},H(this.infoItems().toArray())),90),t},n.getJumpTo=function(){var t=this.attrs.discussion,e=0;if(this.attrs.params.q){var n=t.mostRelevantPost();n&&(e=n.number());var r=Ut(this.attrs.params.q);this.highlightRegExp=new RegExp(r+"|"+r.trim().replace(/\s+/g,"|"),"gi")}else{var i;e=Math.min(null!=(i=t.lastPostNumber())?i:0,(t.lastReadPostNumber()||0)+1)}return e},n.oncreate=function(e){if(t.prototype.oncreate.call(this,e),"ontouchstart"in window){var n=Rt(this.element);this.$(".DiscussionListItem-controls").on("hidden.bs.dropdown",(function(){return n.reset()}))}},n.onbeforeupdate=function(e){return t.prototype.onbeforeupdate.call(this,e),this.subtree.needsRebuild()},n.active=function(){return Wi.current.matches(ae,{discussion:this.attrs.discussion})},n.showFirstPost=function(){var t;return["newest","oldest"].includes(null!=(t=this.attrs.params.sort)?t:"")},n.showRepliesCount=function(){return"replies"===this.attrs.params.sort},n.markAsRead=function(){var t=this.attrs.discussion;t.isUnread()&&(t.save({lastReadPostNumber:t.lastPostNumber()}),m.redraw())},n.infoItems=function(){var t=new B;if(this.attrs.params.q){var e=this.attrs.discussion.mostRelevantPost()||this.attrs.discussion.firstPost();if(e&&"comment"===e.contentType()){var n,r=et(null!=(n=e.contentPlain())?n:"",this.highlightRegExp,175);t.add("excerpt",r,-100)}}else t.add("terminalPost",m(ct,{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",{className:"visually-hidden"},Wi.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",{className:"visually-hidden"},Wi.translator.trans("core.forum.discussion_list.total_replies_a11y_label",{count:t.replyCount()})))},e}(E),zt=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(){return m("div",{className:"Placeholder"},m("p",null,this.attrs.text))},e}(E),Vt=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(){var t,e=this.attrs.state,n=e.getParams(),r=e.isInitialLoading()||e.isLoadingNext();if(r?t=m(ft,null):e.hasNext()&&(t=m(yt,{className:"Button",onclick:e.loadNext.bind(e)},Wi.translator.trans("core.forum.discussion_list.load_more_button"))),e.isEmpty()){var i=Wi.translator.trans("core.forum.discussion_list.empty_text");return m("div",{className:"DiscussionList"},m(zt,{text:i}))}var o=e.pageSize;return m("div",{className:M("DiscussionList",{"DiscussionList--searchResults":e.isSearchResults()})},m("ul",{role:"feed","aria-busy":r,className:"DiscussionList-discussions"},e.getPages().map((function(t,e){return t.items.map((function(t,r){return m("li",{key:t.id(),"data-id":t.id(),role:"article","aria-setsize":"-1","aria-posinset":e*o+r},m(qt,{discussion:t,params:n}))}))}))),m("div",{className:"DiscussionList-loadMore"},t))},e}(E),Wt=function(t){t.pageX<10&&Wi.pane.show()},Gt=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){if(this.attrs.state.hasItems())return m("aside",{className:"DiscussionPage-list"},this.enoughSpace()&&m(Vt,{state:this.attrs.state}))},n.oncreate=function(e){t.prototype.oncreate.call(this,e);var n=$(e.dom),r=Wi.pane;if(n.hover(r.show.bind(r),r.onmouseleave.bind(r)),$(document).on("mousemove",Wt),Wi.previous.matches(ae)){var i=Wi.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){Wi.cache.discussionListPaneScrollTop=$(t.dom).scrollTop(),$(document).off("mousemove",Wt)},n.enoughSpace=function(){return!$(".App-navigation").is(":visible")},e}(E),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 w(e,t),e.prototype.view=function(){return m("div",{className:"Post CommentPost LoadingPost"},m("header",{className:"Post-header"},Y(null,{className:"PostUser-avatar"}),m("div",{className:"fakeText"})),m("div",{className:"Post-body"},m("div",{className:"fakeText"}),m("div",{className:"fakeText"}),m("div",{className:"fakeText"})))},e}(E);function Xt(t){var e=t&&t.displayName()||v.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}w(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}(E),Qt=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){var t=this;return Wi.composer.composingReplyTo(this.attrs.discussion)?m("article",{className:"Post CommentPost editing","aria-busy":"true"},m("header",{className:"Post-header"},m("div",{className:"PostUser"},m("h3",{className:"PostUser-name"},Y(Wi.session.user,{className:"PostUser-avatar"}),Xt(Wi.session.user)),m("ul",{className:"PostUser-badges badges"},H(Wi.session.user.badges().toArray())))),m(Jt,{className:"Post-body",composer:Wi.composer,surround:this.anchorPreview.bind(this)})):m("button",{className:"Post ReplyPlaceholder",onclick:function(){jt.replyAction.call(t.attrs.discussion,!0).catch((function(){}))}},m("span",{className:"Post-header"},Y(Wi.session.user,{className:"PostUser-avatar"})," ",Wi.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}(E),Zt=function(t){function e(){return t.apply(this,arguments)||this}w(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=Wi.postComponents[n.contentType()];s=!!l&&m(l,{post:n}),a.key="post"+n.id(),a.oncreate=o,a["data-time"]=u.toISOString(),a["data-number"]=n.number(),a["data-id"]=n.id(),a["data-type"]=n.contentType();var c=u-t;c>3456e5&&(s=[m("div",{className:"PostStream-timeGap"},m("span",null,Wi.translator.trans("core.forum.post_stream.time_lapsed_text",{period:dayjs().add(c,"ms").fromNow(!0)}))),s]),t=u}else a.key="post"+i[e.stream.visibleStart+r],s=m(Kt,null);var d=m("div",Object.assign({className:"PostStream-item"},a),s);return 0===r&&e.afterFirstPostItems().toArray().length>0?m.fragment(D({},a),[d,m("div",{className:"PostStream-item PostStream-afterFirstPost",key:"afterFirstPost"},e.afterFirstPostItems().toArray())]):d}));return!n&&r[this.stream.visibleEnd-this.stream.visibleStart-1]&&s.push(m("div",{className:"PostStream-loadMore",key:"loadMore"},m(yt,{className:"Button",onclick:this.stream.loadNext.bind(this.stream)},Wi.translator.trans("core.forum.post_stream.load_more_button")))),n&&s.push.apply(s,this.endItems().toArray()),!n||Wi.session.user&&!this.discussion.canReply()||s.push(m("div",{className:"PostStream-item",key:"reply","data-index":this.stream.count(),oncreate:o},m(Qt,{discussion:this.discussion}))),m("div",{className:"PostStream",role:"feed","aria-live":"off","aria-busy":this.stream.pagesLoading?"true":"false"},s)},n.afterFirstPostItems=function(){return new B},n.endItems=function(){return new B},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(ot(Wi.translator.trans("core.lib.datetime_formats.scrubber"))))},n.calculatePosition=function(t){void 0===t&&(t=window.pageYOffset);var e,n,r=this.getMarginTop(),i=$(window),o=i.height()-r,s=i.scrollTop()+r,a=t+r;this.$(".PostStream-item").each((function(){var t=$(this),r=t.offset().top,i=t.outerHeight(!0),u=Math.max(0,a-r);if(void 0===e&&(u/i<.75||(i-u)/o>.25)&&(e=t.data("number")),r+i>s){if(!(r+i<s+o))return!1;t.data("number")&&(n=t.data("number"))}})),e&&this.attrs.onPositionChange(e||1,n,e)},n.getMarginTop=function(){var t="phone"===Wi.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()+Wi.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()+Wi.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}(E);function te(t,e){return void 0===e&&(e=v.data.locale),new Intl.NumberFormat(e).format(t)}var ee=function(t){function e(){return t.apply(this,arguments)||this}w(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=Wi.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+"%",opacity:r?1:0};t.state.oldStyle?e.stop(!0).css(t.state.oldStyle).animate(n):e.css(n),t.state.oldStyle=n}var o=["PostStreamScrubber","Dropdown"];return this.attrs.className&&o.push(this.attrs.className),m("div",{className:o.join(" ")},m("button",{className:"Button Dropdown-toggle","data-toggle":"dropdown"},e," ",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")," ",this.firstPostLabel()),m("div",{className:"Scrubber-scrollbar"},m("div",{className:"Scrubber-before"}),m("div",{className:"Scrubber-handle"},m("div",{className:"Scrubber-bar"}),m("div",{className:"Scrubber-info"},m("strong",null,e),m("span",{className:"Scrubber-description"}))),m("div",{className:"Scrubber-after"}),m("div",{className:"Scrubber-unread",oncreate:i,onupdate:i},this.unreadLabel(n))),m("a",{className:"Scrubber-last",onclick:this.goToLast.bind(this)},nt("fas fa-angle-double-down")," ",this.lastPostLabel()))))},n.firstPostLabel=function(){return Wi.translator.trans("core.forum.post_scrubber.original_post_link")},n.unreadLabel=function(t){return Wi.translator.trans("core.forum.post_scrubber.unread_text",{count:t})},n.lastPostLabel=function(){return Wi.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}(E),ne=function(t){function e(){return t.apply(this,arguments)||this}w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=M(e.className,"Dropdown--split"),e.menuClassName=M(e.menuClassName,"Dropdown-menu--right")};var n=e.prototype;return n.getButton=function(t){var e=this.getFirstChild(t),n=Object.assign({},null==e?void 0:e.attrs);return n.className=M(n.className,"SplitDropdown-button Button",this.attrs.buttonClassName),m("[",null,m(yt,n,e.children),m("button",{className:"Dropdown-toggle Button Button--icon "+this.attrs.buttonClassName,"aria-haspopup":"menu","aria-label":this.attrs.accessibleToggleLabel,"data-toggle":"dropdown"},this.attrs.icon?nt(this.attrs.icon,{className:"Button-icon"}):null,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=void 0,this.paused=!1,this.loadPageTimeouts={},this.pagesLoading=0,this.index=0,this.number=1,this.visible=1,this.visibleStart=0,this.visibleEnd=0,this.animateScroll=!1,this.needsScroll=!1,this.targetPost=null,this.description="",this.forceUpdateScrubber=!1,this.loadPromise=null,this.loadNext=void 0,this.loadPrevious=void 0,this.discussion=t,this.loadNext=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=D({},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(),Wi.store.find("posts",{filter:{discussion:this.discussion.id()},page:{near:t}}).then(this.show.bind(this)))},e.loadNearIndex=function(e){if(e>=this.visibleStart&&e<this.visibleEnd)return Promise.resolve();var n=this.sanitizeIndex(e-t.loadCount/2),r=n+t.loadCount;return this.reset(n,r),this.loadRange(n,r).then(this.show.bind(this))},e._loadNext=function(){var e=this.visibleEnd,n=this.visibleEnd=this.sanitizeIndex(this.visibleEnd+t.loadCount),r=e-2*t.loadCount;r>this.visibleStart&&r>=0&&(this.visibleStart=r+t.loadCount+1,this.loadPageTimeouts[r]&&(clearTimeout(this.loadPageTimeouts[r]),delete this.loadPageTimeouts[r],this.pagesLoading--)),this.loadPage(e,n)},e._loadPrevious=function(){var e=this.visibleStart,n=this.visibleStart=this.sanitizeIndex(this.visibleStart-t.loadCount),r=n+2*t.loadCount;r<this.visibleEnd&&r<=this.count()&&(this.visibleEnd=r,this.loadPageTimeouts[r]&&(clearTimeout(this.loadPageTimeouts[r]),delete this.loadPageTimeouts[r],this.pagesLoading--)),this.loadPage(n,e,!0)},e.loadPage=function(t,e,n){var r=this;void 0===n&&(n=!1),this.pagesLoading++;var i=function(){t<r.visibleStart||e>r.visibleEnd||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--})),delete r.loadPageTimeouts[t]}),this.pagesLoading-1?1e3:0)},e.loadRange=function(t,e){var n=[],r=[];return this.discussion.postIds().slice(t,e).forEach((function(t){var e=Wi.store.getById("posts",t);e&&e.discussion()&&void 0!==e.canEdit()?r.push(e):n.push(t)})),n.length?Wi.store.find("posts",n).then((function(t){return r.concat(t).sort((function(t,e){return t.number()-e.number()}))})):Promise.resolve(r)},e.show=function(t){var e;this.visibleStart=t.length?this.discussion.postIds().indexOf(null!=(e=t[0].id())?e:"0"):0,this.visibleEnd=this.sanitizeIndex(this.visibleStart+t.length)},e.reset=function(e,n){this.visibleStart=e||0,this.visibleEnd=this.sanitizeIndex(n||t.loadCount)},e.posts=function(){return this.discussion.postIds().slice(this.visibleStart,this.visibleEnd).map((function(t){var e=Wi.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;var ae=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}w(e,t);var n=e.prototype;return n.oninit=function(e){var n,r;t.prototype.oninit.call(this,e),this.load(),(Wi.discussions.hasItems()||Wi.discussions.isLoading())&&(null==(n=Wi.pane)||n.enable(),null==(r=Wi.pane)||r.hide()),this.bodyClass="App--discussion"},n.onremove=function(e){var n,r,i;t.prototype.onremove.call(this,e),null==(n=Wi.pane)||n.disable(),!this.discussion||!Wi.composer.composingReplyTo(this.discussion)||null!=(r=Wi.composer)&&null!=(i=r.fields)&&i.content()?Wi.composer.minimize():Wi.composer.hide()},n.view=function(){return m("div",{className:"DiscussionPage"},this.viewItems().toArray())},n.viewItems=function(){var t=new B;return t.add("pane",m(Gt,{state:Wi.discussions}),100),t.add("discussions",m("div",{className:"DiscussionPage-discussion"},this.discussion?this.pageContent().toArray():this.loadingItems().toArray()),90),t},n.loadingItems=function(){var t=new B;return t.add("spinner",m(ft,null),100),t},n.sidebar=function(){return m("nav",{className:"DiscussionPage-nav"},m("ul",null,H(this.sidebarItems().toArray())))},n.hero=function(){return m(U,{discussion:this.discussion})},n.pageContent=function(){var t=new B;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 B;return t.add("sidebar",this.sidebar(),100),t.add("poststream",m("div",{className:"DiscussionPage-stream"},m(Zt,{discussion:this.discussion,stream:this.stream,onPositionChange:this.positionChanged.bind(this)})),10),t},n.load=function(){var t=Wi.preloadedApiDocument();if(t)setTimeout(this.show.bind(this,t),0);else{var e=this.requestParams();Wi.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;Wi.history.push("discussion",t.title()),Wi.setTitle(t.title()),Wi.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 Wi.store.getById("posts",t.id)})).sort((function(t,e){return t.number()-e.number()})).slice(0,20)}this.stream=new se(t,i);var s=m.route.param("near"),a="reply"===s?"reply":parseInt(s);this.stream.goToNumber(a||(null!=(e=null==(n=i[0])?void 0:n.number())?e:0),!0).then((function(){r.discussion=t,Wi.current.set("discussion",t),Wi.current.set("stream",r.stream)}))},n.sidebarItems=function(){var t=new B;return this.discussion&&t.add("controls",m(ne,{icon:"fas fa-ellipsis-v",className:"App-primaryControl",buttonClassName:"Button--primary",accessibleToggleLabel:Wi.translator.trans("core.forum.discussion_controls.toggle_dropdown_accessible_label")},jt.controls(this.discussion,this).toArray()),100),t.add("scrubber",m(ee,{stream:this.stream,className:"App-titleControl"}),-100),t},n.positionChanged=function(t,e){var n=this.discussion;if(n){var r=Wi.route.discussion(n,this.near=t);window.history.replaceState(null,document.title,r),Wi.history.push("discussion",n.title()),Wi.session.user&&e>(n.lastReadPostNumber()||0)&&(n.save({lastReadPostNumber:e}),m.redraw())}},e}(S),ue=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},H(this.items().toArray()))},n.items=function(){return new B},e}(E),le=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.active=this.isActive(e),void 0===e.force&&(e.force=!0)},e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return n.tag=G,n.attrs.active=String(n.attrs.active),delete n.attrs.type,n},e.isActive=function(t){var e,n;return void 0!==t.active?t.active:(null==(e=m.route.get())?void 0:e.split("?")[0])===(null==(n=t.href)?void 0:n.split("?")[0])},e}(yt),ce=function(t){function e(){return t.apply(this,arguments)||this}w(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=ot(Wi.translator.trans("core.forum.header.session_dropdown_accessible_label"))};var n=e.prototype;return n.view=function(e){return t.prototype.view.call(this,D({},e,{children:this.items().toArray()}))},n.getButtonContent=function(){var t=Wi.session.user;return[Y(t)," ",m("span",{className:"Button-label"},Xt(t))]},n.items=function(){var t=new B,e=Wi.session.user;return t.add("profile",m(le,{icon:"fas fa-user",href:Wi.route.user(e)},Wi.translator.trans("core.forum.header.profile_button")),100),t.add("settings",m(le,{icon:"fas fa-cog",href:Wi.route("settings")},Wi.translator.trans("core.forum.header.settings_button")),50),Wi.forum.attribute("adminUrl")&&t.add("administration",m(le,{icon:"fas fa-wrench",href:Wi.forum.attribute("adminUrl"),target:"_blank"},Wi.translator.trans("core.forum.header.admin_button")),0),t.add("separator",m(O,null),-90),t.add("logOut",m(yt,{icon:"fas fa-sign-out-alt",onclick:Wi.session.logout.bind(Wi.session)},Wi.translator.trans("core.forum.header.log_out_button")),-100),t},e}(ut);function de(t){if(!t||"object"!=typeof t||t instanceof Array)return!1;var e=t.tag;return("string"!=typeof e||"a"===e||"button"===e)&&("object"!=typeof e&&"function"!=typeof e||!("initAttrs"in e)||e.initAttrs(t.attrs),"object"!=typeof e&&"function"!=typeof e||!("isActive"in e)?t.attrs.active:e.isActive(t.attrs))}var he=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.initAttrs=function(e){null!=e.caretIcon||(e.caretIcon="fas fa-sort"),t.initAttrs.call(this,e),e.className=M(e.className,"Dropdown--select")},e.prototype.getButtonContent=function(t){var e=t.find(de),n=e&&"object"==typeof e&&"children"in e&&e.children||this.attrs.defaultLabel;return Array.isArray(n)&&(n=n[0]),[m("span",{className:"Button-label"},n),this.attrs.caretIcon?nt(this.attrs.caretIcon,{className:"Button-caret"}):null]},e}(ut),fe=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=v.store),this.data={},this.freshness=new Date,this.exists=!1,this.store=void 0,this.data=t,this.store=e}var e=t.prototype;return e.id=function(){return"id"in this.data?this.data.id:void 0},e.attribute=function(t){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){if("id"in e&&(this.data.id=e.id),"type"in e&&(this.data.type=e.type),"attributes"in e){var n;for(var r in(n=this.data).attributes||(n.attributes={}),e.attributes){var i=e.attributes[r];i&&i instanceof t&&(vt("Providing models as attributes to `Model.pushData()` or `Model.pushAttributes()` is deprecated.","3249"),delete e.attributes[r],e.relationships||(e.relationships={}),e.relationships[r]={data:t.getIdentifier(i)})}Object.assign(this.data.attributes,e.attributes)}if("relationships"in e){var o,s=null!=(o=this.data.relationships)?o:{};for(var a in e.relationships){var u=e.relationships[a];if(null!==u){var l;l=u instanceof t?{data:t.getIdentifier(u)}:u instanceof Array?{data:u.map(t.getIdentifier)}:u,e.relationships[a]=l,s[a]=l}else delete s[a],delete e.relationships[a]}this.data.relationships=s}return this.freshness=new Date,this},e.pushAttributes=function(t){this.pushData({attributes:t})},e.save=function(e,n){var r=this;void 0===n&&(n={});var i={type:this.data.type,attributes:e};if("id"in this.data&&(i.id=this.data.id),e.relationships){for(var o in i.relationships={},e.relationships){var s=e.relationships[o];null!==s&&(i.relationships[o]={data:s instanceof Array?s.map(t.getIdentifier):t.getIdentifier(s)})}delete e.relationships}var a=this.copyData();this.pushData(i);var u={data:i,meta:n.meta||void 0};return v.request(D({method:this.exists?"PATCH":"POST",url:v.forum.attribute("apiUrl")+this.apiEndpoint(),body:u},n)).then((function(t){return r.store.pushPayload(t)}),(function(t){throw r.pushData(a),m.redraw(),t}))},e.delete=function(t,e){var n=this;return void 0===t&&(t={}),void 0===e&&(e={}),this.exists?v.request(D({method:"DELETE",url:v.forum.attribute("apiUrl")+this.apiEndpoint(),body:t},e)).then((function(){n.exists=!1,n.store.remove(n)})):Promise.resolve()},e.apiEndpoint=function(){return"/"+this.data.type+("id"in this.data?"/"+this.data.id:"")},e.copyData=function(){return JSON.parse(JSON.stringify(this.data))},e.rawRelationship=function(t){var e,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 pe(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i=e.slice(0,-1),o=e.slice(-1)[0],s={};return function(){var t=this,e=!1;return i.forEach((function(n){var r=t[n],i="function"==typeof r?r.call(t):r;s[n]!==i&&(e=!0,s[n]=i)})),e&&(r=o.apply(this,i.map((function(t){return s[t]})))),r}}function me(t){if(!t||t.length<4)return!1;var e=t.replace("#","");return 3===e.length&&(e+=e),(299*parseInt(e.slice(0,2),16)+587*parseInt(e.slice(2,4),16)+114*parseInt(e.slice(4,6),16))/1e3<(parseInt(getComputedStyle(document.body).getPropertyValue("--yiq-threshold").trim())||128)}function ve(t){return t?me(t)?"text-contrast--light":"text-contrast--dark":"text-contrast--unchanged"}var ge,ye=["type","icon","label","color","style"],be=function(t){function e(){return t.apply(this,arguments)||this}return w(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=q(t,ye),u=M("Badge",[e&&"Badge--"+e],a.className,ve(i)),l=n?nt(n,{className:"Badge-icon"}):m.trust("&nbsp;"),c=D({},s,{"--badge-bg":i}),d=D({},a,{className:u,style:c}),h=m("div",d,l);return r?m(Et,{text:r},h):h},e}(E),we=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.title=function(){return fe.attribute("title").call(this)},n.slug=function(){return fe.attribute("slug").call(this)},n.createdAt=function(){return fe.attribute("createdAt",fe.transformDate).call(this)},n.user=function(){return fe.hasOne("user").call(this)},n.firstPost=function(){return fe.hasOne("firstPost").call(this)},n.lastPostedAt=function(){return fe.attribute("lastPostedAt",fe.transformDate).call(this)},n.lastPostedUser=function(){return fe.hasOne("lastPostedUser").call(this)},n.lastPost=function(){return fe.hasOne("lastPost").call(this)},n.lastPostNumber=function(){return fe.attribute("lastPostNumber").call(this)},n.commentCount=function(){return fe.attribute("commentCount").call(this)},n.replyCount=function(){return pe("commentCount",(function(t){var e;return Math.max(0,(null!=(e=t)?e:0)-1)})).call(this)},n.posts=function(){return fe.hasMany("posts").call(this)},n.mostRelevantPost=function(){return fe.hasOne("mostRelevantPost").call(this)},n.lastReadAt=function(){return fe.attribute("lastReadAt",fe.transformDate).call(this)},n.lastReadPostNumber=function(){return fe.attribute("lastReadPostNumber").call(this)},n.isUnread=function(){return pe("unreadCount",(function(t){return!!t})).call(this)},n.isRead=function(){return pe("unreadCount",(function(t){return!(!v.session.user||t)})).call(this)},n.hiddenAt=function(){return fe.attribute("hiddenAt",fe.transformDate).call(this)},n.hiddenUser=function(){return fe.hasOne("hiddenUser").call(this)},n.isHidden=function(){return pe("hiddenAt",(function(t){return!!t})).call(this)},n.canReply=function(){return fe.attribute("canReply").call(this)},n.canRename=function(){return fe.attribute("canRename").call(this)},n.canHide=function(){return fe.attribute("canHide").call(this)},n.canDelete=function(){return fe.attribute("canDelete").call(this)},n.removePost=function(t){var e=this.rawRelationship("posts");e&&e.some((function(n,r){return t===n.id&&(e.splice(r,1),!0)}))},n.unreadCount=function(){var t,e,n,r=v.session.user;if(r&&(null!=(t=null==(e=r.markedAllAsReadAt())?void 0:e.getTime())?t:0)<(null==(n=this.lastPostedAt())?void 0:n.getTime())){var i,o,s=Math.max(0,(null!=(i=this.lastPostNumber())?i:0)-(this.lastReadPostNumber()||0));return Math.min(s,null!=(o=this.commentCount())?o:0)}return 0},n.badges=function(){var t=new B;return this.isHidden()&&t.add("hidden",m(be,{type:"hidden",icon:"fas fa-trash",label:v.translator.trans("core.lib.badge.hidden_tooltip")})),t},n.postIds=function(){var t,e;return null!=(t=null==(e=this.rawRelationship("posts"))?void 0:e.map((function(t){return t.id})))?t:[]},e}(fe),De=function(t){function e(){return t.apply(this,arguments)||this}w(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"},Wi.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 B,e=this.attrs.state;return t.add("mark_all_as_read",m(Et,{text:Wi.translator.trans("core.forum.notifications.mark_all_as_read_tooltip")},m(yt,{className:"Button Button--link","data-container":".NotificationList",icon:"fas fa-check",title:Wi.translator.trans("core.forum.notifications.mark_all_as_read_tooltip"),onclick:e.markAllAsRead.bind(e)})),70),t.add("delete_all",m(Et,{text:Wi.translator.trans("core.forum.notifications.delete_all_tooltip")},m(yt,{className:"Button Button--link","data-container":".NotificationList",icon:"fas fa-trash-alt",title:Wi.translator.trans("core.forum.notifications.delete_all_tooltip"),onclick:function(){confirm(Wi.translator.trans("core.forum.notifications.delete_all_confirm"))&&e.deleteAll.call(e)}})),50),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 we?i=r:r&&r.discussion&&(i=r.discussion());var o=i?i.id():0;n[o]=n[o]||{discussion:i,notifications:[]},n[o].notifications.push(t),-1===e.indexOf(n[o])&&e.push(n[o])}})),e.map((function(t){var e=t.discussion&&t.discussion.badges().toArray();return m("div",{className:"NotificationGroup"},t.discussion?m(G,{className:"NotificationGroup-header",href:Wi.route.discussion(t.discussion)},e&&!!e.length&&m("ul",{className:"NotificationGroup-badges badges"},H(e)),m("span",null,t.discussion.title())):m("div",{className:"NotificationGroup-header"},Wi.forum.attribute("title")),m("ul",{className:"NotificationGroup-content"},t.notifications.map((function(t){var e=Wi.notificationComponents[t.contentType()];return!!e&&m("li",null,m(e,{notification:t}))}))))}))})):m("div",{className:"NotificationList-empty"},Wi.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}(E),xe=function(t){function e(){return t.apply(this,arguments)||this}w(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=ot(Wi.translator.trans("core.forum.notifications.tooltip"))),e.icon||(e.icon="fas fa-bell"),e.accessibleToggleLabel||(e.accessibleToggleLabel=ot(Wi.translator.trans("core.forum.notifications.toggle_dropdown_accessible_label"))),t.initAttrs.call(this,e)};var n=e.prototype;return n.getButton=function(e){var n=this.getNewCount(),r=t.prototype.getButton.call(this,e);return r.attrs.title=this.attrs.label,r.attrs.className=M(r.attrs.className,[n&&"new"]),r.attrs.onclick=this.onclick.bind(this),r},n.getButtonContent=function(){var t=this.getUnreadCount();return[this.attrs.icon?nt(this.attrs.icon,{className:"Button-icon"}):null,0!==t&&m("span",{className:"NotificationsDropdown-unread"},t),m("span",{className:"Button-label"},this.attrs.label)]},n.getMenu=function(){return m("div",{className:M("Dropdown-menu",this.attrs.menuClassName),onclick:this.menuClick.bind(this)},this.showing&&m(De,{state:this.attrs.state}))},n.onclick=function(){Wi.drawer.isOpen()?this.goToRoute():this.attrs.state.load()},n.goToRoute=function(){m.route.set(Wi.route("notifications"))},n.getUnreadCount=function(){return Wi.session.user.unreadNotificationCount()},n.getNewCount=function(){return Wi.session.user.newNotificationCount()},n.menuClick=function(t){(t.shiftKey||t.metaKey||t.ctrlKey||1===t.button)&&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"}(ge||(ge={}));var Ce=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(ge.ArrowUp,(function(e){e.preventDefault(),t(e)})),this},e.onDown=function(t){return this.callbacks.set(ge.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(ge.Tab,n),this.callbacks.set(ge.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(ge.Escape,(function(e){e.stopPropagation(),e.preventDefault(),t(e)})),this},e.onRemove=function(t){return this.callbacks.set(ge.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 Ae(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 Ee(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function s(t){Ae(o,r,i,s,a,"next",t)}function a(t){Ae(o,r,i,s,a,"throw",t)}s(void 0)}))}}var Ne=n(2507),ke=n.n(Ne),Se=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).query=void 0,e.discussion=void 0,e.mostRelevantPost=void 0,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.query=this.attrs.query,this.discussion=this.attrs.discussion,this.mostRelevantPost=this.attrs.mostRelevantPost},n.view=function(){return m("li",{className:"DiscussionSearchResult","data-index":"discussions"+this.discussion.id()},m(G,{href:Wi.route.discussion(this.discussion,this.mostRelevantPost&&this.mostRelevantPost.number()||0)},this.viewItems().toArray()))},n.discussionTitle=function(){return this.discussion.title()},n.mostRelevantPostContent=function(){var t;return null==(t=this.mostRelevantPost)?void 0:t.contentPlain()},n.viewItems=function(){var t,e=new B;return e.add("discussion-title",m("div",{className:"DiscussionSearchResult-title"},et(this.discussionTitle(),this.query)),90),this.mostRelevantPost&&e.add("most-relevant",m("div",{className:"DiscussionSearchResult-excerpt"},et(null!=(t=this.mostRelevantPostContent())?t:"",this.query,100)),80),e},e}(E),Te=function(){function t(){this.results=new Map,this.queryString=null}var e=t.prototype;return e.search=function(){var t=Ee(ke().mark((function t(e){var n,r=this;return ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=e.toLowerCase(),this.results.set(e,[]),this.setQueryString(e),n={filter:{q:this.queryString||e},page:{limit:this.limit()},include:this.includes().join(",")},t.abrupt("return",Wi.store.find("discussions",n).then((function(t){r.results.set(e,t),m.redraw()})));case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.view=function(t){t=t.toLowerCase(),this.setQueryString(t);var e=(this.results.get(t)||[]).map((function(e){var n=e.mostRelevantPost();return m(Se,{query:t,discussion:e,mostRelevantPost:n})}));return[m("li",{className:"Dropdown-header"},Wi.translator.trans("core.forum.search.discussions_heading")),m("li",null,m(le,{icon:"fas fa-search",href:Wi.route("index",{q:this.queryString})},Wi.translator.trans("core.forum.search.all_discussions_button",{query:t})))].concat(e)},e.includes=function(){return["mostRelevantPost"]},e.limit=function(){return 3},e.queryMutators=function(){return[]},e.setQueryString=function(t){this.queryString=t+" "+this.queryMutators().join(" ")},t}(),Fe=function(){function t(){this.results=new Map}var e=t.prototype;return e.search=function(){var t=Ee(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",Wi.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(Wi.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"},Wi.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(G,{href:Wi.route.user(e)},Y(e),D({},n,{text:void 0,children:r})))}))):[]},t}(),_e=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}w(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=ot(Wi.translator.trans("core.forum.header.search_placeholder")),r=!!e,i=!(!this.searchState.getValue()||!this.hasFocus),o=!(this.loadingSources||!this.searchState.getValue());return m("div",{role:"search","aria-label":Wi.translator.trans("core.forum.header.search_role_label"),className:M("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":Wi.translator.trans("core.forum.header.search_clear_button_accessible_label"),type:"button"},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 Ce,this.navigator.onUp((function(){return r.setIndex(r.getCurrentNumericIndex()-1,!0)})).onDown((function(){return r.setIndex(r.getCurrentNumericIndex()+1,!0)})).onSelect(this.selectResult.bind(this),!0).onCancel(this.clear.bind(this)).bindTo(s),s.on("input focus",(function(){var t=this.value.toLowerCase();t&&(i.searchTimeout&&clearTimeout(i.searchTimeout),i.searchTimeout=window.setTimeout((function(){var e;o.isCached(t)||(t.length>=i.constructor.MIN_SEARCH_LEN&&(null==(e=i.sources)||e.map((function(e){e.search&&(i.loadingSources++,e.search(t).then((function(){i.loadingSources=Math.max(0,i.loadingSources-1),m.redraw()})))}))),o.cache(t),m.redraw())}),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 B;return Wi.forum.attribute("canViewForum")&&t.add("discussions",new Te),Wi.forum.attribute("canSearchUsers")&&t.add("users",new Fe),t},n.selectableItems=function(){return this.$(".Search-results > li:not(.Dropdown-header)")},n.getCurrentNumericIndex=function(){return Math.max(0,this.selectableItems().index(this.getItem(this.index)))},n.getItem=function(t){var e=this.selectableItems(),n=e.filter('[data-index="'+t+'"]');return n.length||(n=e.eq(t)),n},n.setIndex=function(t,e){void 0===e&&(e=!1);var n=this.selectableItems(),r=n.parent(),i=t;t<0?i=n.length-1:t>=n.length&&(i=0);var o=n.removeClass("active").eq(i).addClass("active");if(this.index=parseInt(o.attr("data-index"))||i,e){var s,a=r.scrollTop(),u=r.offset().top,l=u+r.outerHeight(),c=o.offset().top,d=c+o.outerHeight();c<u?s=a-u+c-parseInt(r.css("padding-top"),10):d>l&&(s=a-l+d+parseInt(r.css("padding-bottom"),10)),void 0!==s&&r.stop(!0).animate({scrollTop:s},100)}},F(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}(E);_e.MIN_SEARCH_LEN=3;var Pe=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},H(this.items().toArray()))},n.items=function(){var t=new B;if(t.add("search",m(_e,{state:Wi.search}),30),Wi.forum.attribute("showLanguageSelector")&&Object.keys(Wi.data.locales).length>1){var e=[],n=function(t){e.push(m(yt,{active:Wi.data.locale===t,icon:Wi.data.locale!==t||"fas fa-check",onclick:function(){Wi.session.user?Wi.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())}},Wi.data.locales[t]))};for(var r in Wi.data.locales)n(r);t.add("locale",m(he,{buttonClassName:"Button Button--link",accessibleToggleLabel:Wi.translator.trans("core.forum.header.locale_dropdown_accessible_label")},e),20)}return Wi.session.user?(t.add("notifications",m(xe,{state:Wi.notifications}),10),t.add("session",m(ce,null),0)):(Wi.forum.attribute("allowSignUp")&&t.add("signUp",m(yt,{className:"Button Button--link",onclick:function(){return Wi.modal.show(Lt)}},Wi.translator.trans("core.forum.header.sign_up_link")),10),t.add("logIn",m(yt,{className:"Button Button--link",onclick:function(){return Wi.modal.show(Mt)}},Wi.translator.trans("core.forum.header.log_in_link")),0)),t},e}(E),Be=function(t){function e(){return t.apply(this,arguments)||this}return w(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:Bt("")},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={}),!!N(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"===Wi.screen()},e.composingReplyTo=function(t){return this.isVisible()&&this.bodyMatches(Tt,{discussion:t})},e.preventExit=function(){if(this.isVisible()&&this.onExit)return this.onExit.callback()?!confirm(this.onExit.message):void 0},e.preventClosingWhen=function(t,e){this.onExit={callback:t,message:e}},e.minimumHeight=function(){return 200},e.maximumHeight=function(){return $(window).height()-$("#header").outerHeight()},e.computedHeight=function(){return this.position===t.Position.MINIMIZED?"":this.position===t.Position.FULLSCREEN?$(window).height():Math.max(this.minimumHeight(),Math.min(this.height,this.maximumHeight()))},t}();Ie.Position={HIDDEN:"hidden",NORMAL:"normal",MINIMIZED:"minimized",FULLSCREEN:"fullScreen"};const Oe=Ie;var Le=function(t){function e(){return t.apply(this,arguments)||this}w(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,r=t.componentClass;return m("div",{className:"Composer "+M(e)},m("div",{className:"Composer-handle",oncreate:this.configHandle.bind(this)}),m("ul",{className:"Composer-controls"},H(this.controlItems().toArray())),m("div",{className:"Composer-content",onclick:n},r&&m(r,Object.assign({},t.attrs,{composer:this.state,disabled:e.minimized}))))},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.state.position===this.prevPosition?this.updateHeight():(this.animatePositionChange(),this.prevPosition=this.state.position)},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.initializeHeight(),this.$().hide().css("bottom",-this.state.computedHeight()),this.$().on("focus blur",":input,.TextEditor-editorContainer",(function(t){n.active="focusin"===t.type,m.redraw()})),this.$().on("keydown",":input,.TextEditor-editorContainer","esc",(function(){return n.state.close()})),this.handlers={},$(window).on("resize",this.handlers.onresize=this.updateHeight.bind(this)).resize(),$(document).on("mousemove",this.handlers.onmousemove=this.onmousemove.bind(this)).on("mouseup",this.handlers.onmouseup=this.onmouseup.bind(this))},n.onremove=function(e){t.prototype.onremove.call(this,e),$(window).off("resize",this.handlers.onresize),$(document).off("mousemove",this.handlers.onmousemove).off("mouseup",this.handlers.onmouseup)},n.configHandle=function(t){var e=this;$(t.dom).css("cursor","row-resize").bind("dragstart mousedown",(function(t){return t.preventDefault()})).mousedown((function(t){e.mouseStart=t.clientY,e.heightStart=e.$().height(),e.handle=$(this),$("body").css("cursor","row-resize")}))},n.onmousemove=function(t){if(this.handle){var e=this.mouseStart-t.clientY;this.changeHeight(this.heightStart+e);var n=$(window).scrollTop(),r=n>0&&n+$(window).height()>=$(document).height();this.updateBodyPadding(r)}},n.onmouseup=function(){this.handle&&(this.handle=null,$("body").css("cursor",""))},n.focus=function(){this.$(".Composer-content :input:enabled:visible, .TextEditor-editor").first().focus()},n.updateHeight=function(){var t=this.state.computedHeight(),e=this.$(".Composer-flexible");if(this.$().height(t),e.length){var n=e.offset().top-this.$().offset().top,r=parseInt(e.css("padding-bottom"),10),i=this.$(".Composer-footer").outerHeight(!0);e.height(this.$().outerHeight()-n-r-i)}},n.updateBodyPadding=function(){var t=this.state.position!==Oe.Position.HIDDEN&&this.state.position!==Oe.Position.MINIMIZED&&"phone"!==Wi.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"===Wi.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 B;return this.state.position===Oe.Position.FULLSCREEN?t.add("exitFullScreen",m(Be,{icon:"fas fa-compress",title:Wi.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",m(Be,{icon:"fas fa-minus minimize",title:Wi.translator.trans("core.forum.composer.minimize_tooltip"),onclick:this.state.minimize.bind(this.state),itemClassName:"App-backControl"})),t.add("fullScreen",m(Be,{icon:"fas fa-expand",title:Wi.translator.trans("core.forum.composer.full_screen_tooltip"),onclick:this.state.fullScreen.bind(this.state)}))),t.add("close",m(Be,{icon:"fas fa-times",title:Wi.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}(E),Me=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(t){var e,n,r,i,o,s=this,a=this.attrs.notification,u=null!=(e=null==(n=this.href)?void 0:n.call(this))?e:"",l=a.fromUser();return m(G,{className:M("Notification","Notification--"+a.contentType(),[!a.isRead()&&"unread"]),href:u,external:u.includes("://"),onclick:this.markAsRead.bind(this)},Y(l||null),nt(null==(r=this.icon)?void 0:r.call(this),{className:"Notification-icon"}),m("span",{className:"Notification-title"},m("span",{className:"Notification-content"},null==(i=this.content)?void 0:i.call(this)),m("span",{className:"Notification-title-spring"}),lt(a.createdAt())),!a.isRead()&&m(yt,{className:"Notification-action Button Button--link",icon:"fas fa-check",title:Wi.translator.trans("core.forum.notifications.mark_as_read_tooltip"),onclick:function(t){t.preventDefault(),t.stopPropagation(),s.markAsRead()}}),m("div",{className:"Notification-excerpt"},null==(o=this.excerpt)?void 0:o.call(this)))},n.markAsRead=function(){var t,e;this.attrs.notification.isRead()||(null==(t=Wi.session.user)||t.pushAttributes({unreadNotificationCount:(null!=(e=Wi.session.user.unreadNotificationCount())?e:1)-1}),this.attrs.notification.save({isRead:!0}))},e}(E),$e=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-pencil-alt"},n.href=function(){var t=this.attrs.notification,e=t.subject();return e?Wi.route.discussion(e,t.content().postNumber):"#"},n.content=function(){return Wi.translator.trans("core.forum.notifications.discussion_renamed_text",{user:this.attrs.notification.fromUser()})},n.excerpt=function(){return null},e}(Me);function je(t){Wi.composer.isFullScreen()&&(Wi.composer.minimize(),t.stopPropagation())}var Re=function(t){function e(){return t.apply(this,arguments)||this}w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.submitLabel=e.submitLabel||Wi.translator.trans("core.forum.composer_edit.submit_button"),e.confirmExit=e.confirmExit||Wi.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(G,{href:Wi.route.discussion(n.discussion(),n.number()),onclick:je},Wi.translator.trans("core.forum.composer_edit.post_link",{number:n.number(),discussion:n.discussion().title()})))),e},n.jumpToPreview=function(t){je(t),m.route.set(Wi.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(Wi.viewingDiscussion(e))Wi.current.get("stream").goToNumber(n.number());else var r=Wi.alerts.show({type:"success",controls:[m(yt,{className:"Button Button--link",onclick:function(){m.route.set(Wi.route.post(n)),Wi.alerts.dismiss(r)}},Wi.translator.trans("core.forum.composer_edit.view_button"))]},Wi.translator.trans("core.forum.composer_edit.edited_message"));t.composer.hide()}),this.loaded.bind(this))},e}(kt);const He={controls:function(t,e){var n=this,r=new B;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(O,null)))})),r},userControls:function(t,e){return new B},moderationControls:function(t,e){var n=new B;return"comment"===t.contentType()&&t.canEdit()&&(t.isHidden()||n.add("edit",m(yt,{icon:"fas fa-pencil-alt",onclick:this.editAction.bind(t)},Wi.translator.trans("core.forum.post_controls.edit_button")))),n},destructiveControls:function(t,e){var n=new B;return"comment"!==t.contentType()||t.isHidden()?("comment"===t.contentType()&&t.canHide()&&n.add("restore",m(yt,{icon:"fas fa-reply",onclick:this.restoreAction.bind(t)},Wi.translator.trans("core.forum.post_controls.restore_button"))),t.canDelete()&&n.add("delete",m(yt,{icon:"fas fa-times",onclick:this.deleteAction.bind(t,e)},Wi.translator.trans("core.forum.post_controls.delete_forever_button")))):t.canHide()&&n.add("hide",m(yt,{icon:"far fa-trash-alt",onclick:this.hideAction.bind(t)},Wi.translator.trans("core.forum.post_controls.delete_button"))),n},editAction:function(){var t=this;return new Promise((function(e){return Wi.composer.load(Re,{post:t}),Wi.composer.show(),e()}))},hideAction:function(){if(confirm(ot(Wi.translator.trans("core.forum.post_controls.hide_confirmation"))))return this.pushData({attributes:{hiddenAt:new Date},relationships:{hiddenUser:Wi.session.user}}),this.save({isHidden:!0}).then((function(){return m.redraw()}))},restoreAction:function(){return this.pushData({attributes:{hiddenAt:null},relationships:{hiddenUser:null}}),this.save({isHidden:!1}).then((function(){return m.redraw()}))},deleteAction:function(t){var e=this;if(confirm(ot(Wi.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||(Wi.discussions.removeDiscussion(t),Wi.viewingDiscussion(t)&&Wi.history.back())})).catch((function(){})).then((function(){t&&(t.loading=!1),m.redraw()}))}};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).loading=!1,e.subtree=void 0,e}w(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}))},n.view=function(t){var 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.viewItems(n,r).toArray()))},n.viewItems=function(t,e){var n=this,r=new B;return r.add("content",this.loading?m(ft,null):this.content(),100),r.add("actions",m("aside",{className:"Post-actions"},m("ul",null,H(this.actionItems().toArray()),!!t.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 n.$(".Post-controls").addClass("open")},onhide:function(){return n.$(".Post-controls").removeClass("open")},accessibleToggleLabel:Wi.translator.trans("core.forum.post_controls.toggle_dropdown_accessible_label")},t)))),90),r.add("footer",m("footer",{className:"Post-footer"},e.length>0?m("ul",null,H(e)):m("ul",null)),80),r},n.onbeforeupdate=function(e){return t.prototype.onbeforeupdate.call(this,e),this.subtree.needsRebuild()},n.onupdate=function(e){t.prototype.onupdate.call(this,e);var n=this.$(".Post-actions"),r=this.$(".Post-controls");n.toggleClass("openWithin",r.hasClass("open"))},n.elementAttrs=function(){return{}},n.content=function(){return[]},n.classes=function(t){var e=(t||"").split(" ").concat(["Post"]),n=this.attrs.post.user(),r=this.attrs.post.discussion();return this.loading&&e.push("Post--loading"),n&&n===Wi.session.user&&e.push("Post--by-actor"),n&&n===r.user()&&e.push("Post--by-start-user"),e},n.actionItems=function(){return new B},n.footerItems=function(){return new B},e}(E),qe=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.group&&(e.icon=e.group.icon()||"",e.color=e.group.color()||"",e.label=void 0===e.label?e.group.nameSingular():e.label,e.type="group--"+e.group.id(),delete e.group)},e}(be),ze=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.nameSingular=function(){return fe.attribute("nameSingular").call(this)},n.namePlural=function(){return fe.attribute("namePlural").call(this)},n.color=function(){return fe.attribute("color").call(this)},n.icon=function(){return fe.attribute("icon").call(this)},n.isHidden=function(){return fe.attribute("isHidden").call(this)},e}(fe);ze.ADMINISTRATOR_ID="1",ze.GUEST_ID="2",ze.MEMBER_ID="3";var Ve=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}w(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=Bt(r.username()||""),this.email=Bt(r.email()||""),this.isEmailConfirmed=Bt(r.isEmailConfirmed()||!1),this.setPassword=Bt(!1),this.password=Bt(r.password()||"");var i=r.groups()||[];v.store.all("groups").filter((function(t){return![ze.GUEST_ID,ze.MEMBER_ID].includes(t.id())})).forEach((function(t){return n.groups[t.id()]=Bt(i.includes(t))}))},n.className=function(){return"EditUserModal Modal--small"},n.title=function(){return v.translator.trans("core.lib.edit_user.title")},n.content=function(){var t=this.fields().toArray();return m("div",{className:"Modal-body"},t.length>1?m("div",{className:"Form"},this.fields().toArray()):v.translator.trans("core.lib.edit_user.nothing_available"))},n.fields=function(){var t=this,e=new B;return this.attrs.user.canEditCredentials()&&(e.add("username",m("div",{className:"Form-group"},m("label",null,v.translator.trans("core.lib.edit_user.username_heading")),m("input",{className:"FormControl",placeholder:ot(v.translator.trans("core.lib.edit_user.username_label")),bidi:this.username,disabled:this.nonAdminEditingAdmin()})),40),v.session.user!==this.attrs.user&&(e.add("email",m("div",{className:"Form-group"},m("label",null,v.translator.trans("core.lib.edit_user.email_heading")),m("div",null,m("input",{className:"FormControl",placeholder:ot(v.translator.trans("core.lib.edit_user.email_label")),bidi:this.email,disabled:this.nonAdminEditingAdmin()})),!this.isEmailConfirmed()&&this.userIsAdmin(v.session.user)&&m("div",null,m(yt,{className:"Button Button--block",loading:this.loading,onclick:this.activate.bind(this)},v.translator.trans("core.lib.edit_user.activate_button")))),30),e.add("password",m("div",{className:"Form-group"},m("label",null,v.translator.trans("core.lib.edit_user.password_heading")),m("div",null,m("label",{className:"checkbox"},m("input",{type:"checkbox",onchange:function(e){var n=e.target;t.setPassword(n.checked),m.redraw.sync(),n.checked&&t.$("[name=password]").select(),e.redraw=!1},disabled:this.nonAdminEditingAdmin()}),v.translator.trans("core.lib.edit_user.set_password_label")),this.setPassword()&&m("input",{className:"FormControl",type:"password",name:"password",placeholder:ot(v.translator.trans("core.lib.edit_user.password_label")),bidi:this.password,disabled:this.nonAdminEditingAdmin()}))),20))),this.attrs.user.canEditGroups()&&e.add("groups",m("div",{className:"Form-group EditUserModal-groups"},m("label",null,v.translator.trans("core.lib.edit_user.groups_heading")),m("div",null,Object.keys(this.groups).map((function(t){return v.store.getById("groups",t)})).filter(Boolean).map((function(e){return e&&m("label",{className:"checkbox"},m("input",{type:"checkbox",bidi:t.groups[e.id()],disabled:e.id()===ze.ADMINISTRATOR_ID&&(t.attrs.user===v.session.user||!t.userIsAdmin(v.session.user))}),m(qe,{group:e,label:null})," ",e.nameSingular())})))),10),e.add("submit",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary",type:"submit",loading:this.loading},v.translator.trans("core.lib.edit_user.submit_button"))),-10),e},n.activate=function(){var t=this;this.loading=!0;var e={username:this.username(),isEmailConfirmed:!0};this.attrs.user.save(e,{errorHandler:this.onerror.bind(this)}).then((function(){t.isEmailConfirmed(!0),t.loading=!1,m.redraw()})).catch((function(){t.loading=!1,m.redraw()}))},n.data=function(){var t=this,e={},n={};return this.attrs.user.canEditCredentials()&&!this.nonAdminEditingAdmin()&&(e.username=this.username(),v.session.user!==this.attrs.user&&(e.email=this.email()),this.setPassword()&&(e.password=this.password())),this.attrs.user.canEditGroups()&&(n.groups=Object.keys(this.groups).filter((function(e){return t.groups[e]()})).map((function(t){return v.store.getById("groups",t)})).filter((function(t){return t instanceof ze}))),e.relationships=n,e},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0,this.attrs.user.save(this.data(),{errorHandler:this.onerror.bind(this)}).then(this.hide.bind(this)).catch((function(){e.loading=!1,m.redraw()}))},n.nonAdminEditingAdmin=function(){return this.userIsAdmin(this.attrs.user)&&!this.userIsAdmin(v.session.user)},n.userIsAdmin=function(t){return!!((null==t?void 0:t.groups())||[]).some((function(t){return(null==t?void 0:t.id())===ze.ADMINISTRATOR_ID}))},e}(_t),We=function(t){function e(){return t.apply(this,arguments)||this}w(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}(E),Ge=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).user=null,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.bodyClass="App--user"},n.view=function(){return m("div",{className:"UserPage"},this.user?[m(Xe,{user:this.user,className:"Hero UserHero",editable:this.user.canEdit()||this.user===Wi.session.user,controlsButtonClassName:"Button"}),m("div",{className:"container"},m("div",{className:"sideNavContainer"},m(We,null,m("nav",{className:"sideNav UserPage-nav"},m("ul",null,H(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,Wi.current.set("user",t),Wi.setTitle(t.displayName()),m.redraw()},n.loadUser=function(t){var e=this,n=t.toLowerCase();Wi.preloadedApiDocument(),Wi.store.all("users").some((function(r){return!(r.username().toLowerCase()!==n&&r.id()!==t||!r.joinTime()||(e.show(r),0))})),this.user||Wi.store.find("users",t,{bySlug:!0}).then(this.show.bind(this))},n.sidebarItems=function(){var t=new B;return t.add("nav",m(he,{className:"App-titleControl",buttonClassName:"Button"},this.navItems().toArray())),t},n.navItems=function(){var t=new B,e=this.user,n=Wi.session.user===e;return t.add("posts",m(le,{href:Wi.route("user.posts",{username:e.slug()}),icon:"far fa-comment"},Wi.translator.trans("core.forum.user.posts_link")," ",m("span",{className:"Button-badge"},e.commentCount())),100),t.add("discussions",m(le,{href:Wi.route("user.discussions",{username:e.slug()}),icon:"fas fa-bars"},Wi.translator.trans("core.forum.user.discussions_link")," ",m("span",{className:"Button-badge"},e.discussionCount())),90),n&&(t.add("separator",m(O,null),-90),t.add("settings",m(le,{href:Wi.route("settings"),icon:"fas fa-cog"},Wi.translator.trans("core.forum.user.settings_link")),-100)),(n||Wi.forum.attribute("canModerateAccessTokens"))&&(n||t.add("security-separator",m(O,null),-90),t.add("security",m(le,{href:Wi.route("user.security",{username:e.slug()}),icon:"fas fa-shield-alt"},Wi.translator.trans("core.forum.user.security_link")),-100)),t},e}(S);const Ye={controls:function(t,e){var n=this,r=new B;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(O,null)))})),r},userControls:function(){return new B},moderationControls:function(t){var e=new B;return(t.canEdit()||t.canEditCredentials()||t.canEditGroups())&&e.add("edit",m(yt,{icon:"fas fa-pencil-alt",onclick:this.editAction.bind(this,t)},Wi.translator.trans("core.forum.user_controls.edit_button"))),e},destructiveControls:function(t){var e=new B;return"1"!==t.id()&&t.canDelete()&&e.add("delete",m(yt,{icon:"fas fa-times",onclick:this.deleteAction.bind(this,t)},Wi.translator.trans("core.forum.user_controls.delete_button"))),e},deleteAction:function(t){var e=this;confirm(Wi.translator.trans("core.forum.user_controls.delete_confirmation"))&&t.delete().then((function(){e.showDeletionAlert(t,"success"),Wi.current.matches(Ge,{user:t})?Wi.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];Wi.alerts.show({type:e},Wi.translator.trans(n,{user:t,email:t.email()}))},editAction:function(t){Wi.modal.show(Ve,{user:t})}};var Ke=function(t){function e(){return t.apply(this,arguments)||this}w(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:M(["AvatarEditor","Dropdown",this.attrs.className,this.loading&&"loading",this.isDraggedOver&&"dragover"])},Y(t,{loading:"eager"}),m("a",{className:t.avatarUrl()?"Dropdown-toggle":"Dropdown-toggle AvatarEditor--noAvatar",title:Wi.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"},H(this.controlItems().toArray())))},n.controlItems=function(){var t=new B;return t.add("upload",m(yt,{icon:"fas fa-upload",onclick:this.openPicker.bind(this)},Wi.translator.trans("core.forum.user.avatar_upload_button"))),t.add("remove",m(yt,{icon:"fas fa-times",onclick:this.remove.bind(this)},Wi.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(),Wi.request({method:"POST",url:Wi.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(),Wi.request({method:"DELETE",url:Wi.forum.attribute("apiUrl")+"/users/"+t.id()+"/avatar"}).then(this.success.bind(this),this.failure.bind(this))},n.success=function(t){Wi.store.pushPayload(t),delete this.attrs.user.avatarColor,this.loading=!1,m.redraw()},n.failure=function(t){this.loading=!1,m.redraw()},e}(E),Xe=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.user,e=Ye.controls(t,this).toArray(),n=t.color(),r=t.badges().toArray();return m("div",{className:M("UserCard",this.attrs.className),style:n&&{"--usercard-bg":n}},m("div",{className:"darkenBackground"},m("div",{className:"container"},!!e.length&&m(ut,{className:"UserCard-controls App-primaryControl",menuClassName:"Dropdown-menu--right",buttonClassName:this.attrs.controlsButtonClassName,label:Wi.translator.trans("core.forum.user_controls.button"),accessibleToggleLabel:Wi.translator.trans("core.forum.user_controls.toggle_dropdown_accessible_label"),icon:"fas fa-ellipsis-v"},e),m("div",{className:"UserCard-profile"},m("h1",{className:"UserCard-identity"},this.attrs.editable?m("[",null,m(Ke,{user:t,className:"UserCard-avatar"})," ",Xt(t)):m(G,{href:Wi.route.user(t)},m("div",{className:"UserCard-avatar"},Y(t,{loading:"eager"})),Xt(t))),!!r.length&&m("ul",{className:"UserCard-badges badges"},H(r)),m("ul",{className:"UserCard-info"},H(this.infoItems().toArray()))))))},n.infoItems=function(){var t=new B,e=this.attrs.user,n=e.lastSeenAt();if(n){var r=e.isOnline();t.add("lastSeen",m("span",{className:M("UserCard-lastSeen",{online:r})},r?[nt("fas fa-circle")," ",Wi.translator.trans("core.forum.user.online_text")]:[nt("far fa-clock")," ",st(n)]),100)}return t.add("joined",Wi.translator.trans("core.forum.user.joined_date_text",{ago:st(e.joinTime())}),90),t},e}(E);function Je(t){return t.lastSeenAt()&&t.isOnline()?m("span",{className:"UserOnline"},nt("fas fa-circle")):null}var Qe=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.post,e=t.user();return e?m("div",{className:"PostUser"},m("h3",{className:"PostUser-name"},m(G,{href:Wi.route.user(e)},Y(e,{className:"PostUser-avatar"}),Je(e),Xt(e))),m("ul",{className:"PostUser-badges badges"},H(e.badges().toArray())),!t.isHidden()&&this.attrs.cardVisible&&m(Xe,{user:e,className:"UserCard--popover",controlsButtonClassName:"Button Button--icon Button--flat"})):m("div",{className:"PostUser"},m("h3",{className:"PostUser-name"},Y(e,{className:"PostUser-avatar"})," ",Xt(e)))},n.oncreate=function(e){var n,r=this;t.prototype.oncreate.call(this,e),this.$().on("mouseover",".PostUser-name a, .UserCard",(function(){clearTimeout(n),n=setTimeout(r.showCard.bind(r),500)})).on("mouseout",".PostUser-name a, .UserCard",(function(){clearTimeout(n),n=setTimeout(r.hideCard.bind(r),250)}))},n.showCard=function(){var t=this;this.attrs.oncardshow(),setTimeout((function(){return t.$(".UserCard").addClass("in")}))},n.hideCard=function(){var t=this;this.$(".UserCard").removeClass("in").one("transitionend webkitTransitionEnd oTransitionEnd",(function(){t.attrs.oncardhide()}))},e}(E);function Ze(t){var e=it()(t),n=e.format(),r=e.format("LLLL");return m("time",{pubdate:!0,datetime:n},r)}var tn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).ip=void 0,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.ip=this.attrs.ip||""},n.view=function(){return m("span",{className:"IPAddress"},this.viewItems().toArray())},n.viewItems=function(){var t=new B;return t.add("ip",m("span",null,this.ip),100),t},e}(E),en=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){return m("div",{className:"Dropdown PostMeta"},this.viewItems().toArray())},n.getPermalink=function(t){return Wi.forum.attribute("baseOrigin")+Wi.route.post(t)},n.selectPermalink=function(t){var e=this;setTimeout((function(){return $(e.element).parent().find(".PostMeta-permalink").select()})),t.redraw=!1},n.viewItems=function(){var t=this,e=new B,n=this.attrs.post.createdAt();return e.add("time",m("a",{className:"Dropdown-toggle",onclick:function(e){return t.selectPermalink(e)},"data-toggle":"dropdown"},lt(n)),100),e.add("meta-dropdown",m("div",{className:"Dropdown-menu dropdown-menu"},this.metaItems().toArray()),90),e},n.metaItems=function(){var t=new B,e=this.attrs.post,n="ontouchstart"in document.documentElement,r=this.getPermalink(e),i=e.createdAt();return t.add("post-number",m("span",{className:"PostMeta-number"},Wi.translator.trans("core.forum.post.number_tooltip",{number:e.number()})," "),100),t.add("post-time",m("span",{className:"PostMeta-time"},Ze(i)),90),t.add("post-ip",m("span",{className:"PostMeta-ip"},m(tn,{ip:e.data.attributes.ipAddress})),80),t.add("permalink",n?m("a",{className:"Button PostMeta-permalink",href:r},r):m("input",{className:"FormControl PostMeta-permalink",value:r,onclick:function(t){return t.stopPropagation()}}),0),t},e}(E),nn=function(t){function e(){return t.apply(this,arguments)||this}w(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=Wi.translator.trans("core.forum.post.edited_tooltip",{user:e,ago:st(t.editedAt())});return m(Et,{text:n},m("span",{className:"PostEdited"},Wi.translator.trans("core.forum.post.edited_text")))},n.oncreate=function(e){t.prototype.oncreate.call(this,e)},e}(E),rn=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.revealContent=!1,this.cardVisible=!1,this.subtree.check((function(){return n.cardVisible}),(function(){return n.isEditing()}),(function(){return n.revealContent}))},n.content=function(){return t.prototype.content.call(this).concat(this.contentItems().toArray())},n.contentItems=function(){var t=new B;return t.add("header",m("header",{className:"Post-header"},m("ul",null,H(this.headerItems().toArray()))),100),t.add("body",m("div",{className:"Post-body"},this.bodyItems().toArray()),90),t},n.bodyItems=function(){var t=new B;return t.add("content",this.isEditing()?m(Jt,{className:"Post-preview",composer:Wi.composer}):m.trust(this.attrs.post.contentHtml()),100),t},n.refreshContent=function(){var t=this.isEditing()?"":this.attrs.post.contentHtml();this.contentHtml!==t&&this.$(".Post-body script").each((function(){var t=document.createElement("script");t.textContent=this.textContent,Array.from(this.attributes).forEach((function(e){return t.setAttribute(e.name,e.value)})),this.parentNode.replaceChild(t,this)})),this.contentHtml=t},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.refreshContent()},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.refreshContent()},n.isEditing=function(){return Wi.composer.bodyMatches(Re,{post:this.attrs.post})},n.elementAttrs=function(){var e=this.attrs.post,n=t.prototype.elementAttrs.call(this);return n.className=M(n.className,"CommentPost",{"Post--renderFailed":e.renderFailed(),"Post--hidden":e.isHidden(),"Post--edited":e.isEdited(),revealContent:this.revealContent,editing:this.isEditing()}),this.isEditing()&&(n["aria-busy"]="true"),n},n.toggleContent=function(){this.revealContent=!this.revealContent},n.headerItems=function(){var t=this,e=new B,n=this.attrs.post;return e.add("user",m(Qe,{post:n,cardVisible:this.cardVisible,oncardshow:function(){t.cardVisible=!0,m.redraw()},oncardhide:function(){t.cardVisible=!1,m.redraw()}}),100),e.add("meta",m(en,{post:n})),n.isEdited()&&!n.isHidden()&&e.add("edited",m(nn,{post:n})),n.isHidden()&&e.add("toggle",m(yt,{className:"Button Button--default Button--more",icon:"fas fa-ellipsis-h",onclick:this.toggleContent.bind(this)})),e},e}(Ue),on=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.elementAttrs=function(){var e=t.prototype.elementAttrs.call(this);return e.className=M(e.className,"EventPost",Q(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(G,{className:"EventPost-user",href:Wi.route.user(e)},n):n,time:lt(this.attrs.post.createdAt())});return t.prototype.content.call(this).concat([nt(this.icon(),{className:"EventPost-icon"}),m("div",{className:"EventPost-info"},this.description(r))])},n.icon=function(){return""},n.description=function(t){return Wi.translator.trans(this.descriptionKey(),t)},n.descriptionKey=function(){return""},n.descriptionData=function(){return{}},e}(Ue),sn=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-pencil-alt"},n.description=function(t){var e=Wi.translator.trans("core.forum.post_stream.discussion_renamed_text",t);return m("span",null,e)},n.descriptionData=function(){var t=this.attrs.post,e=t.content()[0],n=t.content()[1];return{new:m(Et,{text:ot(Wi.translator.trans("core.forum.post_stream.discussion_renamed_old_tooltip",{old:e}))},m("strong",{className:"DiscussionRenamedPost-new"},n))}},e}(on),an="welcomeHidden",un=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}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e)},n.view=function(t){return this.isHidden()?null:m("header",{className:"Hero WelcomeHero"},m("div",{className:"container"},this.viewItems().toArray()))},n.hide=function(){localStorage.setItem(an,"true")},n.isHidden=function(){var t;return null==(t=Wi.forum.attribute("welcomeTitle"))||!t.trim()||!!localStorage.getItem(an)||!!this.hidden},n.viewItems=function(){var t=this,e=new B;return e.add("dismiss-button",m(yt,{icon:"fas fa-times",onclick:function(){t.$().slideUp(t.hide.bind(t))},className:"Hero-close Button Button--icon Button--link","aria-label":Wi.translator.trans("core.forum.welcome_hero.hide")}),100),e.add("content",m("div",{className:"containerNarrow"},this.contentItems().toArray()),80),e},n.contentItems=function(){var t=new B;return t.add("title",m("h1",{className:"Hero-title"},Wi.forum.attribute("welcomeTitle")),100),t.add("subtitle",m("div",{className:"Hero-subtitle"},m.trust(Wi.forum.attribute("welcomeMessage")))),t},e}(E),ln=function(t){function e(){return t.apply(this,arguments)||this}w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.placeholder=e.placeholder||ot(Wi.translator.trans("core.forum.composer_discussion.body_placeholder")),e.submitLabel=e.submitLabel||Wi.translator.trans("core.forum.composer_discussion.submit_button"),e.confirmExit=e.confirmExit||ot(Wi.translator.trans("core.forum.composer_discussion.discard_confirmation")),e.titlePlaceholder=e.titlePlaceholder||ot(Wi.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||Bt(""),this.title=this.composer.fields.title},n.headerItems=function(){var e=t.prototype.headerItems.call(this);return e.add("title",m("h3",null,Wi.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();Wi.store.createRecord("discussions").save(e).then((function(e){t.composer.hide(),Wi.discussions.refresh(),m.route.set(Wi.route.discussion(e))}),this.loaded.bind(this))},e}(kt),cn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).lastDiscussion=void 0,e}w(e,t);var n=e.prototype;return n.oninit=function(n){t.prototype.oninit.call(this,n),Wi.previous.matches(ae)&&(this.lastDiscussion=Wi.previous.get("discussion")),Wi.previous.matches(e)&&Wi.discussions.clear(),Wi.discussions.refreshParams(Wi.search.params(),m.route.param("page")&&Number(m.route.param("page"))||1),Wi.history.push("index",ot(Wi.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,H(this.sidebarItems().toArray()))),m("div",{className:"IndexPage-results sideNavOffset"},this.contentItems().toArray()))))},n.contentItems=function(){var t=new B;return t.add("toolbar",m("div",{className:"IndexPage-toolbar"},this.toolbarItems().toArray()),100),t.add("discussionList",m(Vt,{state:Wi.discussions}),90),t},n.toolbarItems=function(){var t=new B;return t.add("view",m("ul",{className:"IndexPage-toolbar-view"},H(this.viewItems().toArray())),100),t.add("action",m("ul",{className:"IndexPage-toolbar-action"},H(this.actionItems().toArray())),90),t},n.setTitle=function(){Wi.setTitle(ot(Wi.translator.trans("core.forum.index.meta_title_text"))),Wi.setTitleCount(0)},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.setTitle();var n=Wi.cache.heroHeight,r=Wi.cache.heroHeight=this.$(".Hero").outerHeight()||0,i=Wi.cache.scrollTop;if($("#app").css("min-height",($(window).height()||0)+r),null!=Wi.previous.type&&(this.lastDiscussion?$(window).scrollTop(i-n+r):$(window).scrollTop(0),this.lastDiscussion)){var o=this.$('li[data-id="'+this.lastDiscussion.id()+'"] .DiscussionListItem');if(o.length){var s=$("#header").outerHeight()||0,a=$(window).height()||0,u=o.offset(),l=u&&u.top||0,c=l+(o.outerHeight()||0);(l<i+s||c>i+a)&&$(window).scrollTop(l-s)}}},n.onbeforeremove=function(e){t.prototype.onbeforeremove.call(this,e),Wi.cache.scrollTop=$(window).scrollTop()},n.onremove=function(e){t.prototype.onremove.call(this,e),$("#app").css("min-height","")},n.hero=function(){return m(un,null)},n.sidebarItems=function(){var t=this,e=new B,n=Wi.forum.attribute("canStartDiscussion")||!Wi.session.user;return e.add("newDiscussion",m(yt,{icon:"fas fa-edit",className:"Button Button--primary IndexPage-newDiscussion",itemClassName:"App-primaryControl",onclick:function(){return t.newDiscussionAction().catch((function(){}))},disabled:!n},Wi.translator.trans("core.forum.index."+(n?"start_discussion_button":"cannot_start_discussion_button")))),e.add("nav",m(he,{buttonClassName:"Button",className:"App-titleControl",accessibleToggleLabel:Wi.translator.trans("core.forum.index.toggle_sidenav_dropdown_accessible_label")},this.navItems().toArray())),e},n.navItems=function(){var t=new B,e=Wi.search.stickyParams();return t.add("allDiscussions",m(le,{href:Wi.route("index",e),icon:"far fa-comments"},Wi.translator.trans("core.forum.index.all_discussions_link")),100),t},n.viewItems=function(){var t=new B,e=Wi.discussions.sortMap(),n=Object.keys(e).reduce((function(t,e){return t[e]=Wi.translator.trans("core.forum.index_sort."+e+"_button"),t}),{});return t.add("sort",m(ut,{buttonClassName:"Button",label:n[Wi.search.params().sort]||Object.keys(e).map((function(t){return n[t]}))[0],accessibleToggleLabel:Wi.translator.trans("core.forum.index_sort.toggle_dropdown_accessible_label")},Object.keys(n).map((function(t){var r=n[t],i=(Wi.search.params().sort||Object.keys(e)[0])===t;return m(yt,{icon:!i||"fas fa-check",onclick:Wi.search.changeSort.bind(Wi.search,t),active:i},r)})))),t},n.actionItems=function(){var t=new B;return t.add("refresh",m(yt,{title:Wi.translator.trans("core.forum.index.refresh_tooltip"),icon:"fas fa-sync",className:"Button Button--icon",onclick:function(){Wi.discussions.refresh(),Wi.session.user&&(Wi.store.find("users",Wi.session.user.id()),m.redraw())}})),Wi.session.user&&t.add("markAllAsRead",m(yt,{title:Wi.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 Wi.session.user?(Wi.composer.load(ln,{user:Wi.session.user}),Wi.composer.show(),t(Wi.composer)):(Wi.modal.show(Mt),e())}))},n.markAllAsRead=function(){var t;confirm(ot(Wi.translator.trans("core.forum.index.mark_all_as_read_confirmation")))&&(null==(t=Wi.session.user)||t.save({markedAllAsReadAt:new Date}))},e}(S);cn.providesInitialSearch=!0;var dn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).loading=!0,e.moreResults=!1,e.posts=[],e.loadLimit=20,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.loadUser(m.route.param("username"))},n.content=function(){var t,e=this;return 0!==this.posts.length||this.loading?(this.loading?t=m(ft,null):this.moreResults&&(t=m("div",{className:"PostsUserPage-loadMore"},m(yt,{className:"Button",onclick:this.loadMore.bind(this)},Wi.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"},Wi.translator.trans("core.forum.user.in_discussion_text",{discussion:m(G,{href:Wi.route.post(t)},e.discussionTitle(t))})),m(rn,{post:t}))}))),m("div",{className:"PostsUserPage-loadMore"},t))):m("div",{className:"PostsUserPage"},m(zt,{text:Wi.translator.trans("core.forum.user.posts_empty_text")}))},n.show=function(e){t.prototype.show.call(this,e),this.refresh()},n.refresh=function(){this.loading=!0,this.posts=[],m.redraw(),this.loadResults().then(this.parseResults.bind(this))},n.loadResults=function(t){return void 0===t&&(t=0),Wi.store.find("posts",{filter:{author:this.user.username(),type:"comment"},page:{offset:t,limit:this.loadLimit},sort:"-createdAt"})},n.loadMore=function(){this.loading=!0,this.loadResults(this.posts.length).then(this.parseResults.bind(this))},n.parseResults=function(t){var e;return this.loading=!1,(e=this.posts).push.apply(e,t),this.moreResults=t.length>=this.loadLimit,m.redraw(),t},n.discussionTitle=function(t){return t.discussion().title()},e}(Ge),hn=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=D({},e,{page:D({},e.page,{offset:this.pageSize*(t-1)}),include:n});return v.store.find(this.type,r)},e.requestParams=function(){return this.params},e.refreshParams=function(t,e){return this.isEmpty()||this.paramsChanged(t)?(this.params=t,this.refresh(e)):Promise.resolve()},e.refresh=function(t){var e=this;return void 0===t&&(t=1),this.initialLoading=!0,this.loadingPrev=!1,this.loadingNext=!1,this.clear(),this.location={page:t},this.loadPage().then((function(t){e.pages=[],e.parseResults(e.location.page,t)})).finally((function(){return e.initialLoading=!1}))},e.getPages=function(){return this.pages},e.getLocation=function(){return this.location},e.isLoading=function(){return this.initialLoading||this.loadingNext||this.loadingPrev},e.isInitialLoading=function(){return this.initialLoading},e.isLoadingPrev=function(){return this.loadingPrev},e.isLoadingNext=function(){return this.loadingNext},e.hasItems=function(){return!!this.getAllItems().length},e.isEmpty=function(){return!this.isInitialLoading()&&!this.hasItems()},e.hasPrev=function(){var t;return!(null==(t=this.pages[0])||!t.hasPrev)},e.hasNext=function(){var t;return!(null==(t=this.pages[this.pages.length-1])||!t.hasNext)},e.getParams=function(){return this.params},e.getNextPageNumber=function(){var t,e=null==(t=this.pages[this.pages.length-1])?void 0:t.number;return e&&!isNaN(e)?e+1:this.location.page},e.getPrevPageNumber=function(){var t,e=null==(t=this.pages[0])?void 0:t.number;return e&&!isNaN(e)?Math.max(e-1,1):this.location.page},e.paramsChanged=function(t){var e=this;return Object.keys(t).some((function(n){return e.getParams()[n]!==t[n]}))},e.getAllItems=function(){return this.getPages().map((function(t){return t.items})).flat()},t}(),fn=function(){function t(){this.events={},this.events={}}var e=t.prototype;return e.on=function(t,e){return this.events[t]||(this.events[t]=[]),this.events[t].push(e),this},e.emit=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.events[t]&&this.events[t].forEach((function(t){return t.apply(void 0,n)}))},t}();function pn(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 mn=new fn,vn=function(t){function e(e,n){var r;return void 0===n&&(n=1),(r=t.call(this,e,n,20)||this).extraDiscussions=[],r.eventEmitter=void 0,r.eventEmitter=mn.on("discussion.deleted",r.deleteDiscussion.bind(y(r))),r}w(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=Wi.preloadedApiDocument();return n?(this.initialLoading=!1,Promise.resolve(n)):t.prototype.loadPage.call(this,e)},n.clear=function(){t.prototype.clear.call(this),this.extraDiscussions=[]},n.sortMap=function(){var t={};return this.params.q&&(t.relevance=""),t.latest="-lastPostedAt",t.top="-commentCount",t.newest="-createdAt",t.oldest="createdAt",t},n.isSearchResults=function(){return!!this.params.q},n.removeDiscussion=function(t){this.eventEmitter.emit("discussion.deleted",t)},n.deleteDiscussion=function(t){for(var e,n=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return pn(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)?pn(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},F(e,[{key:"type",get:function(){return"discussions"}}]),e}(hn),gn=function(t){function e(){return t.apply(this,arguments)||this}w(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 vn({filter:{author:e.username()},sort:"newest"}),this.state.refresh()},n.content=function(){return m("div",{className:"DiscussionsUserPage"},m(Vt,{state:this.state}))},e}(Ge);const yn=function(t,e){return function(){e(this.getAttribute(t)||this[t])}};var bn=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(t){var e=M(["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:yn("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}(E),wn=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=M(e.className,"Checkbox--switch")},e.prototype.getDisplay=function(){return!!this.attrs.loading&&t.prototype.getDisplay.call(this)},e}(bn),Dn=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(t){return m("fieldset",{className:this.attrs.className},m("legend",null,this.attrs.label),m("ul",null,H(t.children)))},e}(E),xn=function(t){function e(){return t.apply(this,arguments)||this}w(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(bn,{state:!!e[i],loading:t.loading[i],disabled:!(i in e),onchange:t.toggle.bind(t,[i])},m("span",{className:"sr-only"},Wi.translator.trans("core.forum.settings.notification_checkbox_a11y_label_template",{description:n.label,method:r.label}))))})))}))))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$("thead .NotificationGrid-groupToggle").bind("mouseenter mouseleave",(function(t){var e=parseInt($(this).index(),10)+1;$(this).parents("table").find("td:nth-child("+e+")").toggleClass("highlighted","mouseenter"===t.type)})),this.$("tbody .NotificationGrid-groupToggle").bind("mouseenter mouseleave",(function(t){$(this).parent().find("td").toggleClass("highlighted","mouseenter"===t.type)}))},n.toggle=function(t){var e=this,n=this.attrs.user,r=n.preferences(),i=!r[t[0]];t.forEach((function(t){e.loading[t]=!0,r[t]=i})),m.redraw(),n.save({preferences:r}).then((function(){t.forEach((function(t){return e.loading[t]=!1})),m.redraw()}))},n.toggleMethod=function(t){var e=this,n=this.types.map((function(n){return e.preferenceKey(n.name,t)})).filter((function(t){return t in e.attrs.user.preferences()}));this.toggle(n)},n.toggleType=function(t){var e=this,n=this.methods.map((function(n){return e.preferenceKey(t,n.name)})).filter((function(t){return t in e.attrs.user.preferences()}));this.toggle(n)},n.preferenceKey=function(t,e){return"notify_"+t+"_"+e},n.notificationMethods=function(){var t=new B;return t.add("alert",{name:"alert",icon:"fas fa-bell",label:Wi.translator.trans("core.forum.settings.notify_by_web_heading")}),t.add("email",{name:"email",icon:"far fa-envelope",label:Wi.translator.trans("core.forum.settings.notify_by_email_heading")}),t},n.notificationTypes=function(){var t=new B;return t.add("discussionRenamed",{name:"discussionRenamed",icon:"fas fa-pencil-alt",label:Wi.translator.trans("core.forum.settings.notify_discussion_renamed_label")}),t},e}(E),Cn=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.className=function(){return"ChangePasswordModal Modal--small"},n.title=function(){return Wi.translator.trans("core.forum.change_password.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},this.fields().toArray()))},n.fields=function(){var t=new B;return t.add("help",m("p",{className:"helpText"},Wi.translator.trans("core.forum.change_password.text"))),t.add("submit",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Wi.translator.trans("core.forum.change_password.send_button")))),t},n.onsubmit=function(t){t.preventDefault(),this.loading=!0,Wi.request({method:"POST",url:Wi.forum.attribute("apiUrl")+"/forgot",body:this.requestBody()}).then(this.hide.bind(this),this.loaded.bind(this))},n.requestBody=function(){return{email:Wi.session.user.email()}},e}(_t),An=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).email=void 0,e.password=void 0,e.success=!1,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.email=Bt(Wi.session.user.email()||""),this.password=Bt("")},n.className=function(){return"ChangeEmailModal Modal--small"},n.title=function(){return Wi.translator.trans("core.forum.change_email.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},this.fields().toArray()))},n.fields=function(){var t=new B;return this.success?(t.add("help",m("p",{className:"helpText"},Wi.translator.trans("core.forum.change_email.confirmation_message",{email:m("strong",null,this.email())}))),t.add("dismiss",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},Wi.translator.trans("core.forum.change_email.dismiss_button"))))):(t.add("email",m("div",{className:"Form-group"},m("input",{type:"email",name:"email",className:"FormControl",placeholder:Wi.session.user.email(),bidi:this.email,disabled:this.loading}))),t.add("password",m("div",{className:"Form-group"},m("input",{type:"password",name:"password",className:"FormControl",autocomplete:"current-password",placeholder:Wi.translator.trans("core.forum.change_email.confirm_password_placeholder"),bidi:this.password,disabled:this.loading}))),t.add("submit",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Wi.translator.trans("core.forum.change_email.submit_button"))))),t},n.onsubmit=function(t){var e=this;t.preventDefault(),this.email()!==Wi.session.user.email()?(this.loading=!0,this.alertAttrs=null,Wi.session.user.save(this.requestAttributes(),{errorHandler:this.onerror.bind(this),meta:{password:this.password()}}).then((function(){e.success=!0})).catch((function(){})).then(this.loaded.bind(this))):this.hide()},n.requestAttributes=function(){return{email:this.email()}},n.onerror=function(e){401===e.status&&e.alert&&(e.alert.content=Wi.translator.trans("core.forum.change_email.incorrect_password_message")),t.prototype.onerror.call(this,e)},e}(_t),En=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).discloseOnlineLoading=void 0,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.show(Wi.session.user),Wi.setTitle(ot(Wi.translator.trans("core.forum.settings.title")))},n.content=function(){return m("div",{className:"SettingsPage"},m("ul",null,H(this.settingsItems().toArray())))},n.settingsItems=function(){var t=this,e=new B;return["account","notifications","privacy"].forEach((function(n,r){var i=n+"Items";e.add(n,m(Dn,{className:"Settings-"+n,label:Wi.translator.trans("core.forum.settings."+n+"_heading")},t[i]().toArray()),100-10*r)})),e},n.accountItems=function(){var t=new B;return t.add("changePassword",m(yt,{className:"Button",onclick:function(){return Wi.modal.show(Cn)}},Wi.translator.trans("core.forum.settings.change_password_button")),100),t.add("changeEmail",m(yt,{className:"Button",onclick:function(){return Wi.modal.show(An)}},Wi.translator.trans("core.forum.settings.change_email_button")),90),t},n.notificationsItems=function(){var t=new B;return t.add("notificationGrid",m(xn,{user:this.user}),100),t},n.privacyItems=function(){var t,e=this,n=new B;return n.add("discloseOnline",m(wn,{state:null==(t=this.user.preferences())?void 0:t.discloseOnline,onchange:function(t){e.discloseOnlineLoading=!0,e.user.savePreferences({discloseOnline:t}).then((function(){e.discloseOnlineLoading=!1,m.redraw()}))},loading:this.discloseOnlineLoading},Wi.translator.trans("core.forum.settings.privacy_disclose_online_label")),100),n},e}(Ge),Nn=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),Wi.history.push("notifications",ot(Wi.translator.trans("core.forum.notifications.title"))),Wi.notifications.load(),this.bodyClass="App--notifications"},n.view=function(){return m("div",{className:"NotificationsPage"},m(De,{state:Wi.notifications}))},e}(S),kn=function(){function t(t,e){this.component=void 0,this.routeName=void 0,this.component=t,this.routeName=e}var e=t.prototype;return e.makeKey=function(){return this.routeName+JSON.stringify(m.route.param())},e.makeAttrs=function(t){return D({},t.attrs,{routeName:this.routeName})},e.onmatch=function(t,e,n){return this.component},e.render=function(t){return[D({},t,{attrs:this.makeAttrs(t),key:this.makeKey()})]},t}(),Sn=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.canonicalizeDiscussionSlug=function(t){if(t)return t.split("-")[0]},n.makeKey=function(){var t=D({},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 Wi.current.matches(ae)&&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 Wi.current.get("stream").goToNumber(r)})),e.scrollToPostNumber=null}return t.prototype.render.call(this,n)},e}(kn);Sn.scrollToPostNumber=null;var Tn=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(t){return m("div",{className:"LabelValue"},m("div",{className:"LabelValue-label"},v.translator.trans("core.lib.data_segment.label",{label:this.attrs.label})),m("div",{className:"LabelValue-value"},this.attrs.value))},e}(E),Fn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).loading={},e.showingTokens={},e}w(e,t);var n=e.prototype;return n.view=function(t){return m("div",{className:"AccessTokensList"},this.attrs.tokens.length?this.attrs.tokens.map(this.tokenView.bind(this)):m("div",{className:"AccessTokensList--empty"},Wi.translator.trans("core.forum.security.empty_text")))},n.tokenView=function(t){return m("div",{className:M("AccessTokensList-item",{"AccessTokensList-item--active":t.isCurrent()}),key:t.id()},this.tokenViewItems(t).toArray())},n.tokenViewItems=function(t){var e=new B;return e.add("icon",m("div",{className:"AccessTokensList-item-icon"},nt(this.attrs.icon||"fas fa-key")),50),e.add("info",m("div",{className:"AccessTokensList-item-info"},this.tokenInfoItems(t).toArray()),40),e.add("actions",m("div",{className:"AccessTokensList-item-actions"},this.tokenActionItems(t).toArray()),30),e},n.tokenInfoItems=function(t){var e=new B;return"session"===this.attrs.type?e.add("title",m("div",{className:"AccessTokensList-item-title"},m("span",{className:"AccessTokensList-item-title-main"},t.device()),t.isCurrent()&&[" — ",m("span",{className:"AccessTokensList-item-title-sub"},Wi.translator.trans("core.forum.security.current_active_session"))])):e.add("title",m("div",{className:"AccessTokensList-item-title"},m("span",{className:"AccessTokensList-item-title-main"},this.generateTokenTitle(t)))),e.add("createdAt",m("div",{className:"AccessTokensList-item-createdAt"},m(Tn,{label:Wi.translator.trans("core.forum.security.created"),value:lt(t.createdAt())}))),e.add("lastActivityAt",m("div",{className:"AccessTokensList-item-lastActivityAt"},m(Tn,{label:Wi.translator.trans("core.forum.security.last_activity"),value:t.lastActivityAt()?m("[",null,lt(t.lastActivityAt()),t.lastIpAddress()&&m("span",null," ","— ",m(tn,{ip:t.lastIpAddress()})),"developer_token"===this.attrs.type&&t.device()&&m("[",null," ","— ",m("span",{className:"AccessTokensList-item-title-sub"},t.device()))):Wi.translator.trans("core.forum.security.never")}))),e},n.tokenActionItems=function(t){var e=this,n=new B,r={session:"terminate_session",developer_token:"revoke_access_token"}[this.attrs.type];if("developer_token"===this.attrs.type){var i=!this.showingTokens[t.id()],o=i?"show_access_token":"hide_access_token";n.add("toggleDisplay",m(yt,{className:"Button Button--inverted",icon:i?"fas fa-eye":"fas fa-eye-slash",onclick:function(){e.showingTokens[t.id()]=i,m.redraw()}},Wi.translator.trans("core.forum.security."+o)))}var s=m(yt,{className:"Button Button--danger",disabled:t.isCurrent(),loading:!!this.loading[t.id()],onclick:function(){return e.revoke(t)}},Wi.translator.trans("core.forum.security."+r));return t.isCurrent()&&(s=m(Et,{text:Wi.translator.trans("core.forum.security.cannot_terminate_current_session")},m("div",{tabindex:"0"},s))),n.add("revoke",s),n},n.revoke=function(){var t=Ee(ke().mark((function t(e){var n,r,i;return ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(confirm(ot(Wi.translator.trans("core.forum.security.revoke_access_token_confirmation")))){t.next=2;break}return t.abrupt("return");case 2:return this.loading[e.id()]=!0,t.next=5,e.delete();case 5:this.loading[e.id()]=!1,null==(n=(r=this.attrs).ondelete)||n.call(r,e),i="session"===this.attrs.type?"session_terminated":"token_revoked",Wi.alerts.show({type:"success"},Wi.translator.trans("core.forum.security."+i,{count:1})),m.redraw();case 10:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),n.generateTokenTitle=function(t){var e=t.title()||Wi.translator.trans("core.forum.security.token_title_placeholder"),n=this.tokenValueDisplay(t);return Wi.translator.trans("core.forum.security.token_item_title",{title:e,token:n})},n.tokenValueDisplay=function(t){var e=Array(12).fill("*").join(""),n=this.showingTokens[t.id()]?t.token():e;return m("code",{className:"AccessTokensList-item-token"},n)},e}(E),_n=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).titleInput=Bt(""),e}w(e,t);var n=e.prototype;return n.className=function(){return"Modal--small NewAccessTokenModal"},n.title=function(){return Wi.translator.trans("core.forum.security.new_access_token_modal.title")},n.content=function(){var t=Wi.translator.trans("core.forum.security.new_access_token_modal.title_placeholder");return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("input",{type:"text",className:"FormControl",bidi:this.titleInput,placeholder:t,"aria-label":t})),m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Wi.translator.trans("core.forum.security.new_access_token_modal.submit_button")))))},n.submitData=function(){return{title:this.titleInput()}},n.onsubmit=function(e){var n=this;t.prototype.onsubmit.call(this,e),e.preventDefault(),this.loading=!0,Wi.store.createRecord("access-tokens").save(this.submitData()).then((function(t){n.attrs.onsuccess(t),Wi.modal.close()})).finally(this.loaded.bind(this))},e}(_t),Pn=function(){function t(){this.tokens=null,this.loadingTerminateSessions=!1,this.loadingGlobalLogout=!1}var e=t.prototype;return e.hasLoadedTokens=function(){return null!==this.tokens},e.getTokens=function(){return this.tokens},e.setTokens=function(t){this.tokens=t},e.pushToken=function(t){var e;null==(e=this.tokens)||e.push(t)},e.removeToken=function(t){this.tokens=this.tokens.filter((function(e){return e!==t}))},e.getSessionTokens=function(){var t;return(null==(t=this.tokens)?void 0:t.filter((function(t){return t.isSessionToken()})).sort((function(t,e){return e.isCurrent()?1:-1})))||[]},e.getDeveloperTokens=function(){var t;return(null==(t=this.tokens)?void 0:t.filter((function(t){return!t.isSessionToken()})))||null},e.getOtherSessionTokens=function(){var t;return(null==(t=this.tokens)?void 0:t.filter((function(t){return t.isSessionToken()&&!t.isCurrent()})))||[]},e.hasOtherActiveSessions=function(){return(this.getOtherSessionTokens()||[]).length>0},e.removeOtherSessionTokens=function(){this.tokens=this.tokens.filter((function(t){return!t.isSessionToken()||t.isCurrent()}))},t}(),Bn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).state=new Pn,e}w(e,t);var n=e.prototype;return n.oninit=function(e){var n;t.prototype.oninit.call(this,e);var r=m.route.param("username");r===(null==(n=Wi.session.user)?void 0:n.slug())||Wi.forum.attribute("canModerateAccessTokens")||m.route.set("/"),this.loadUser(r),Wi.setTitle(ot(Wi.translator.trans("core.forum.security.title"))),this.loadTokens()},n.content=function(){return m("div",{className:"UserSecurityPage"},m("ul",null,H(this.settingsItems().toArray())))},n.settingsItems=function(){var t,e=new B;return Wi.forum.attribute("canCreateAccessToken")||Wi.forum.attribute("canModerateAccessTokens")||this.state.hasLoadedTokens()&&null!=(t=this.state.getDeveloperTokens())&&t.length?e.add("developerTokens",m(Dn,{className:"UserSecurityPage-developerTokens",label:Wi.translator.trans("core.forum.security.developer_tokens_heading")},this.developerTokensItems().toArray())):this.state.hasLoadedTokens()||e.add("developerTokens",m(ft,null)),e.add("sessions",m(Dn,{className:"UserSecurityPage-sessions",label:Wi.translator.trans("core.forum.security.sessions_heading")},this.sessionsItems().toArray())),this.user.id()===Wi.session.user.id()&&e.add("globalLogout",m(Dn,{className:"UserSecurityPage-globalLogout",label:Wi.translator.trans("core.forum.security.global_logout.heading")},m("span",{className:"helpText"},Wi.translator.trans("core.forum.security.global_logout.help_text")),m(yt,{className:"Button",icon:"fas fa-sign-out-alt",onclick:this.globalLogout.bind(this),loading:this.state.loadingGlobalLogout,disabled:this.state.loadingTerminateSessions},Wi.translator.trans("core.forum.security.global_logout.log_out_button")))),e},n.developerTokensItems=function(){var t=this,e=new B;return e.add("accessTokenList",this.state.hasLoadedTokens()?m(Fn,{type:"developer_token",ondelete:function(e){t.state.removeToken(e),m.redraw()},tokens:this.state.getDeveloperTokens(),icon:"fas fa-key",hideTokens:!1}):m(ft,null)),this.user.id()===Wi.session.user.id()&&e.add("newAccessToken",m(yt,{className:"Button",disabled:!Wi.forum.attribute("canCreateAccessToken"),onclick:function(){return Wi.modal.show(_n,{onsuccess:function(e){t.state.pushToken(e),m.redraw()}})}},Wi.translator.trans("core.forum.security.new_access_token_button"))),e},n.sessionsItems=function(){var t=this,e=new B;if(e.add("sessionsList",this.state.hasLoadedTokens()?m(Fn,{type:"session",ondelete:function(e){t.state.removeToken(e),m.redraw()},tokens:this.state.getSessionTokens(),icon:"fas fa-laptop",hideTokens:!0}):m(ft,null)),this.user.id()===Wi.session.user.id()){var n=!this.state.hasOtherActiveSessions(),r=m(yt,{className:"Button",onclick:this.terminateAllOtherSessions.bind(this),loading:this.state.loadingTerminateSessions,disabled:this.state.loadingGlobalLogout||n},Wi.translator.trans("core.forum.security.terminate_all_other_sessions"));n&&(r=m(Et,{text:Wi.translator.trans("core.forum.security.cannot_terminate_current_session")},m("span",{tabindex:"0"},r))),e.add("terminateAllOtherSessions",r)}return e},n.loadTokens=function(){var t=this;return Wi.store.find("access-tokens",{filter:{user:this.user.id()}}).then((function(e){t.state.setTokens(e),m.redraw()}))},n.terminateAllOtherSessions=function(){var t=this;if(confirm(ot(Wi.translator.trans("core.forum.security.terminate_all_other_sessions_confirmation"))))return this.state.loadingTerminateSessions=!0,Wi.request({method:"DELETE",url:Wi.forum.attribute("apiUrl")+"/sessions"}).then((function(){var e=t.state.getOtherSessionTokens().length;t.state.removeOtherSessionTokens(),Wi.alerts.show({type:"success"},Wi.translator.trans("core.forum.security.session_terminated",{count:e}))})).catch((function(){Wi.alerts.show({type:"error"},Wi.translator.trans("core.forum.security.session_termination_failed"))})).finally((function(){t.state.loadingTerminateSessions=!1,m.redraw()}))},n.globalLogout=function(){var t=this;return this.state.loadingGlobalLogout=!0,Wi.request({method:"POST",url:Wi.forum.attribute("baseUrl")+"/global-logout"}).then((function(){return window.location.reload()})).finally((function(){t.state.loadingGlobalLogout=!1,m.redraw()}))},e}(Ge);function In(t){t.routes={index:{path:"/all",component:cn},discussion:{path:"/d/:id",component:ae,resolverClass:Sn},"discussion.near":{path:"/d/:id/:near",component:ae,resolverClass:Sn},user:{path:"/u/:username",component:dn},"user.posts":{path:"/u/:username",component:dn},"user.discussions":{path:"/u/:username/discussions",component:gn},settings:{path:"/settings",component:En},"user.security":{path:"/u/:username/security",component:Bn},notifications:{path:"/notifications",component:Nn}}}function On(t){var e=t.session.user;if(e&&!e.isEmailConfirmed()){var n=function(n){function r(){return n.apply(this,arguments)||this}w(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,{className:"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}(E),r=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return D({},n,{children:[m("div",{className:"container"},n.children)]})},e}(Ft);m.mount($('<div className="App-notices"/>').insertBefore("#content")[0],{view:function(){return m(r,{dismissible:!1,controls:[m(n,null)],className:"Alert--emailConfirmation"},t.translator.trans("core.forum.user_email_confirmation.alert_message",{email:m("strong",null,e.email())}))}})}}var Ln=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],Mn=Ln.join(","),$n="undefined"==typeof Element,jn=$n?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Rn=!$n&&Element.prototype.getRootNode?function(t){return t.getRootNode()}:function(t){return t.ownerDocument},Hn=function(t,e,n){var r=Array.prototype.slice.apply(t.querySelectorAll(Mn));return e&&jn.call(t,Mn)&&r.unshift(t),r.filter(n)},Un=function t(e,n,r){for(var i=[],o=Array.from(e);o.length;){var s=o.shift();if("SLOT"===s.tagName){var a=s.assignedElements(),u=t(a.length?a:s.children,!0,r);r.flatten?i.push.apply(i,u):i.push({scope:s,candidates:u})}else{jn.call(s,Mn)&&r.filter(s)&&(n||!e.includes(s))&&i.push(s);var l=s.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(s),c=!r.shadowRootFilter||r.shadowRootFilter(s);if(l&&c){var d=t(!0===l?s.children:l.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scope:s,candidates:d})}else o.unshift.apply(o,s.children)}}return i},qn=function(t,e){return t.tabIndex<0&&(e||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||t.isContentEditable)&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},zn=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Vn=function(t){return"INPUT"===t.tagName},Wn=function(t){var e=t.getBoundingClientRect(),n=e.width,r=e.height;return 0===n&&0===r},Gn=function(t,e){return!(e.disabled||function(t){return Vn(t)&&"hidden"===t.type}(e)||function(t,e){var n=e.displayCheck,r=e.getShadowRoot;if("hidden"===getComputedStyle(t).visibility)return!0;var i=jn.call(t,"details>summary:first-of-type")?t.parentElement:t;if(jn.call(i,"details:not([open]) *"))return!0;var o=Rn(t).host,s=(null==o?void 0:o.ownerDocument.contains(o))||t.ownerDocument.contains(t);if(n&&"full"!==n){if("non-zero-area"===n)return Wn(t)}else{if("function"==typeof r){for(var a=t;t;){var u=t.parentElement,l=Rn(t);if(u&&!u.shadowRoot&&!0===r(u))return Wn(t);t=t.assignedSlot?t.assignedSlot:u||l===t.ownerDocument?u:l.host}t=a}if(s)return!t.getClientRects().length}return!1}(e,t)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var n=0;n<e.children.length;n++){var r=e.children.item(n);if("LEGEND"===r.tagName)return!!jn.call(e,"fieldset[disabled] *")||!r.contains(t)}return!0}e=e.parentElement}return!1}(e))},Yn=function(t,e){return!(function(t){return function(t){return Vn(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,n=t.form||Rn(t),r=function(t){return n.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=r(window.CSS.escape(t.name));else try{e=r(t.name)}catch(t){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message),!1}var i=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]}(e,t.form);return!i||i===t}(t)}(e)||qn(e)<0||!Gn(t,e))},Kn=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Xn=function t(e){var n=[],r=[];return e.forEach((function(e,i){var o=!!e.scope,s=o?e.scope:e,a=qn(s,o),u=o?t(e.candidates):s;0===a?o?n.push.apply(n,u):n.push(s):r.push({documentOrder:i,tabIndex:a,item:e,isScope:o,content:u})})),r.sort(zn).reduce((function(t,e){return e.isScope?t.push.apply(t,e.content):t.push(e.content),t}),[]).concat(n)},Jn=function(t,e){var n;return n=(e=e||{}).getShadowRoot?Un([t],e.includeContainer,{filter:Yn.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:Kn}):Hn(t,e.includeContainer,Yn.bind(null,e)),Xn(n)},Qn=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==jn.call(t,Mn)&&Yn(e,t)},Zn=Ln.concat("iframe").join(","),tr=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==jn.call(t,Zn)&&Gn(e,t)};function er(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 nr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?er(Object(n),!0).forEach((function(e){rr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):er(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function rr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ir,or=(ir=[],{activateTrap:function(t){if(ir.length>0){var e=ir[ir.length-1];e!==t&&e.pause()}var n=ir.indexOf(t);-1===n||ir.splice(n,1),ir.push(t)},deactivateTrap:function(t){var e=ir.indexOf(t);-1!==e&&ir.splice(e,1),ir.length>0&&ir[ir.length-1].unpause()}}),sr=function(t){return setTimeout(t,0)},ar=function(t,e){var n=-1;return t.every((function(t,r){return!e(t)||(n=r,!1)})),n},ur=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},lr=function(t){return t.target.shadowRoot&&"function"==typeof t.composedPath?t.composedPath()[0]:t.target},cr=function(t,e){var n,r=(null==e?void 0:e.document)||document,i=nr({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},e),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s=function(t,e,n){return t&&void 0!==t[e]?t[e]:i[n||e]},a=function(t){return o.containerGroups.findIndex((function(e){var n=e.container,r=e.tabbableNodes;return n.contains(t)||r.find((function(e){return e===t}))}))},u=function(t){var e=i[t];if("function"==typeof e){for(var n=arguments.length,o=new Array(n>1?n-1:0),s=1;s<n;s++)o[s-1]=arguments[s];e=e.apply(void 0,o)}if(!0===e&&(e=void 0),!e){if(void 0===e||!1===e)return e;throw new Error("`".concat(t,"` was specified but was not a node, or did not return a node"))}var a=e;if("string"==typeof e&&!(a=r.querySelector(e)))throw new Error("`".concat(t,"` as selector refers to no known node"));return a},l=function(){var t=u("initialFocus");if(!1===t)return!1;if(void 0===t)if(a(r.activeElement)>=0)t=r.activeElement;else{var e=o.tabbableGroups[0];t=e&&e.firstTabbableNode||u("fallbackFocus")}if(!t)throw new Error("Your focus-trap needs to have at least one focusable element");return t},c=function(){if(o.containerGroups=o.containers.map((function(t){var e,n,r=Jn(t,i.tabbableOptions),o=(e=t,(n=(n=i.tabbableOptions)||{}).getShadowRoot?Un([e],n.includeContainer,{filter:Gn.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):Hn(e,n.includeContainer,Gn.bind(null,n)));return{container:t,tabbableNodes:r,focusableNodes:o,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=o.findIndex((function(e){return e===t}));if(!(n<0))return e?o.slice(n+1).find((function(t){return Qn(t,i.tabbableOptions)})):o.slice(0,n).reverse().find((function(t){return Qn(t,i.tabbableOptions)}))}}})),o.tabbableGroups=o.containerGroups.filter((function(t){return t.tabbableNodes.length>0})),o.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},d=function t(e){!1!==e&&e!==r.activeElement&&(e&&e.focus?(e.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=e,function(t){return t.tagName&&"input"===t.tagName.toLowerCase()&&"function"==typeof t.select}(e)&&e.select()):t(l()))},h=function(t){var e=u("setReturnFocus",t);return e||!1!==e&&t},f=function(t){var e=lr(t);a(e)>=0||(ur(i.clickOutsideDeactivates,t)?n.deactivate({returnFocus:i.returnFocusOnDeactivate&&!tr(e,i.tabbableOptions)}):ur(i.allowOutsideClick,t)||t.preventDefault())},p=function(t){var e=lr(t),n=a(e)>=0;n||e instanceof Document?n&&(o.mostRecentlyFocusedNode=e):(t.stopImmediatePropagation(),d(o.mostRecentlyFocusedNode||l()))},m=function(t){if(function(t){return"Escape"===t.key||"Esc"===t.key||27===t.keyCode}(t)&&!1!==ur(i.escapeDeactivates,t))return t.preventDefault(),void n.deactivate();(function(t){return"Tab"===t.key||9===t.keyCode})(t)&&function(t){var e=lr(t);c();var n=null;if(o.tabbableGroups.length>0){var r=a(e),s=r>=0?o.containerGroups[r]:void 0;if(r<0)n=t.shiftKey?o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:o.tabbableGroups[0].firstTabbableNode;else if(t.shiftKey){var l=ar(o.tabbableGroups,(function(t){var n=t.firstTabbableNode;return e===n}));if(l<0&&(s.container===e||tr(e,i.tabbableOptions)&&!Qn(e,i.tabbableOptions)&&!s.nextTabbableNode(e,!1))&&(l=r),l>=0){var h=0===l?o.tabbableGroups.length-1:l-1;n=o.tabbableGroups[h].lastTabbableNode}}else{var f=ar(o.tabbableGroups,(function(t){var n=t.lastTabbableNode;return e===n}));if(f<0&&(s.container===e||tr(e,i.tabbableOptions)&&!Qn(e,i.tabbableOptions)&&!s.nextTabbableNode(e))&&(f=r),f>=0){var p=f===o.tabbableGroups.length-1?0:f+1;n=o.tabbableGroups[p].firstTabbableNode}}}else n=u("fallbackFocus");n&&(t.preventDefault(),d(n))}(t)},v=function(t){var e=lr(t);a(e)>=0||ur(i.clickOutsideDeactivates,t)||ur(i.allowOutsideClick,t)||(t.preventDefault(),t.stopImmediatePropagation())},g=function(){if(o.active)return or.activateTrap(n),o.delayInitialFocusTimer=i.delayInitialFocus?sr((function(){d(l())})):d(l()),r.addEventListener("focusin",p,!0),r.addEventListener("mousedown",f,{capture:!0,passive:!1}),r.addEventListener("touchstart",f,{capture:!0,passive:!1}),r.addEventListener("click",v,{capture:!0,passive:!1}),r.addEventListener("keydown",m,{capture:!0,passive:!1}),n},y=function(){if(o.active)return r.removeEventListener("focusin",p,!0),r.removeEventListener("mousedown",f,!0),r.removeEventListener("touchstart",f,!0),r.removeEventListener("click",v,!0),r.removeEventListener("keydown",m,!0),n};return(n={get active(){return o.active},get paused(){return o.paused},activate:function(t){if(o.active)return this;var e=s(t,"onActivate"),n=s(t,"onPostActivate"),i=s(t,"checkCanFocusTrap");i||c(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,e&&e();var a=function(){i&&c(),g(),n&&n()};return i?(i(o.containers.concat()).then(a,a),this):(a(),this)},deactivate:function(t){if(!o.active)return this;var e=nr({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},t);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,y(),o.active=!1,o.paused=!1,or.deactivateTrap(n);var r=s(e,"onDeactivate"),a=s(e,"onPostDeactivate"),u=s(e,"checkCanReturnFocus"),l=s(e,"returnFocus","returnFocusOnDeactivate");r&&r();var c=function(){sr((function(){l&&d(h(o.nodeFocusedBeforeActivation)),a&&a()}))};return l&&u?(u(h(o.nodeFocusedBeforeActivation)).then(c,c),this):(c(),this)},pause:function(){return o.paused||!o.active||(o.paused=!0,y()),this},unpause:function(){return o.paused&&o.active?(o.paused=!1,c(),g(),this):this},updateContainerElements:function(t){var e=[].concat(t).filter(Boolean);return o.containers=e.map((function(t){return"string"==typeof t?r.querySelector(t):t})),o.active&&c(),this}}).updateContainerElements(t),n};function dr(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e[1]=D({escapeDeactivates:!1},e[1]),cr.apply(void 0,e)}var hr=!1;if("undefined"!=typeof window){var fr={get passive(){hr=!0}};window.addEventListener("testPassive",null,fr),window.removeEventListener("testPassive",null,fr)}var pr,mr="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),vr=[],gr=!1,yr=-1,br=void 0,wr=void 0,Dr=void 0,xr=function(t){return vr.some((function(e){return!(!e.options.allowTouchMove||!e.options.allowTouchMove(t))}))},Cr=function(t){var e=t||window.event;return!!xr(e.target)||e.touches.length>1||(e.preventDefault&&e.preventDefault(),!1)},Ar=function(){mr&&(vr.forEach((function(t){t.targetElement.ontouchstart=null,t.targetElement.ontouchmove=null})),gr&&(document.removeEventListener("touchmove",Cr,hr?{passive:!1}:void 0),gr=!1),yr=-1),mr?function(){if(void 0!==wr){var t=-parseInt(document.body.style.top,10),e=-parseInt(document.body.style.left,10);document.body.style.position=wr.position,document.body.style.top=wr.top,document.body.style.left=wr.left,window.scrollTo(e,t),wr=void 0}}():(void 0!==Dr&&(document.body.style.paddingRight=Dr,Dr=void 0),void 0!==br&&(document.body.style.overflow=br,br=void 0)),vr=[]},Er=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).focusTrap=void 0,e.lastSetFocusTrap=void 0,e.modalClosing=!1,e.keyUpListener=null,e}w(e,t);var n=e.prototype;return n.view=function(t){var e=this;return m("[",null,this.attrs.state.modalList.map((function(t,n){var r=null==t?void 0:t.componentClass;return m("div",{key:t.key,className:"ModalManager modal","data-modal-key":t.key,"data-modal-number":n,role:"dialog","aria-modal":"true",style:{"--modal-number":n},"aria-hidden":e.attrs.state.modal!==t&&"true"},!!r&&[m(r,Object.assign({key:t.key},t.attrs,{animateShow:e.animateShow.bind(e),animateHide:e.animateHide.bind(e),state:e.attrs.state})),m("div",{key:t.key,className:"ModalManager-invisibleBackdrop",onclick:e.handlePossibleBackdropClick.bind(e)})])})),this.attrs.state.backdropShown&&m("div",{className:"Modal-backdrop backdrop",ontransitionend:this.onBackdropTransitionEnd.bind(this),"data-showing":!!this.attrs.state.modalList.length,style:{"--modal-count":this.attrs.state.modalList.length}}))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.keyUpListener=this.handleEscPress.bind(this),document.body.addEventListener("keyup",this.keyUpListener)},n.onbeforeremove=function(e){t.prototype.onbeforeremove.call(this,e),this.keyUpListener&&document.body.removeEventListener("keyup",this.keyUpListener),this.keyUpListener=null},n.onupdate=function(e){var n=this;t.prototype.onupdate.call(this,e),requestAnimationFrame((function(){try{var t,e;if(!n.attrs.state.isModalOpen())return null==(e=document.getElementById("app"))||e.setAttribute("aria-hidden","false"),null==n.focusTrap.deactivate||n.focusTrap.deactivate(),void Ar();null==(t=document.getElementById("app"))||t.setAttribute("aria-hidden","true");var r=n.attrs.state.modal.key;n.focusTrap&&n.lastSetFocusTrap!==r&&(null==n.focusTrap.deactivate||n.focusTrap.deactivate(),Ar()),n.activeDialogElement&&n.lastSetFocusTrap!==r&&(n.focusTrap=dr(n.activeDialogElement,{allowOutsideClick:!0}),null==n.focusTrap.activate||n.focusTrap.activate(),function(t,e){if(t){if(!vr.some((function(e){return e.targetElement===t}))){var n={targetElement:t,options:e||{}};vr=[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(vr),[n]),mr?window.requestAnimationFrame((function(){if(void 0===wr){wr={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var t=window,e=t.scrollY,n=t.scrollX,r=t.innerHeight;document.body.style.position="fixed",document.body.style.top=-e,document.body.style.left=-n,setTimeout((function(){return window.requestAnimationFrame((function(){var t=r-window.innerHeight;t&&e>=r&&(document.body.style.top=-(e+t))}))}),300)}})):function(t){if(void 0===Dr){var e=!!t&&!0===t.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;if(e&&n>0){var r=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);Dr=document.body.style.paddingRight,document.body.style.paddingRight=r+n+"px"}}void 0===br&&(br=document.body.style.overflow,document.body.style.overflow="hidden")}(e),mr&&(t.ontouchstart=function(t){1===t.targetTouches.length&&(yr=t.targetTouches[0].clientY)},t.ontouchmove=function(e){1===e.targetTouches.length&&function(t,e){var n=t.targetTouches[0].clientY-yr;!xr(t.target)&&(e&&0===e.scrollTop&&n>0||function(t){return!!t&&t.scrollHeight-t.scrollTop<=t.clientHeight}(e)&&n<0?Cr(t):t.stopPropagation())}(e,t)},gr||(document.addEventListener("touchmove",Cr,hr?{passive:!1}:void 0),gr=!0))}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")}(n.activeDialogManagerElement,{reserveScrollBarGap:!0})),n.lastSetFocusTrap=r}catch(t){}}))},n.animateShow=function(t){var e=this;void 0===t&&(t=function(){}),this.attrs.state.modal&&(this.activeDialogElement.addEventListener("transitionend",(function(){t()}),{once:!0}),requestAnimationFrame((function(){e.activeDialogElement.classList.add("in")})))},n.animateHide=function(t){var e=this;void 0===t&&(t=function(){}),this.modalClosing||(this.modalClosing=!0,this.activeDialogElement.addEventListener("transitionend",(function(){e.modalClosing=!1,e.attrs.state.close(),t()}),{once:!0}),this.activeDialogElement.classList.remove("in"),this.activeDialogElement.classList.add("out"))},n.handleEscPress=function(t){if(this.attrs.state.modal){var e=this.attrs.state.modal.componentClass.dismissibleOptions;"Escape"===t.key&&e.viaEscKey&&(t.preventDefault(),this.animateHide())}},n.handlePossibleBackdropClick=function(t){this.attrs.state.modal&&this.attrs.state.modal.componentClass.dismissibleOptions.viaBackdropClick&&this.animateHide()},n.onBackdropTransitionEnd=function(t){"opacity"===t.propertyName&&null===t.currentTarget.getAttribute("data-showing")&&(this.attrs.state.backdropShown=!1,m.redraw())},F(e,[{key:"activeDialogElement",get:function(){var t;return document.body.querySelector('.ModalManager[data-modal-key="'+(null==(t=this.attrs.state.modal)?void 0:t.key)+'"] .Modal')}},{key:"activeDialogManagerElement",get:function(){var t;return document.body.querySelector('.ModalManager[data-modal-key="'+(null==(t=this.attrs.state.modal)?void 0:t.key)+'"]')}}]),e}(E),Nr=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state},n.view=function(){var t=this,e=this.state.getActiveAlerts();return m("div",{className:"AlertManager"},Object.keys(e).map(Number).map((function(n){var r=e[n],i="error"===r.attrs.type;return m("div",{className:"AlertManager-alert",role:"alert","aria-live":i?"assertive":"polite"},m(r.componentClass,Object.assign({},r.attrs,{ondismiss:t.state.dismiss.bind(t.state,n)}),r.children))})))},e}(E),kr=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.className=function(){return"RequestErrorModal Modal--large"},n.title=function(){return!!this.attrs.error.xhr&&this.attrs.error.xhr.status+" "+this.attrs.error.xhr.statusText},n.content=function(){var t,e=this.attrs,n=e.error,r=e.formattedError;return t=r.length?r.join("\n\n"):n.response?JSON.stringify(n.response,null,2):n.responseText,m("div",{className:"Modal-body"},m("pre",null,this.attrs.error.options.method," ",this.attrs.error.options.url,m("br",null),m("br",null),t))},e}(_t),Sr=n(5387),Tr=n.n(Sr),Fr=n(1904),_r=n.n(Fr),Pr=n(8213),Br=n.n(Pr),Ir=n(2061),Or=n.n(Ir),Lr=n(8974),Mr=n.n(Lr),$r=n(9767),jr=n.n($r),Rr=n(402),Hr=n.n(Rr);function Ur(t){return t.reduce((function(t,e){return t.concat(Array.isArray(e)?Ur(e):e)}),[])}function qr(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 zr(t){for(var e=function(t){return/\s/.test(t)},n=[],r={},i=0,o=null,s=!1,a=0;a<t.length;){if(s&&(e(t[a])||"{"===t[a]))s=!1,o=t.slice(i,a),"{"===t[a]&&a--;else if(!s&&!e(t[a])){var u="{"===t[a];if(o&&u){var l=Vr(t,a);if(-1===l)throw new Error('Unbalanced curly braces in string: "'.concat(t,'"'));r[o]=t.slice(a+1,l),a=l,o=null}else o&&(n.push(o),o=null),s=!0,i=a}a++}return s&&(o=t.slice(i)),o&&n.push(o),{args:n,cases:r}}function Vr(t,e){for(var n=0,r=e+1;r<t.length;r++){var i=t.charAt(r);if("}"===i){if(0===n)return r;n--}else"{"===i&&n++}return-1}function Wr(t){return Gr(t.slice(1,-1),",",3)}function Gr(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(!t)return r;if(1===n)return r.push(t),r;var i=t.indexOf(e);if(-1===i)return r.push(t),r;var o=t.substring(0,i).trim(),s=t.substring(i+e.length+1).trim();return r.push(o),Gr(s,e,n-1,r)}function Yr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Kr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Yr(Object(n),!0).forEach((function(e){Hr()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Xr=0,Jr="other";function Qr(t,e){for(var n=0,r="",i=0,o={};n<t.length;){if("#"!==t[n]||i)r+=t[n];else{var s="__hashToken".concat(Xr++);r+="{".concat(s,", number}"),o[s]=e}"{"===t[n]?i++:"}"===t[n]&&i--,n++}return{caseBody:r,numberValues:o}}function Zr(t){var e=arguments.length>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=zr(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!==pr&&pr.resolvedOptions().locale===n||(pr=new Intl.PluralRules(n));var c=pr.select(u);c!==Jr&&l.push(c)}1===u&&l.push("one"),l.push("=".concat(u),Jr);for(var d=0;d<l.length;d++){var h=l[d];if(h in a){var f=Qr(a[h],u),p=f.caseBody,m=f.numberValues;return i(p,Kr(Kr({},r),m))}}return t}var ti="other";function ei(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=zr(e),o=i.cases;return t in o?r(o[t],n):ti in o?r(o.other,n):t}function ni(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=[],o=function(r,o,s,a,u,l){if(o)return{break:!0};var c=ri(t,s,a,u);if(!c)return i;var d=c.segmentIndex===a,h=t[c.segmentIndex],f=[];if(d)f.push(r.slice(u+1,c.segmentStart));else{f.push(r.slice(u+1));for(var p=a+1;p<c.segmentIndex;p++)f.push(t[p]);f.push(h.slice(0,c.segmentStart))}return i.push(r.slice(0,l)),i.push(n(s,e,ni(f.filter((function(t){return""!==t})),e,n))),t.splice(c.segmentIndex+1,0,h.slice(c.segmentEnd+1)),{processedSegment:!0,newSegmentIndex:c.segmentIndex,break:!0}};return ii(t,0,0,i,o),i.filter((function(t){return""!==t})).map((function(t,e){return r.includes(e)?t:si(t)}))}function ri(t,e,n,r){var i,o=1;return ii(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}function ii(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 oi(t){return Object.keys(t).reduce((function(e,n){return e[n]=ai(t[n]),e}),{})}function si(t){return"string"!=typeof t?t:t.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#039;/g,"'").replace(/&amp;/g,"&")}function ai(t){return"string"==typeof t||t instanceof String?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"):Array.isArray(t)?t.map(ai):t}function ui(t,e,n){return"<".concat(t,">").concat(si(n),"</").concat(t,">")}var li=function(t){Or()(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=jr()(e);if(n){var i=jr()(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return Mr()(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 _r()(this,i),(e=r.call(this,t,n)).richHandler=o||ui,e}return Br()(i,[{key:"rich",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=oi(e),r=Ur(this.process(t,n)),i=Math.random().toString(36)+Math.random().toString(36)+Math.random().toString(36),o=Object.fromEntries(Object.entries(e).map((function(t){var e=Tr()(t,2),n=e[0];return e[1],[n,i]}))),s=Ur(this.process(t,o)),a=ni(s,o,(function(){return i})),u=a.map((function(t,e){return t===i?null:e})).filter((function(t){return null!==t}));return ni(r,n,this.richHandler,u)}}]),i}(function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_r()(this,t),Hr()(this,"format",qr((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ur(n.process(t,e)).join("")}))),this.locale=e,this.typeHandlers=r}return Br()(t,[{key:"process",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)return[];var n=t.indexOf("{");if(-1!==n){var r=Vr(t,n);if(-1===r)throw new Error('Unbalanced curly braces in string: "'.concat(t,'"'));var i=t.substring(n,r+1);if(i){var o=[],s=t.substring(0,n);s&&o.push(s);var a=Wr(i),u=Tr()(a,3),l=u[0],c=u[1],d=u[2],h=e[l];null==h&&(h="");var f=c&&this.typeHandlers[c];o.push(f?f(h,d,this.locale,e,this.process.bind(this)):h);var p=t.substring(r+1);return p&&o.push(this.process(p,e)),o}}return[t]}}]),t}());function ci(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 di(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ci(Object(n),!0).forEach((function(e){Hr()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ci(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function hi(t,e,n){var r=e[t]||m(t),i=si(m.fragment(n).children);return di(di({},r),{},{children:i})}var fi=function(){function t(){this.translations={},this.formatter=new li(null,this.formatterTypeHandlers(),hi)}var e=t.prototype;return e.setLocale=function(t){this.formatter.locale=t},e.getLocale=function(){return this.formatter.locale},e.addTranslations=function(t){Object.assign(this.translations,t)},e.formatterTypeHandlers=function(){return{plural:Zr,select:ei}},e.preprocessParameters=function(t){if("user"in t){var e=z(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 pi(t){return Array.isArray(t.data)}var mi=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=Ee(ke().mark((function t(e,n,r,i){var o,s,a=this;return ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===r&&(r={}),void 0===i&&(i={}),o=r,s=v.forum.attribute("apiUrl")+"/"+e,n instanceof Array?s+="?filter[id]="+n.join(","):"object"==typeof n?o=n:n&&(s+="/"+n),t.abrupt("return",v.request(D({method:"GET",url:s,params:o},i)).then((function(t){return pi(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}(),vi=function(){function t(t,e){this.user=void 0,this.csrfToken=void 0,this.user=t,this.csrfToken=e}var e=t.prototype;return e.login=function(t,e){return void 0===e&&(e={}),v.request(D({method:"POST",url:v.forum.attribute("baseUrl")+"/login",body:t},e))},e.logout=function(){window.location.href=v.forum.attribute("baseUrl")+"/logout?token="+this.csrfToken},t}(),gi=function(){function t(){var t=this;this.focusTrap=void 0,this.appElement=void 0,this.resizeHandler=function(e){!e.matches&&t.isOpen()&&t.hide()}.bind(this),this.drawerAvailableMediaQuery=void 0,document.getElementById("content").addEventListener("click",(function(e){t.isOpen()&&(e.preventDefault(),t.hide())})),this.appElement=document.getElementById("app"),this.focusTrap=dr("#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 yi(t,e){void 0===e&&(e="");var n={};for(var r in t){var i=t[r];if("resolver"in i)n[e+i.path]=i.resolver;else{if(!("component"in i))throw new Error("Either a resolver or a component must be provided for the route ["+r+"]");var o="resolverClass"in i?i.resolverClass:kn;n[e+i.path]=new o(i.component,r)}}return n}var bi=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 wi(){$("[data-humantime]").each((function(){var t=$(this),e=st(t.attr("datetime"));t.html(e)}))}function Di(){setInterval(wi,1e4)}function xi(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 Ci(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 Ai=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.apiEndpoint=function(){return"/"},e}(fe),Ei=n(2898),Ni=n.n(Ei);function ki(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 Si=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}w(e,t);var n=e.prototype;return n.username=function(){return fe.attribute("username").call(this)},n.slug=function(){return fe.attribute("slug").call(this)},n.displayName=function(){return fe.attribute("displayName").call(this)},n.email=function(){return fe.attribute("email").call(this)},n.isEmailConfirmed=function(){return fe.attribute("isEmailConfirmed").call(this)},n.password=function(){return fe.attribute("password").call(this)},n.avatarUrl=function(){return fe.attribute("avatarUrl").call(this)},n.preferences=function(){return fe.attribute("preferences").call(this)},n.groups=function(){return fe.hasMany("groups").call(this)},n.isAdmin=function(){return fe.attribute("isAdmin").call(this)},n.joinTime=function(){return fe.attribute("joinTime",fe.transformDate).call(this)},n.lastSeenAt=function(){return fe.attribute("lastSeenAt",fe.transformDate).call(this)},n.markedAllAsReadAt=function(){return fe.attribute("markedAllAsReadAt",fe.transformDate).call(this)},n.unreadNotificationCount=function(){return fe.attribute("unreadNotificationCount").call(this)},n.newNotificationCount=function(){return fe.attribute("newNotificationCount").call(this)},n.discussionCount=function(){return fe.attribute("discussionCount").call(this)},n.commentCount=function(){return fe.attribute("commentCount").call(this)},n.canEdit=function(){return fe.attribute("canEdit").call(this)},n.canEditCredentials=function(){return fe.attribute("canEditCredentials").call(this)},n.canEditGroups=function(){return fe.attribute("canEditGroups").call(this)},n.canDelete=function(){return fe.attribute("canDelete").call(this)},n.color=function(){var t=this;return pe("displayName","avatarUrl","avatarColor",(function(e,n,r){return r?"rgb("+r.join(", ")+")":n?(t.calculateAvatarColor(),""):"#"+ki(e)})).call(this)},n.isOnline=function(){return dayjs().subtract(5,"minutes").isBefore(this.lastSeenAt())},n.badges=function(){var t=new B,e=this.groups();return e&&e.forEach((function(e){t.add("group"+(null==e?void 0:e.id()),m(qe,{group:e}))})),t},n.calculateAvatarColor=function(){var t,e=new Image,n=this;e.addEventListener("load",(function(){try{var t=new(Ni());n.avatarColor=t.getColor(this)}catch(t){if(!(t instanceof TypeError))throw t;n.avatarColor=[255,255,255]}n.freshness=new Date,m.redraw()})),e.crossOrigin="anonymous",e.src=null!=(t=this.avatarUrl())?t:""},n.savePreferences=function(t){var e=this.preferences();return Object.assign(null!=e?e:{},t),this.save({preferences:e})},e}(fe),Ti=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.number=function(){return fe.attribute("number").call(this)},n.discussion=function(){return fe.hasOne("discussion").call(this)},n.createdAt=function(){return fe.attribute("createdAt",fe.transformDate).call(this)},n.user=function(){return fe.hasOne("user").call(this)},n.contentType=function(){return fe.attribute("contentType").call(this)},n.content=function(){return fe.attribute("content").call(this)},n.contentHtml=function(){return fe.attribute("contentHtml").call(this)},n.renderFailed=function(){return fe.attribute("renderFailed").call(this)},n.contentPlain=function(){return pe("contentHtml",(function(t){return"string"==typeof t?J(t):t})).call(this)},n.editedAt=function(){return fe.attribute("editedAt",fe.transformDate).call(this)},n.editedUser=function(){return fe.hasOne("editedUser").call(this)},n.isEdited=function(){return pe("editedAt",(function(t){return!!t})).call(this)},n.hiddenAt=function(){return fe.attribute("hiddenAt",fe.transformDate).call(this)},n.hiddenUser=function(){return fe.hasOne("hiddenUser").call(this)},n.isHidden=function(){return pe("hiddenAt",(function(t){return!!t})).call(this)},n.canEdit=function(){return fe.attribute("canEdit").call(this)},n.canHide=function(){return fe.attribute("canHide").call(this)},n.canDelete=function(){return fe.attribute("canDelete").call(this)},e}(fe),Fi=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.contentType=function(){return fe.attribute("contentType").call(this)},n.content=function(){return fe.attribute("content").call(this)},n.createdAt=function(){return fe.attribute("createdAt",fe.transformDate).call(this)},n.isRead=function(){return fe.attribute("isRead").call(this)},n.user=function(){return fe.hasOne("user").call(this)},n.fromUser=function(){return fe.hasOne("fromUser").call(this)},n.subject=function(){return fe.hasOne("subject").call(this)},e}(fe),_i=function(){function t(){this.modal=null,this.modalList=[],this.backdropShown=!1,this.key=0}var e=t.prototype;return e.show=function(t,e,n){var r=this;if(void 0===e&&(e={}),void 0===n&&(n=!1),!(t.prototype instanceof _t)){var i="The ModalManager can only show Modals.";throw console.error(i),new Error(i)}this.backdropShown=!0,m.redraw.sync(),requestAnimationFrame((function(){r.modal={componentClass:t,attrs:e,key:r.key++},n?r.modalList.push(r.modal):r.modalList=[r.modal],m.redraw()}))},e.close=function(){this.modal&&(this.modalList.length>1?(this.modalList.pop(),this.modal=this.modalList[this.modalList.length-1]):(this.modal=null,this.modalList=[]),m.redraw())},e.isModalOpen=function(){return!!this.modal},t}(),Pi=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=Ft,o={};return 1==arguments.length?r=t:2==arguments.length?(o=t,r=e):3==arguments.length&&(i=t,o=e,r=n),this.activeAlerts[++this.alertId]={children:r,attrs:o,componentClass:i},m.redraw(),this.alertId},e.dismiss=function(t){t&&t in this.activeAlerts&&(delete this.activeAlerts[t],m.redraw())},e.clear=function(){this.activeAlerts={},m.redraw()},t}();function Bi(t,e,n){var r,i;console.group("%c"+e,"background-color: #d83e3e; color: #ffffff; font-weight: bold;"),console.error(n),console.groupEnd(),null!=(r=v.session)&&null!=(i=r.user)&&i.isAdmin()&&v.alerts.show({type:"error"},""+t)}var Ii=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.token=function(){return fe.attribute("token").call(this)},n.userId=function(){return fe.attribute("userId").call(this)},n.title=function(){return fe.attribute("title").call(this)},n.type=function(){return fe.attribute("type").call(this)},n.createdAt=function(){return fe.attribute("createdAt",fe.transformDate).call(this)},n.lastActivityAt=function(){return fe.attribute("lastActivityAt",fe.transformDate).call(this)},n.lastIpAddress=function(){return fe.attribute("lastIpAddress").call(this)},n.device=function(){return fe.attribute("device").call(this)},n.isCurrent=function(){return fe.attribute("isCurrent").call(this)},n.isSessionToken=function(){return fe.attribute("isSessionToken").call(this)},e}(fe),Oi=["background","deserialize","extract","modifyText"];function Li(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 Mi=function(){function t(){this.forum=void 0,this.routes={},this.initializers=new B,this.session=void 0,this.translator=new fi,this.store=new mi({"access-tokens":Ii,forums:Ai,users:Si,discussions:we,posts:Ti,groups:ze,notifications:Fi}),this.cache={},this.booted=!1,this.current=new k(null),this.previous=new k(null),this.modal=new _i,this.alerts=new Pi,this.drawer=void 0,this.history=null,this.pane=null,this.data=void 0,this.refs={fontawesome:"https://fontawesome.com/v5/search?o=r&m=free"},this._title="",this._titleCount=0,this.requestErrorAlert=null,this.initialRoute=void 0}var e=t.prototype;return e.load=function(t){this.data=t,this.translator.setLocale(t.locale)},e.boot=function(){var t,e=this,n=[];this.initializers.toArray().forEach((function(t){try{t(e)}catch(e){var r=t.itemName.includes("/")?t.itemName.replace(/(\/flarum-ext-)|(\/flarum-)/g,"-"):t.itemName;n.push((function(){return Bi(ot(v.translator.trans("core.lib.error.extension_initialiation_failed_message",{extension:r})),r+" failed to initialize",e)}))}})),this.store.pushPayload({data:this.data.resources}),this.forum=this.store.getById("forums","1"),this.session=new vi(null!=(t=this.store.getById("users",String(this.data.session.userId)))?t:null,this.data.session.csrfToken),this.mount(),this.initialRoute=window.location.href,n.forEach((function(t){return t()}))},e.bootExtensions=function(t){var e=this;Object.keys(t).forEach((function(n){var r=t[n];if(r.extend)for(var i,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Li(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)?Li(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r.extend.flat(1/0));!(i=o()).done;)i.value.extend(e,{name:n,exports:r})}))},e.mount=function(t){var e=this;void 0===t&&(t=""),m.mount(document.getElementById("modal"),{view:function(){return m(Er,{state:e.modal})}}),m.mount(document.getElementById("alerts"),{view:function(){return m(Nr,{state:e.alerts})}}),this.drawer=new gi,m.route(document.getElementById("content"),t+"/",yi(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"),Di()},e.preloadedApiDocument=function(){if(this.data.apiDocument&&window.location.href===this.initialRoute){var t=(pi(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?ot(v.translator.trans("core.lib.meta_titles.without_page_title",n)):ot(v.translator.trans("core.lib.meta_titles.with_page_title",n));r=t+r;var i=new DOMParser;document.title=i.parseFromString(r,"text/html").body.innerText},e.transformRequestOptions=function(t){var e=this,n=D({},t),r=n.background,i=n.deserialize,o=n.extract,s=n.modifyText,a=q(n,Oi),u=s||o,l=D({background:null==r||r,deserialize:null!=i?i:function(t){return t}},a);if(xi(l,"config",(function(t,n){n.setRequestHeader("X-CSRF-Token",e.session.csrfToken)})),l.method&&!["GET","POST"].includes(l.method)){var c=l.method;xi(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 bi(n,""+e,l,t);if(t.getResponseHeader){var r=t.getResponseHeader("X-CSRF-Token");r&&(v.session.csrfToken=r)}try{return""===e?null:JSON.parse(e)}catch(n){throw new bi(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=v.translator.trans("core.lib.error.permission_denied_message");break;case 404:case 410:o=v.translator.trans("core.lib.error.not_found_message");break;case 413:o=v.translator.trans("core.lib.error.payload_too_large_message");break;case 429:o=v.translator.trans("core.lib.error.rate_limit_exceeded_message");break;default:o=this.requestWasCrossOrigin(t)?v.translator.trans("core.lib.error.generic_cross_origin_message"):v.translator.trans("core.lib.error.generic_message")}var a=v.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)},v.translator.trans("core.lib.debug_button"))]},e?e(t):this.requestErrorDefaultHandler(t,a,s),Promise.reject(t)},e.requestWasCrossOrigin=function(t){return new URL(t.options.url,document.baseURI).origin!==window.location.origin},e.requestErrorDefaultHandler=function(t,e,n){if(!(t instanceof bi))throw t;if(e&&t.xhr){var r,i=t.options,o=i.method,s=i.url,a=t.xhr.status,u=void 0===a?"":a;console.group(o+" "+s+" "+u),n.length?(r=console).error.apply(r,n):console.error(t),console.groupEnd()}t.alert&&(this.requestErrorAlert=this.alerts.show(t.alert,t.alert.content))},e.showDebug=function(t,e){null!==this.requestErrorAlert&&this.alerts.dismiss(this.requestErrorAlert),this.modal.show(kr,{error:t,formattedError:e})},e.route=function(t,e){void 0===e&&(e={});var n=this.routes[t];if(!n)throw new Error("Route '"+t+"' does not exist");var r=n.path.replace(/:([^\/]+)/g,(function(t,n){return""+z(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:"")},F(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}(),$i=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){var t=v.history,e=v.pane;return m("div",{className:M("Navigation ButtonGroup",this.attrs.className),onmouseenter:e&&e.show.bind(e),onmouseleave:e&&e.onmouseleave.bind(e)},null!=t&&t.canGoBack()?[this.getBackButton(),this.getPaneButton()]:this.getDrawerButton())},n.getBackButton=function(){var t=v.history,e=null==t?void 0:t.getPrevious();return m(le,{className:"Button Navigation-back Button--icon",href:null==t?void 0:t.backUrl(),icon:"fas fa-chevron-left","aria-label":null==e?void 0:e.title,onclick:function(e){e.shiftKey||e.ctrlKey||e.metaKey||2===e.which||(e.preventDefault(),null==t||t.back())}})},n.getPaneButton=function(){var t=v.pane;return t&&t.active?m(yt,{className:M("Button Button--icon Navigation-pin",{active:t.pinned}),onclick:t.togglePinned.bind(t),icon:"fas fa-thumbtack"}):null},n.getDrawerButton=function(){if(!this.attrs.drawer)return null;var t=v.drawer,e=v.session.user;return m(yt,{className:M("Button Button--icon Navigation-drawer",{new:null==e?void 0:e.newNotificationCount()}),onclick:function(e){e.stopPropagation(),t.show()},icon:"fas fa-bars","aria-label":v.translator.trans("core.lib.nav.drawer_button")})},e}(E),ji=function(t){function e(){return t.call(this,{},1,20)||this}w(e,t);var n=e.prototype;return n.load=function(){var e,n;return null!=(e=Wi.session.user)&&e.newNotificationCount()&&(this.pages=[],this.location={page:1}),this.pages.length>0?Promise.resolve():(null==(n=Wi.session.user)||n.pushAttributes({newNotificationCount:0}),t.prototype.loadNext.call(this))},n.markAllAsRead=function(){var t;if(0!==this.pages.length)return null==(t=Wi.session.user)||t.pushAttributes({unreadNotificationCount:0}),this.pages.forEach((function(t){t.items.forEach((function(t){return t.pushAttributes({isRead:!0})}))})),Wi.request({url:Wi.forum.attribute("apiUrl")+"/notifications/read",method:"POST"})},n.deleteAll=function(){var t;if(0!==this.pages.length)return null==(t=Wi.session.user)||t.pushAttributes({unreadNotificationCount:0}),this.pages=[],Wi.request({url:Wi.forum.attribute("apiUrl")+"/notifications",method:"DELETE"})},F(e,[{key:"type",get:function(){return"notifications"}}]),e}(hn),Ri=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}(),Hi=["q"],Ui=function(t){function e(e){var n;return void 0===e&&(e=[]),(n=t.call(this,e)||this).initialValueSet=!1,n}w(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 Wi.current.type&&Wi.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,q(t,Hi));x(Wi.route(Wi.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(Wi.discussions.sortMap())[0]?delete e.sort:e.sort=t,x(Wi.route(Wi.current.get("routeName"),e))},e}(Ri);function qi(){return"ontouchstart"in window&&null!=navigator.vendor&&navigator.vendor.includes("Apple")&&null!=navigator.userAgent&&!navigator.userAgent.includes("CriOS")&&!navigator.userAgent.includes("FxiOS")}var zi=function(t){function e(){var e;return(e=t.call(this)||this).notificationComponents={discussionRenamed:$e},e.postComponents={comment:rn,discussionRenamed:sn},e.pane=null,e.history=new C,e.notifications=new ji,e.search=new Ui,e.composer=new Oe,e.discussions=new vn({}),e.route=void 0,e.data=void 0,In(y(e)),e.route=Object.assign(Object.getPrototypeOf(Object.getPrototypeOf(y(e))).route.bind(y(e)),function(t){return{discussion:function(t){function e(e,n){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(e,n){return t.route(n&&1!==n?"discussion.near":"discussion",{id:e.slug(),near:n&&1!==n?n:void 0})})),post:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(e){return t.route.discussion(e.discussion(),e.number())})),user:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(e){return t.route("user",{username:e.slug()})}))}}(y(e))),e}w(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,ot(this.translator.trans("core.forum.header.back_to_index_tooltip")),"/"),this.pane=new A(document.getElementById("app")),m.route.prefix="",t.prototype.mount.call(this,this.forum.attribute("basePath")),m.mount(document.getElementById("app-navigation"),{view:function(){return m($i,{className:"App-backControl",drawer:!0})}}),m.mount(document.getElementById("header-navigation"),$i),m.mount(document.getElementById("header-primary"),ue),m.mount(document.getElementById("header-secondary"),Pe),m.mount(document.getElementById("composer"),{view:function(){return m(Le,{state:e.composer})}}),On(this),document.getElementById("home-link").addEventListener("click",(function(t){var e;if(!t.ctrlKey&&!t.metaKey&&1!==t.button){t.preventDefault(),Wi.history.home();var n=null==(e=Wi.session.user)?void 0:e.id();n&&(Wi.store.find("users",n),m.redraw())}})),qi()&&$((function(){$(".App").addClass("mobile-safari")}))},n.viewingDiscussion=function(t){return this.current.matches(ae,{discussion:t})},n.authenticationComplete=function(t){t.loggedIn?window.location.reload():this.modal.show(Lt,t)},e}(Mi),Vi=new zi;window.app=Vi;const Wi=Vi;function Gi(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 Yi=function(){function t(t){this.model=void 0,this.callbacks=[],this.model=t}var e=t.prototype;return e.attribute=function(t,e){var n=this;return void 0===e&&(e=null),this.callbacks.push((function(){n.model.prototype[t]=e?fe.attribute(t,e):fe.attribute(t)})),this},e.hasOne=function(t){var e=this;return this.callbacks.push((function(){e.model.prototype[t]=fe.hasOne(t)})),this},e.hasMany=function(t){var e=this;return this.callbacks.push((function(){e.model.prototype[t]=fe.hasMany(t)})),this},e.extend=function(t,e){for(var n,r=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Gi(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)?Gi(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.callbacks);!(n=r()).done;)n.value.call(this)},t}(),Ki=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}(),Xi=function(){function t(){this.routes={},this.helpers={}}var e=t.prototype;return e.add=function(t,e,n){return this.routes[t]={path:e,component:n},this},e.helper=function(t,e){return this.helpers[t]=e,this},e.extend=function(t,e){Object.assign(t.routes,this.routes),Object.assign(t.route,this.helpers)},t}(),Ji=function(){function t(){this.models={}}var e=t.prototype;return e.add=function(t,e){return this.models[t]=e,this},e.extend=function(t,e){for(var n in this.models){if(t.store.models[n])throw new Error('The model type "'+n+'" has already been registered with the class "'+t.store.models[n].name+'".');t.store.models[n]=this.models[n]}},t}();const Qi={Model:Yi,PostTypes:Ki,Routes:Xi,Store:Ji};var Zi="The `evented` util is deprecated and no longer supported.",to="2547";const eo={handlers:null,getHandlers:function(t){return vt(Zi,to),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(Zi,to),this.getHandlers(t).forEach((function(t){return t.apply(e,r)}))},on:function(t,e){vt(Zi,to),this.getHandlers(t).push(e)},one:function(t,e){vt(Zi,to),this.getHandlers(t).push((function n(){e.apply(this,arguments),this.off(t,n)}))},off:function(t,e){vt(Zi,to);var n=this.getHandlers(t),r=n.indexOf(e);-1!==r&&n.splice(r,1)}};var no={prefix:"",suffix:"",blockPrefix:"",blockSuffix:"",multiline:!1,replaceNext:"",prefixSpace:!1,scanFor:"",surroundWithNewlines:!1,orderedList:!1,unorderedList:!1,trimFirst:!1};function ro(t){return t.trim().split("\n").length>1}function io(t,e){return Array(e+1).join(t)}function oo(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=io("\n",2-a)),i.match(/\S/)&&u<2&&(n=io("\n",2-u)),null==e&&(e=""),null==n&&(n=""),{newlinesToAppend:e,newlinesToPrepend:n}}function so(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 ao(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 uo(t,e){return e?"- ":t+1+". "}var lo,co=n(8492);function ho(t,e){var n,r,i=new RegExp(String.raw(lo||(n=["(w+/)?(","|common)/"],(r=["(\\w+\\/)?(","|common)\\/"])||(r=n.slice(0)),n.raw=r,lo=n),e)),o=/(\.js|\.tsx?)$/;return new Proxy(t,{get:function(t,e){return t[e]||t[e.replace(i,"$1").replace(o,"")]}})}var fo=["className","class"],po=["options","onchange","value","disabled","className","class","wrapperAttrs"],mo=function(t){function e(){return t.apply(this,arguments)||this}return w(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=q(a,fo),d=q(t,po);return m("span",Object.assign({className:M("Select",u,l)},c),m("select",Object.assign({className:M("Select-input FormControl",o,s),onchange:n?yn("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}(E),vo=["className","id"],go=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(t){var e=this.attrs,n=e.className,r=e.id,i=q(e,vo);return i.type||(i.type="text"),4===i.value.length&&(i.value=i.value.replace(/#([a-f0-9])([a-f0-9])([a-f0-9])/,"#$1$1$2$2$3$3")),m("div",{className:"ColorInput"},m("input",Object.assign({className:M("FormControl",n),id:r},i)),m("span",{className:"ColorInput-icon",role:"presentation"},nt("fas fa-exclamation-circle")),m("input",Object.assign({className:"ColorInput-preview"},i,{type:"color"})))},e}(E),yo=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return m(Et,{text:this.attrs.tooltipText||ot(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 bo={extenders:Qi,extend:o,Session:vi,Store:mi,"utils/BasicEditorDriver":Ct,"utils/bidi":h,"utils/evented":eo,"utils/EventEmitter":fn,"utils/KeyboardNavigatable":Ce,"utils/liveHumanTimes":Di,"utils/ItemList":B,"utils/mixin":function(t){for(var e=function(t){function e(){return t.apply(this,arguments)||this}return w(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":st,"utils/computed":pe,"utils/insertText":xt,"utils/styleSelectedText":function(t,e){t.focus(),e=Object.assign({},no,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=ao((r=so(e)).text)).text:(n=so((r=ao(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""+uo(n,e.unorderedList)+t})),d=c.reduce((function(t,n,r){return t+uo(r,e.unorderedList).length}),0),h=c.reduce((function(t,n,r){return t+uo(r,!e.unorderedList).length}),0);if(a.processed)return n?i=r=Math.max(r-uo(0,e.unorderedList).length,0):(r=t.selectionStart,i=t.selectionEnd-d),{text:l,selectionStart:r,selectionEnd:i};var f=oo(t),p=f.newlinesToAppend,m=f.newlinesToPrepend,v=p+c.join("\n")+m;return n?i=r=Math.max(r+uo(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&&ro(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=oo(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=ro(h)&&i.length>0?i+"\n":n,p=ro(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=oo(t);f=b.newlinesToAppend+n,p+=b.newlinesToPrepend}if(h.startsWith(f)&&h.endsWith(p)){var w=h.slice(f.length,h.length-p.length);if(c===d){var D=c-f.length;D=Math.max(D,v),v=g=D=Math.min(D,v+w.length)}else g=v+w.length;return{text:w,selectionStart:v,selectionEnd:g}}if(y)return u.length>0&&h.match(u)?{text:f+(p=p.replace(s,h)),selectionStart:v=g=v+f.length,selectionEnd:g}:{text:f+h+p,selectionStart:v=v+f.length+h.length+p.indexOf(s),selectionEnd:g=v+s.length};var x=f+h+p;v=c+f.length,g=d+f.length;var C=h.match(/^\s*|\s*$/g);if(e.trimFirst&&C){var A=C[0]||"",E=C[1]||"";x=A+f+h.trim()+p+E,v+=A.length,g-=E.length}return{text:x,selectionStart:v,selectionEnd:g}}(t,e),xt(t,n)},"utils/Drawer":gi,"utils/EditorDriverInterface":co,"utils/anchorScroll":oe,"utils/RequestError":bi,"utils/abbreviateNumber":at,"utils/string":t,"utils/SubtreeRetainer":dt,"utils/escapeRegExp":Ut,"utils/extract":z,"utils/ScrollListener":Yt,"utils/stringToColor":ki,"utils/Stream":Bt,"utils/subclassOf":N,"utils/setRouteWithForcedRefresh":x,"utils/patchMithril":f,"utils/proxifyCompat":ho,"utils/classList":M,"utils/extractText":ot,"utils/formatNumber":te,"utils/mapRoutes":yi,"utils/withAttr":yn,"utils/throttleDebounce":s,"utils/isObject":_,"utils/focusTrap":i,"utils/isDark":me,"models/AccessToken":Ii,"models/Notification":Fi,"models/User":Si,"models/Post":Ti,"models/Discussion":we,"models/Group":ze,"models/Forum":Ai,Component:E,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:fi,"components/AlertManager":Nr,"components/Page":S,"components/Switch":wn,"components/Badge":be,"components/LoadingIndicator":ft,"components/Placeholder":zt,"components/Separator":O,"components/Dropdown":ut,"components/SplitDropdown":ne,"components/RequestErrorModal":kr,"components/FieldSet":Dn,"components/Select":mo,"components/Navigation":$i,"components/Alert":Ft,"components/Link":G,"components/LinkButton":le,"components/Checkbox":bn,"components/ColorPreviewInput":go,"components/ConfirmDocumentUnload":pt,"components/SelectDropdown":he,"components/ModalManager":Er,"components/Button":yt,"components/Modal":_t,"components/GroupBadge":qe,"components/TextEditor":Nt,"components/TextEditorButton":yo,"components/Tooltip":Et,"components/EditUserModal":Ve,"components/LabelValue":Tn,"components/IPAddress":tn,Model:fe,Application:Mi,"helpers/fullTime":Ze,"helpers/avatar":Y,"helpers/fireApplicationError":Bi,"helpers/fireDebugWarning":e,"helpers/icon":nt,"helpers/humanTime":lt,"helpers/punctuateSeries":function(t){if(2===t.length)return v.translator.trans("core.lib.series.two_text",{first:t[0],second:t[1]});if(t.length>=3){var e=t.slice(1,t.length-1).reduce((function(t,e){return t.concat([e,v.translator.trans("core.lib.series.glue_text")])}),[]).slice(0,-1);return v.translator.trans("core.lib.series.three_text",{first:t[0],second:e,third:t[t.length-1]})}return t},"helpers/highlight":et,"helpers/username":Xt,"helpers/userOnline":Je,"helpers/listItems":H,"helpers/textContrastClass":ve,"resolvers/DefaultResolver":kn,"states/PaginatedListState":hn,"states/AlertManagerState":Pi,"states/ModalManagerState":_i,"states/PageState":k};var wo=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.initAttrs=function(e){e.className=M(e.className,"LogInButton"),e.onclick=function(){var t=$(window);window.open(Wi.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),Do=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.post,e=t.user();return m(G,{className:"PostPreview",href:Wi.route.post(t),onclick:this.attrs.onclick},m("span",{className:"PostPreview-content"},Y(e),Xt(e)," ",m("span",{className:"PostPreview-excerpt"},this.excerpt())))},n.content=function(){return"comment"===this.attrs.post.contentType()&&this.attrs.post.contentPlain()},n.excerpt=function(){return this.content()?et(this.content(),this.attrs.highlight,300):""},e}(E);const xo=Object.assign(bo,{"utils/PostControls":He,"utils/KeyboardNavigatable":Ce,"utils/slidable":Rt,"utils/History":C,"utils/DiscussionControls":jt,"utils/alertEmailConfirmation":On,"utils/UserControls":Ye,"utils/Pane":A,"utils/BasicEditorDriver":Ct,"utils/isSafariMobile":qi,"states/ComposerState":Oe,"states/DiscussionListState":vn,"states/GlobalSearchState":Ui,"states/NotificationListState":ji,"states/PostStreamState":se,"states/SearchState":Ri,"states/UserSecurityPageState":Pn,"components/AffixedSidebar":We,"components/DiscussionPage":ae,"components/DiscussionListPane":Gt,"components/LogInModal":Mt,"components/NewAccessTokenModal":_n,"components/ComposerBody":kt,"components/ForgotPasswordModal":It,"components/Notification":Me,"components/LogInButton":wo,"components/DiscussionsUserPage":gn,"components/Composer":Le,"components/SessionDropdown":ce,"components/HeaderPrimary":ue,"components/PostEdited":nn,"components/PostStream":Zt,"components/ChangePasswordModal":Cn,"components/IndexPage":cn,"components/DiscussionRenamedNotification":$e,"components/DiscussionsSearchSource":Te,"components/DiscussionsSearchItem":Se,"components/HeaderSecondary":Pe,"components/ComposerButton":Be,"components/DiscussionList":Vt,"components/ReplyPlaceholder":Qt,"components/AvatarEditor":Ke,"components/Post":Ue,"components/SettingsPage":En,"components/TerminalPost":ct,"components/ChangeEmailModal":An,"components/NotificationsDropdown":xe,"components/UserPage":Ge,"components/PostUser":Qe,"components/UserCard":Xe,"components/UsersSearchSource":Fe,"components/UserSecurityPage":Bn,"components/NotificationGrid":xn,"components/PostPreview":Do,"components/EventPost":on,"components/DiscussionHero":U,"components/PostMeta":en,"components/DiscussionRenamedPost":sn,"components/DiscussionComposer":ln,"components/LogInButtons":Ot,"components/NotificationList":De,"components/WelcomeHero":un,"components/SignUpModal":Lt,"components/CommentPost":rn,"components/ComposerPostPreview":Jt,"components/ReplyComposer":Tt,"components/NotificationsPage":Nn,"components/PostStreamScrubber":ee,"components/EditPostComposer":Re,"components/RenameDiscussionModal":$t,"components/Search":_e,"components/DiscussionListItem":qt,"components/LoadingPost":Kt,"components/PostsUserPage":dn,"components/AccessTokensList":Fn,"resolvers/DiscussionPageResolver":Sn,routes:In,ForumApplication:zi});xo.app=Wi;var Co=ho(xo,"forum")})(),flarum.core=r})();
 //# sourceMappingURL=forum.js.map
\ No newline at end of file
diff --git a/framework/core/js/dist/forum.js.map b/framework/core/js/dist/forum.js.map
index d4929aa976..66f847badb 100644
--- a/framework/core/js/dist/forum.js.map
+++ b/framework/core/js/dist/forum.js.map
@@ -1 +1 @@
-{"version":3,"file":"forum.js","mappings":";mCAOKA,MAAMC,UAAgB,OACzBD,MAAMC,UAAgB,KAAI,SAASC,EAAuCC,GAExE,OAAa,MAALA,EAAAA,EAAS,GAAK,EAElBH,MAAMC,UAAUG,OAAOC,KAAKC,MAAM,SAACC,EAAKC,GAAG,OAAYD,EAAIE,OAAOT,MAAMU,QAAQF,GAAON,EAAKG,KAAKG,EAAKL,EAAQ,GAAKK,EAAI,GAAE,IAGzH,UACIF,KACV,eCRD,SAAUK,GACT,aAKA,IAAIC,EAAQ,SAARA,EAAkBC,EAASC,GAC7BR,KAAKQ,QAAUH,EAAEI,OAAO,CAAC,EAAGH,EAAMI,SAAUF,GAE5C,IAAIG,EAASX,KAAKQ,QAAQG,SAAWL,EAAMI,SAASC,OAASN,EAAEL,KAAKQ,QAAQG,QAAUN,EAAEO,UAAUC,KAAKb,KAAKQ,QAAQG,QAEpHX,KAAKc,QAAUH,EACZI,GAAG,2BAA4BV,EAAEW,MAAMhB,KAAKiB,cAAejB,OAC3De,GAAG,0BAA4BV,EAAEW,MAAMhB,KAAKkB,2BAA4BlB,OAE3EA,KAAKmB,SAAed,EAAEE,GACtBP,KAAKoB,QAAe,KACpBpB,KAAKqB,MAAe,KACpBrB,KAAKsB,aAAe,KAEpBtB,KAAKiB,eACP,EA0FA,SAASM,EAAOC,GACd,OAAOxB,KAAKyB,MAAK,WACf,IAAIC,EAAUrB,EAAEL,MACZ2B,EAAUD,EAAMC,KAAK,YACrBnB,EAA2B,iBAAVgB,GAAsBA,EAEtCG,GAAMD,EAAMC,KAAK,WAAaA,EAAO,IAAIrB,EAAMN,KAAMQ,IACrC,iBAAVgB,GAAoBG,EAAKH,IACtC,GACF,CAjGAlB,EAAMsB,QAAW,QAEjBtB,EAAMuB,MAAW,+BAEjBvB,EAAMI,SAAW,CACf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6B7vB,EAC7B,sBAAuBwuB,GACvB,mCAAoCyB,GACpC,gCAAiCM,GACjC,0BAA2BvkB,GAC3B,8BAA+ByU,GAC/B,yBAA0B6P,GAC1B,yBAA0BrkB,GAC1B,yBAA0BkjB,GAC1B,iCAAkCrb,GAClC,2BAA4B/J,GAC5B,+BAAgC4rB,GAChC,gCAAiCzd,GACjC,8BAA+B6R,GAC/B,mCAAoC3c,GACpC,oBAAqBiX,GACrB,gCAAiCzU,GACjC,yBAA0BiE,GAC1B,2BAA4B2d,GAC5B,8BAA+B4E,GAC/B,mCAAoCJ,GACpClzC,OAAQA,GACR6wD,iBAAkBA,KCnJpB+G,GAAAA,IAAgBn/C,GAET,IAAMq7C,GAASD,GAAc+D,GAAW","sources":["webpack://@flarum/core/./src/common/utils/arrayFlatPolyfill.ts","webpack://@flarum/core/../../../node_modules/bootstrap/js/affix.js","webpack://@flarum/core/../../../node_modules/bootstrap/js/dropdown.js","webpack://@flarum/core/../../../node_modules/bootstrap/js/tooltip.js","webpack://@flarum/core/../../../node_modules/bootstrap/js/transition.js","webpack://@flarum/core/../../../node_modules/color-thief-browser/dist/color-thief.min.js","webpack://@flarum/core/../../../node_modules/dayjs/dayjs.min.js","webpack://@flarum/core/../../../node_modules/dayjs/plugin/localizedFormat.js","webpack://@flarum/core/../../../node_modules/dayjs/plugin/relativeTime.js","webpack://@flarum/core/../../../node_modules/expose-loader/dist/runtime/getGlobalThis.js","webpack://@flarum/core/../../../node_modules/jquery.hotkeys/jquery.hotkeys.js","webpack://@flarum/core/../../../node_modules/jquery/dist/jquery.js","webpack://@flarum/core/../../../node_modules/mithril/api/mount-redraw.js","webpack://@flarum/core/../../../node_modules/mithril/api/router.js","webpack://@flarum/core/../../../node_modules/mithril/hyperscript.js","webpack://@flarum/core/../../../node_modules/mithril/index.js","webpack://@flarum/core/../../../node_modules/mithril/mount-redraw.js","webpack://@flarum/core/../../../node_modules/mithril/pathname/assign.js","webpack://@flarum/core/../../../node_modules/mithril/pathname/build.js","webpack://@flarum/core/../../../node_modules/mithril/pathname/compileTemplate.js","webpack://@flarum/core/../../../node_modules/mithril/pathname/parse.js","webpack://@flarum/core/../../../node_modules/mithril/promise/polyfill.js","webpack://@flarum/core/../../../node_modules/mithril/promise/promise.js","webpack://@flarum/core/../../../node_modules/mithril/querystring/build.js","webpack://@flarum/core/../../../node_modules/mithril/querystring/parse.js","webpack://@flarum/core/../../../node_modules/mithril/render.js","webpack://@flarum/core/../../../node_modules/mithril/render/fragment.js","webpack://@flarum/core/../../../node_modules/mithril/render/hyperscript.js","webpack://@flarum/core/../../../node_modules/mithril/render/hyperscriptVnode.js","webpack://@flarum/core/../../../node_modules/mithril/render/render.js","webpack://@flarum/core/../../../node_modules/mithril/render/trust.js","webpack://@flarum/core/../../../node_modules/mithril/render/vnode.js","webpack://@flarum/core/../../../node_modules/mithril/request.js","webpack://@flarum/core/../../../node_modules/mithril/request/request.js","webpack://@flarum/core/../../../node_modules/mithril/route.js","webpack://@flarum/core/../../../node_modules/mithril/stream.js","webpack://@flarum/core/../../../node_modules/mithril/stream/stream.js","webpack://@flarum/core/../../../node_modules/punycode/punycode.es6.js","webpack://@flarum/core/../../../node_modules/textarea-caret/index.js","webpack://@flarum/core/../../../node_modules/jquery/dist/jquery-exposed.js","webpack://@flarum/core/../../../node_modules/color-thief-browser/dist/color-thief.min-exposed.js","webpack://@flarum/core/../../../node_modules/dayjs/dayjs.min-exposed.js","webpack://@flarum/core/../../../node_modules/mithril/index-exposed.js","webpack://@flarum/core/../../../node_modules/punycode/punycode.es6-exposed.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/classCallCheck.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/createClass.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/defineProperty.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/inherits.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/slicedToArray.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/typeof.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/regenerator/index.js","webpack://@flarum/core/webpack/bootstrap","webpack://@flarum/core/webpack/runtime/compat get default export","webpack://@flarum/core/webpack/runtime/define property getters","webpack://@flarum/core/webpack/runtime/global","webpack://@flarum/core/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/core/webpack/runtime/make namespace object","webpack://@flarum/core/./src/common/utils/bidi.js","webpack://@flarum/core/./src/common/utils/patchMithril.js","webpack://@flarum/core/./src/common/app.ts","webpack://@flarum/core/./src/common/index.ts","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/core/./src/common/utils/setRouteWithForcedRefresh.ts","webpack://@flarum/core/./src/forum/utils/History.ts","webpack://@flarum/core/./src/forum/utils/Pane.js","webpack://@flarum/core/./src/common/Component.ts","webpack://@flarum/core/./src/common/utils/subclassOf.js","webpack://@flarum/core/./src/common/states/PageState.js","webpack://@flarum/core/./src/common/components/Page.tsx","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://@flarum/core/./src/common/utils/isObject.ts","webpack://@flarum/core/./src/common/utils/ItemList.ts","webpack://@flarum/core/./src/common/components/Separator.js","webpack://@flarum/core/../../../node_modules/clsx/dist/clsx.m.js","webpack://@flarum/core/./src/common/utils/classList.ts","webpack://@flarum/core/./src/common/helpers/listItems.tsx","webpack://@flarum/core/./src/forum/components/DiscussionHero.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://@flarum/core/./src/common/utils/extract.ts","webpack://@flarum/core/./src/common/utils/string.ts","webpack://@flarum/core/./src/common/components/Link.js","webpack://@flarum/core/./src/common/helpers/avatar.tsx","webpack://@flarum/core/./src/common/helpers/highlight.tsx","webpack://@flarum/core/./src/common/helpers/icon.tsx","webpack://@flarum/core/./src/common/utils/extractText.ts","webpack://@flarum/core/./src/common/utils/humanTime.ts","webpack://@flarum/core/./src/common/utils/abbreviateNumber.ts","webpack://@flarum/core/./src/common/components/Dropdown.tsx","webpack://@flarum/core/./src/common/helpers/humanTime.tsx","webpack://@flarum/core/./src/forum/components/TerminalPost.js","webpack://@flarum/core/./src/common/utils/SubtreeRetainer.ts","webpack://@flarum/core/./src/common/components/LoadingIndicator.tsx","webpack://@flarum/core/./src/common/components/ConfirmDocumentUnload.js","webpack://@flarum/core/./src/common/helpers/fireDebugWarning.ts","webpack://@flarum/core/./src/common/components/Button.tsx","webpack://@flarum/core/./src/common/utils/insertText.ts","webpack://@flarum/core/./src/common/utils/BasicEditorDriver.ts","webpack://@flarum/core/./src/common/components/Tooltip.tsx","webpack://@flarum/core/./src/common/components/TextEditor.js","webpack://@flarum/core/./src/forum/components/ComposerBody.js","webpack://@flarum/core/./src/forum/components/ReplyComposer.js","webpack://@flarum/core/./src/common/components/Alert.tsx","webpack://@flarum/core/./src/common/components/Modal.tsx","webpack://@flarum/core/./src/common/utils/Stream.ts","webpack://@flarum/core/./src/forum/components/ForgotPasswordModal.tsx","webpack://@flarum/core/./src/forum/components/LogInButtons.js","webpack://@flarum/core/./src/forum/components/SignUpModal.tsx","webpack://@flarum/core/./src/forum/components/LogInModal.tsx","webpack://@flarum/core/./src/forum/components/RenameDiscussionModal.tsx","webpack://@flarum/core/./src/forum/utils/DiscussionControls.js","webpack://@flarum/core/./src/forum/utils/slidable.js","webpack://@flarum/core/./src/common/utils/escapeRegExp.ts","webpack://@flarum/core/./src/forum/components/DiscussionListItem.tsx","webpack://@flarum/core/./src/common/components/Placeholder.js","webpack://@flarum/core/./src/forum/components/DiscussionList.js","webpack://@flarum/core/./src/forum/components/DiscussionListPane.js","webpack://@flarum/core/./src/common/utils/ScrollListener.js","webpack://@flarum/core/./src/forum/components/LoadingPost.js","webpack://@flarum/core/./src/common/helpers/username.tsx","webpack://@flarum/core/./src/forum/components/ComposerPostPreview.js","webpack://@flarum/core/./src/forum/components/ReplyPlaceholder.js","webpack://@flarum/core/./src/forum/components/PostStream.js","webpack://@flarum/core/./src/common/utils/formatNumber.ts","webpack://@flarum/core/./src/forum/components/PostStreamScrubber.js","webpack://@flarum/core/./src/common/components/SplitDropdown.tsx","webpack://@flarum/core/../throttle.js","webpack://@flarum/core/../debounce.js","webpack://@flarum/core/./src/common/utils/anchorScroll.js","webpack://@flarum/core/./src/forum/states/PostStreamState.ts","webpack://@flarum/core/./src/forum/components/DiscussionPage.tsx","webpack://@flarum/core/./src/forum/components/HeaderPrimary.js","webpack://@flarum/core/./src/common/components/LinkButton.js","webpack://@flarum/core/./src/forum/components/SessionDropdown.tsx","webpack://@flarum/core/./src/common/components/SelectDropdown.tsx","webpack://@flarum/core/./src/common/Model.ts","webpack://@flarum/core/./src/common/utils/computed.ts","webpack://@flarum/core/./src/common/utils/isDark.ts","webpack://@flarum/core/./src/common/helpers/textContrastClass.ts","webpack://@flarum/core/./src/common/utils/KeyboardNavigatable.ts","webpack://@flarum/core/./src/common/components/Badge.tsx","webpack://@flarum/core/./src/common/models/Discussion.tsx","webpack://@flarum/core/./src/forum/components/NotificationList.js","webpack://@flarum/core/./src/forum/components/NotificationsDropdown.tsx","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@flarum/core/./src/forum/components/DiscussionsSearchItem.tsx","webpack://@flarum/core/./src/forum/components/DiscussionsSearchSource.tsx","webpack://@flarum/core/./src/forum/components/UsersSearchSource.tsx","webpack://@flarum/core/./src/forum/components/Search.tsx","webpack://@flarum/core/./src/forum/components/HeaderSecondary.js","webpack://@flarum/core/./src/forum/components/ComposerButton.js","webpack://@flarum/core/./src/forum/states/ComposerState.js","webpack://@flarum/core/./src/forum/components/Composer.js","webpack://@flarum/core/./src/forum/components/Notification.tsx","webpack://@flarum/core/./src/forum/components/DiscussionRenamedNotification.tsx","webpack://@flarum/core/./src/forum/components/EditPostComposer.js","webpack://@flarum/core/./src/forum/utils/PostControls.js","webpack://@flarum/core/./src/forum/components/Post.tsx","webpack://@flarum/core/./src/common/components/GroupBadge.tsx","webpack://@flarum/core/./src/common/models/Group.ts","webpack://@flarum/core/./src/common/components/EditUserModal.tsx","webpack://@flarum/core/./src/forum/components/AffixedSidebar.js","webpack://@flarum/core/./src/forum/components/UserPage.tsx","webpack://@flarum/core/./src/forum/utils/UserControls.js","webpack://@flarum/core/./src/forum/components/AvatarEditor.js","webpack://@flarum/core/./src/forum/components/UserCard.js","webpack://@flarum/core/./src/common/helpers/userOnline.tsx","webpack://@flarum/core/./src/forum/components/PostUser.js","webpack://@flarum/core/./src/common/helpers/fullTime.tsx","webpack://@flarum/core/./src/common/components/IPAddress.tsx","webpack://@flarum/core/./src/forum/components/PostMeta.js","webpack://@flarum/core/./src/forum/components/PostEdited.js","webpack://@flarum/core/./src/forum/components/CommentPost.js","webpack://@flarum/core/./src/forum/components/EventPost.js","webpack://@flarum/core/./src/forum/components/DiscussionRenamedPost.js","webpack://@flarum/core/./src/forum/components/WelcomeHero.tsx","webpack://@flarum/core/./src/forum/components/DiscussionComposer.js","webpack://@flarum/core/./src/forum/components/IndexPage.tsx","webpack://@flarum/core/./src/forum/components/PostsUserPage.tsx","webpack://@flarum/core/./src/common/states/PaginatedListState.ts","webpack://@flarum/core/./src/common/utils/EventEmitter.ts","webpack://@flarum/core/./src/forum/states/DiscussionListState.ts","webpack://@flarum/core/./src/forum/components/DiscussionsUserPage.tsx","webpack://@flarum/core/./src/common/utils/withAttr.ts","webpack://@flarum/core/./src/common/components/Checkbox.tsx","webpack://@flarum/core/./src/common/components/Switch.tsx","webpack://@flarum/core/./src/common/components/FieldSet.js","webpack://@flarum/core/./src/forum/components/NotificationGrid.js","webpack://@flarum/core/./src/forum/components/ChangePasswordModal.tsx","webpack://@flarum/core/./src/forum/components/ChangeEmailModal.tsx","webpack://@flarum/core/./src/forum/components/SettingsPage.tsx","webpack://@flarum/core/./src/forum/components/NotificationsPage.tsx","webpack://@flarum/core/./src/common/resolvers/DefaultResolver.ts","webpack://@flarum/core/./src/forum/resolvers/DiscussionPageResolver.ts","webpack://@flarum/core/./src/common/components/LabelValue.tsx","webpack://@flarum/core/./src/forum/components/AccessTokensList.tsx","webpack://@flarum/core/./src/forum/components/NewAccessTokenModal.tsx","webpack://@flarum/core/./src/forum/states/UserSecurityPageState.ts","webpack://@flarum/core/./src/forum/components/UserSecurityPage.tsx","webpack://@flarum/core/./src/forum/routes.ts","webpack://@flarum/core/./src/forum/utils/alertEmailConfirmation.js","webpack://@flarum/core/../src/index.js","webpack://@flarum/core/../index.js","webpack://@flarum/core/./src/common/utils/focusTrap.ts","webpack://@flarum/core/../../../node_modules/body-scroll-lock/lib/bodyScrollLock.esm.js","webpack://@flarum/core/../source/pluralTypeHandler.js","webpack://@flarum/core/./src/common/components/ModalManager.tsx","webpack://@flarum/core/./src/common/components/AlertManager.tsx","webpack://@flarum/core/./src/common/components/RequestErrorModal.tsx","webpack://@flarum/core/array-utils.js","webpack://@flarum/core/function-utils.js","webpack://@flarum/core/../source/utilities.js","webpack://@flarum/core/../source/selectTypeHandler.js","webpack://@flarum/core/../source/defaultRichHandler.js","webpack://@flarum/core/../source/RichMessageFormatter.js","webpack://@flarum/core/../source/MessageFormatter.js","webpack://@flarum/core/../source/mithrilRichHandler.js","webpack://@flarum/core/./src/common/Translator.tsx","webpack://@flarum/core/./src/common/Store.ts","webpack://@flarum/core/./src/common/Session.ts","webpack://@flarum/core/./src/common/utils/Drawer.js","webpack://@flarum/core/./src/common/utils/mapRoutes.ts","webpack://@flarum/core/./src/common/utils/RequestError.ts","webpack://@flarum/core/./src/common/utils/liveHumanTimes.ts","webpack://@flarum/core/./src/common/extend.ts","webpack://@flarum/core/./src/common/models/Forum.ts","webpack://@flarum/core/./src/common/utils/stringToColor.ts","webpack://@flarum/core/./src/common/models/User.tsx","webpack://@flarum/core/./src/common/models/Post.ts","webpack://@flarum/core/./src/common/models/Notification.ts","webpack://@flarum/core/./src/common/states/ModalManagerState.ts","webpack://@flarum/core/./src/common/states/AlertManagerState.ts","webpack://@flarum/core/./src/common/helpers/fireApplicationError.ts","webpack://@flarum/core/./src/common/models/AccessToken.ts","webpack://@flarum/core/./src/common/Application.tsx","webpack://@flarum/core/./src/common/components/Navigation.tsx","webpack://@flarum/core/./src/forum/states/NotificationListState.ts","webpack://@flarum/core/./src/forum/states/SearchState.ts","webpack://@flarum/core/./src/forum/states/GlobalSearchState.ts","webpack://@flarum/core/./src/forum/utils/isSafariMobile.ts","webpack://@flarum/core/./src/forum/ForumApplication.tsx","webpack://@flarum/core/./src/forum/app.ts","webpack://@flarum/core/./src/common/extenders/Model.ts","webpack://@flarum/core/./src/common/extenders/PostTypes.ts","webpack://@flarum/core/./src/common/extenders/Routes.ts","webpack://@flarum/core/./src/common/extenders/Store.ts","webpack://@flarum/core/./src/common/extenders/index.ts","webpack://@flarum/core/./src/common/utils/evented.js","webpack://@flarum/core/./src/common/utils/styleSelectedText.ts","webpack://@flarum/core/./src/common/utils/proxifyCompat.ts","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js","webpack://@flarum/core/./src/common/components/Select.js","webpack://@flarum/core/./src/common/components/ColorPreviewInput.tsx","webpack://@flarum/core/./src/common/components/TextEditorButton.js","webpack://@flarum/core/./src/common/compat.ts","webpack://@flarum/core/./src/common/utils/mixin.js","webpack://@flarum/core/./src/common/Fragment.ts","webpack://@flarum/core/./src/common/helpers/punctuateSeries.js","webpack://@flarum/core/./src/forum/components/LogInButton.js","webpack://@flarum/core/./src/forum/components/PostPreview.js","webpack://@flarum/core/./src/forum/compat.ts","webpack://@flarum/core/./src/forum/index.ts"],"sourcesContent":["// Based off of the polyfill on MDN\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat#reduce_concat_isarray_recursivity\n//\n// Needed to provide support for Safari on iOS < 12\n\n// ts-ignored because we can afford to encapsulate some messy logic behind the clean typings.\n\nif (!Array.prototype['flat']) {\n  Array.prototype['flat'] = function flat<A, D extends number = 1>(this: A, depth?: D | unknown): any[] {\n    // @ts-ignore\n    return (depth ?? 1) > 0\n      ? // @ts-ignore\n        Array.prototype.reduce.call(this, (acc, val): any[] => acc.concat(Array.isArray(val) ? flat.call(val, depth - 1) : val), [])\n      : // If no depth is provided, or depth is 0, just return a copy of\n        // the array. Spread is supported in all major browsers (iOS 8+)\n        // @ts-ignore\n        [...this];\n  };\n}\n","/* ========================================================================\n * Bootstrap: affix.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#affix\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // AFFIX CLASS DEFINITION\n  // ======================\n\n  var Affix = function (element, options) {\n    this.options = $.extend({}, Affix.DEFAULTS, options)\n\n    var target = this.options.target === Affix.DEFAULTS.target ? $(this.options.target) : $(document).find(this.options.target)\n\n    this.$target = target\n      .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))\n      .on('click.bs.affix.data-api',  $.proxy(this.checkPositionWithEventLoop, this))\n\n    this.$element     = $(element)\n    this.affixed      = null\n    this.unpin        = null\n    this.pinnedOffset = null\n\n    this.checkPosition()\n  }\n\n  Affix.VERSION  = '3.4.1'\n\n  Affix.RESET    = 'affix affix-top affix-bottom'\n\n  Affix.DEFAULTS = {\n    offset: 0,\n    target: window\n  }\n\n  Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {\n    var scrollTop    = this.$target.scrollTop()\n    var position     = this.$element.offset()\n    var targetHeight = this.$target.height()\n\n    if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false\n\n    if (this.affixed == 'bottom') {\n      if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'\n      return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'\n    }\n\n    var initializing   = this.affixed == null\n    var colliderTop    = initializing ? scrollTop : position.top\n    var colliderHeight = initializing ? targetHeight : height\n\n    if (offsetTop != null && scrollTop <= offsetTop) return 'top'\n    if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'\n\n    return false\n  }\n\n  Affix.prototype.getPinnedOffset = function () {\n    if (this.pinnedOffset) return this.pinnedOffset\n    this.$element.removeClass(Affix.RESET).addClass('affix')\n    var scrollTop = this.$target.scrollTop()\n    var position  = this.$element.offset()\n    return (this.pinnedOffset = position.top - scrollTop)\n  }\n\n  Affix.prototype.checkPositionWithEventLoop = function () {\n    setTimeout($.proxy(this.checkPosition, this), 1)\n  }\n\n  Affix.prototype.checkPosition = function () {\n    if (!this.$element.is(':visible')) return\n\n    var height       = this.$element.height()\n    var offset       = this.options.offset\n    var offsetTop    = offset.top\n    var offsetBottom = offset.bottom\n    var scrollHeight = Math.max($(document).height(), $(document.body).height())\n\n    if (typeof offset != 'object')         offsetBottom = offsetTop = offset\n    if (typeof offsetTop == 'function')    offsetTop    = offset.top(this.$element)\n    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)\n\n    var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)\n\n    if (this.affixed != affix) {\n      if (this.unpin != null) this.$element.css('top', '')\n\n      var affixType = 'affix' + (affix ? '-' + affix : '')\n      var e         = $.Event(affixType + '.bs.affix')\n\n      this.$element.trigger(e)\n\n      if (e.isDefaultPrevented()) return\n\n      this.affixed = affix\n      this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null\n\n      this.$element\n        .removeClass(Affix.RESET)\n        .addClass(affixType)\n        .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')\n    }\n\n    if (affix == 'bottom') {\n      this.$element.offset({\n        top: scrollHeight - height - offsetBottom\n      })\n    }\n  }\n\n\n  // AFFIX PLUGIN DEFINITION\n  // =======================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.affix')\n      var options = typeof option == 'object' && option\n\n      if (!data) $this.data('bs.affix', (data = new Affix(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  var old = $.fn.affix\n\n  $.fn.affix             = Plugin\n  $.fn.affix.Constructor = Affix\n\n\n  // AFFIX NO CONFLICT\n  // =================\n\n  $.fn.affix.noConflict = function () {\n    $.fn.affix = old\n    return this\n  }\n\n\n  // AFFIX DATA-API\n  // ==============\n\n  $(window).on('load', function () {\n    $('[data-spy=\"affix\"]').each(function () {\n      var $spy = $(this)\n      var data = $spy.data()\n\n      data.offset = data.offset || {}\n\n      if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom\n      if (data.offsetTop    != null) data.offset.top    = data.offsetTop\n\n      Plugin.call($spy, data)\n    })\n  })\n\n}(jQuery);\n","/* ========================================================================\n * Bootstrap: dropdown.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#dropdowns\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // DROPDOWN CLASS DEFINITION\n  // =========================\n\n  var backdrop = '.dropdown-backdrop'\n  var toggle   = '[data-toggle=\"dropdown\"]'\n  var Dropdown = function (element) {\n    $(element).on('click.bs.dropdown', this.toggle)\n  }\n\n  Dropdown.VERSION = '3.4.1'\n\n  function getParent($this) {\n    var selector = $this.attr('data-target')\n\n    if (!selector) {\n      selector = $this.attr('href')\n      selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\\s]*$)/, '') // strip for ie7\n    }\n\n    var $parent = selector !== '#' ? $(document).find(selector) : null\n\n    return $parent && $parent.length ? $parent : $this.parent()\n  }\n\n  function clearMenus(e) {\n    if (e && e.which === 3) return\n    $(backdrop).remove()\n    $(toggle).each(function () {\n      var $this         = $(this)\n      var $parent       = getParent($this)\n      var relatedTarget = { relatedTarget: this }\n\n      if (!$parent.hasClass('open')) return\n\n      if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return\n\n      $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))\n\n      if (e.isDefaultPrevented()) return\n\n      $this.attr('aria-expanded', 'false')\n      $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))\n    })\n  }\n\n  Dropdown.prototype.toggle = function (e) {\n    var $this = $(this)\n\n    if ($this.is('.disabled, :disabled')) return\n\n    var $parent  = getParent($this)\n    var isActive = $parent.hasClass('open')\n\n    clearMenus()\n\n    if (!isActive) {\n      if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {\n        // if mobile we use a backdrop because click events don't delegate\n        $(document.createElement('div'))\n          .addClass('dropdown-backdrop')\n          .insertAfter($(this))\n          .on('click', clearMenus)\n      }\n\n      var relatedTarget = { relatedTarget: this }\n      $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))\n\n      if (e.isDefaultPrevented()) return\n\n      $this\n        .trigger('focus')\n        .attr('aria-expanded', 'true')\n\n      $parent\n        .toggleClass('open')\n        .trigger($.Event('shown.bs.dropdown', relatedTarget))\n    }\n\n    return false\n  }\n\n  Dropdown.prototype.keydown = function (e) {\n    if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return\n\n    var $this = $(this)\n\n    e.preventDefault()\n    e.stopPropagation()\n\n    if ($this.is('.disabled, :disabled')) return\n\n    var $parent  = getParent($this)\n    var isActive = $parent.hasClass('open')\n\n    if (!isActive && e.which != 27 || isActive && e.which == 27) {\n      if (e.which == 27) $parent.find(toggle).trigger('focus')\n      return $this.trigger('click')\n    }\n\n    var desc = ' li:not(.disabled):visible a'\n    var $items = $parent.find('.dropdown-menu' + desc)\n\n    if (!$items.length) return\n\n    var index = $items.index(e.target)\n\n    if (e.which == 38 && index > 0)                 index--         // up\n    if (e.which == 40 && index < $items.length - 1) index++         // down\n    if (!~index)                                    index = 0\n\n    $items.eq(index).trigger('focus')\n  }\n\n\n  // DROPDOWN PLUGIN DEFINITION\n  // ==========================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this = $(this)\n      var data  = $this.data('bs.dropdown')\n\n      if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n      if (typeof option == 'string') data[option].call($this)\n    })\n  }\n\n  var old = $.fn.dropdown\n\n  $.fn.dropdown             = Plugin\n  $.fn.dropdown.Constructor = Dropdown\n\n\n  // DROPDOWN NO CONFLICT\n  // ====================\n\n  $.fn.dropdown.noConflict = function () {\n    $.fn.dropdown = old\n    return this\n  }\n\n\n  // APPLY TO STANDARD DROPDOWN ELEMENTS\n  // ===================================\n\n  $(document)\n    .on('click.bs.dropdown.data-api', clearMenus)\n    .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })\n    .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)\n    .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)\n    .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)\n\n}(jQuery);\n","/* ========================================================================\n * Bootstrap: tooltip.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#tooltip\n * Inspired by the original jQuery.tipsy by Jason Frame\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n+function ($) {\n  'use strict';\n\n  var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn']\n\n  var uriAttrs = [\n    'background',\n    'cite',\n    'href',\n    'itemtype',\n    'longdesc',\n    'poster',\n    'src',\n    'xlink:href'\n  ]\n\n  var ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i\n\n  var DefaultWhitelist = {\n    // Global attributes allowed on any supplied element below.\n    '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n    a: ['target', 'href', 'title', 'rel'],\n    area: [],\n    b: [],\n    br: [],\n    col: [],\n    code: [],\n    div: [],\n    em: [],\n    hr: [],\n    h1: [],\n    h2: [],\n    h3: [],\n    h4: [],\n    h5: [],\n    h6: [],\n    i: [],\n    img: ['src', 'alt', 'title', 'width', 'height'],\n    li: [],\n    ol: [],\n    p: [],\n    pre: [],\n    s: [],\n    small: [],\n    span: [],\n    sub: [],\n    sup: [],\n    strong: [],\n    u: [],\n    ul: []\n  }\n\n  /**\n   * A pattern that recognizes a commonly useful subset of URLs that are safe.\n   *\n   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n   */\n  var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi\n\n  /**\n   * A pattern that matches safe data URLs. Only matches image, video and audio types.\n   *\n   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n   */\n  var DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i\n\n  function allowedAttribute(attr, allowedAttributeList) {\n    var attrName = attr.nodeName.toLowerCase()\n\n    if ($.inArray(attrName, allowedAttributeList) !== -1) {\n      if ($.inArray(attrName, uriAttrs) !== -1) {\n        return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN))\n      }\n\n      return true\n    }\n\n    var regExp = $(allowedAttributeList).filter(function (index, value) {\n      return value instanceof RegExp\n    })\n\n    // Check if a regular expression validates the attribute.\n    for (var i = 0, l = regExp.length; i < l; i++) {\n      if (attrName.match(regExp[i])) {\n        return true\n      }\n    }\n\n    return false\n  }\n\n  function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {\n    if (unsafeHtml.length === 0) {\n      return unsafeHtml\n    }\n\n    if (sanitizeFn && typeof sanitizeFn === 'function') {\n      return sanitizeFn(unsafeHtml)\n    }\n\n    // IE 8 and below don't support createHTMLDocument\n    if (!document.implementation || !document.implementation.createHTMLDocument) {\n      return unsafeHtml\n    }\n\n    var createdDocument = document.implementation.createHTMLDocument('sanitization')\n    createdDocument.body.innerHTML = unsafeHtml\n\n    var whitelistKeys = $.map(whiteList, function (el, i) { return i })\n    var elements = $(createdDocument.body).find('*')\n\n    for (var i = 0, len = elements.length; i < len; i++) {\n      var el = elements[i]\n      var elName = el.nodeName.toLowerCase()\n\n      if ($.inArray(elName, whitelistKeys) === -1) {\n        el.parentNode.removeChild(el)\n\n        continue\n      }\n\n      var attributeList = $.map(el.attributes, function (el) { return el })\n      var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || [])\n\n      for (var j = 0, len2 = attributeList.length; j < len2; j++) {\n        if (!allowedAttribute(attributeList[j], whitelistedAttributes)) {\n          el.removeAttribute(attributeList[j].nodeName)\n        }\n      }\n    }\n\n    return createdDocument.body.innerHTML\n  }\n\n  // TOOLTIP PUBLIC CLASS DEFINITION\n  // ===============================\n\n  var Tooltip = function (element, options) {\n    this.type       = null\n    this.options    = null\n    this.enabled    = null\n    this.timeout    = null\n    this.hoverState = null\n    this.$element   = null\n    this.inState    = null\n\n    this.init('tooltip', element, options)\n  }\n\n  Tooltip.VERSION  = '3.4.1'\n\n  Tooltip.TRANSITION_DURATION = 150\n\n  Tooltip.DEFAULTS = {\n    animation: true,\n    placement: 'top',\n    selector: false,\n    template: '<div class=\"tooltip\" role=\"tooltip\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\"></div></div>',\n    trigger: 'hover focus',\n    title: '',\n    delay: 0,\n    html: false,\n    container: false,\n    viewport: {\n      selector: 'body',\n      padding: 0\n    },\n    sanitize : true,\n    sanitizeFn : null,\n    whiteList : DefaultWhitelist\n  }\n\n  Tooltip.prototype.init = function (type, element, options) {\n    this.enabled   = true\n    this.type      = type\n    this.$element  = $(element)\n    this.options   = this.getOptions(options)\n    this.$viewport = this.options.viewport && $(document).find($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))\n    this.inState   = { click: false, hover: false, focus: false }\n\n    if (this.$element[0] instanceof document.constructor && !this.options.selector) {\n      throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')\n    }\n\n    var triggers = this.options.trigger.split(' ')\n\n    for (var i = triggers.length; i--;) {\n      var trigger = triggers[i]\n\n      if (trigger == 'click') {\n        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))\n      } else if (trigger != 'manual') {\n        var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focusin'\n        var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'\n\n        this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))\n        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))\n      }\n    }\n\n    this.options.selector ?\n      (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :\n      this.fixTitle()\n  }\n\n  Tooltip.prototype.getDefaults = function () {\n    return Tooltip.DEFAULTS\n  }\n\n  Tooltip.prototype.getOptions = function (options) {\n    var dataAttributes = this.$element.data()\n\n    for (var dataAttr in dataAttributes) {\n      if (dataAttributes.hasOwnProperty(dataAttr) && $.inArray(dataAttr, DISALLOWED_ATTRIBUTES) !== -1) {\n        delete dataAttributes[dataAttr]\n      }\n    }\n\n    options = $.extend({}, this.getDefaults(), dataAttributes, options)\n\n    if (options.delay && typeof options.delay == 'number') {\n      options.delay = {\n        show: options.delay,\n        hide: options.delay\n      }\n    }\n\n    if (options.sanitize) {\n      options.template = sanitizeHtml(options.template, options.whiteList, options.sanitizeFn)\n    }\n\n    return options\n  }\n\n  Tooltip.prototype.getDelegateOptions = function () {\n    var options  = {}\n    var defaults = this.getDefaults()\n\n    this._options && $.each(this._options, function (key, value) {\n      if (defaults[key] != value) options[key] = value\n    })\n\n    return options\n  }\n\n  Tooltip.prototype.enter = function (obj) {\n    var self = obj instanceof this.constructor ?\n      obj : $(obj.currentTarget).data('bs.' + this.type)\n\n    if (!self) {\n      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())\n      $(obj.currentTarget).data('bs.' + this.type, self)\n    }\n\n    if (obj instanceof $.Event) {\n      self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true\n    }\n\n    if (self.tip().hasClass('in') || self.hoverState == 'in') {\n      self.hoverState = 'in'\n      return\n    }\n\n    clearTimeout(self.timeout)\n\n    self.hoverState = 'in'\n\n    if (!self.options.delay || !self.options.delay.show) return self.show()\n\n    self.timeout = setTimeout(function () {\n      if (self.hoverState == 'in') self.show()\n    }, self.options.delay.show)\n  }\n\n  Tooltip.prototype.isInStateTrue = function () {\n    for (var key in this.inState) {\n      if (this.inState[key]) return true\n    }\n\n    return false\n  }\n\n  Tooltip.prototype.leave = function (obj) {\n    var self = obj instanceof this.constructor ?\n      obj : $(obj.currentTarget).data('bs.' + this.type)\n\n    if (!self) {\n      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())\n      $(obj.currentTarget).data('bs.' + this.type, self)\n    }\n\n    if (obj instanceof $.Event) {\n      self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false\n    }\n\n    if (self.isInStateTrue()) return\n\n    clearTimeout(self.timeout)\n\n    self.hoverState = 'out'\n\n    if (!self.options.delay || !self.options.delay.hide) return self.hide()\n\n    self.timeout = setTimeout(function () {\n      if (self.hoverState == 'out') self.hide()\n    }, self.options.delay.hide)\n  }\n\n  Tooltip.prototype.show = function () {\n    var e = $.Event('show.bs.' + this.type)\n\n    if (this.hasContent() && this.enabled) {\n      this.$element.trigger(e)\n\n      var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])\n      if (e.isDefaultPrevented() || !inDom) return\n      var that = this\n\n      var $tip = this.tip()\n\n      var tipId = this.getUID(this.type)\n\n      this.setContent()\n      $tip.attr('id', tipId)\n      this.$element.attr('aria-describedby', tipId)\n\n      if (this.options.animation) $tip.addClass('fade')\n\n      var placement = typeof this.options.placement == 'function' ?\n        this.options.placement.call(this, $tip[0], this.$element[0]) :\n        this.options.placement\n\n      var autoToken = /\\s?auto?\\s?/i\n      var autoPlace = autoToken.test(placement)\n      if (autoPlace) placement = placement.replace(autoToken, '') || 'top'\n\n      $tip\n        .detach()\n        .css({ top: 0, left: 0, display: 'block' })\n        .addClass(placement)\n        .data('bs.' + this.type, this)\n\n      this.options.container ? $tip.appendTo($(document).find(this.options.container)) : $tip.insertAfter(this.$element)\n      this.$element.trigger('inserted.bs.' + this.type)\n\n      var pos          = this.getPosition()\n      var actualWidth  = $tip[0].offsetWidth\n      var actualHeight = $tip[0].offsetHeight\n\n      if (autoPlace) {\n        var orgPlacement = placement\n        var viewportDim = this.getPosition(this.$viewport)\n\n        placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top'    :\n                    placement == 'top'    && pos.top    - actualHeight < viewportDim.top    ? 'bottom' :\n                    placement == 'right'  && pos.right  + actualWidth  > viewportDim.width  ? 'left'   :\n                    placement == 'left'   && pos.left   - actualWidth  < viewportDim.left   ? 'right'  :\n                    placement\n\n        $tip\n          .removeClass(orgPlacement)\n          .addClass(placement)\n      }\n\n      var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)\n\n      this.applyPlacement(calculatedOffset, placement)\n\n      var complete = function () {\n        var prevHoverState = that.hoverState\n        that.$element.trigger('shown.bs.' + that.type)\n        that.hoverState = null\n\n        if (prevHoverState == 'out') that.leave(that)\n      }\n\n      $.support.transition && this.$tip.hasClass('fade') ?\n        $tip\n          .one('bsTransitionEnd', complete)\n          .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :\n        complete()\n    }\n  }\n\n  Tooltip.prototype.applyPlacement = function (offset, placement) {\n    var $tip   = this.tip()\n    var width  = $tip[0].offsetWidth\n    var height = $tip[0].offsetHeight\n\n    // manually read margins because getBoundingClientRect includes difference\n    var marginTop = parseInt($tip.css('margin-top'), 10)\n    var marginLeft = parseInt($tip.css('margin-left'), 10)\n\n    // we must check for NaN for ie 8/9\n    if (isNaN(marginTop))  marginTop  = 0\n    if (isNaN(marginLeft)) marginLeft = 0\n\n    offset.top  += marginTop\n    offset.left += marginLeft\n\n    // $.fn.offset doesn't round pixel values\n    // so we use setOffset directly with our own function B-0\n    $.offset.setOffset($tip[0], $.extend({\n      using: function (props) {\n        $tip.css({\n          top: Math.round(props.top),\n          left: Math.round(props.left)\n        })\n      }\n    }, offset), 0)\n\n    $tip.addClass('in')\n\n    // check to see if placing tip in new offset caused the tip to resize itself\n    var actualWidth  = $tip[0].offsetWidth\n    var actualHeight = $tip[0].offsetHeight\n\n    if (placement == 'top' && actualHeight != height) {\n      offset.top = offset.top + height - actualHeight\n    }\n\n    var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)\n\n    if (delta.left) offset.left += delta.left\n    else offset.top += delta.top\n\n    var isVertical          = /top|bottom/.test(placement)\n    var arrowDelta          = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight\n    var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'\n\n    $tip.offset(offset)\n    this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)\n  }\n\n  Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {\n    this.arrow()\n      .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')\n      .css(isVertical ? 'top' : 'left', '')\n  }\n\n  Tooltip.prototype.setContent = function () {\n    var $tip  = this.tip()\n    var title = this.getTitle()\n\n    if (this.options.html) {\n      if (this.options.sanitize) {\n        title = sanitizeHtml(title, this.options.whiteList, this.options.sanitizeFn)\n      }\n\n      $tip.find('.tooltip-inner').html(title)\n    } else {\n      $tip.find('.tooltip-inner').text(title)\n    }\n\n    $tip.removeClass('fade in top bottom left right')\n  }\n\n  Tooltip.prototype.hide = function (callback) {\n    var that = this\n    var $tip = $(this.$tip)\n    var e    = $.Event('hide.bs.' + this.type)\n\n    function complete() {\n      if (that.hoverState != 'in') $tip.detach()\n      if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.\n        that.$element\n          .removeAttr('aria-describedby')\n          .trigger('hidden.bs.' + that.type)\n      }\n      callback && callback()\n    }\n\n    this.$element.trigger(e)\n\n    if (e.isDefaultPrevented()) return\n\n    $tip.removeClass('in')\n\n    $.support.transition && $tip.hasClass('fade') ?\n      $tip\n        .one('bsTransitionEnd', complete)\n        .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :\n      complete()\n\n    this.hoverState = null\n\n    return this\n  }\n\n  Tooltip.prototype.fixTitle = function () {\n    var $e = this.$element\n    if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {\n      $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')\n    }\n  }\n\n  Tooltip.prototype.hasContent = function () {\n    return this.getTitle()\n  }\n\n  Tooltip.prototype.getPosition = function ($element) {\n    $element   = $element || this.$element\n\n    var el     = $element[0]\n    var isBody = el.tagName == 'BODY'\n\n    var elRect    = el.getBoundingClientRect()\n    if (elRect.width == null) {\n      // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093\n      elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })\n    }\n    var isSvg = window.SVGElement && el instanceof window.SVGElement\n    // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.\n    // See https://github.com/twbs/bootstrap/issues/20280\n    var elOffset  = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())\n    var scroll    = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }\n    var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null\n\n    return $.extend({}, elRect, scroll, outerDims, elOffset)\n  }\n\n  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {\n    return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2 } :\n           placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :\n           placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :\n        /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }\n\n  }\n\n  Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {\n    var delta = { top: 0, left: 0 }\n    if (!this.$viewport) return delta\n\n    var viewportPadding = this.options.viewport && this.options.viewport.padding || 0\n    var viewportDimensions = this.getPosition(this.$viewport)\n\n    if (/right|left/.test(placement)) {\n      var topEdgeOffset    = pos.top - viewportPadding - viewportDimensions.scroll\n      var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight\n      if (topEdgeOffset < viewportDimensions.top) { // top overflow\n        delta.top = viewportDimensions.top - topEdgeOffset\n      } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow\n        delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset\n      }\n    } else {\n      var leftEdgeOffset  = pos.left - viewportPadding\n      var rightEdgeOffset = pos.left + viewportPadding + actualWidth\n      if (leftEdgeOffset < viewportDimensions.left) { // left overflow\n        delta.left = viewportDimensions.left - leftEdgeOffset\n      } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow\n        delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset\n      }\n    }\n\n    return delta\n  }\n\n  Tooltip.prototype.getTitle = function () {\n    var title\n    var $e = this.$element\n    var o  = this.options\n\n    title = $e.attr('data-original-title')\n      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)\n\n    return title\n  }\n\n  Tooltip.prototype.getUID = function (prefix) {\n    do prefix += ~~(Math.random() * 1000000)\n    while (document.getElementById(prefix))\n    return prefix\n  }\n\n  Tooltip.prototype.tip = function () {\n    if (!this.$tip) {\n      this.$tip = $(this.options.template)\n      if (this.$tip.length != 1) {\n        throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')\n      }\n    }\n    return this.$tip\n  }\n\n  Tooltip.prototype.arrow = function () {\n    return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))\n  }\n\n  Tooltip.prototype.enable = function () {\n    this.enabled = true\n  }\n\n  Tooltip.prototype.disable = function () {\n    this.enabled = false\n  }\n\n  Tooltip.prototype.toggleEnabled = function () {\n    this.enabled = !this.enabled\n  }\n\n  Tooltip.prototype.toggle = function (e) {\n    var self = this\n    if (e) {\n      self = $(e.currentTarget).data('bs.' + this.type)\n      if (!self) {\n        self = new this.constructor(e.currentTarget, this.getDelegateOptions())\n        $(e.currentTarget).data('bs.' + this.type, self)\n      }\n    }\n\n    if (e) {\n      self.inState.click = !self.inState.click\n      if (self.isInStateTrue()) self.enter(self)\n      else self.leave(self)\n    } else {\n      self.tip().hasClass('in') ? self.leave(self) : self.enter(self)\n    }\n  }\n\n  Tooltip.prototype.destroy = function () {\n    var that = this\n    clearTimeout(this.timeout)\n    this.hide(function () {\n      that.$element.off('.' + that.type).removeData('bs.' + that.type)\n      if (that.$tip) {\n        that.$tip.detach()\n      }\n      that.$tip = null\n      that.$arrow = null\n      that.$viewport = null\n      that.$element = null\n    })\n  }\n\n  Tooltip.prototype.sanitizeHtml = function (unsafeHtml) {\n    return sanitizeHtml(unsafeHtml, this.options.whiteList, this.options.sanitizeFn)\n  }\n\n  // TOOLTIP PLUGIN DEFINITION\n  // =========================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.tooltip')\n      var options = typeof option == 'object' && option\n\n      if (!data && /destroy|hide/.test(option)) return\n      if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  var old = $.fn.tooltip\n\n  $.fn.tooltip             = Plugin\n  $.fn.tooltip.Constructor = Tooltip\n\n\n  // TOOLTIP NO CONFLICT\n  // ===================\n\n  $.fn.tooltip.noConflict = function () {\n    $.fn.tooltip = old\n    return this\n  }\n\n}(jQuery);\n","/* ========================================================================\n * Bootstrap: transition.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#transitions\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // CSS TRANSITION SUPPORT (Shoutout: https://modernizr.com/)\n  // ============================================================\n\n  function transitionEnd() {\n    var el = document.createElement('bootstrap')\n\n    var transEndEventNames = {\n      WebkitTransition : 'webkitTransitionEnd',\n      MozTransition    : 'transitionend',\n      OTransition      : 'oTransitionEnd otransitionend',\n      transition       : 'transitionend'\n    }\n\n    for (var name in transEndEventNames) {\n      if (el.style[name] !== undefined) {\n        return { end: transEndEventNames[name] }\n      }\n    }\n\n    return false // explicit for ie8 (  ._.)\n  }\n\n  // https://blog.alexmaccaw.com/css-transitions\n  $.fn.emulateTransitionEnd = function (duration) {\n    var called = false\n    var $el = this\n    $(this).one('bsTransitionEnd', function () { called = true })\n    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }\n    setTimeout(callback, duration)\n    return this\n  }\n\n  $(function () {\n    $.support.transition = transitionEnd()\n\n    if (!$.support.transition) return\n\n    $.event.special.bsTransitionEnd = {\n      bindType: $.support.transition.end,\n      delegateType: $.support.transition.end,\n      handle: function (e) {\n        if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)\n      }\n    }\n  })\n\n}(jQuery);\n","/*!\r\n * Color Thief v2.0\r\n * by Lokesh Dhakar - http://www.lokeshdhakar.com\r\n *\r\n * Thanks\r\n * ------\r\n * Nick Rabinowitz - For creating quantize.js.\r\n * John Schulz - For clean up and optimization. @JFSIII\r\n * Nathan Spady - For adding drag and drop support to the demo page.\r\n *\r\n * License\r\n * -------\r\n * Copyright 2011, 2015 Lokesh Dhakar\r\n * Released under the MIT license\r\n * https://raw.githubusercontent.com/lokesh/color-thief/master/LICENSE\r\n *\r\n */\r\nvar CanvasImage=function(a){this.canvas=document.createElement(\"canvas\"),this.context=this.canvas.getContext(\"2d\"),document.body.appendChild(this.canvas),this.width=this.canvas.width=a.width,this.height=this.canvas.height=a.height,this.context.drawImage(a,0,0,this.width,this.height)};CanvasImage.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},CanvasImage.prototype.update=function(a){this.context.putImageData(a,0,0)},CanvasImage.prototype.getPixelCount=function(){return this.width*this.height},CanvasImage.prototype.getImageData=function(){return this.context.getImageData(0,0,this.width,this.height)},CanvasImage.prototype.removeCanvas=function(){this.canvas.parentNode.removeChild(this.canvas)};var ColorThief=function(){};/*!\r\n * quantize.js Copyright 2008 Nick Rabinowitz.\r\n * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php\r\n */\r\n/*!\r\n * Block below copied from Protovis: http://mbostock.github.com/protovis/\r\n * Copyright 2010 Stanford Visualization Group\r\n * Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php\r\n */\r\nif(ColorThief.prototype.getColor=function(a,b){var c=this.getPalette(a,5,b),d=c[0];return d},ColorThief.prototype.getPalette=function(a,b,c){\"undefined\"==typeof b&&(b=10),(\"undefined\"==typeof c||1>c)&&(c=10);for(var d,e,f,g,h,i=new CanvasImage(a),j=i.getImageData(),k=j.data,l=i.getPixelCount(),m=[],n=0;l>n;n+=c)d=4*n,e=k[d+0],f=k[d+1],g=k[d+2],h=k[d+3],h>=125&&(e>250&&f>250&&g>250||m.push([e,f,g]));var o=MMCQ.quantize(m,b),p=o?o.palette():null;return i.removeCanvas(),p},!pv)var pv={map:function(a,b){var c={};return b?a.map(function(a,d){return c.index=d,b.call(c,a)}):a.slice()},naturalOrder:function(a,b){return b>a?-1:a>b?1:0},sum:function(a,b){var c={};return a.reduce(b?function(a,d,e){return c.index=e,a+b.call(c,d)}:function(a,b){return a+b},0)},max:function(a,b){return Math.max.apply(null,b?pv.map(a,b):a)}};var MMCQ=function(){function a(a,b,c){return(a<<2*i)+(b<<i)+c}function b(a){function b(){c.sort(a),d=!0}var c=[],d=!1;return{push:function(a){c.push(a),d=!1},peek:function(a){return d||b(),void 0===a&&(a=c.length-1),c[a]},pop:function(){return d||b(),c.pop()},size:function(){return c.length},map:function(a){return c.map(a)},debug:function(){return d||b(),c}}}function c(a,b,c,d,e,f,g){var h=this;h.r1=a,h.r2=b,h.g1=c,h.g2=d,h.b1=e,h.b2=f,h.histo=g}function d(){this.vboxes=new b(function(a,b){return pv.naturalOrder(a.vbox.count()*a.vbox.volume(),b.vbox.count()*b.vbox.volume())})}function e(b){var c,d,e,f,g=1<<3*i,h=new Array(g);return b.forEach(function(b){d=b[0]>>j,e=b[1]>>j,f=b[2]>>j,c=a(d,e,f),h[c]=(h[c]||0)+1}),h}function f(a,b){var d,e,f,g=1e6,h=0,i=1e6,k=0,l=1e6,m=0;return a.forEach(function(a){d=a[0]>>j,e=a[1]>>j,f=a[2]>>j,g>d?g=d:d>h&&(h=d),i>e?i=e:e>k&&(k=e),l>f?l=f:f>m&&(m=f)}),new c(g,h,i,k,l,m,b)}function g(b,c){function d(a){var b,d,e,f,g,h=a+\"1\",j=a+\"2\",k=0;for(i=c[h];i<=c[j];i++)if(o[i]>n/2){for(e=c.copy(),f=c.copy(),b=i-c[h],d=c[j]-i,g=d>=b?Math.min(c[j]-1,~~(i+d/2)):Math.max(c[h],~~(i-1-b/2));!o[g];)g++;for(k=p[g];!k&&o[g-1];)k=p[--g];return e[j]=g,f[h]=e[j]+1,[e,f]}}if(c.count()){var e=c.r2-c.r1+1,f=c.g2-c.g1+1,g=c.b2-c.b1+1,h=pv.max([e,f,g]);if(1==c.count())return[c.copy()];var i,j,k,l,m,n=0,o=[],p=[];if(h==e)for(i=c.r1;i<=c.r2;i++){for(l=0,j=c.g1;j<=c.g2;j++)for(k=c.b1;k<=c.b2;k++)m=a(i,j,k),l+=b[m]||0;n+=l,o[i]=n}else if(h==f)for(i=c.g1;i<=c.g2;i++){for(l=0,j=c.r1;j<=c.r2;j++)for(k=c.b1;k<=c.b2;k++)m=a(j,i,k),l+=b[m]||0;n+=l,o[i]=n}else for(i=c.b1;i<=c.b2;i++){for(l=0,j=c.r1;j<=c.r2;j++)for(k=c.g1;k<=c.g2;k++)m=a(j,k,i),l+=b[m]||0;n+=l,o[i]=n}return o.forEach(function(a,b){p[b]=n-a}),d(h==e?\"r\":h==f?\"g\":\"b\")}}function h(a,c){function h(a,b){for(var c,d=1,e=0;k>e;)if(c=a.pop(),c.count()){var f=g(i,c),h=f[0],j=f[1];if(!h)return;if(a.push(h),j&&(a.push(j),d++),d>=b)return;if(e++>k)return}else a.push(c),e++}if(!a.length||2>c||c>256)return!1;var i=e(a),j=0;i.forEach(function(){j++});var m=f(a,i),n=new b(function(a,b){return pv.naturalOrder(a.count(),b.count())});n.push(m),h(n,l*c);for(var o=new b(function(a,b){return pv.naturalOrder(a.count()*a.volume(),b.count()*b.volume())});n.size();)o.push(n.pop());h(o,c-o.size());for(var p=new d;o.size();)p.push(o.pop());return p}var i=5,j=8-i,k=1e3,l=.75;return c.prototype={volume:function(a){var b=this;return(!b._volume||a)&&(b._volume=(b.r2-b.r1+1)*(b.g2-b.g1+1)*(b.b2-b.b1+1)),b._volume},count:function(b){var c=this,d=c.histo;if(!c._count_set||b){var e,f,g,h=0;for(e=c.r1;e<=c.r2;e++)for(f=c.g1;f<=c.g2;f++)for(g=c.b1;g<=c.b2;g++)index=a(e,f,g),h+=d[index]||0;c._count=h,c._count_set=!0}return c._count},copy:function(){var a=this;return new c(a.r1,a.r2,a.g1,a.g2,a.b1,a.b2,a.histo)},avg:function(b){var c=this,d=c.histo;if(!c._avg||b){var e,f,g,h,j,k=0,l=1<<8-i,m=0,n=0,o=0;for(f=c.r1;f<=c.r2;f++)for(g=c.g1;g<=c.g2;g++)for(h=c.b1;h<=c.b2;h++)j=a(f,g,h),e=d[j]||0,k+=e,m+=e*(f+.5)*l,n+=e*(g+.5)*l,o+=e*(h+.5)*l;k?c._avg=[~~(m/k),~~(n/k),~~(o/k)]:c._avg=[~~(l*(c.r1+c.r2+1)/2),~~(l*(c.g1+c.g2+1)/2),~~(l*(c.b1+c.b2+1)/2)]}return c._avg},contains:function(a){var b=this,c=a[0]>>j;return gval=a[1]>>j,bval=a[2]>>j,c>=b.r1&&c<=b.r2&&gval>=b.g1&&gval<=b.g2&&bval>=b.b1&&bval<=b.b2}},d.prototype={push:function(a){this.vboxes.push({vbox:a,color:a.avg()})},palette:function(){return this.vboxes.map(function(a){return a.color})},size:function(){return this.vboxes.size()},map:function(a){for(var b=this.vboxes,c=0;c<b.size();c++)if(b.peek(c).vbox.contains(a))return b.peek(c).color;return this.nearest(a)},nearest:function(a){for(var b,c,d,e=this.vboxes,f=0;f<e.size();f++)c=Math.sqrt(Math.pow(a[0]-e.peek(f).color[0],2)+Math.pow(a[1]-e.peek(f).color[1],2)+Math.pow(a[2]-e.peek(f).color[2],2)),(b>c||void 0===b)&&(b=c,d=e.peek(f).color);return d},forcebw:function(){var a=this.vboxes;a.sort(function(a,b){return pv.naturalOrder(pv.sum(a.color),pv.sum(b.color))});var b=a[0].color;b[0]<5&&b[1]<5&&b[2]<5&&(a[0].color=[0,0,0]);var c=a.length-1,d=a[c].color;d[0]>251&&d[1]>251&&d[2]>251&&(a[c].color=[255,255,255])}},{quantize:h}}();\r\nmodule.exports = ColorThief;\r\n","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",f=\"month\",h=\"quarter\",c=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(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,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},g=\"en\",D={};D[g]=M;var p=function(t){return t instanceof _},S=function t(e,n,r){var i;if(!e)return g;if(\"string\"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split(\"-\");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.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($);if(r){var i=r[2]-1||0,s=(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,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.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()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),l=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return O.w(n.toDate()[t].apply(n.toDate(\"s\"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v=\"set\"+(this.$u?\"UTC\":\"\");switch(h){case c:return r?l(1,0):l(31,11);case f:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+\"Hours\",0);case u:return $(v+\"Minutes\",1);case s:return $(v+\"Seconds\",2);case i:return $(v+\"Milliseconds\",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h=\"set\"+(this.$u?\"UTC\":\"\"),l=(n={},n[a]=h+\"Date\",n[d]=h+\"Date\",n[f]=h+\"Month\",n[c]=h+\"FullYear\",n[u]=h+\"Hours\",n[s]=h+\"Minutes\",n[i]=h+\"Seconds\",n[r]=h+\"Milliseconds\",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,l=this;r=Number(r);var $=O.p(h),y=function(t){var e=w(l);return O.w(e.date(e.date()+Math.round(t*r)),l)};if($===f)return this.set(f,this.$M+r);if($===c)return this.set(c,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||\"YYYY-MM-DDTHH:mm:ssZ\",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},c=function(t){return O.s(s%12||12,t,\"0\")},d=n.meridiem||function(t,e,n){var r=t<12?\"AM\":\"PM\";return n?r.toLowerCase():r},$={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,\"0\"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,\"0\"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,\"0\"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,\"0\"),s:String(this.$s),ss:O.s(this.$s,2,\"0\"),SSS:O.s(this.$ms,3,\"0\"),Z:i};return r.replace(y,(function(t,e){return e||$[t]||i.replace(\":\",\"\")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,v=this-M,g=O.m(this,M);return g=($={},$[c]=g/12,$[f]=g,$[h]=g/3,$[o]=(v-m)/6048e5,$[a]=(v-m)/864e5,$[u]=v/n,$[s]=v/e,$[i]=v/t,$)[y]||v,l?g:O.a(g)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),T=_.prototype;return w.prototype=T,[[\"$ms\",r],[\"$s\",i],[\"$m\",s],[\"$H\",u],[\"$W\",a],[\"$M\",f],[\"$y\",c],[\"$D\",d]].forEach((function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[g],w.Ls=D,w.p={},w}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_localizedFormat=t()}(this,(function(){\"use strict\";var e={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(t,o,n){var r=o.prototype,i=r.format;n.en.formats=e,r.format=function(t){void 0===t&&(t=\"YYYY-MM-DDTHH:mm:ssZ\");var o=this.$locale().formats,n=function(t,o){return t.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var i=r&&r.toUpperCase();return n||o[r]||e[r]||o[i].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,o){return t||o.slice(1)}))}))}(t,void 0===o?{}:o);return i.call(this,n)}}}));","!function(r,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(r=\"undefined\"!=typeof globalThis?globalThis:r||self).dayjs_plugin_relativeTime=e()}(this,(function(){\"use strict\";return function(r,e,t){r=r||{};var n=e.prototype,o={future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.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\"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(\"\"+p)),a=\"string\"==typeof v?v.replace(\"%d\",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return\"function\"==typeof M?M(a):M.replace(\"%s\",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)}}}));","\"use strict\";\n\n// eslint-disable-next-line func-names\nmodule.exports = function () {\n  if (typeof globalThis === \"object\") {\n    return globalThis;\n  }\n\n  var g;\n\n  try {\n    // This works if eval is allowed (see CSP)\n    // eslint-disable-next-line no-new-func\n    g = this || new Function(\"return this\")();\n  } catch (e) {\n    // This works if the window reference is available\n    if (typeof window === \"object\") {\n      return window;\n    } // This works if the self reference is available\n\n\n    if (typeof self === \"object\") {\n      return self;\n    } // This works if the global reference is available\n\n\n    if (typeof global !== \"undefined\") {\n      return global;\n    }\n  }\n\n  return g;\n}();","/*jslint browser: true*/\r\n/*jslint jquery: true*/\r\n\r\n/*\r\n * jQuery Hotkeys Plugin\r\n * Copyright 2010, John Resig\r\n * Dual licensed under the MIT or GPL Version 2 licenses.\r\n *\r\n * Based upon the plugin by Tzury Bar Yochay:\r\n * https://github.com/tzuryby/jquery.hotkeys\r\n *\r\n * Original idea by:\r\n * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/\r\n */\r\n\r\n/*\r\n * One small change is: now keys are passed by object { keys: '...' }\r\n * Might be useful, when you want to pass some other data to your handler\r\n */\r\n\r\n(function(jQuery) {\r\n\r\n  jQuery.hotkeys = {\r\n    version: \"0.2.0\",\r\n\r\n    specialKeys: {\r\n      8: \"backspace\",\r\n      9: \"tab\",\r\n      10: \"return\",\r\n      13: \"return\",\r\n      16: \"shift\",\r\n      17: \"ctrl\",\r\n      18: \"alt\",\r\n      19: \"pause\",\r\n      20: \"capslock\",\r\n      27: \"esc\",\r\n      32: \"space\",\r\n      33: \"pageup\",\r\n      34: \"pagedown\",\r\n      35: \"end\",\r\n      36: \"home\",\r\n      37: \"left\",\r\n      38: \"up\",\r\n      39: \"right\",\r\n      40: \"down\",\r\n      45: \"insert\",\r\n      46: \"del\",\r\n      59: \";\",\r\n      61: \"=\",\r\n      96: \"0\",\r\n      97: \"1\",\r\n      98: \"2\",\r\n      99: \"3\",\r\n      100: \"4\",\r\n      101: \"5\",\r\n      102: \"6\",\r\n      103: \"7\",\r\n      104: \"8\",\r\n      105: \"9\",\r\n      106: \"*\",\r\n      107: \"+\",\r\n      109: \"-\",\r\n      110: \".\",\r\n      111: \"/\",\r\n      112: \"f1\",\r\n      113: \"f2\",\r\n      114: \"f3\",\r\n      115: \"f4\",\r\n      116: \"f5\",\r\n      117: \"f6\",\r\n      118: \"f7\",\r\n      119: \"f8\",\r\n      120: \"f9\",\r\n      121: \"f10\",\r\n      122: \"f11\",\r\n      123: \"f12\",\r\n      144: \"numlock\",\r\n      145: \"scroll\",\r\n      173: \"-\",\r\n      186: \";\",\r\n      187: \"=\",\r\n      188: \",\",\r\n      189: \"-\",\r\n      190: \".\",\r\n      191: \"/\",\r\n      192: \"`\",\r\n      219: \"[\",\r\n      220: \"\\\\\",\r\n      221: \"]\",\r\n      222: \"'\"\r\n    },\r\n\r\n    shiftNums: {\r\n      \"`\": \"~\",\r\n      \"1\": \"!\",\r\n      \"2\": \"@\",\r\n      \"3\": \"#\",\r\n      \"4\": \"$\",\r\n      \"5\": \"%\",\r\n      \"6\": \"^\",\r\n      \"7\": \"&\",\r\n      \"8\": \"*\",\r\n      \"9\": \"(\",\r\n      \"0\": \")\",\r\n      \"-\": \"_\",\r\n      \"=\": \"+\",\r\n      \";\": \": \",\r\n      \"'\": \"\\\"\",\r\n      \",\": \"<\",\r\n      \".\": \">\",\r\n      \"/\": \"?\",\r\n      \"\\\\\": \"|\"\r\n    },\r\n\r\n    // excludes: button, checkbox, file, hidden, image, password, radio, reset, search, submit, url\r\n    textAcceptingInputTypes: [\r\n      \"text\", \"password\", \"number\", \"email\", \"url\", \"range\", \"date\", \"month\", \"week\", \"time\", \"datetime\",\r\n      \"datetime-local\", \"search\", \"color\", \"tel\"],\r\n\r\n    // default input types not to bind to unless bound directly\r\n    textInputTypes: /textarea|input|select/i,\r\n\r\n    options: {\r\n      filterInputAcceptingElements: true,\r\n      filterTextInputs: true,\r\n      filterContentEditable: true\r\n    }\r\n  };\r\n\r\n  function keyHandler(handleObj) {\r\n    if (typeof handleObj.data === \"string\") {\r\n      handleObj.data = {\r\n        keys: handleObj.data\r\n      };\r\n    }\r\n\r\n    // Only care when a possible input has been specified\r\n    if (!handleObj.data || !handleObj.data.keys || typeof handleObj.data.keys !== \"string\") {\r\n      return;\r\n    }\r\n\r\n    var origHandler = handleObj.handler,\r\n      keys = handleObj.data.keys.toLowerCase().split(\" \");\r\n\r\n    handleObj.handler = function(event) {\r\n      //      Don't fire in text-accepting inputs that we didn't directly bind to\r\n      if (this !== event.target &&\r\n        (jQuery.hotkeys.options.filterInputAcceptingElements &&\r\n          jQuery.hotkeys.textInputTypes.test(event.target.nodeName) ||\r\n          (jQuery.hotkeys.options.filterContentEditable && jQuery(event.target).attr('contenteditable')) ||\r\n          (jQuery.hotkeys.options.filterTextInputs &&\r\n            jQuery.inArray(event.target.type, jQuery.hotkeys.textAcceptingInputTypes) > -1))) {\r\n        return;\r\n      }\r\n\r\n      var special = event.type !== \"keypress\" && jQuery.hotkeys.specialKeys[event.which],\r\n        character = String.fromCharCode(event.which).toLowerCase(),\r\n        modif = \"\",\r\n        possible = {};\r\n\r\n      jQuery.each([\"alt\", \"ctrl\", \"shift\"], function(index, specialKey) {\r\n\r\n        if (event[specialKey + 'Key'] && special !== specialKey) {\r\n          modif += specialKey + '+';\r\n        }\r\n      });\r\n\r\n      // metaKey is triggered off ctrlKey erronously\r\n      if (event.metaKey && !event.ctrlKey && special !== \"meta\") {\r\n        modif += \"meta+\";\r\n      }\r\n\r\n      if (event.metaKey && special !== \"meta\" && modif.indexOf(\"alt+ctrl+shift+\") > -1) {\r\n        modif = modif.replace(\"alt+ctrl+shift+\", \"hyper+\");\r\n      }\r\n\r\n      if (special) {\r\n        possible[modif + special] = true;\r\n      }\r\n      else {\r\n        possible[modif + character] = true;\r\n        possible[modif + jQuery.hotkeys.shiftNums[character]] = true;\r\n\r\n        // \"$\" can be triggered as \"Shift+4\" or \"Shift+$\" or just \"$\"\r\n        if (modif === \"shift+\") {\r\n          possible[jQuery.hotkeys.shiftNums[character]] = true;\r\n        }\r\n      }\r\n\r\n      for (var i = 0, l = keys.length; i < l; i++) {\r\n        if (possible[keys[i]]) {\r\n          return origHandler.apply(this, arguments);\r\n        }\r\n      }\r\n    };\r\n  }\r\n\r\n  jQuery.each([\"keydown\", \"keyup\", \"keypress\"], function() {\r\n    jQuery.event.special[this] = {\r\n      add: keyHandler\r\n    };\r\n  });\r\n\r\n})(jQuery || this.jQuery || window.jQuery);\r\n","/*!\n * jQuery JavaScript Library v3.6.1\n * https://jquery.com/\n *\n * Includes Sizzle.js\n * https://sizzlejs.com/\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2022-08-26T17:52Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket trac-14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar flat = arr.flat ? function( array ) {\n\treturn arr.flat.call( array );\n} : function( array ) {\n\treturn arr.concat.apply( [], array );\n};\n\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n\t\t// Support: Chrome <=57, Firefox <=52\n\t\t// In some browsers, typeof returns \"function\" for HTML <object> elements\n\t\t// (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n\t\t// We don't want to classify *any* DOM node as a function.\n\t\t// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5\n\t\t// Plus for old WebKit, typeof returns \"function\" for HTML collections\n\t\t// (e.g., `typeof document.getElementsByTagName(\"div\") === \"function\"`). (gh-4756)\n\t\treturn typeof obj === \"function\" && typeof obj.nodeType !== \"number\" &&\n\t\t\ttypeof obj.item !== \"function\";\n\t};\n\n\nvar isWindow = function isWindow( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t};\n\n\nvar document = window.document;\n\n\n\n\tvar preservedScriptAttributes = {\n\t\ttype: true,\n\t\tsrc: true,\n\t\tnonce: true,\n\t\tnoModule: true\n\t};\n\n\tfunction DOMEval( code, node, doc ) {\n\t\tdoc = doc || document;\n\n\t\tvar i, val,\n\t\t\tscript = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tif ( node ) {\n\t\t\tfor ( i in preservedScriptAttributes ) {\n\n\t\t\t\t// Support: Firefox 64+, Edge 18+\n\t\t\t\t// Some browsers don't support the \"nonce\" property on scripts.\n\t\t\t\t// On the other hand, just using `getAttribute` is not enough as\n\t\t\t\t// the `nonce` attribute is reset to an empty string whenever it\n\t\t\t\t// becomes browsing-context connected.\n\t\t\t\t// See https://github.com/whatwg/html/issues/2369\n\t\t\t\t// See https://html.spec.whatwg.org/#nonce-attributes\n\t\t\t\t// The `node.getAttribute` check was added for the sake of\n\t\t\t\t// `jQuery.globalEval` so that it can fake a nonce-containing node\n\t\t\t\t// via an object.\n\t\t\t\tval = node[ i ] || node.getAttribute && node.getAttribute( i );\n\t\t\t\tif ( val ) {\n\t\t\t\t\tscript.setAttribute( i, val );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n\n\nfunction toType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\t// Support: Android <=2.3 only (functionish RegExp)\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar\n\tversion = \"3.6.1\",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teven: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn ( i + 1 ) % 2;\n\t\t} ) );\n\t},\n\n\todd: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn i % 2;\n\t\t} ) );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent Object.prototype pollution\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( name === \"__proto__\" || target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\n\t\t\t\t\tsrc = target[ name ];\n\n\t\t\t\t\t// Ensure proper type for the source value\n\t\t\t\t\tif ( copyIsArray && !Array.isArray( src ) ) {\n\t\t\t\t\t\tclone = [];\n\t\t\t\t\t} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {\n\t\t\t\t\t\tclone = {};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src;\n\t\t\t\t\t}\n\t\t\t\t\tcopyIsArray = false;\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t// Evaluates a script in a provided context; falls back to the global one\n\t// if not specified.\n\tglobalEval: function( code, options, doc ) {\n\t\tDOMEval( code, { nonce: options && options.nonce }, doc );\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn flat( ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\n\tfunction( _i, name ) {\n\t\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n\t} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = toType( obj );\n\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.3.6\n * https://sizzlejs.com/\n *\n * Copyright JS Foundation and other contributors\n * Released under the MIT license\n * https://js.foundation/\n *\n * Date: 2021-02-16\n */\n( function( window ) {\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tnonnativeSelectorCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// Instance methods\n\thasOwn = ( {} ).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpushNative = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\n\t// Use a stripped-down indexOf as it's faster than native\n\t// https://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[ i ] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|\" +\n\t\t\"ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\n\t// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram\n\tidentifier = \"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\n\t\t// \"Attribute values must be CSS identifiers [capture 5]\n\t\t// or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" +\n\t\twhitespace + \"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" +\n\t\twhitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace +\n\t\t\"*\" ),\n\trdescend = new RegExp( whitespace + \"|>\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" +\n\t\t\twhitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" +\n\t\t\twhitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace +\n\t\t\t\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" + whitespace +\n\t\t\t\"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trhtml = /HTML$/i,\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace + \"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\", \"g\" ),\n\tfunescape = function( escape, nonHex ) {\n\t\tvar high = \"0x\" + escape.slice( 1 ) - 0x10000;\n\n\t\treturn nonHex ?\n\n\t\t\t// Strip the backslash prefix from a non-hex escape sequence\n\t\t\tnonHex :\n\n\t\t\t// Replace a hexadecimal escape sequence with the encoded Unicode code point\n\t\t\t// Support: IE <=11+\n\t\t\t// For values outside the Basic Multilingual Plane (BMP), manually construct a\n\t\t\t// surrogate pair\n\t\t\thigh < 0 ?\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// CSS string/identifier serialization\n\t// https://drafts.csswg.org/cssom/#common-serializing-idioms\n\trcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,\n\tfcssescape = function( ch, asCodePoint ) {\n\t\tif ( asCodePoint ) {\n\n\t\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\t\tif ( ch === \"\\0\" ) {\n\t\t\t\treturn \"\\uFFFD\";\n\t\t\t}\n\n\t\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\t\treturn ch.slice( 0, -1 ) + \"\\\\\" +\n\t\t\t\tch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t\t}\n\n\t\t// Other potentially-special ASCII characters get backslash-escaped\n\t\treturn \"\\\\\" + ch;\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tinDisabledFieldset = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && elem.nodeName.toLowerCase() === \"fieldset\";\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t( arr = slice.call( preferredDoc.childNodes ) ),\n\t\tpreferredDoc.childNodes\n\t);\n\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\t// eslint-disable-next-line no-unused-expressions\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpushNative.apply( target, slice.call( els ) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( ( target[ j++ ] = els[ i++ ] ) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\t\tsetDocument( context );\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( ( m = match[ 1 ] ) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( ( elem = context.getElementById( m ) ) ) {\n\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && ( elem = newContext.getElementById( m ) ) &&\n\t\t\t\t\t\t\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[ 2 ] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( ( m = match[ 3 ] ) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( support.qsa &&\n\t\t\t\t!nonnativeSelectorCache[ selector + \" \" ] &&\n\t\t\t\t( !rbuggyQSA || !rbuggyQSA.test( selector ) ) &&\n\n\t\t\t\t// Support: IE 8 only\n\t\t\t\t// Exclude object elements\n\t\t\t\t( nodeType !== 1 || context.nodeName.toLowerCase() !== \"object\" ) ) {\n\n\t\t\t\tnewSelector = selector;\n\t\t\t\tnewContext = context;\n\n\t\t\t\t// qSA considers elements outside a scoping root when evaluating child or\n\t\t\t\t// descendant combinators, which is not what we want.\n\t\t\t\t// In such cases, we work around the behavior by prefixing every selector in the\n\t\t\t\t// list with an ID selector referencing the scope context.\n\t\t\t\t// The technique has to be used as well when a leading combinator is used\n\t\t\t\t// as such selectors are not recognized by querySelectorAll.\n\t\t\t\t// Thanks to Andrew Dupont for this technique.\n\t\t\t\tif ( nodeType === 1 &&\n\t\t\t\t\t( rdescend.test( selector ) || rcombinators.test( selector ) ) ) {\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\n\t\t\t\t\t// We can use :scope instead of the ID hack if the browser\n\t\t\t\t\t// supports it & if we're not changing the context.\n\t\t\t\t\tif ( newContext !== context || !support.scope ) {\n\n\t\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\t\tif ( ( nid = context.getAttribute( \"id\" ) ) ) {\n\t\t\t\t\t\t\tnid = nid.replace( rcssescape, fcssescape );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontext.setAttribute( \"id\", ( nid = expando ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[ i ] = ( nid ? \"#\" + nid : \":scope\" ) + \" \" +\n\t\t\t\t\t\t\ttoSelector( groups[ i ] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\tnonnativeSelectorCache( selector, true );\n\t\t\t\t} finally {\n\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn ( cache[ key + \" \" ] = value );\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement( \"fieldset\" );\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch ( e ) {\n\t\treturn false;\n\t} finally {\n\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\n\t\t// release memory in IE\n\t\tel = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split( \"|\" ),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[ i ] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\ta.sourceIndex - b.sourceIndex;\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( ( cur = cur.nextSibling ) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn ( name === \"input\" || name === \"button\" ) && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\t/* jshint -W018 */\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\tinDisabledFieldset( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction( function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction( function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ ( j = matchIndexes[ i ] ) ] ) {\n\t\t\t\t\tseed[ j ] = !( matches[ j ] = seed[ j ] );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\tvar namespace = elem && elem.namespaceURI,\n\t\tdocElem = elem && ( elem.ownerDocument || elem ).documentElement;\n\n\t// Support: IE <=8\n\t// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes\n\t// https://bugs.jquery.com/ticket/4833\n\treturn !rhtml.test( namespace || docElem && docElem.nodeName || \"HTML\" );\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( preferredDoc != document &&\n\t\t( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 11, Edge\n\t\tif ( subWindow.addEventListener ) {\n\t\t\tsubWindow.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( subWindow.attachEvent ) {\n\t\t\tsubWindow.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t// Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only,\n\t// Safari 4 - 5 only, Opera <=11.6 - 12.x only\n\t// IE/Edge & older browsers don't support the :scope pseudo-class.\n\t// Support: Safari 6.0 only\n\t// Safari 6.0 supports :scope but it's an alias of :root there.\n\tsupport.scope = assert( function( el ) {\n\t\tdocElem.appendChild( el ).appendChild( document.createElement( \"div\" ) );\n\t\treturn typeof el.querySelectorAll !== \"undefined\" &&\n\t\t\t!el.querySelectorAll( \":scope fieldset div\" ).length;\n\t} );\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert( function( el ) {\n\t\tel.className = \"i\";\n\t\treturn !el.getAttribute( \"className\" );\n\t} );\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert( function( el ) {\n\t\tel.appendChild( document.createComment( \"\" ) );\n\t\treturn !el.getElementsByTagName( \"*\" ).length;\n\t} );\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert( function( el ) {\n\t\tdocElem.appendChild( el ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t} );\n\n\t// ID filter and find\n\tif ( support.getById ) {\n\t\tExpr.filter[ \"ID\" ] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute( \"id\" ) === attrId;\n\t\t\t};\n\t\t};\n\t\tExpr.find[ \"ID\" ] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\n\t\tExpr.filter[ \"ID\" ] =  function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode( \"id\" );\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find[ \"ID\" ] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( ( elem = elems[ i++ ] ) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[ \"TAG\" ] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[ \"CLASS\" ] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See https://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) {\n\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert( function( el ) {\n\n\t\t\tvar input;\n\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// https://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( el ).innerHTML = \"<a id='\" + expando + \"'></a>\" +\n\t\t\t\t\"<select id='\" + expando + \"-\\r\\\\' msallowcapture=''>\" +\n\t\t\t\t\"<option selected=''></option></select>\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( el.querySelectorAll( \"[msallowcapture^='']\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !el.querySelectorAll( \"[selected]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"~=\" );\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 15 - 18+\n\t\t\t// IE 11/Edge don't find elements on a `[name='']` query in some cases.\n\t\t\t// Adding a temporary attribute to the document before the selection works\n\t\t\t// around the issue.\n\t\t\t// Interestingly, IE 10 & older don't seem to have the issue.\n\t\t\tinput = document.createElement( \"input\" );\n\t\t\tinput.setAttribute( \"name\", \"\" );\n\t\t\tel.appendChild( input );\n\t\t\tif ( !el.querySelectorAll( \"[name='']\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*name\" + whitespace + \"*=\" +\n\t\t\t\t\twhitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !el.querySelectorAll( \":checked\" ).length ) {\n\t\t\t\trbuggyQSA.push( \":checked\" );\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push( \".#.+[+~]\" );\n\t\t\t}\n\n\t\t\t// Support: Firefox <=3.6 - 5 only\n\t\t\t// Old Firefox doesn't throw on a badly-escaped identifier.\n\t\t\tel.querySelectorAll( \"\\\\\\f\" );\n\t\t\trbuggyQSA.push( \"[\\\\r\\\\n\\\\f]\" );\n\t\t} );\n\n\t\tassert( function( el ) {\n\t\t\tel.innerHTML = \"<a href='' disabled='disabled'></a>\" +\n\t\t\t\t\"<select disabled='disabled'><option/></select>\";\n\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement( \"input\" );\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( el.querySelectorAll( \"[name=d]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( el.querySelectorAll( \":enabled\" ).length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: IE9-11+\n\t\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t\tdocElem.appendChild( el ).disabled = true;\n\t\t\tif ( el.querySelectorAll( \":disabled\" ).length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: Opera 10 - 11 only\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tel.querySelectorAll( \"*,:x\" );\n\t\t\trbuggyQSA.push( \",.*:\" );\n\t\t} );\n\t}\n\n\tif ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector ) ) ) ) {\n\n\t\tassert( function( el ) {\n\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( el, \"*\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( el, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t} );\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( \"|\" ) );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( \"|\" ) );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t) );\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( ( b = b.parentNode ) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = hasCompare ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tcompare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( a == document || a.ownerDocument == preferredDoc &&\n\t\t\t\tcontains( preferredDoc, a ) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( b == document || b.ownerDocument == preferredDoc &&\n\t\t\t\tcontains( preferredDoc, b ) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\tif ( !aup || !bup ) {\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t/* eslint-disable eqeqeq */\n\t\t\treturn a == document ? -1 :\n\t\t\t\tb == document ? 1 :\n\t\t\t\t/* eslint-enable eqeqeq */\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( ( cur = cur.parentNode ) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( ( cur = cur.parentNode ) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[ i ] === bp[ i ] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[ i ], bp[ i ] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t/* eslint-disable eqeqeq */\n\t\t\tap[ i ] == preferredDoc ? -1 :\n\t\t\tbp[ i ] == preferredDoc ? 1 :\n\t\t\t/* eslint-enable eqeqeq */\n\t\t\t0;\n\t};\n\n\treturn document;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\tsetDocument( elem );\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t!nonnativeSelectorCache[ expr + \" \" ] &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\n\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t// fragment in IE 9\n\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch ( e ) {\n\t\t\tnonnativeSelectorCache( expr, true );\n\t\t}\n\t}\n\n\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( context.ownerDocument || context ) != document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( elem.ownerDocument || elem ) != document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val !== undefined ?\n\t\tval :\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t( val = elem.getAttributeNode( name ) ) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull;\n};\n\nSizzle.escape = function( sel ) {\n\treturn ( sel + \"\" ).replace( rcssescape, fcssescape );\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\n\t\t// If no nodeType, this is expected to be an array\n\t\twhile ( ( node = elem[ i++ ] ) ) {\n\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[ 1 ] = match[ 1 ].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[ 3 ] = ( match[ 3 ] || match[ 4 ] ||\n\t\t\t\tmatch[ 5 ] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[ 2 ] === \"~=\" ) {\n\t\t\t\tmatch[ 3 ] = \" \" + match[ 3 ] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[ 1 ] = match[ 1 ].toLowerCase();\n\n\t\t\tif ( match[ 1 ].slice( 0, 3 ) === \"nth\" ) {\n\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[ 3 ] ) {\n\t\t\t\t\tSizzle.error( match[ 0 ] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[ 4 ] = +( match[ 4 ] ?\n\t\t\t\t\tmatch[ 5 ] + ( match[ 6 ] || 1 ) :\n\t\t\t\t\t2 * ( match[ 3 ] === \"even\" || match[ 3 ] === \"odd\" ) );\n\t\t\t\tmatch[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === \"odd\" );\n\n\t\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[ 3 ] ) {\n\t\t\t\tSizzle.error( match[ 0 ] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[ 6 ] && match[ 2 ];\n\n\t\t\tif ( matchExpr[ \"CHILD\" ].test( match[ 0 ] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[ 3 ] ) {\n\t\t\t\tmatch[ 2 ] = match[ 4 ] || match[ 5 ] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t( excess = tokenize( unquoted, true ) ) &&\n\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t( excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length ) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[ 0 ] = match[ 0 ].slice( 0, excess );\n\t\t\t\tmatch[ 2 ] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() {\n\t\t\t\t\treturn true;\n\t\t\t\t} :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t( pattern = new RegExp( \"(^|\" + whitespace +\n\t\t\t\t\t\")\" + className + \"(\" + whitespace + \"|$)\" ) ) && classCache(\n\t\t\t\t\t\tclassName, function( elem ) {\n\t\t\t\t\t\t\treturn pattern.test(\n\t\t\t\t\t\t\t\ttypeof elem.className === \"string\" && elem.className ||\n\t\t\t\t\t\t\t\ttypeof elem.getAttribute !== \"undefined\" &&\n\t\t\t\t\t\t\t\t\telem.getAttribute( \"class\" ) ||\n\t\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t\t);\n\t\t\t\t} );\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\t/* eslint-disable max-len */\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t\t/* eslint-enable max-len */\n\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": function( type, what, _argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tvar cache, uniqueCache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( ( node = node[ dir ] ) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\n\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\tnode = parent;\n\t\t\t\t\t\t\touterCache = node[ expando ] || ( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\n\t\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\touterCache = node[ expando ] || ( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t\"PSEUDO\": function( pseudo, argument ) {\n\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction( function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf( seed, matched[ i ] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[ i ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} ) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\n\t\t// Potentially complex pseudos\n\t\t\"not\": markFunction( function( selector ) {\n\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction( function( seed, matches, _context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\t\t\t\t\tseed[ i ] = !( matches[ i ] = elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} ) :\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tinput[ 0 ] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\n\t\t\t\t\t// Don't keep the element (issue #299)\n\t\t\t\t\tinput[ 0 ] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t} ),\n\n\t\t\"has\": markFunction( function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t} ),\n\n\t\t\"contains\": markFunction( function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t} ),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test( lang || \"\" ) ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( ( elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute( \"xml:lang\" ) || elem.getAttribute( \"lang\" ) ) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t} ),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement &&\n\t\t\t\t( !document.hasFocus || document.hasFocus() ) &&\n\t\t\t\t!!( elem.type || elem.href || ~elem.tabIndex );\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": createDisabledPseudo( false ),\n\t\t\"disabled\": createDisabledPseudo( true ),\n\n\t\t\"checked\": function( elem ) {\n\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn ( nodeName === \"input\" && !!elem.checked ) ||\n\t\t\t\t( nodeName === \"option\" && !!elem.selected );\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t//   but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[ \"empty\" ]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\n\t\t\t\t// Support: IE<8\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\n\t\t\t\t( ( attr = elem.getAttribute( \"type\" ) ) == null ||\n\t\t\t\t\tattr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo( function() {\n\t\t\treturn [ 0 ];\n\t\t} ),\n\n\t\t\"last\": createPositionalPseudo( function( _matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t} ),\n\n\t\t\"eq\": createPositionalPseudo( function( _matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t} ),\n\n\t\t\"even\": createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\t\"odd\": createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\t\"lt\": createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ?\n\t\t\t\targument + length :\n\t\t\t\targument > length ?\n\t\t\t\t\tlength :\n\t\t\t\t\targument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\t\"gt\": createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} )\n\t}\n};\n\nExpr.pseudos[ \"nth\" ] = Expr.pseudos[ \"eq\" ];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || ( match = rcomma.exec( soFar ) ) ) {\n\t\t\tif ( match ) {\n\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[ 0 ].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( ( tokens = [] ) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( ( match = rcombinators.exec( soFar ) ) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push( {\n\t\t\t\tvalue: matched,\n\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[ 0 ].replace( rtrim, \" \" )\n\t\t\t} );\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||\n\t\t\t\t( match = preFilters[ type ]( match ) ) ) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push( {\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t} );\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n};\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[ i ].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tskip = combinator.next,\n\t\tkey = skip || dir,\n\t\tcheckNonElements = base && key === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, uniqueCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\n\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\tuniqueCache = outerCache[ elem.uniqueID ] ||\n\t\t\t\t\t\t\t( outerCache[ elem.uniqueID ] = {} );\n\n\t\t\t\t\t\tif ( skip && skip === elem.nodeName.toLowerCase() ) {\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\n\t\t\t\t\t\t} else if ( ( oldCache = uniqueCache[ key ] ) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn ( newCache[ 2 ] = oldCache[ 2 ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\tuniqueCache[ key ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[ i ]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[ 0 ];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[ i ], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction( function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts(\n\t\t\t\tselector || \"*\",\n\t\t\t\tcontext.nodeType ? [ context ] : context,\n\t\t\t\t[]\n\t\t\t),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( ( elem = temp[ i ] ) ) {\n\t\t\t\t\tmatcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) ) {\n\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( ( matcherIn[ i ] = elem ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, ( matcherOut = [] ), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) &&\n\t\t\t\t\t\t( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) {\n\n\t\t\t\t\t\tseed[ temp ] = !( results[ temp ] = elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t} );\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[ 0 ].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[ \" \" ],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\tvar ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t( checkContext = context ).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\n\t\t\t// Avoid hanging onto element (issue #299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {\n\t\t\tmatchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[ j ].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\n\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\ttokens\n\t\t\t\t\t\t.slice( 0, i - 1 )\n\t\t\t\t\t\t.concat( { value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" } )\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find[ \"TAG\" ]( \"*\", outermost ),\n\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\n\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\toutermostContext = context == document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: IE<9, Safari\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching elements by id\n\t\t\tfor ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( !context && elem.ownerDocument != document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( ( matcher = elementMatchers[ j++ ] ) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml ) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( ( elem = !matcher && elem ) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( ( matcher = setMatchers[ j++ ] ) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !( unmatched[ i ] || setMatched[ i ] ) ) {\n\t\t\t\t\t\t\t\tsetMatched[ i ] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[ i ] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache(\n\t\t\tselector,\n\t\t\tmatcherFromGroupMatchers( elementMatchers, setMatchers )\n\t\t);\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n};\n\n/**\n * A low-level selection function that works with Sizzle's compiled\n *  selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n *  selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nselect = Sizzle.select = function( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( ( selector = compiled.selector || selector ) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[ 0 ] = match[ 0 ].slice( 0 );\n\t\tif ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === \"ID\" &&\n\t\t\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {\n\n\t\t\tcontext = ( Expr.find[ \"ID\" ]( token.matches[ 0 ]\n\t\t\t\t.replace( runescape, funescape ), context ) || [] )[ 0 ];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr[ \"needsContext\" ].test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[ i ];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ ( type = token.type ) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( ( find = Expr.find[ type ] ) ) {\n\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( ( seed = find(\n\t\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext\n\t\t\t\t) ) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n};\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split( \"\" ).sort( sortOrder ).join( \"\" ) === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert( function( el ) {\n\n\t// Should return 1, but returns 4 (following)\n\treturn el.compareDocumentPosition( document.createElement( \"fieldset\" ) ) & 1;\n} );\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert( function( el ) {\n\tel.innerHTML = \"<a href='#'></a>\";\n\treturn el.firstChild.getAttribute( \"href\" ) === \"#\";\n} ) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t} );\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert( function( el ) {\n\tel.innerHTML = \"<input/>\";\n\tel.firstChild.setAttribute( \"value\", \"\" );\n\treturn el.firstChild.getAttribute( \"value\" ) === \"\";\n} ) ) {\n\taddHandle( \"value\", function( elem, _name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t} );\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert( function( el ) {\n\treturn el.getAttribute( \"disabled\" ) == null;\n} ) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\n\t\t\t\t( val = elem.getAttributeNode( name ) ) && val.specified ?\n\t\t\t\t\tval.value :\n\t\t\t\t\tnull;\n\t\t}\n\t} );\n}\n\nreturn Sizzle;\n\n} )( window );\n\n\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\n\n// Deprecated\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\njQuery.escapeSelector = Sizzle.escape;\n\n\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\n\n\nfunction nodeName( elem, name ) {\n\n\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\n}\nvar rsingleTag = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\n\n\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\t}\n\n\t// Single element\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\t}\n\n\t// Arraylike of elements (jQuery, arguments, Array)\n\tif ( typeof qualifier !== \"string\" ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t\t} );\n\t}\n\n\t// Filtered directly for both simple and complex selectors\n\treturn jQuery.filter( qualifier, elements, not );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\tif ( elems.length === 1 && elem.nodeType === 1 ) {\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\n\t}\n\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\treturn elem.nodeType === 1;\n\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i, ret,\n\t\t\tlen = this.length,\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tret = this.pushStack( [] );\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\treturn len > 1 ? jQuery.uniqueSort( ret ) : ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521)\n\t// Strict HTML recognition (trac-11290: must start with <)\n\t// Shortcut simple #id case for speed\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\n\n\t\t// Positional selectors never match, since there's no _selection_ context\n\t\tif ( !rneedsContext.test( selectors ) ) {\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t\t// Always skip document fragments\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\n\n\t\t\t\t\t\t// Don't pass non-elements to Sizzle\n\t\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\tif ( elem.contentDocument != null &&\n\n\t\t\t// Support: IE 11+\n\t\t\t// <object> elements with no `data` attribute has an object\n\t\t\t// `contentDocument` with a `null` prototype.\n\t\t\tgetProto( elem.contentDocument ) ) {\n\n\t\t\treturn elem.contentDocument;\n\t\t}\n\n\t\t// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\n\t\t// Treat the template element as a regular one in browsers that\n\t\t// don't support it.\n\t\tif ( nodeName( elem, \"template\" ) ) {\n\t\t\telem = elem.content || elem;\n\t\t}\n\n\t\treturn jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = locked || options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && toType( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory && !firing ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\nfunction Identity( v ) {\n\treturn v;\n}\nfunction Thrower( ex ) {\n\tthrow ex;\n}\n\nfunction adoptValue( value, resolve, reject, noValue ) {\n\tvar method;\n\n\ttry {\n\n\t\t// Check for promise aspect first to privilege synchronous behavior\n\t\tif ( value && isFunction( ( method = value.promise ) ) ) {\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\n\n\t\t// Other thenables\n\t\t} else if ( value && isFunction( ( method = value.then ) ) ) {\n\t\t\tmethod.call( value, resolve, reject );\n\n\t\t// Other non-thenables\n\t\t} else {\n\n\t\t\t// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\n\t\t\t// * false: [ value ].slice( 0 ) => resolve( value )\n\t\t\t// * true: [ value ].slice( 1 ) => resolve()\n\t\t\tresolve.apply( undefined, [ value ].slice( noValue ) );\n\t\t}\n\n\t// For Promises/A+, convert exceptions into rejections\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\n\t// Deferred#then to conditionally suppress rejection.\n\t} catch ( value ) {\n\n\t\t// Support: Android 4.0 only\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\treject.apply( undefined, [ value ] );\n\t}\n}\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, callbacks,\n\t\t\t\t// ... .then handlers, argument index, [final state]\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\t\"catch\": function( fn ) {\n\t\t\t\t\treturn promise.then( null, fn );\n\t\t\t\t},\n\n\t\t\t\t// Keep pipe for back-compat\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( _i, tuple ) {\n\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\n\t\t\t\t\t\t\tvar fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\n\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\n\t\t\t\t\tvar maxDepth = 0;\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar that = this,\n\t\t\t\t\t\t\t\targs = arguments,\n\t\t\t\t\t\t\t\tmightThrow = function() {\n\t\t\t\t\t\t\t\t\tvar returned, then;\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\n\t\t\t\t\t\t\t\t\tthen = returned &&\n\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\n\t\t\t\t\t\t\t\t\t\treturned.then;\n\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\n\t\t\t\t\t\t\t\t\tif ( isFunction( then ) ) {\n\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\n\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\n\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Handle all other returned values\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Process the value(s)\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\n\t\t\t\t\t\t\t\tprocess = special ?\n\t\t\t\t\t\t\t\t\tmightThrow :\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.stackTrace );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\n\t\t\t\t\t\t\t// subsequent errors\n\t\t\t\t\t\t\tif ( depth ) {\n\t\t\t\t\t\t\t\tprocess();\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Call an optional hook to record the stack, in case of exception\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getStackHook ) {\n\t\t\t\t\t\t\t\t\tprocess.stackTrace = jQuery.Deferred.getStackHook();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\n\t\t\t\t\t\t// progress_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onProgress ) ?\n\t\t\t\t\t\t\t\t\tonProgress :\n\t\t\t\t\t\t\t\t\tIdentity,\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// fulfilled_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onFulfilled ) ?\n\t\t\t\t\t\t\t\t\tonFulfilled :\n\t\t\t\t\t\t\t\t\tIdentity\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// rejected_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onRejected ) ?\n\t\t\t\t\t\t\t\t\tonRejected :\n\t\t\t\t\t\t\t\t\tThrower\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 5 ];\n\n\t\t\t// promise.progress = list.add\n\t\t\t// promise.done = list.add\n\t\t\t// promise.fail = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(\n\t\t\t\t\tfunction() {\n\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\n\t\t\t\t\t\t// state = \"rejected\"\n\t\t\t\t\t\tstate = stateString;\n\t\t\t\t\t},\n\n\t\t\t\t\t// rejected_callbacks.disable\n\t\t\t\t\t// fulfilled_callbacks.disable\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\n\n\t\t\t\t\t// rejected_handlers.disable\n\t\t\t\t\t// fulfilled_handlers.disable\n\t\t\t\t\ttuples[ 3 - i ][ 3 ].disable,\n\n\t\t\t\t\t// progress_callbacks.lock\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock,\n\n\t\t\t\t\t// progress_handlers.lock\n\t\t\t\t\ttuples[ 0 ][ 3 ].lock\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// progress_handlers.fire\n\t\t\t// fulfilled_handlers.fire\n\t\t\t// rejected_handlers.fire\n\t\t\tlist.add( tuple[ 3 ].fire );\n\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\t// deferred.notifyWith = list.fireWith\n\t\t\t// deferred.resolveWith = list.fireWith\n\t\t\t// deferred.rejectWith = list.fireWith\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( singleValue ) {\n\t\tvar\n\n\t\t\t// count of uncompleted subordinates\n\t\t\tremaining = arguments.length,\n\n\t\t\t// count of unprocessed arguments\n\t\t\ti = remaining,\n\n\t\t\t// subordinate fulfillment data\n\t\t\tresolveContexts = Array( i ),\n\t\t\tresolveValues = slice.call( arguments ),\n\n\t\t\t// the primary Deferred\n\t\t\tprimary = jQuery.Deferred(),\n\n\t\t\t// subordinate callback factory\n\t\t\tupdateFunc = function( i ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tresolveContexts[ i ] = this;\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( !( --remaining ) ) {\n\t\t\t\t\t\tprimary.resolveWith( resolveContexts, resolveValues );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t// Single- and empty arguments are adopted like Promise.resolve\n\t\tif ( remaining <= 1 ) {\n\t\t\tadoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,\n\t\t\t\t!remaining );\n\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\n\t\t\tif ( primary.state() === \"pending\" ||\n\t\t\t\tisFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\n\n\t\t\t\treturn primary.then();\n\t\t\t}\n\t\t}\n\n\t\t// Multiple arguments are aggregated like Promise.all array elements\n\t\twhile ( i-- ) {\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );\n\t\t}\n\n\t\treturn primary.promise();\n\t}\n} );\n\n\n// These usually indicate a programmer mistake during development,\n// warn about them ASAP rather than swallowing them by default.\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\n\njQuery.Deferred.exceptionHook = function( error, stack ) {\n\n\t// Support: IE 8 - 9 only\n\t// Console exists when dev tools are open, which can happen at any time\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message, error.stack, stack );\n\t}\n};\n\n\n\n\njQuery.readyException = function( error ) {\n\twindow.setTimeout( function() {\n\t\tthrow error;\n\t} );\n};\n\n\n\n\n// The deferred used on DOM ready\nvar readyList = jQuery.Deferred();\n\njQuery.fn.ready = function( fn ) {\n\n\treadyList\n\t\t.then( fn )\n\n\t\t// Wrap jQuery.readyException in a function so that the lookup\n\t\t// happens at the time of error handling instead of callback\n\t\t// registration.\n\t\t.catch( function( error ) {\n\t\t\tjQuery.readyException( error );\n\t\t} );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See trac-6781\n\treadyWait: 1,\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\t}\n} );\n\njQuery.ready.then = readyList.then;\n\n// The ready event handler and self cleanup method\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\n// Catch cases where $(document).ready() is called\n// after the browser event has already occurred.\n// Support: IE <=9 - 10 only\n// Older IE sometimes signals \"interactive\" too soon\nif ( document.readyState === \"complete\" ||\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\twindow.setTimeout( jQuery.ready );\n\n} else {\n\n\t// Use the handy event callback\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t// A fallback to window.onload, that will always work\n\twindow.addEventListener( \"load\", completed );\n}\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( toType( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, _key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\t\tvalue :\n\t\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( chainable ) {\n\t\treturn elems;\n\t}\n\n\t// Gets\n\tif ( bulk ) {\n\t\treturn fn.call( elems );\n\t}\n\n\treturn len ? fn( elems[ 0 ], key ) : emptyGet;\n};\n\n\n// Matches dashed string for camelizing\nvar rmsPrefix = /^-ms-/,\n\trdashAlpha = /-([a-z])/g;\n\n// Used by camelCase as callback to replace()\nfunction fcamelCase( _all, letter ) {\n\treturn letter.toUpperCase();\n}\n\n// Convert dashed to camelCase; used by the css and data modules\n// Support: IE <=9 - 11, Edge 12 - 15\n// Microsoft forgot to hump their vendor prefix (trac-9572)\nfunction camelCase( string ) {\n\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n}\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t//  - Node\n\t//    - Node.ELEMENT_NODE\n\t//    - Node.DOCUMENT_NODE\n\t//  - Object\n\t//    - Any\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tcache: function( owner ) {\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see trac-8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\t// Always use camelCase key (gh-2257)\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ camelCase( data ) ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ camelCase( prop ) ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\n\t\t\t// Always use camelCase key (gh-2257)\n\t\t\towner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];\n\t},\n\taccess: function( owner, key, value ) {\n\n\t\t// In cases where either:\n\t\t//\n\t\t//   1. No key was specified\n\t\t//   2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t//   1. The entire cache object\n\t\t//   2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\treturn this.get( owner, key );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t//   1. An object of properties\n\t\t//   2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key !== undefined ) {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( Array.isArray( key ) ) {\n\n\t\t\t\t// If key is an array of keys...\n\t\t\t\t// We always set camelCase keys, so remove that.\n\t\t\t\tkey = key.map( camelCase );\n\t\t\t} else {\n\t\t\t\tkey = camelCase( key );\n\n\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\tkey = key in cache ?\n\t\t\t\t\t[ key ] :\n\t\t\t\t\t( key.match( rnothtmlwhite ) || [] );\n\t\t\t}\n\n\t\t\ti = key.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ key[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <=35 - 45\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction getData( data ) {\n\tif ( data === \"true\" ) {\n\t\treturn true;\n\t}\n\n\tif ( data === \"false\" ) {\n\t\treturn false;\n\t}\n\n\tif ( data === \"null\" ) {\n\t\treturn null;\n\t}\n\n\t// Only convert to a number if it doesn't change the string\n\tif ( data === +data + \"\" ) {\n\t\treturn +data;\n\t}\n\n\tif ( rbrace.test( data ) ) {\n\t\treturn JSON.parse( data );\n\t}\n\n\treturn data;\n}\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = getData( data );\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE 11 only\n\t\t\t\t\t\t// The attrs elements can be null (trac-14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// The key will always be camelCased in Data\n\t\t\t\tdata = dataUser.get( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tthis.each( function() {\n\n\t\t\t\t// We always store the camelCased key\n\t\t\t\tdataUser.set( this, key, value );\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || Array.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar documentElement = document.documentElement;\n\n\n\n\tvar isAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem );\n\t\t},\n\t\tcomposed = { composed: true };\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only\n\t// Check attachment across shadow DOM boundaries when possible (gh-3504)\n\t// Support: iOS 10.0-10.2 only\n\t// Early iOS 10 versions support `attachShadow` but not `getRootNode`,\n\t// leading to errors. We need to check for `getRootNode`.\n\tif ( documentElement.getRootNode ) {\n\t\tisAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem ) ||\n\t\t\t\telem.getRootNode( composed ) === elem.ownerDocument;\n\t\t};\n\t}\nvar isHiddenWithinTree = function( elem, el ) {\n\n\t\t// isHiddenWithinTree might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\n\t\t// Inline style trumps all\n\t\treturn elem.style.display === \"none\" ||\n\t\t\telem.style.display === \"\" &&\n\n\t\t\t// Otherwise, check computed style\n\t\t\t// Support: Firefox <=43 - 45\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\n\t\t\t// in the document.\n\t\t\tisAttached( elem ) &&\n\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted, scale,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() {\n\t\t\t\treturn tween.cur();\n\t\t\t} :\n\t\t\tfunction() {\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\n\t\t\t},\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = elem.nodeType &&\n\t\t\t( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Support: Firefox <=54\n\t\t// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\n\t\tinitial = initial / 2;\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\twhile ( maxIterations-- ) {\n\n\t\t\t// Evaluate and update our best guess (doubling guesses that zero out).\n\t\t\t// Finish if the scale equals or crosses 1 (making the old*new product non-positive).\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\t\t\tif ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {\n\t\t\t\tmaxIterations = 0;\n\t\t\t}\n\t\t\tinitialInUnit = initialInUnit / scale;\n\n\t\t}\n\n\t\tinitialInUnit = initialInUnit * 2;\n\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\nvar defaultDisplayMap = {};\n\nfunction getDefaultDisplay( elem ) {\n\tvar temp,\n\t\tdoc = elem.ownerDocument,\n\t\tnodeName = elem.nodeName,\n\t\tdisplay = defaultDisplayMap[ nodeName ];\n\n\tif ( display ) {\n\t\treturn display;\n\t}\n\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\n\tdisplay = jQuery.css( temp, \"display\" );\n\n\ttemp.parentNode.removeChild( temp );\n\n\tif ( display === \"none\" ) {\n\t\tdisplay = \"block\";\n\t}\n\tdefaultDisplayMap[ nodeName ] = display;\n\n\treturn display;\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\t// Determine new display value for elements that need to change\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\n\t\t\t// inline or about-to-be-restored)\n\t\t\tif ( display === \"none\" ) {\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\n\t\t\t\tif ( !values[ index ] ) {\n\t\t\t\t\telem.style.display = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( display !== \"none\" ) {\n\t\t\t\tvalues[ index ] = \"none\";\n\n\t\t\t\t// Remember what we're overwriting\n\t\t\t\tdataPriv.set( elem, \"display\", display );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of the elements in a second loop to avoid constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\tif ( values[ index ] != null ) {\n\t\t\telements[ index ].style.display = values[ index ];\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend( {\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHiddenWithinTree( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i );\n\nvar rscriptType = ( /^$|^module$|\\/(?:java|ecma)script/i );\n\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0 - 4.3 only\n\t// Check state lost if the name is set (trac-11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (trac-14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Android <=4.1 only\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE <=11 only\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n\n\t// Support: IE <=9 only\n\t// IE <=9 replaces <option> tags with their contents when inserted outside of\n\t// the select element.\n\tdiv.innerHTML = \"<option></option>\";\n\tsupport.option = !!div.lastChild;\n} )();\n\n\n// We have to close these tags to support XHTML (trac-13200)\nvar wrapMap = {\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting <tbody> or other required elements.\n\tthead: [ 1, \"<table>\", \"</table>\" ],\n\tcol: [ 2, \"<table><colgroup>\", \"</colgroup></table>\" ],\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// Support: IE <=9 only\nif ( !support.option ) {\n\twrapMap.optgroup = wrapMap.option = [ 1, \"<select multiple='multiple'>\", \"</select>\" ];\n}\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE <=9 - 11 only\n\t// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)\n\tvar ret;\n\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\tret = context.getElementsByTagName( tag || \"*\" );\n\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\n\t\tret = context.querySelectorAll( tag || \"*\" );\n\n\t} else {\n\t\tret = [];\n\t}\n\n\tif ( tag === undefined || tag && nodeName( context, tag ) ) {\n\t\treturn jQuery.merge( [ context ], ret );\n\t}\n\n\treturn ret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, attached, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( toType( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (trac-12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tattached = isAttached( elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( attached ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\nvar rtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\n// Support: IE <=9 - 11+\n// focus() and blur() are asynchronous, except when they are no-op.\n// So expect focus to be synchronous when the element is already active,\n// and blur to be synchronous when the element is not already active.\n// (focus and blur are always synchronous in other supported browsers,\n// this just defines when we can count on it).\nfunction expectSync( elem, type ) {\n\treturn ( elem === safeActiveElement() ) === ( type === \"focus\" );\n}\n\n// Support: IE <=9 only\n// Accessing document.activeElement can throw unexpectedly\n// https://bugs.jquery.com/ticket/13393\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Only attach events to objects that accept data\n\t\tif ( !acceptData( elem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Ensure that invalid selectors throw exceptions at attach time\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\n\t\tif ( selector ) {\n\t\t\tjQuery.find.matchesSelector( documentElement, selector );\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = Object.create( null );\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( nativeEvent ) {\n\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\n\t\t\targs = new Array( arguments.length ),\n\n\t\t\t// Make a writable jQuery.Event from the native event object\n\t\t\tevent = jQuery.event.fix( nativeEvent ),\n\n\t\t\thandlers = (\n\t\t\t\tdataPriv.get( this, \"events\" ) || Object.create( null )\n\t\t\t)[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// If the event is namespaced, then each handler is only invoked if it is\n\t\t\t\t// specially universal or its namespaces are a superset of the event's.\n\t\t\t\tif ( !event.rnamespace || handleObj.namespace === false ||\n\t\t\t\t\tevent.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, handleObj, sel, matchedHandlers, matchedSelectors,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\tif ( delegateCount &&\n\n\t\t\t// Support: IE <=9\n\t\t\t// Black-hole SVG <use> instance trees (trac-13180)\n\t\t\tcur.nodeType &&\n\n\t\t\t// Support: Firefox <=42\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n\t\t\t// Support: IE 11 only\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\n\t\t\t!( event.type === \"click\" && event.button >= 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (trac-13208)\n\t\t\t\t// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)\n\t\t\t\tif ( cur.nodeType === 1 && !( event.type === \"click\" && cur.disabled === true ) ) {\n\t\t\t\t\tmatchedHandlers = [];\n\t\t\t\t\tmatchedSelectors = {};\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (trac-13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatchedSelectors[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] ) {\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matchedHandlers.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tcur = this;\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\taddProp: function( name, hook ) {\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget: isFunction( hook ) ?\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn hook( this.originalEvent );\n\t\t\t\t\t}\n\t\t\t\t} :\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn this.originalEvent[ name ];\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\tset: function( value ) {\n\t\t\t\tObject.defineProperty( this, name, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: value\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\tfix: function( originalEvent ) {\n\t\treturn originalEvent[ jQuery.expando ] ?\n\t\t\toriginalEvent :\n\t\t\tnew jQuery.Event( originalEvent );\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tclick: {\n\n\t\t\t// Utilize native event to ensure correct state for checkable inputs\n\t\t\tsetup: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Claim the first handler\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\t// dataPriv.set( el, \"click\", ... )\n\t\t\t\t\tleverageNative( el, \"click\", returnTrue );\n\t\t\t\t}\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\ttrigger: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Force setup before triggering a click\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\tleverageNative( el, \"click\" );\n\t\t\t\t}\n\n\t\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, suppress native .click() on links\n\t\t\t// Also prevent it if we're currently inside a leveraged native-event stack\n\t\t\t_default: function( event ) {\n\t\t\t\tvar target = event.target;\n\t\t\t\treturn rcheckableType.test( target.type ) &&\n\t\t\t\t\ttarget.click && nodeName( target, \"input\" ) &&\n\t\t\t\t\tdataPriv.get( target, \"click\" ) ||\n\t\t\t\t\tnodeName( target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Ensure the presence of an event listener that handles manually-triggered\n// synthetic events by interrupting progress until reinvoked in response to\n// *native* events that it fires directly, ensuring that state changes have\n// already occurred before other listeners are invoked.\nfunction leverageNative( el, type, expectSync ) {\n\n\t// Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add\n\tif ( !expectSync ) {\n\t\tif ( dataPriv.get( el, type ) === undefined ) {\n\t\t\tjQuery.event.add( el, type, returnTrue );\n\t\t}\n\t\treturn;\n\t}\n\n\t// Register the controller as a special universal handler for all event namespaces\n\tdataPriv.set( el, type, false );\n\tjQuery.event.add( el, type, {\n\t\tnamespace: false,\n\t\thandler: function( event ) {\n\t\t\tvar notAsync, result,\n\t\t\t\tsaved = dataPriv.get( this, type );\n\n\t\t\tif ( ( event.isTrigger & 1 ) && this[ type ] ) {\n\n\t\t\t\t// Interrupt processing of the outer synthetic .trigger()ed event\n\t\t\t\t// Saved data should be false in such cases, but might be a leftover capture object\n\t\t\t\t// from an async native handler (gh-4350)\n\t\t\t\tif ( !saved.length ) {\n\n\t\t\t\t\t// Store arguments for use when handling the inner native event\n\t\t\t\t\t// There will always be at least one argument (an event object), so this array\n\t\t\t\t\t// will not be confused with a leftover capture object.\n\t\t\t\t\tsaved = slice.call( arguments );\n\t\t\t\t\tdataPriv.set( this, type, saved );\n\n\t\t\t\t\t// Trigger the native event and capture its result\n\t\t\t\t\t// Support: IE <=9 - 11+\n\t\t\t\t\t// focus() and blur() are asynchronous\n\t\t\t\t\tnotAsync = expectSync( this, type );\n\t\t\t\t\tthis[ type ]();\n\t\t\t\t\tresult = dataPriv.get( this, type );\n\t\t\t\t\tif ( saved !== result || notAsync ) {\n\t\t\t\t\t\tdataPriv.set( this, type, false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult = {};\n\t\t\t\t\t}\n\t\t\t\t\tif ( saved !== result ) {\n\n\t\t\t\t\t\t// Cancel the outer synthetic event\n\t\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t// Support: Chrome 86+\n\t\t\t\t\t\t// In Chrome, if an element having a focusout handler is blurred by\n\t\t\t\t\t\t// clicking outside of it, it invokes the handler synchronously. If\n\t\t\t\t\t\t// that handler calls `.remove()` on the element, the data is cleared,\n\t\t\t\t\t\t// leaving `result` undefined. We need to guard against this.\n\t\t\t\t\t\treturn result && result.value;\n\t\t\t\t\t}\n\n\t\t\t\t// If this is an inner synthetic event for an event with a bubbling surrogate\n\t\t\t\t// (focus or blur), assume that the surrogate already propagated from triggering the\n\t\t\t\t// native event and prevent that from happening again here.\n\t\t\t\t// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the\n\t\t\t\t// bubbling surrogate propagates *after* the non-bubbling base), but that seems\n\t\t\t\t// less bad than duplication.\n\t\t\t\t} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\n\t\t\t// If this is a native event triggered above, everything is now in order\n\t\t\t// Fire an inner synthetic event with the original arguments\n\t\t\t} else if ( saved.length ) {\n\n\t\t\t\t// ...and capture the result\n\t\t\t\tdataPriv.set( this, type, {\n\t\t\t\t\tvalue: jQuery.event.trigger(\n\n\t\t\t\t\t\t// Support: IE <=9 - 11+\n\t\t\t\t\t\t// Extend with the prototype to reset the above stopImmediatePropagation()\n\t\t\t\t\t\tjQuery.extend( saved[ 0 ], jQuery.Event.prototype ),\n\t\t\t\t\t\tsaved.slice( 1 ),\n\t\t\t\t\t\tthis\n\t\t\t\t\t)\n\t\t\t\t} );\n\n\t\t\t\t// Abort handling of the native event\n\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t}\n\t\t}\n\t} );\n}\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android <=2.3 only\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t\t// Create target properties\n\t\t// Support: Safari <=6 - 7 only\n\t\t// Target should not be a text node (trac-504, trac-13143)\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\n\t\t\tsrc.target.parentNode :\n\t\t\tsrc.target;\n\n\t\tthis.currentTarget = src.currentTarget;\n\t\tthis.relatedTarget = src.relatedTarget;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || Date.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Includes all common event props including KeyEvent and MouseEvent specific props\njQuery.each( {\n\taltKey: true,\n\tbubbles: true,\n\tcancelable: true,\n\tchangedTouches: true,\n\tctrlKey: true,\n\tdetail: true,\n\teventPhase: true,\n\tmetaKey: true,\n\tpageX: true,\n\tpageY: true,\n\tshiftKey: true,\n\tview: true,\n\t\"char\": true,\n\tcode: true,\n\tcharCode: true,\n\tkey: true,\n\tkeyCode: true,\n\tbutton: true,\n\tbuttons: true,\n\tclientX: true,\n\tclientY: true,\n\toffsetX: true,\n\toffsetY: true,\n\tpointerId: true,\n\tpointerType: true,\n\tscreenX: true,\n\tscreenY: true,\n\ttargetTouches: true,\n\ttoElement: true,\n\ttouches: true,\n\twhich: true\n}, jQuery.event.addProp );\n\njQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( type, delegateType ) {\n\tjQuery.event.special[ type ] = {\n\n\t\t// Utilize native event if possible so blur/focus sequence is correct\n\t\tsetup: function() {\n\n\t\t\t// Claim the first handler\n\t\t\t// dataPriv.set( this, \"focus\", ... )\n\t\t\t// dataPriv.set( this, \"blur\", ... )\n\t\t\tleverageNative( this, type, expectSync );\n\n\t\t\t// Return false to allow normal processing in the caller\n\t\t\treturn false;\n\t\t},\n\t\ttrigger: function() {\n\n\t\t\t// Force setup before trigger\n\t\t\tleverageNative( this, type );\n\n\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\treturn true;\n\t\t},\n\n\t\t// Suppress native focus or blur if we're currently inside\n\t\t// a leveraged native-event stack\n\t\t_default: function( event ) {\n\t\t\treturn dataPriv.get( event.target, type );\n\t\t},\n\n\t\tdelegateType: delegateType\n\t};\n} );\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://bugs.chromium.org/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event )  dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\n\t// Support: IE <=10 - 11, Edge 12 - 13 only\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /<script|<style|<link/i,\n\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\n\trcleanScript = /^\\s*<!\\[CDATA\\[|\\]\\]>\\s*$/g;\n\n// Prefer a tbody over its parent table for containing new rows\nfunction manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tif ( ( elem.type || \"\" ).slice( 0, 5 ) === \"true/\" ) {\n\t\telem.type = elem.type.slice( 5 );\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.get( src );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdataPriv.remove( dest, \"handle events\" );\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = flat( args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tvalueIsFunction = isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( valueIsFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (trac-8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Reenable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src && ( node.type || \"\" ).toLowerCase()  !== \"module\" ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl && !node.noModule ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src, {\n\t\t\t\t\t\t\t\t\tnonce: node.nonce || node.getAttribute( \"nonce\" )\n\t\t\t\t\t\t\t\t}, doc );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Unwrap a CDATA section containing script contents. This shouldn't be\n\t\t\t\t\t\t\t// needed as in XML documents they're already not visible when\n\t\t\t\t\t\t\t// inspecting element contents and in HTML documents they have no\n\t\t\t\t\t\t\t// meaning but we're preserving that logic for backwards compatibility.\n\t\t\t\t\t\t\t// This will be removed completely in 4.0. See gh-4904.\n\t\t\t\t\t\t\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), node, doc );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && isAttached( node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html;\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = isAttached( elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar rcustomProp = /^--/;\n\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\nvar swap = function( elem, options, callback ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.call( elem );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar rboxStyle = new RegExp( cssExpand.join( \"|\" ), \"i\" );\n\nvar whitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\";\n\n\nvar rtrimCSS = new RegExp(\n\t\"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\",\n\t\"g\"\n);\n\n\n\n\n( function() {\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\tdiv.style.cssText =\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"width:60%;top:1%\";\n\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.right = \"60%\";\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t// Support: IE 9 - 11 only\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t// Support: IE 9 only\n\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t// Support: Chrome <=64\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\tdiv.style.position = \"absolute\";\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}\n\n\tfunction roundPixelMeasures( measure ) {\n\t\treturn Math.round( parseFloat( measure ) );\n\t}\n\n\tvar pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,\n\t\treliableTrDimensionsVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE <=9 - 11 only\n\t// Style of cloned element affects source element cloned (trac-8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tjQuery.extend( support, {\n\t\tboxSizingReliable: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelBoxStyles: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelBoxStylesVal;\n\t\t},\n\t\tpixelPosition: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn reliableMarginLeftVal;\n\t\t},\n\t\tscrollboxSize: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn scrollboxSizeVal;\n\t\t},\n\n\t\t// Support: IE 9 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Behavior in IE 9 is more subtle than in newer versions & it passes\n\t\t// some versions of this test; make sure not to make it pass there!\n\t\t//\n\t\t// Support: Firefox 70+\n\t\t// Only Firefox includes border widths\n\t\t// in computed dimensions. (gh-4529)\n\t\treliableTrDimensions: function() {\n\t\t\tvar table, tr, trChild, trStyle;\n\t\t\tif ( reliableTrDimensionsVal == null ) {\n\t\t\t\ttable = document.createElement( \"table\" );\n\t\t\t\ttr = document.createElement( \"tr\" );\n\t\t\t\ttrChild = document.createElement( \"div\" );\n\n\t\t\t\ttable.style.cssText = \"position:absolute;left:-11111px;border-collapse:separate\";\n\t\t\t\ttr.style.cssText = \"border:1px solid\";\n\n\t\t\t\t// Support: Chrome 86+\n\t\t\t\t// Height set through cssText does not get applied.\n\t\t\t\t// Computed height then comes back as 0.\n\t\t\t\ttr.style.height = \"1px\";\n\t\t\t\ttrChild.style.height = \"9px\";\n\n\t\t\t\t// Support: Android 8 Chrome 86+\n\t\t\t\t// In our bodyBackground.html iframe,\n\t\t\t\t// display for all div elements is set to \"inline\",\n\t\t\t\t// which causes a problem only in Android 8 Chrome 86.\n\t\t\t\t// Ensuring the div is display: block\n\t\t\t\t// gets around this issue.\n\t\t\t\ttrChild.style.display = \"block\";\n\n\t\t\t\tdocumentElement\n\t\t\t\t\t.appendChild( table )\n\t\t\t\t\t.appendChild( tr )\n\t\t\t\t\t.appendChild( trChild );\n\n\t\t\t\ttrStyle = window.getComputedStyle( tr );\n\t\t\t\treliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderTopWidth, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;\n\n\t\t\t\tdocumentElement.removeChild( table );\n\t\t\t}\n\t\t\treturn reliableTrDimensionsVal;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\t\tisCustomProp = rcustomProp.test( name ),\n\n\t\t// Support: Firefox 51+\n\t\t// Retrieving style before computed somehow\n\t\t// fixes an issue with getting wrong values\n\t\t// on detached elements\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\n\t// getPropertyValue is needed for:\n\t//   .css('filter') (IE 9 only, trac-12537)\n\t//   .css('--customProperty) (gh-3144)\n\tif ( computed ) {\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\n\t\t// trim whitespace for custom property (issue gh-4926)\n\t\tif ( isCustomProp ) {\n\n\t\t\t// rtrim treats U+000D CARRIAGE RETURN and U+000C FORM FEED\n\t\t\t// as whitespace while CSS does not, but this is not a problem\n\t\t\t// because CSS preprocessing replaces them with U+000A LINE FEED\n\t\t\t// (which *is* CSS whitespace)\n\t\t\t// https://www.w3.org/TR/css-syntax-3/#input-preprocessing\n\t\t\tret = ret.replace( rtrimCSS, \"$1\" );\n\t\t}\n\n\t\tif ( ret === \"\" && !isAttached( elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// https://drafts.csswg.org/cssom/#resolved-values\n\t\tif ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE <=9 - 11 only\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar cssPrefixes = [ \"Webkit\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style,\n\tvendorProps = {};\n\n// Return a vendor-prefixed property or undefined\nfunction vendorPropName( name ) {\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\n// Return a potentially-mapped jQuery.cssProps or vendor prefixed property\nfunction finalPropName( name ) {\n\tvar final = jQuery.cssProps[ name ] || vendorProps[ name ];\n\n\tif ( final ) {\n\t\treturn final;\n\t}\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\treturn vendorProps[ name ] = vendorPropName( name ) || name;\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t};\n\nfunction setPositiveNumber( _elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {\n\tvar i = dimension === \"width\" ? 1 : 0,\n\t\textra = 0,\n\t\tdelta = 0;\n\n\t// Adjustment may not be necessary\n\tif ( box === ( isBorderBox ? \"border\" : \"content\" ) ) {\n\t\treturn 0;\n\t}\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin\n\t\tif ( box === \"margin\" ) {\n\t\t\tdelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\t// If we get here with a content-box, we're seeking \"padding\" or \"border\" or \"margin\"\n\t\tif ( !isBorderBox ) {\n\n\t\t\t// Add padding\n\t\t\tdelta += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// For \"border\" or \"margin\", add border\n\t\t\tif ( box !== \"padding\" ) {\n\t\t\t\tdelta += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\n\t\t\t// But still keep track of it otherwise\n\t\t\t} else {\n\t\t\t\textra += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\n\t\t// If we get here with a border-box (content + padding + border), we're seeking \"content\" or\n\t\t// \"padding\" or \"margin\"\n\t\t} else {\n\n\t\t\t// For \"content\", subtract padding\n\t\t\tif ( box === \"content\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// For \"content\" or \"padding\", subtract border\n\t\t\tif ( box !== \"margin\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Account for positive content-box scroll gutter when requested by providing computedVal\n\tif ( !isBorderBox && computedVal >= 0 ) {\n\n\t\t// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\n\t\t// Assuming integer scroll gutter, subtract the rest and round down\n\t\tdelta += Math.max( 0, Math.ceil(\n\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\tcomputedVal -\n\t\t\tdelta -\n\t\t\textra -\n\t\t\t0.5\n\n\t\t// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter\n\t\t// Use an explicit zero to avoid NaN (gh-3964)\n\t\t) ) || 0;\n\t}\n\n\treturn delta;\n}\n\nfunction getWidthOrHeight( elem, dimension, extra ) {\n\n\t// Start with computed style\n\tvar styles = getStyles( elem ),\n\n\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).\n\t\t// Fake content-box until we know it's needed to know the true value.\n\t\tboxSizingNeeded = !support.boxSizingReliable() || extra,\n\t\tisBorderBox = boxSizingNeeded &&\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\tvalueIsBorderBox = isBorderBox,\n\n\t\tval = curCSS( elem, dimension, styles ),\n\t\toffsetProp = \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );\n\n\t// Support: Firefox <=54\n\t// Return a confounding non-pixel value or feign ignorance, as appropriate.\n\tif ( rnumnonpx.test( val ) ) {\n\t\tif ( !extra ) {\n\t\t\treturn val;\n\t\t}\n\t\tval = \"auto\";\n\t}\n\n\n\t// Support: IE 9 - 11 only\n\t// Use offsetWidth/offsetHeight for when box sizing is unreliable.\n\t// In those cases, the computed value can be trusted to be border-box.\n\tif ( ( !support.boxSizingReliable() && isBorderBox ||\n\n\t\t// Support: IE 10 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Interestingly, in some cases IE 9 doesn't suffer from this issue.\n\t\t!support.reliableTrDimensions() && nodeName( elem, \"tr\" ) ||\n\n\t\t// Fall back to offsetWidth/offsetHeight when value is \"auto\"\n\t\t// This happens for inline elements with no explicit setting (gh-3571)\n\t\tval === \"auto\" ||\n\n\t\t// Support: Android <=4.1 - 4.3 only\n\t\t// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)\n\t\t!parseFloat( val ) && jQuery.css( elem, \"display\", false, styles ) === \"inline\" ) &&\n\n\t\t// Make sure the element is visible & connected\n\t\telem.getClientRects().length ) {\n\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t\t// Where available, offsetWidth/offsetHeight approximate border box dimensions.\n\t\t// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the\n\t\t// retrieved value as a content box dimension.\n\t\tvalueIsBorderBox = offsetProp in elem;\n\t\tif ( valueIsBorderBox ) {\n\t\t\tval = elem[ offsetProp ];\n\t\t}\n\t}\n\n\t// Normalize \"\" and auto\n\tval = parseFloat( val ) || 0;\n\n\t// Adjust for the element's box model\n\treturn ( val +\n\t\tboxModelAdjustment(\n\t\t\telem,\n\t\t\tdimension,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles,\n\n\t\t\t// Provide the current computed size to request scroll gutter calculation (gh-3589)\n\t\t\tval\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\t\"animationIterationCount\": true,\n\t\t\"columnCount\": true,\n\t\t\"fillOpacity\": true,\n\t\t\"flexGrow\": true,\n\t\t\"flexShrink\": true,\n\t\t\"fontWeight\": true,\n\t\t\"gridArea\": true,\n\t\t\"gridColumn\": true,\n\t\t\"gridColumnEnd\": true,\n\t\t\"gridColumnStart\": true,\n\t\t\"gridRow\": true,\n\t\t\"gridRowEnd\": true,\n\t\t\"gridRowStart\": true,\n\t\t\"lineHeight\": true,\n\t\t\"opacity\": true,\n\t\t\"order\": true,\n\t\t\"orphans\": true,\n\t\t\"widows\": true,\n\t\t\"zIndex\": true,\n\t\t\"zoom\": true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name ),\n\t\t\tstyle = elem.style;\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to query the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (trac-7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug trac-9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (trac-7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\t// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append\n\t\t\t// \"px\" to a few hardcoded values.\n\t\t\tif ( type === \"number\" && !isCustomProp ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tif ( isCustomProp ) {\n\t\t\t\t\tstyle.setProperty( name, value );\n\t\t\t\t} else {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name );\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to modify the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( _i, dimension ) {\n\tjQuery.cssHooks[ dimension ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\n\t\t\t\t\t// Support: Safari 8+\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\n\t\t\t\t\t// Support: IE <=11 only\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\n\t\t\t\t\t// in IE throws an error.\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\n\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\treturn getWidthOrHeight( elem, dimension, extra );\n\t\t\t\t\t} ) :\n\t\t\t\t\tgetWidthOrHeight( elem, dimension, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = getStyles( elem ),\n\n\t\t\t\t// Only read styles.position if the test has a chance to fail\n\t\t\t\t// to avoid forcing a reflow.\n\t\t\t\tscrollboxSizeBuggy = !support.scrollboxSize() &&\n\t\t\t\t\tstyles.position === \"absolute\",\n\n\t\t\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)\n\t\t\t\tboxSizingNeeded = scrollboxSizeBuggy || extra,\n\t\t\t\tisBorderBox = boxSizingNeeded &&\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\tsubtract = extra ?\n\t\t\t\t\tboxModelAdjustment(\n\t\t\t\t\t\telem,\n\t\t\t\t\t\tdimension,\n\t\t\t\t\t\textra,\n\t\t\t\t\t\tisBorderBox,\n\t\t\t\t\t\tstyles\n\t\t\t\t\t) :\n\t\t\t\t\t0;\n\n\t\t\t// Account for unreliable border-box dimensions by comparing offset* to computed and\n\t\t\t// faking a content-box to get border and padding (gh-3699)\n\t\t\tif ( isBorderBox && scrollboxSizeBuggy ) {\n\t\t\t\tsubtract -= Math.ceil(\n\t\t\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\t\t\tparseFloat( styles[ dimension ] ) -\n\t\t\t\t\tboxModelAdjustment( elem, dimension, \"border\", false, styles ) -\n\t\t\t\t\t0.5\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\n\n\t\t\t\telem.style[ dimension ] = value;\n\t\t\t\tvalue = jQuery.css( elem, dimension );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( prefix !== \"margin\" ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 && (\n\t\t\t\tjQuery.cssHooks[ tween.prop ] ||\n\t\t\t\t\ttween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9 only\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, inProgress,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\nfunction schedule() {\n\tif ( inProgress ) {\n\t\tif ( document.hidden === false && window.requestAnimationFrame ) {\n\t\t\twindow.requestAnimationFrame( schedule );\n\t\t} else {\n\t\t\twindow.setTimeout( schedule, jQuery.fx.interval );\n\t\t}\n\n\t\tjQuery.fx.tick();\n\t}\n}\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\n\t\tisBox = \"width\" in props || \"height\" in props,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Queue-skipping animations hijack the fx hooks\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Detect show/hide animations\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.test( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// Pretend to be hidden if this is a \"show\" and\n\t\t\t\t// there is still data from a stopped show/hide\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\n\t\t\t\t// Ignore all other no-op show/hide data\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\t\t}\n\t}\n\n\t// Bail out if this is a no-op like .hide().hide()\n\tpropTween = !jQuery.isEmptyObject( props );\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\n\t\treturn;\n\t}\n\n\t// Restrict \"overflow\" and \"display\" styles during box animations\n\tif ( isBox && elem.nodeType === 1 ) {\n\n\t\t// Support: IE <=9 - 11, Edge 12 - 15\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\n\t\t// from identically-valued overflowX and overflowY and Edge just mirrors\n\t\t// the overflowX value there.\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\n\t\trestoreDisplay = dataShow && dataShow.display;\n\t\tif ( restoreDisplay == null ) {\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\n\t\t}\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\tif ( display === \"none\" ) {\n\t\t\tif ( restoreDisplay ) {\n\t\t\t\tdisplay = restoreDisplay;\n\t\t\t} else {\n\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\t\t\tshowHide( [ elem ] );\n\t\t\t}\n\t\t}\n\n\t\t// Animate inline elements as inline-block\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\n\t\t\t\tif ( !propTween ) {\n\t\t\t\t\tanim.done( function() {\n\t\t\t\t\t\tstyle.display = restoreDisplay;\n\t\t\t\t\t} );\n\t\t\t\t\tif ( restoreDisplay == null ) {\n\t\t\t\t\t\tdisplay = style.display;\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// Implement show/hide animations\n\tpropTween = false;\n\tfor ( prop in orig ) {\n\n\t\t// General show/hide setup for this element animation\n\t\tif ( !propTween ) {\n\t\t\tif ( dataShow ) {\n\t\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\t\thidden = dataShow.hidden;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\n\t\t\t}\n\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\n\t\t\tif ( toggle ) {\n\t\t\t\tdataShow.hidden = !hidden;\n\t\t\t}\n\n\t\t\t// Show elements before animating them\n\t\t\tif ( hidden ) {\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t}\n\n\t\t\t/* eslint-disable no-loop-func */\n\n\t\t\tanim.done( function() {\n\n\t\t\t\t/* eslint-enable no-loop-func */\n\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\n\t\t\t\tif ( !hidden ) {\n\t\t\t\t\tshowHide( [ elem ] );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\t\tfor ( prop in orig ) {\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Per-property setup\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\t\tif ( !( prop in dataShow ) ) {\n\t\t\tdataShow[ prop ] = propTween.start;\n\t\t\tif ( hidden ) {\n\t\t\t\tpropTween.end = propTween.start;\n\t\t\t\tpropTween.start = 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( Array.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3 only\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\t// If there's more to do, yield\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t}\n\n\t\t\t// If this was an empty animation, synthesize a final progress notification\n\t\t\tif ( !length ) {\n\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t}\n\n\t\t\t// Resolve the animation and report its conclusion\n\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\treturn false;\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tresult.stop.bind( result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\t// Attach callbacks from options\n\tanimation\n\t\t.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\treturn animation;\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnothtmlwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tisFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !isFunction( easing ) && easing\n\t};\n\n\t// Go to the end state if fx are off\n\tif ( jQuery.fx.off ) {\n\t\topt.duration = 0;\n\n\t} else {\n\t\tif ( typeof opt.duration !== \"number\" ) {\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\n\n\t\t\t} else {\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHiddenWithinTree ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\n\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( _i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = Date.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Run the timer and safely remove it when done (allowing for external removal)\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tjQuery.fx.start();\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( inProgress ) {\n\t\treturn;\n\t}\n\n\tinProgress = true;\n\tschedule();\n};\n\njQuery.fx.stop = function() {\n\tinProgress = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: Android <=4.3 only\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE <=11 only\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: IE <=11 only\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// Attribute hooks are determined by the lowercase version\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tnodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name,\n\t\t\ti = 0,\n\n\t\t\t// Attribute names can contain non-HTML whitespace characters\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( _i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle,\n\t\t\tlowercaseName = name.toLowerCase();\n\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ lowercaseName ];\n\t\t\tattrHandle[ lowercaseName ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tlowercaseName :\n\t\t\t\tnull;\n\t\t\tattrHandle[ lowercaseName ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// Support: IE <=9 - 11 only\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// Use proper attribute retrieval (trac-12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\tif ( tabindex ) {\n\t\t\t\t\treturn parseInt( tabindex, 10 );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\n\t\t\t\t\telem.href\n\t\t\t\t) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Support: IE <=11 only\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\n// eslint rule \"no-unused-expressions\" is disabled for this code\n// since it considers such accessions noop\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\n\t// Strip and collapse whitespace according to HTML spec\n\t// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace\n\tfunction stripAndCollapse( value ) {\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\treturn tokens.join( \" \" );\n\t}\n\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\n}\n\nfunction classesToArray( value ) {\n\tif ( Array.isArray( value ) ) {\n\t\treturn value;\n\t}\n\tif ( typeof value === \"string\" ) {\n\t\treturn value.match( rnothtmlwhite ) || [];\n\t}\n\treturn [];\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + className + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += className + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + className + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + className + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar classNames, className, i, self,\n\t\t\ttype = typeof value,\n\t\t\tisValidValue = type === \"string\" || Array.isArray( value );\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\tif ( typeof stateVal === \"boolean\" && isValidValue ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\treturn this.each( function() {\n\t\t\tif ( isValidValue ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\tself = jQuery( this );\n\n\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( \"class\",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t\t\"\" :\n\t\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, valueIsFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\t// Handle most common string cases\n\t\t\t\tif ( typeof ret === \"string\" ) {\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\n\t\t\t\t}\n\n\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\treturn ret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tvalueIsFunction = isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( Array.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE <=10 - 11 only\n\t\t\t\t\t// option.text throws exceptions (trac-14686, trac-14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tstripAndCollapse( jQuery.text( elem ) );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option, i,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\",\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length;\n\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\ti = max;\n\n\t\t\t\t} else {\n\t\t\t\t\ti = one ? index : 0;\n\t\t\t\t}\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (trac-2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t!option.disabled &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t/* eslint-disable no-cond-assign */\n\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* eslint-enable no-cond-assign */\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\n\n\nsupport.focusin = \"onfocusin\" in window;\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\tstopPropagationCallback = function( e ) {\n\t\te.stopPropagation();\n\t};\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special, lastElement,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = lastElement = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (trac-9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tlastElement = cur;\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( dataPriv.get( cur, \"events\" ) || Object.create( null ) )[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (trac-6170)\n\t\t\t\tif ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.addEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\telem[ type ]();\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.removeEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\t// Used only for `focus(in | out)` events\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\n// Support: Firefox <=44\n// Firefox doesn't have focus(in | out) events\n// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n//\n// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\n// focus(in | out) events fire after focus & blur events,\n// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\nif ( !support.focusin ) {\n\tjQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler on the document while someone wants focusin/focusout\n\t\tvar handler = function( event ) {\n\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );\n\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\n\t\t\t\t// Handle: regular nodes (via `this.ownerDocument`), window\n\t\t\t\t// (via `this.document`) & document (via `this`).\n\t\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix );\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.access( doc, fix, ( attaches || 0 ) + 1 );\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix ) - 1;\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.removeEventListener( orig, handler, true );\n\t\t\t\t\tdataPriv.remove( doc, fix );\n\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.access( doc, fix, attaches );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} );\n}\nvar location = window.location;\n\nvar nonce = { guid: Date.now() };\n\nvar rquery = ( /\\?/ );\n\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml, parserErrorElem;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE throws on parseFromString with invalid input.\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {}\n\n\tparserErrorElem = xml && xml.getElementsByTagName( \"parsererror\" )[ 0 ];\n\tif ( !xml || parserErrorElem ) {\n\t\tjQuery.error( \"Invalid XML: \" + (\n\t\t\tparserErrorElem ?\n\t\t\t\tjQuery.map( parserErrorElem.childNodes, function( el ) {\n\t\t\t\t\treturn el.textContent;\n\t\t\t\t} ).join( \"\\n\" ) :\n\t\t\t\tdata\n\t\t) );\n\t}\n\treturn xml;\n};\n\n\nvar\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( Array.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && toType( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, valueOrFunction ) {\n\n\t\t\t// If value is a function, invoke it and use its return value\n\t\t\tvar value = isFunction( valueOrFunction ) ?\n\t\t\t\tvalueOrFunction() :\n\t\t\t\tvalueOrFunction;\n\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\n\t\t};\n\n\tif ( a == null ) {\n\t\treturn \"\";\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} ).filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} ).map( function( _i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\tif ( val == null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( Array.isArray( val ) ) {\n\t\t\t\treturn jQuery.map( val, function( val ) {\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\nvar\n\tr20 = /%20/g,\n\trhash = /#.*$/,\n\trantiCache = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// trac-7653, trac-8125, trac-8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t *    - BEFORE asking for a transport\n\t *    - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( \"a\" );\n\noriginAnchor.href = location.href;\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];\n\n\t\tif ( isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes trac-9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": JSON.parse,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// Request state (becomes false upon send and true upon completion)\n\t\t\tcompleted,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// uncached part of the url\n\t\t\tuncached,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( completed ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() + \" \" ] =\n\t\t\t\t\t\t\t\t\t( responseHeaders[ match[ 1 ].toLowerCase() + \" \" ] || [] )\n\t\t\t\t\t\t\t\t\t\t.concat( match[ 2 ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() + \" \" ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match.join( \", \" );\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn completed ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( completed ) {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR );\n\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (trac-10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" )\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\n\n\t\t// Alias method option to type as per ticket trac-12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = ( s.dataType || \"*\" ).toLowerCase().match( rnothtmlwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( \"a\" );\n\n\t\t\t// Support: IE <=8 - 11, Edge 12 - 15\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\n\t\t\t// e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE <=8 - 11 only\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( completed ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\t// Remove hash to simplify url manipulation\n\t\tcacheURL = s.url.replace( rhash, \"\" );\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// Remember the hash so we can put it back\n\t\t\tuncached = s.url.slice( cacheURL.length );\n\n\t\t\t// If data is available and should be processed, append data to url\n\t\t\tif ( s.data && ( s.processData || typeof s.data === \"string\" ) ) {\n\t\t\t\tcacheURL += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data;\n\n\t\t\t\t// trac-9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add or update anti-cache param if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce.guid++ ) +\n\t\t\t\t\tuncached;\n\t\t\t}\n\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\n\t\t\ts.url = cacheURL + uncached;\n\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\n\t\t} else if ( s.data && s.processData &&\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\n\t\t\ts.data = s.data.replace( r20, \"+\" );\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tcompleteDeferred.add( s.complete );\n\t\tjqXHR.done( s.success );\n\t\tjqXHR.fail( s.error );\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( completed ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tcompleted = false;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Rethrow post-completion exceptions\n\t\t\t\tif ( completed ) {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\n\t\t\t\t// Propagate others as results\n\t\t\t\tdone( -1, e );\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompleted = true;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Use a noop converter for missing script but not if jsonp\n\t\t\tif ( !isSuccess &&\n\t\t\t\tjQuery.inArray( \"script\", s.dataTypes ) > -1 &&\n\t\t\t\tjQuery.inArray( \"json\", s.dataTypes ) < 0 ) {\n\t\t\t\ts.converters[ \"text script\" ] = function() {};\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( _i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\njQuery.ajaxPrefilter( function( s ) {\n\tvar i;\n\tfor ( i in s.headers ) {\n\t\tif ( i.toLowerCase() === \"content-type\" ) {\n\t\t\ts.contentType = s.headers[ i ] || \"\";\n\t\t}\n\t}\n} );\n\n\njQuery._evalUrl = function( url, options, doc ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (trac-11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\n\t\t// Only evaluate the response if it is successful (gh-4126)\n\t\t// dataFilter is not invoked for failure responses, so using it instead\n\t\t// of the default converter is kludgy but it works.\n\t\tconverters: {\n\t\t\t\"text script\": function() {}\n\t\t},\n\t\tdataFilter: function( response ) {\n\t\t\tjQuery.globalEval( response, options, doc );\n\t\t}\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( this[ 0 ] ) {\n\t\t\tif ( isFunction( html ) ) {\n\t\t\t\thtml = html.call( this[ 0 ] );\n\t\t\t}\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar htmlIsFunction = isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function( selector ) {\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t} );\n\t\treturn this;\n\t}\n} );\n\n\njQuery.expr.pseudos.hidden = function( elem ) {\n\treturn !jQuery.expr.pseudos.visible( elem );\n};\njQuery.expr.pseudos.visible = function( elem ) {\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n};\n\n\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE <=9 only\n\t\t// trac-1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.ontimeout =\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see trac-8605, trac-14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\"  ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = xhr.ontimeout = callback( \"error\" );\n\n\t\t\t\t// Support: IE 9 only\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( \"abort\" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// trac-14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\njQuery.ajaxPrefilter( function( s ) {\n\tif ( s.crossDomain ) {\n\t\ts.contents.script = false;\n\t}\n} );\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain or forced-by-attrs requests\n\tif ( s.crossDomain || s.scriptAttrs ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( \"<script>\" )\n\t\t\t\t\t.attr( s.scriptAttrs || {} )\n\t\t\t\t\t.prop( { charset: s.scriptCharset, src: s.url } )\n\t\t\t\t\t.on( \"load error\", callback = function( evt ) {\n\t\t\t\t\t\tscript.remove();\n\t\t\t\t\t\tcallback = null;\n\t\t\t\t\t\tif ( evt ) {\n\t\t\t\t\t\t\tcomplete( evt.type === \"error\" ? 404 : 200, evt.type );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\tdocument.head.appendChild( script[ 0 ] );\n\t\t\t},\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup( {\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce.guid++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n} );\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" &&\n\t\t\t\t( s.contentType || \"\" )\n\t\t\t\t\t.indexOf( \"application/x-www-form-urlencoded\" ) === 0 &&\n\t\t\t\trjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[ \"script json\" ] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// Force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always( function() {\n\n\t\t\t// If previous value didn't exist - remove it\n\t\t\tif ( overwritten === undefined ) {\n\t\t\t\tjQuery( window ).removeProp( callbackName );\n\n\t\t\t// Otherwise restore preexisting value\n\t\t\t} else {\n\t\t\t\twindow[ callbackName ] = overwritten;\n\t\t\t}\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\n\t\t\t\t// Make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// Save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t} );\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n} );\n\n\n\n\n// Support: Safari 8 only\n// In Safari 8 documents created via document.implementation.createHTMLDocument\n// collapse sibling forms: the second one becomes a child of the first one.\n// Because of that, this security measure has to be disabled in Safari 8.\n// https://bugs.webkit.org/show_bug.cgi?id=137337\nsupport.createHTMLDocument = ( function() {\n\tvar body = document.implementation.createHTMLDocument( \"\" ).body;\n\tbody.innerHTML = \"<form></form><form></form>\";\n\treturn body.childNodes.length === 2;\n} )();\n\n\n// Argument \"data\" should be string of html\n// context (optional): If specified, the fragment will be created in this context,\n// defaults to document\n// keepScripts (optional): If true, will include scripts passed in the html string\njQuery.parseHTML = function( data, context, keepScripts ) {\n\tif ( typeof data !== \"string\" ) {\n\t\treturn [];\n\t}\n\tif ( typeof context === \"boolean\" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\n\tvar base, parsed, scripts;\n\n\tif ( !context ) {\n\n\t\t// Stop scripts or inline event handlers from being executed immediately\n\t\t// by using document.implementation\n\t\tif ( support.createHTMLDocument ) {\n\t\t\tcontext = document.implementation.createHTMLDocument( \"\" );\n\n\t\t\t// Set the base href for the created document\n\t\t\t// so any parsed elements with URLs\n\t\t\t// are based on the document's URL (gh-2965)\n\t\t\tbase = context.createElement( \"base\" );\n\t\t\tbase.href = document.location.href;\n\t\t\tcontext.head.appendChild( base );\n\t\t} else {\n\t\t\tcontext = document;\n\t\t}\n\t}\n\n\tparsed = rsingleTag.exec( data );\n\tscripts = !keepScripts && [];\n\n\t// Single tag\n\tif ( parsed ) {\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\n\t}\n\n\tparsed = buildFragment( [ data ], context, scripts );\n\n\tif ( scripts && scripts.length ) {\n\t\tjQuery( scripts ).remove();\n\t}\n\n\treturn jQuery.merge( [], parsed.childNodes );\n};\n\n\n/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf( \" \" );\n\n\tif ( off > -1 ) {\n\t\tselector = stripAndCollapse( url.slice( off ) );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax( {\n\t\t\turl: url,\n\n\t\t\t// If \"type\" variable is undefined, then \"GET\" method will be used.\n\t\t\t// Make value of this field explicit since\n\t\t\t// user can override it through ajaxSetup method\n\t\t\ttype: type || \"GET\",\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t} ).done( function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery( \"<div>\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t// If the request succeeds, this function gets \"data\", \"status\", \"jqXHR\"\n\t\t// but they are ignored because response was set above.\n\t\t// If it fails, this function gets \"jqXHR\", \"status\", \"error\"\n\t\t} ).always( callback && function( jqXHR, status ) {\n\t\t\tself.each( function() {\n\t\t\t\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t\t} );\n\t\t} );\n\t}\n\n\treturn this;\n};\n\n\n\n\njQuery.expr.pseudos.animated = function( elem ) {\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\n\t\treturn elem === fn.elem;\n\t} ).length;\n};\n\n\n\n\njQuery.offset = {\n\tsetOffset: function( elem, options, i ) {\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\n\t\t\tposition = jQuery.css( elem, \"position\" ),\n\t\t\tcurElem = jQuery( elem ),\n\t\t\tprops = {};\n\n\t\t// Set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tcurOffset = curElem.offset();\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\n\t\t\t( curCSSTop + curCSSLeft ).indexOf( \"auto\" ) > -1;\n\n\t\t// Need to be able to calculate position if either\n\t\t// top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( isFunction( options ) ) {\n\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\njQuery.fn.extend( {\n\n\t// offset() relates an element's border box to the document origin\n\toffset: function( options ) {\n\n\t\t// Preserve chaining for setter\n\t\tif ( arguments.length ) {\n\t\t\treturn options === undefined ?\n\t\t\t\tthis :\n\t\t\t\tthis.each( function( i ) {\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t\t} );\n\t\t}\n\n\t\tvar rect, win,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !elem ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Return zeros for disconnected and hidden (display: none) elements (gh-2310)\n\t\t// Support: IE <=11 only\n\t\t// Running getBoundingClientRect on a\n\t\t// disconnected node in IE throws an error\n\t\tif ( !elem.getClientRects().length ) {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t\t// Get document-relative position by adding viewport scroll to viewport-relative gBCR\n\t\trect = elem.getBoundingClientRect();\n\t\twin = elem.ownerDocument.defaultView;\n\t\treturn {\n\t\t\ttop: rect.top + win.pageYOffset,\n\t\t\tleft: rect.left + win.pageXOffset\n\t\t};\n\t},\n\n\t// position() relates an element's margin box to its offset parent's padding box\n\t// This corresponds to the behavior of CSS absolute positioning\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset, doc,\n\t\t\telem = this[ 0 ],\n\t\t\tparentOffset = { top: 0, left: 0 };\n\n\t\t// position:fixed elements are offset from the viewport, which itself always has zero offset\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\n\t\t\t// Assume position:fixed implies availability of getBoundingClientRect\n\t\t\toffset = elem.getBoundingClientRect();\n\n\t\t} else {\n\t\t\toffset = this.offset();\n\n\t\t\t// Account for the *real* offset parent, which can be the document or its root element\n\t\t\t// when a statically positioned element is identified\n\t\t\tdoc = elem.ownerDocument;\n\t\t\toffsetParent = elem.offsetParent || doc.documentElement;\n\t\t\twhile ( offsetParent &&\n\t\t\t\t( offsetParent === doc.body || offsetParent === doc.documentElement ) &&\n\t\t\t\tjQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\n\t\t\t\toffsetParent = offsetParent.parentNode;\n\t\t\t}\n\t\t\tif ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {\n\n\t\t\t\t// Incorporate borders into its offset, since they are outside its content origin\n\t\t\t\tparentOffset = jQuery( offsetParent ).offset();\n\t\t\t\tparentOffset.top += jQuery.css( offsetParent, \"borderTopWidth\", true );\n\t\t\t\tparentOffset.left += jQuery.css( offsetParent, \"borderLeftWidth\", true );\n\t\t\t}\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\treturn {\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\n\t\t};\n\t},\n\n\t// This method will return documentElement in the following cases:\n\t// 1) For the element inside the iframe without offsetParent, this method will return\n\t//    documentElement of the parent window\n\t// 2) For the hidden or detached element\n\t// 3) For body or html element, i.e. in case of the html node - it will return itself\n\t//\n\t// but those exceptions were never presented as a real life use-cases\n\t// and might be considered as more preferable results.\n\t//\n\t// This logic, however, is not guaranteed and can change at any point in the future\n\toffsetParent: function() {\n\t\treturn this.map( function() {\n\t\t\tvar offsetParent = this.offsetParent;\n\n\t\t\twhile ( offsetParent && jQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\n\t\t\treturn offsetParent || documentElement;\n\t\t} );\n\t}\n} );\n\n// Create scrollLeft and scrollTop methods\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\n\tvar top = \"pageYOffset\" === prop;\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn access( this, function( elem, method, val ) {\n\n\t\t\t// Coalesce documents and windows\n\t\t\tvar win;\n\t\t\tif ( isWindow( elem ) ) {\n\t\t\t\twin = elem;\n\t\t\t} else if ( elem.nodeType === 9 ) {\n\t\t\t\twin = elem.defaultView;\n\t\t\t}\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? win[ prop ] : elem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : win.pageXOffset,\n\t\t\t\t\ttop ? val : win.pageYOffset\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length );\n\t};\n} );\n\n// Support: Safari <=7 - 9.1, Chrome <=37 - 49\n// Add the top/left cssHooks using jQuery.fn.position\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347\n// getComputedStyle returns percent when specified for top/left/bottom/right;\n// rather than make the css module depend on the offset module, just check for it here\njQuery.each( [ \"top\", \"left\" ], function( _i, prop ) {\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\n\t\tfunction( elem, computed ) {\n\t\t\tif ( computed ) {\n\t\t\t\tcomputed = curCSS( elem, prop );\n\n\t\t\t\t// If curCSS returns percentage, fallback to offset\n\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\tcomputed;\n\t\t\t}\n\t\t}\n\t);\n} );\n\n\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( {\n\t\tpadding: \"inner\" + name,\n\t\tcontent: type,\n\t\t\"\": \"outer\" + name\n\t}, function( defaultExtra, funcName ) {\n\n\t\t// Margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( isWindow( elem ) ) {\n\n\t\t\t\t\t// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)\n\t\t\t\t\treturn funcName.indexOf( \"outer\" ) === 0 ?\n\t\t\t\t\t\telem[ \"inner\" + name ] :\n\t\t\t\t\t\telem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\n\t\t\t\t\t// whichever is greatest\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable );\n\t\t};\n\t} );\n} );\n\n\njQuery.each( [\n\t\"ajaxStart\",\n\t\"ajaxStop\",\n\t\"ajaxComplete\",\n\t\"ajaxError\",\n\t\"ajaxSuccess\",\n\t\"ajaxSend\"\n], function( _i, type ) {\n\tjQuery.fn[ type ] = function( fn ) {\n\t\treturn this.on( type, fn );\n\t};\n} );\n\n\n\n\njQuery.fn.extend( {\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ?\n\t\t\tthis.off( selector, \"**\" ) :\n\t\t\tthis.off( types, selector || \"**\", fn );\n\t},\n\n\thover: function( fnOver, fnOut ) {\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\n\t}\n} );\n\njQuery.each(\n\t( \"blur focus focusin focusout resize scroll click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup contextmenu\" ).split( \" \" ),\n\tfunction( _i, name ) {\n\n\t\t// Handle event binding\n\t\tjQuery.fn[ name ] = function( data, fn ) {\n\t\t\treturn arguments.length > 0 ?\n\t\t\t\tthis.on( name, null, data, fn ) :\n\t\t\t\tthis.trigger( name );\n\t\t};\n\t}\n);\n\n\n\n\n// Support: Android <=4.0 only\n// Make sure we trim BOM and NBSP\n// Require that the \"whitespace run\" starts from a non-whitespace\n// to avoid O(N^2) behavior when the engine would try matching \"\\s+$\" at each space position.\nvar rtrim = /^[\\s\\uFEFF\\xA0]+|([^\\s\\uFEFF\\xA0])[\\s\\uFEFF\\xA0]+$/g;\n\n// Bind a function to a context, optionally partially applying any\n// arguments.\n// jQuery.proxy is deprecated to promote standards (specifically Function#bind)\n// However, it is not slated for removal any time soon\njQuery.proxy = function( fn, context ) {\n\tvar tmp, args, proxy;\n\n\tif ( typeof context === \"string\" ) {\n\t\ttmp = fn[ context ];\n\t\tcontext = fn;\n\t\tfn = tmp;\n\t}\n\n\t// Quick check to determine if target is callable, in the spec\n\t// this throws a TypeError, but we will just return undefined.\n\tif ( !isFunction( fn ) ) {\n\t\treturn undefined;\n\t}\n\n\t// Simulated bind\n\targs = slice.call( arguments, 2 );\n\tproxy = function() {\n\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t};\n\n\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\treturn proxy;\n};\n\njQuery.holdReady = function( hold ) {\n\tif ( hold ) {\n\t\tjQuery.readyWait++;\n\t} else {\n\t\tjQuery.ready( true );\n\t}\n};\njQuery.isArray = Array.isArray;\njQuery.parseJSON = JSON.parse;\njQuery.nodeName = nodeName;\njQuery.isFunction = isFunction;\njQuery.isWindow = isWindow;\njQuery.camelCase = camelCase;\njQuery.type = toType;\n\njQuery.now = Date.now;\n\njQuery.isNumeric = function( obj ) {\n\n\t// As of jQuery 3.0, isNumeric is limited to\n\t// strings and numbers (primitives or objects)\n\t// that can be coerced to finite numbers (gh-2662)\n\tvar type = jQuery.type( obj );\n\treturn ( type === \"number\" || type === \"string\" ) &&\n\n\t\t// parseFloat NaNs numeric-cast false positives (\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t!isNaN( obj - parseFloat( obj ) );\n};\n\njQuery.trim = function( text ) {\n\treturn text == null ?\n\t\t\"\" :\n\t\t( text + \"\" ).replace( rtrim, \"$1\" );\n};\n\n\n\n// Register as a named AMD module, since jQuery can be concatenated with other\n// files that may use define, but not via a proper concatenation script that\n// understands anonymous AMD modules. A named AMD is safest and most robust\n// way to register. Lowercase jquery is used because AMD module names are\n// derived from file names, and jQuery is normally delivered in a lowercase\n// file name. Do this after creating the global so that if an AMD module wants\n// to call noConflict to hide this version of jQuery, it will work.\n\n// Note that for maximum portability, libraries that are not jQuery should\n// declare themselves as anonymous modules, and avoid setting a global if an\n// AMD loader is present. jQuery is a special case. For more information, see\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\n\nif ( typeof define === \"function\" && define.amd ) {\n\tdefine( \"jquery\", [], function() {\n\t\treturn jQuery;\n\t} );\n}\n\n\n\n\nvar\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$;\n\njQuery.noConflict = function( deep ) {\n\tif ( window.$ === jQuery ) {\n\t\twindow.$ = _$;\n\t}\n\n\tif ( deep && window.jQuery === jQuery ) {\n\t\twindow.jQuery = _jQuery;\n\t}\n\n\treturn jQuery;\n};\n\n// Expose jQuery and $ identifiers, even in AMD\n// (trac-7102#comment:10, https://github.com/jquery/jquery/pull/557)\n// and CommonJS for browser emulators (trac-13566)\nif ( typeof noGlobal === \"undefined\" ) {\n\twindow.jQuery = window.$ = jQuery;\n}\n\n\n\n\nreturn jQuery;\n} );\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function(render, schedule, console) {\n\tvar subscriptions = []\n\tvar rendering = false\n\tvar pending = false\n\n\tfunction sync() {\n\t\tif (rendering) throw new Error(\"Nested m.redraw.sync() call\")\n\t\trendering = true\n\t\tfor (var i = 0; i < subscriptions.length; i += 2) {\n\t\t\ttry { render(subscriptions[i], Vnode(subscriptions[i + 1]), redraw) }\n\t\t\tcatch (e) { console.error(e) }\n\t\t}\n\t\trendering = false\n\t}\n\n\tfunction redraw() {\n\t\tif (!pending) {\n\t\t\tpending = true\n\t\t\tschedule(function() {\n\t\t\t\tpending = false\n\t\t\t\tsync()\n\t\t\t})\n\t\t}\n\t}\n\n\tredraw.sync = sync\n\n\tfunction mount(root, component) {\n\t\tif (component != null && component.view == null && typeof component !== \"function\") {\n\t\t\tthrow new TypeError(\"m.mount(element, component) expects a component, not a vnode\")\n\t\t}\n\n\t\tvar index = subscriptions.indexOf(root)\n\t\tif (index >= 0) {\n\t\t\tsubscriptions.splice(index, 2)\n\t\t\trender(root, [], redraw)\n\t\t}\n\n\t\tif (component != null) {\n\t\t\tsubscriptions.push(root, component)\n\t\t\trender(root, Vnode(component), redraw)\n\t\t}\n\t}\n\n\treturn {mount: mount, redraw: redraw}\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar m = require(\"../render/hyperscript\")\nvar Promise = require(\"../promise/promise\")\n\nvar buildPathname = require(\"../pathname/build\")\nvar parsePathname = require(\"../pathname/parse\")\nvar compileTemplate = require(\"../pathname/compileTemplate\")\nvar assign = require(\"../pathname/assign\")\n\nvar sentinel = {}\n\nmodule.exports = function($window, mountRedraw) {\n\tvar fireAsync\n\n\tfunction setPath(path, data, options) {\n\t\tpath = buildPathname(path, data)\n\t\tif (fireAsync != null) {\n\t\t\tfireAsync()\n\t\t\tvar state = options ? options.state : null\n\t\t\tvar title = options ? options.title : null\n\t\t\tif (options && options.replace) $window.history.replaceState(state, title, route.prefix + path)\n\t\t\telse $window.history.pushState(state, title, route.prefix + path)\n\t\t}\n\t\telse {\n\t\t\t$window.location.href = route.prefix + path\n\t\t}\n\t}\n\n\tvar currentResolver = sentinel, component, attrs, currentPath, lastUpdate\n\n\tvar SKIP = route.SKIP = {}\n\n\tfunction route(root, defaultRoute, routes) {\n\t\tif (root == null) throw new Error(\"Ensure the DOM element that was passed to `m.route` is not undefined\")\n\t\t// 0 = start\n\t\t// 1 = init\n\t\t// 2 = ready\n\t\tvar state = 0\n\n\t\tvar compiled = Object.keys(routes).map(function(route) {\n\t\t\tif (route[0] !== \"/\") throw new SyntaxError(\"Routes must start with a `/`\")\n\t\t\tif ((/:([^\\/\\.-]+)(\\.{3})?:/).test(route)) {\n\t\t\t\tthrow new SyntaxError(\"Route parameter names must be separated with either `/`, `.`, or `-`\")\n\t\t\t}\n\t\t\treturn {\n\t\t\t\troute: route,\n\t\t\t\tcomponent: routes[route],\n\t\t\t\tcheck: compileTemplate(route),\n\t\t\t}\n\t\t})\n\t\tvar callAsync = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\t\tvar p = Promise.resolve()\n\t\tvar scheduled = false\n\t\tvar onremove\n\n\t\tfireAsync = null\n\n\t\tif (defaultRoute != null) {\n\t\t\tvar defaultData = parsePathname(defaultRoute)\n\n\t\t\tif (!compiled.some(function (i) { return i.check(defaultData) })) {\n\t\t\t\tthrow new ReferenceError(\"Default route doesn't match any known routes\")\n\t\t\t}\n\t\t}\n\n\t\tfunction resolveRoute() {\n\t\t\tscheduled = false\n\t\t\t// Consider the pathname holistically. The prefix might even be invalid,\n\t\t\t// but that's not our problem.\n\t\t\tvar prefix = $window.location.hash\n\t\t\tif (route.prefix[0] !== \"#\") {\n\t\t\t\tprefix = $window.location.search + prefix\n\t\t\t\tif (route.prefix[0] !== \"?\") {\n\t\t\t\t\tprefix = $window.location.pathname + prefix\n\t\t\t\t\tif (prefix[0] !== \"/\") prefix = \"/\" + prefix\n\t\t\t\t}\n\t\t\t}\n\t\t\t// This seemingly useless `.concat()` speeds up the tests quite a bit,\n\t\t\t// since the representation is consistently a relatively poorly\n\t\t\t// optimized cons string.\n\t\t\tvar path = prefix.concat()\n\t\t\t\t.replace(/(?:%[a-f89][a-f0-9])+/gim, decodeURIComponent)\n\t\t\t\t.slice(route.prefix.length)\n\t\t\tvar data = parsePathname(path)\n\n\t\t\tassign(data.params, $window.history.state)\n\n\t\t\tfunction fail() {\n\t\t\t\tif (path === defaultRoute) throw new Error(\"Could not resolve default route \" + defaultRoute)\n\t\t\t\tsetPath(defaultRoute, null, {replace: true})\n\t\t\t}\n\n\t\t\tloop(0)\n\t\t\tfunction loop(i) {\n\t\t\t\t// 0 = init\n\t\t\t\t// 1 = scheduled\n\t\t\t\t// 2 = done\n\t\t\t\tfor (; i < compiled.length; i++) {\n\t\t\t\t\tif (compiled[i].check(data)) {\n\t\t\t\t\t\tvar payload = compiled[i].component\n\t\t\t\t\t\tvar matchedRoute = compiled[i].route\n\t\t\t\t\t\tvar localComp = payload\n\t\t\t\t\t\tvar update = lastUpdate = function(comp) {\n\t\t\t\t\t\t\tif (update !== lastUpdate) return\n\t\t\t\t\t\t\tif (comp === SKIP) return loop(i + 1)\n\t\t\t\t\t\t\tcomponent = comp != null && (typeof comp.view === \"function\" || typeof comp === \"function\")? comp : \"div\"\n\t\t\t\t\t\t\tattrs = data.params, currentPath = path, lastUpdate = null\n\t\t\t\t\t\t\tcurrentResolver = payload.render ? payload : null\n\t\t\t\t\t\t\tif (state === 2) mountRedraw.redraw()\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tstate = 2\n\t\t\t\t\t\t\t\tmountRedraw.redraw.sync()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// There's no understating how much I *wish* I could\n\t\t\t\t\t\t// use `async`/`await` here...\n\t\t\t\t\t\tif (payload.view || typeof payload === \"function\") {\n\t\t\t\t\t\t\tpayload = {}\n\t\t\t\t\t\t\tupdate(localComp)\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (payload.onmatch) {\n\t\t\t\t\t\t\tp.then(function () {\n\t\t\t\t\t\t\t\treturn payload.onmatch(data.params, path, matchedRoute)\n\t\t\t\t\t\t\t}).then(update, fail)\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse update(\"div\")\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfail()\n\t\t\t}\n\t\t}\n\n\t\t// Set it unconditionally so `m.route.set` and `m.route.Link` both work,\n\t\t// even if neither `pushState` nor `hashchange` are supported. It's\n\t\t// cleared if `hashchange` is used, since that makes it automatically\n\t\t// async.\n\t\tfireAsync = function() {\n\t\t\tif (!scheduled) {\n\t\t\t\tscheduled = true\n\t\t\t\tcallAsync(resolveRoute)\n\t\t\t}\n\t\t}\n\n\t\tif (typeof $window.history.pushState === \"function\") {\n\t\t\tonremove = function() {\n\t\t\t\t$window.removeEventListener(\"popstate\", fireAsync, false)\n\t\t\t}\n\t\t\t$window.addEventListener(\"popstate\", fireAsync, false)\n\t\t} else if (route.prefix[0] === \"#\") {\n\t\t\tfireAsync = null\n\t\t\tonremove = function() {\n\t\t\t\t$window.removeEventListener(\"hashchange\", resolveRoute, false)\n\t\t\t}\n\t\t\t$window.addEventListener(\"hashchange\", resolveRoute, false)\n\t\t}\n\n\t\treturn mountRedraw.mount(root, {\n\t\t\tonbeforeupdate: function() {\n\t\t\t\tstate = state ? 2 : 1\n\t\t\t\treturn !(!state || sentinel === currentResolver)\n\t\t\t},\n\t\t\toncreate: resolveRoute,\n\t\t\tonremove: onremove,\n\t\t\tview: function() {\n\t\t\t\tif (!state || sentinel === currentResolver) return\n\t\t\t\t// Wrap in a fragment to preserve existing key semantics\n\t\t\t\tvar vnode = [Vnode(component, attrs.key, attrs)]\n\t\t\t\tif (currentResolver) vnode = currentResolver.render(vnode[0])\n\t\t\t\treturn vnode\n\t\t\t},\n\t\t})\n\t}\n\troute.set = function(path, data, options) {\n\t\tif (lastUpdate != null) {\n\t\t\toptions = options || {}\n\t\t\toptions.replace = true\n\t\t}\n\t\tlastUpdate = null\n\t\tsetPath(path, data, options)\n\t}\n\troute.get = function() {return currentPath}\n\troute.prefix = \"#!\"\n\troute.Link = {\n\t\tview: function(vnode) {\n\t\t\tvar options = vnode.attrs.options\n\t\t\t// Remove these so they don't get overwritten\n\t\t\tvar attrs = {}, onclick, href\n\t\t\tassign(attrs, vnode.attrs)\n\t\t\t// The first two are internal, but the rest are magic attributes\n\t\t\t// that need censored to not screw up rendering.\n\t\t\tattrs.selector = attrs.options = attrs.key = attrs.oninit =\n\t\t\tattrs.oncreate = attrs.onbeforeupdate = attrs.onupdate =\n\t\t\tattrs.onbeforeremove = attrs.onremove = null\n\n\t\t\t// Do this now so we can get the most current `href` and `disabled`.\n\t\t\t// Those attributes may also be specified in the selector, and we\n\t\t\t// should honor that.\n\t\t\tvar child = m(vnode.attrs.selector || \"a\", attrs, vnode.children)\n\n\t\t\t// Let's provide a *right* way to disable a route link, rather than\n\t\t\t// letting people screw up accessibility on accident.\n\t\t\t//\n\t\t\t// The attribute is coerced so users don't get surprised over\n\t\t\t// `disabled: 0` resulting in a button that's somehow routable\n\t\t\t// despite being visibly disabled.\n\t\t\tif (child.attrs.disabled = Boolean(child.attrs.disabled)) {\n\t\t\t\tchild.attrs.href = null\n\t\t\t\tchild.attrs[\"aria-disabled\"] = \"true\"\n\t\t\t\t// If you *really* do want to do this on a disabled link, use\n\t\t\t\t// an `oncreate` hook to add it.\n\t\t\t\tchild.attrs.onclick = null\n\t\t\t} else {\n\t\t\t\tonclick = child.attrs.onclick\n\t\t\t\thref = child.attrs.href\n\t\t\t\tchild.attrs.href = route.prefix + href\n\t\t\t\tchild.attrs.onclick = function(e) {\n\t\t\t\t\tvar result\n\t\t\t\t\tif (typeof onclick === \"function\") {\n\t\t\t\t\t\tresult = onclick.call(e.currentTarget, e)\n\t\t\t\t\t} else if (onclick == null || typeof onclick !== \"object\") {\n\t\t\t\t\t\t// do nothing\n\t\t\t\t\t} else if (typeof onclick.handleEvent === \"function\") {\n\t\t\t\t\t\tonclick.handleEvent(e)\n\t\t\t\t\t}\n\n\t\t\t\t\t// Adapted from React Router's implementation:\n\t\t\t\t\t// https://github.com/ReactTraining/react-router/blob/520a0acd48ae1b066eb0b07d6d4d1790a1d02482/packages/react-router-dom/modules/Link.js\n\t\t\t\t\t//\n\t\t\t\t\t// Try to be flexible and intuitive in how we handle links.\n\t\t\t\t\t// Fun fact: links aren't as obvious to get right as you\n\t\t\t\t\t// would expect. There's a lot more valid ways to click a\n\t\t\t\t\t// link than this, and one might want to not simply click a\n\t\t\t\t\t// link, but right click or command-click it to copy the\n\t\t\t\t\t// link target, etc. Nope, this isn't just for blind people.\n\t\t\t\t\tif (\n\t\t\t\t\t\t// Skip if `onclick` prevented default\n\t\t\t\t\t\tresult !== false && !e.defaultPrevented &&\n\t\t\t\t\t\t// Ignore everything but left clicks\n\t\t\t\t\t\t(e.button === 0 || e.which === 0 || e.which === 1) &&\n\t\t\t\t\t\t// Let the browser handle `target=_blank`, etc.\n\t\t\t\t\t\t(!e.currentTarget.target || e.currentTarget.target === \"_self\") &&\n\t\t\t\t\t\t// No modifier keys\n\t\t\t\t\t\t!e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey\n\t\t\t\t\t) {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\te.redraw = false\n\t\t\t\t\t\troute.set(href, null, options)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn child\n\t\t},\n\t}\n\troute.param = function(key) {\n\t\treturn attrs && key != null ? attrs[key] : attrs\n\t}\n\n\treturn route\n}\n","\"use strict\"\n\nvar hyperscript = require(\"./render/hyperscript\")\n\nhyperscript.trust = require(\"./render/trust\")\nhyperscript.fragment = require(\"./render/fragment\")\n\nmodule.exports = hyperscript\n","\"use strict\"\n\nvar hyperscript = require(\"./hyperscript\")\nvar request = require(\"./request\")\nvar mountRedraw = require(\"./mount-redraw\")\n\nvar m = function m() { return hyperscript.apply(this, arguments) }\nm.m = hyperscript\nm.trust = hyperscript.trust\nm.fragment = hyperscript.fragment\nm.mount = mountRedraw.mount\nm.route = require(\"./route\")\nm.render = require(\"./render\")\nm.redraw = mountRedraw.redraw\nm.request = request.request\nm.jsonp = request.jsonp\nm.parseQueryString = require(\"./querystring/parse\")\nm.buildQueryString = require(\"./querystring/build\")\nm.parsePathname = require(\"./pathname/parse\")\nm.buildPathname = require(\"./pathname/build\")\nm.vnode = require(\"./render/vnode\")\nm.PromisePolyfill = require(\"./promise/polyfill\")\n\nmodule.exports = m\n","\"use strict\"\n\nvar render = require(\"./render\")\n\nmodule.exports = require(\"./api/mount-redraw\")(render, requestAnimationFrame, console)\n","\"use strict\"\n\nmodule.exports = Object.assign || function(target, source) {\n\tif(source) Object.keys(source).forEach(function(key) { target[key] = source[key] })\n}\n","\"use strict\"\n\nvar buildQueryString = require(\"../querystring/build\")\nvar assign = require(\"./assign\")\n\n// Returns `path` from `template` + `params`\nmodule.exports = function(template, params) {\n\tif ((/:([^\\/\\.-]+)(\\.{3})?:/).test(template)) {\n\t\tthrow new SyntaxError(\"Template parameter names *must* be separated\")\n\t}\n\tif (params == null) return template\n\tvar queryIndex = template.indexOf(\"?\")\n\tvar hashIndex = template.indexOf(\"#\")\n\tvar queryEnd = hashIndex < 0 ? template.length : hashIndex\n\tvar pathEnd = queryIndex < 0 ? queryEnd : queryIndex\n\tvar path = template.slice(0, pathEnd)\n\tvar query = {}\n\n\tassign(query, params)\n\n\tvar resolved = path.replace(/:([^\\/\\.-]+)(\\.{3})?/g, function(m, key, variadic) {\n\t\tdelete query[key]\n\t\t// If no such parameter exists, don't interpolate it.\n\t\tif (params[key] == null) return m\n\t\t// Escape normal parameters, but not variadic ones.\n\t\treturn variadic ? params[key] : encodeURIComponent(String(params[key]))\n\t})\n\n\t// In case the template substitution adds new query/hash parameters.\n\tvar newQueryIndex = resolved.indexOf(\"?\")\n\tvar newHashIndex = resolved.indexOf(\"#\")\n\tvar newQueryEnd = newHashIndex < 0 ? resolved.length : newHashIndex\n\tvar newPathEnd = newQueryIndex < 0 ? newQueryEnd : newQueryIndex\n\tvar result = resolved.slice(0, newPathEnd)\n\n\tif (queryIndex >= 0) result += template.slice(queryIndex, queryEnd)\n\tif (newQueryIndex >= 0) result += (queryIndex < 0 ? \"?\" : \"&\") + resolved.slice(newQueryIndex, newQueryEnd)\n\tvar querystring = buildQueryString(query)\n\tif (querystring) result += (queryIndex < 0 && newQueryIndex < 0 ? \"?\" : \"&\") + querystring\n\tif (hashIndex >= 0) result += template.slice(hashIndex)\n\tif (newHashIndex >= 0) result += (hashIndex < 0 ? \"\" : \"&\") + resolved.slice(newHashIndex)\n\treturn result\n}\n","\"use strict\"\n\nvar parsePathname = require(\"./parse\")\n\n// Compiles a template into a function that takes a resolved path (without query\n// strings) and returns an object containing the template parameters with their\n// parsed values. This expects the input of the compiled template to be the\n// output of `parsePathname`. Note that it does *not* remove query parameters\n// specified in the template.\nmodule.exports = function(template) {\n\tvar templateData = parsePathname(template)\n\tvar templateKeys = Object.keys(templateData.params)\n\tvar keys = []\n\tvar regexp = new RegExp(\"^\" + templateData.path.replace(\n\t\t// I escape literal text so people can use things like `:file.:ext` or\n\t\t// `:lang-:locale` in routes. This is all merged into one pass so I\n\t\t// don't also accidentally escape `-` and make it harder to detect it to\n\t\t// ban it from template parameters.\n\t\t/:([^\\/.-]+)(\\.{3}|\\.(?!\\.)|-)?|[\\\\^$*+.()|\\[\\]{}]/g,\n\t\tfunction(m, key, extra) {\n\t\t\tif (key == null) return \"\\\\\" + m\n\t\t\tkeys.push({k: key, r: extra === \"...\"})\n\t\t\tif (extra === \"...\") return \"(.*)\"\n\t\t\tif (extra === \".\") return \"([^/]+)\\\\.\"\n\t\t\treturn \"([^/]+)\" + (extra || \"\")\n\t\t}\n\t) + \"$\")\n\treturn function(data) {\n\t\t// First, check the params. Usually, there isn't any, and it's just\n\t\t// checking a static set.\n\t\tfor (var i = 0; i < templateKeys.length; i++) {\n\t\t\tif (templateData.params[templateKeys[i]] !== data.params[templateKeys[i]]) return false\n\t\t}\n\t\t// If no interpolations exist, let's skip all the ceremony\n\t\tif (!keys.length) return regexp.test(data.path)\n\t\tvar values = regexp.exec(data.path)\n\t\tif (values == null) return false\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tdata.params[keys[i].k] = keys[i].r ? values[i + 1] : decodeURIComponent(values[i + 1])\n\t\t}\n\t\treturn true\n\t}\n}\n","\"use strict\"\n\nvar parseQueryString = require(\"../querystring/parse\")\n\n// Returns `{path, params}` from `url`\nmodule.exports = function(url) {\n\tvar queryIndex = url.indexOf(\"?\")\n\tvar hashIndex = url.indexOf(\"#\")\n\tvar queryEnd = hashIndex < 0 ? url.length : hashIndex\n\tvar pathEnd = queryIndex < 0 ? queryEnd : queryIndex\n\tvar path = url.slice(0, pathEnd).replace(/\\/{2,}/g, \"/\")\n\n\tif (!path) path = \"/\"\n\telse {\n\t\tif (path[0] !== \"/\") path = \"/\" + path\n\t\tif (path.length > 1 && path[path.length - 1] === \"/\") path = path.slice(0, -1)\n\t}\n\treturn {\n\t\tpath: path,\n\t\tparams: queryIndex < 0\n\t\t\t? {}\n\t\t\t: parseQueryString(url.slice(queryIndex + 1, queryEnd)),\n\t}\n}\n","\"use strict\"\n/** @constructor */\nvar PromisePolyfill = function(executor) {\n\tif (!(this instanceof PromisePolyfill)) throw new Error(\"Promise must be called with `new`\")\n\tif (typeof executor !== \"function\") throw new TypeError(\"executor must be a function\")\n\n\tvar self = this, resolvers = [], rejectors = [], resolveCurrent = handler(resolvers, true), rejectCurrent = handler(rejectors, false)\n\tvar instance = self._instance = {resolvers: resolvers, rejectors: rejectors}\n\tvar callAsync = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\tfunction handler(list, shouldAbsorb) {\n\t\treturn function execute(value) {\n\t\t\tvar then\n\t\t\ttry {\n\t\t\t\tif (shouldAbsorb && value != null && (typeof value === \"object\" || typeof value === \"function\") && typeof (then = value.then) === \"function\") {\n\t\t\t\t\tif (value === self) throw new TypeError(\"Promise can't be resolved w/ itself\")\n\t\t\t\t\texecuteOnce(then.bind(value))\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcallAsync(function() {\n\t\t\t\t\t\tif (!shouldAbsorb && list.length === 0) console.error(\"Possible unhandled promise rejection:\", value)\n\t\t\t\t\t\tfor (var i = 0; i < list.length; i++) list[i](value)\n\t\t\t\t\t\tresolvers.length = 0, rejectors.length = 0\n\t\t\t\t\t\tinstance.state = shouldAbsorb\n\t\t\t\t\t\tinstance.retry = function() {execute(value)}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\trejectCurrent(e)\n\t\t\t}\n\t\t}\n\t}\n\tfunction executeOnce(then) {\n\t\tvar runs = 0\n\t\tfunction run(fn) {\n\t\t\treturn function(value) {\n\t\t\t\tif (runs++ > 0) return\n\t\t\t\tfn(value)\n\t\t\t}\n\t\t}\n\t\tvar onerror = run(rejectCurrent)\n\t\ttry {then(run(resolveCurrent), onerror)} catch (e) {onerror(e)}\n\t}\n\n\texecuteOnce(executor)\n}\nPromisePolyfill.prototype.then = function(onFulfilled, onRejection) {\n\tvar self = this, instance = self._instance\n\tfunction handle(callback, list, next, state) {\n\t\tlist.push(function(value) {\n\t\t\tif (typeof callback !== \"function\") next(value)\n\t\t\telse try {resolveNext(callback(value))} catch (e) {if (rejectNext) rejectNext(e)}\n\t\t})\n\t\tif (typeof instance.retry === \"function\" && state === instance.state) instance.retry()\n\t}\n\tvar resolveNext, rejectNext\n\tvar promise = new PromisePolyfill(function(resolve, reject) {resolveNext = resolve, rejectNext = reject})\n\thandle(onFulfilled, instance.resolvers, resolveNext, true), handle(onRejection, instance.rejectors, rejectNext, false)\n\treturn promise\n}\nPromisePolyfill.prototype.catch = function(onRejection) {\n\treturn this.then(null, onRejection)\n}\nPromisePolyfill.prototype.finally = function(callback) {\n\treturn this.then(\n\t\tfunction(value) {\n\t\t\treturn PromisePolyfill.resolve(callback()).then(function() {\n\t\t\t\treturn value\n\t\t\t})\n\t\t},\n\t\tfunction(reason) {\n\t\t\treturn PromisePolyfill.resolve(callback()).then(function() {\n\t\t\t\treturn PromisePolyfill.reject(reason);\n\t\t\t})\n\t\t}\n\t)\n}\nPromisePolyfill.resolve = function(value) {\n\tif (value instanceof PromisePolyfill) return value\n\treturn new PromisePolyfill(function(resolve) {resolve(value)})\n}\nPromisePolyfill.reject = function(value) {\n\treturn new PromisePolyfill(function(resolve, reject) {reject(value)})\n}\nPromisePolyfill.all = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tvar total = list.length, count = 0, values = []\n\t\tif (list.length === 0) resolve([])\n\t\telse for (var i = 0; i < list.length; i++) {\n\t\t\t(function(i) {\n\t\t\t\tfunction consume(value) {\n\t\t\t\t\tcount++\n\t\t\t\t\tvalues[i] = value\n\t\t\t\t\tif (count === total) resolve(values)\n\t\t\t\t}\n\t\t\t\tif (list[i] != null && (typeof list[i] === \"object\" || typeof list[i] === \"function\") && typeof list[i].then === \"function\") {\n\t\t\t\t\tlist[i].then(consume, reject)\n\t\t\t\t}\n\t\t\t\telse consume(list[i])\n\t\t\t})(i)\n\t\t}\n\t})\n}\nPromisePolyfill.race = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tfor (var i = 0; i < list.length; i++) {\n\t\t\tlist[i].then(resolve, reject)\n\t\t}\n\t})\n}\n\nmodule.exports = PromisePolyfill\n","\"use strict\"\n\nvar PromisePolyfill = require(\"./polyfill\")\n\nif (typeof window !== \"undefined\") {\n\tif (typeof window.Promise === \"undefined\") {\n\t\twindow.Promise = PromisePolyfill\n\t} else if (!window.Promise.prototype.finally) {\n\t\twindow.Promise.prototype.finally = PromisePolyfill.prototype.finally\n\t}\n\tmodule.exports = window.Promise\n} else if (typeof global !== \"undefined\") {\n\tif (typeof global.Promise === \"undefined\") {\n\t\tglobal.Promise = PromisePolyfill\n\t} else if (!global.Promise.prototype.finally) {\n\t\tglobal.Promise.prototype.finally = PromisePolyfill.prototype.finally\n\t}\n\tmodule.exports = global.Promise\n} else {\n\tmodule.exports = PromisePolyfill\n}\n","\"use strict\"\n\nmodule.exports = function(object) {\n\tif (Object.prototype.toString.call(object) !== \"[object Object]\") return \"\"\n\n\tvar args = []\n\tfor (var key in object) {\n\t\tdestructure(key, object[key])\n\t}\n\n\treturn args.join(\"&\")\n\n\tfunction destructure(key, value) {\n\t\tif (Array.isArray(value)) {\n\t\t\tfor (var i = 0; i < value.length; i++) {\n\t\t\t\tdestructure(key + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse if (Object.prototype.toString.call(value) === \"[object Object]\") {\n\t\t\tfor (var i in value) {\n\t\t\t\tdestructure(key + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse args.push(encodeURIComponent(key) + (value != null && value !== \"\" ? \"=\" + encodeURIComponent(value) : \"\"))\n\t}\n}\n","\"use strict\"\n\nmodule.exports = function(string) {\n\tif (string === \"\" || string == null) return {}\n\tif (string.charAt(0) === \"?\") string = string.slice(1)\n\n\tvar entries = string.split(\"&\"), counters = {}, data = {}\n\tfor (var i = 0; i < entries.length; i++) {\n\t\tvar entry = entries[i].split(\"=\")\n\t\tvar key = decodeURIComponent(entry[0])\n\t\tvar value = entry.length === 2 ? decodeURIComponent(entry[1]) : \"\"\n\n\t\tif (value === \"true\") value = true\n\t\telse if (value === \"false\") value = false\n\n\t\tvar levels = key.split(/\\]\\[?|\\[/)\n\t\tvar cursor = data\n\t\tif (key.indexOf(\"[\") > -1) levels.pop()\n\t\tfor (var j = 0; j < levels.length; j++) {\n\t\t\tvar level = levels[j], nextLevel = levels[j + 1]\n\t\t\tvar isNumber = nextLevel == \"\" || !isNaN(parseInt(nextLevel, 10))\n\t\t\tif (level === \"\") {\n\t\t\t\tvar key = levels.slice(0, j).join()\n\t\t\t\tif (counters[key] == null) {\n\t\t\t\t\tcounters[key] = Array.isArray(cursor) ? cursor.length : 0\n\t\t\t\t}\n\t\t\t\tlevel = counters[key]++\n\t\t\t}\n\t\t\t// Disallow direct prototype pollution\n\t\t\telse if (level === \"__proto__\") break\n\t\t\tif (j === levels.length - 1) cursor[level] = value\n\t\t\telse {\n\t\t\t\t// Read own properties exclusively to disallow indirect\n\t\t\t\t// prototype pollution\n\t\t\t\tvar desc = Object.getOwnPropertyDescriptor(cursor, level)\n\t\t\t\tif (desc != null) desc = desc.value\n\t\t\t\tif (desc == null) cursor[level] = desc = isNumber ? [] : {}\n\t\t\t\tcursor = desc\n\t\t\t}\n\t\t}\n\t}\n\treturn data\n}\n","\"use strict\"\n\nmodule.exports = require(\"./render/render\")(window)\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar hyperscriptVnode = require(\"./hyperscriptVnode\")\n\nmodule.exports = function() {\n\tvar vnode = hyperscriptVnode.apply(0, arguments)\n\n\tvnode.tag = \"[\"\n\tvnode.children = Vnode.normalizeChildren(vnode.children)\n\treturn vnode\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar hyperscriptVnode = require(\"./hyperscriptVnode\")\n\nvar selectorParser = /(?:(^|#|\\.)([^#\\.\\[\\]]+))|(\\[(.+?)(?:\\s*=\\s*(\"|'|)((?:\\\\[\"'\\]]|.)*?)\\5)?\\])/g\nvar selectorCache = {}\nvar hasOwn = {}.hasOwnProperty\n\nfunction isEmpty(object) {\n\tfor (var key in object) if (hasOwn.call(object, key)) return false\n\treturn true\n}\n\nfunction compileSelector(selector) {\n\tvar match, tag = \"div\", classes = [], attrs = {}\n\twhile (match = selectorParser.exec(selector)) {\n\t\tvar type = match[1], value = match[2]\n\t\tif (type === \"\" && value !== \"\") tag = value\n\t\telse if (type === \"#\") attrs.id = value\n\t\telse if (type === \".\") classes.push(value)\n\t\telse if (match[3][0] === \"[\") {\n\t\t\tvar attrValue = match[6]\n\t\t\tif (attrValue) attrValue = attrValue.replace(/\\\\([\"'])/g, \"$1\").replace(/\\\\\\\\/g, \"\\\\\")\n\t\t\tif (match[4] === \"class\") classes.push(attrValue)\n\t\t\telse attrs[match[4]] = attrValue === \"\" ? attrValue : attrValue || true\n\t\t}\n\t}\n\tif (classes.length > 0) attrs.className = classes.join(\" \")\n\treturn selectorCache[selector] = {tag: tag, attrs: attrs}\n}\n\nfunction execSelector(state, vnode) {\n\tvar attrs = vnode.attrs\n\tvar children = Vnode.normalizeChildren(vnode.children)\n\tvar hasClass = hasOwn.call(attrs, \"class\")\n\tvar className = hasClass ? attrs.class : attrs.className\n\n\tvnode.tag = state.tag\n\tvnode.attrs = null\n\tvnode.children = undefined\n\n\tif (!isEmpty(state.attrs) && !isEmpty(attrs)) {\n\t\tvar newAttrs = {}\n\n\t\tfor (var key in attrs) {\n\t\t\tif (hasOwn.call(attrs, key)) newAttrs[key] = attrs[key]\n\t\t}\n\n\t\tattrs = newAttrs\n\t}\n\n\tfor (var key in state.attrs) {\n\t\tif (hasOwn.call(state.attrs, key) && key !== \"className\" && !hasOwn.call(attrs, key)){\n\t\t\tattrs[key] = state.attrs[key]\n\t\t}\n\t}\n\tif (className != null || state.attrs.className != null) attrs.className =\n\t\tclassName != null\n\t\t\t? state.attrs.className != null\n\t\t\t\t? String(state.attrs.className) + \" \" + String(className)\n\t\t\t\t: className\n\t\t\t: state.attrs.className != null\n\t\t\t\t? state.attrs.className\n\t\t\t\t: null\n\n\tif (hasClass) attrs.class = null\n\n\tfor (var key in attrs) {\n\t\tif (hasOwn.call(attrs, key) && key !== \"key\") {\n\t\t\tvnode.attrs = attrs\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif (Array.isArray(children) && children.length === 1 && children[0] != null && children[0].tag === \"#\") {\n\t\tvnode.text = children[0].children\n\t} else {\n\t\tvnode.children = children\n\t}\n\n\treturn vnode\n}\n\nfunction hyperscript(selector) {\n\tif (selector == null || typeof selector !== \"string\" && typeof selector !== \"function\" && typeof selector.view !== \"function\") {\n\t\tthrow Error(\"The selector must be either a string or a component.\");\n\t}\n\n\tvar vnode = hyperscriptVnode.apply(1, arguments)\n\n\tif (typeof selector === \"string\") {\n\t\tvnode.children = Vnode.normalizeChildren(vnode.children)\n\t\tif (selector !== \"[\") return execSelector(selectorCache[selector] || compileSelector(selector), vnode)\n\t}\n\n\tvnode.tag = selector\n\treturn vnode\n}\n\nmodule.exports = hyperscript\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\n// Call via `hyperscriptVnode.apply(startOffset, arguments)`\n//\n// The reason I do it this way, forwarding the arguments and passing the start\n// offset in `this`, is so I don't have to create a temporary array in a\n// performance-critical path.\n//\n// In native ES6, I'd instead add a final `...args` parameter to the\n// `hyperscript` and `fragment` factories and define this as\n// `hyperscriptVnode(...args)`, since modern engines do optimize that away. But\n// ES5 (what Mithril requires thanks to IE support) doesn't give me that luxury,\n// and engines aren't nearly intelligent enough to do either of these:\n//\n// 1. Elide the allocation for `[].slice.call(arguments, 1)` when it's passed to\n//    another function only to be indexed.\n// 2. Elide an `arguments` allocation when it's passed to any function other\n//    than `Function.prototype.apply` or `Reflect.apply`.\n//\n// In ES6, it'd probably look closer to this (I'd need to profile it, though):\n// module.exports = function(attrs, ...children) {\n//     if (attrs == null || typeof attrs === \"object\" && attrs.tag == null && !Array.isArray(attrs)) {\n//         if (children.length === 1 && Array.isArray(children[0])) children = children[0]\n//     } else {\n//         children = children.length === 0 && Array.isArray(attrs) ? attrs : [attrs, ...children]\n//         attrs = undefined\n//     }\n//\n//     if (attrs == null) attrs = {}\n//     return Vnode(\"\", attrs.key, attrs, children)\n// }\nmodule.exports = function() {\n\tvar attrs = arguments[this], start = this + 1, children\n\n\tif (attrs == null) {\n\t\tattrs = {}\n\t} else if (typeof attrs !== \"object\" || attrs.tag != null || Array.isArray(attrs)) {\n\t\tattrs = {}\n\t\tstart = this\n\t}\n\n\tif (arguments.length === start + 1) {\n\t\tchildren = arguments[start]\n\t\tif (!Array.isArray(children)) children = [children]\n\t} else {\n\t\tchildren = []\n\t\twhile (start < arguments.length) children.push(arguments[start++])\n\t}\n\n\treturn Vnode(\"\", attrs.key, attrs, children)\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function($window) {\n\tvar $doc = $window && $window.document\n\tvar currentRedraw\n\n\tvar nameSpace = {\n\t\tsvg: \"http://www.w3.org/2000/svg\",\n\t\tmath: \"http://www.w3.org/1998/Math/MathML\"\n\t}\n\n\tfunction getNameSpace(vnode) {\n\t\treturn vnode.attrs && vnode.attrs.xmlns || nameSpace[vnode.tag]\n\t}\n\n\t//sanity check to discourage people from doing `vnode.state = ...`\n\tfunction checkState(vnode, original) {\n\t\tif (vnode.state !== original) throw new Error(\"`vnode.state` must not be modified\")\n\t}\n\n\t//Note: the hook is passed as the `this` argument to allow proxying the\n\t//arguments without requiring a full array allocation to do so. It also\n\t//takes advantage of the fact the current `vnode` is the first argument in\n\t//all lifecycle methods.\n\tfunction callHook(vnode) {\n\t\tvar original = vnode.state\n\t\ttry {\n\t\t\treturn this.apply(original, arguments)\n\t\t} finally {\n\t\t\tcheckState(vnode, original)\n\t\t}\n\t}\n\n\t// IE11 (at least) throws an UnspecifiedError when accessing document.activeElement when\n\t// inside an iframe. Catch and swallow this error, and heavy-handidly return null.\n\tfunction activeElement() {\n\t\ttry {\n\t\t\treturn $doc.activeElement\n\t\t} catch (e) {\n\t\t\treturn null\n\t\t}\n\t}\n\t//create\n\tfunction createNodes(parent, vnodes, start, end, hooks, nextSibling, ns) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) {\n\t\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t}\n\tfunction createNode(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tif (typeof tag === \"string\") {\n\t\t\tvnode.state = {}\n\t\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\t\tswitch (tag) {\n\t\t\t\tcase \"#\": createText(parent, vnode, nextSibling); break\n\t\t\t\tcase \"<\": createHTML(parent, vnode, ns, nextSibling); break\n\t\t\t\tcase \"[\": createFragment(parent, vnode, hooks, ns, nextSibling); break\n\t\t\t\tdefault: createElement(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t\telse createComponent(parent, vnode, hooks, ns, nextSibling)\n\t}\n\tfunction createText(parent, vnode, nextSibling) {\n\t\tvnode.dom = $doc.createTextNode(vnode.children)\n\t\tinsertNode(parent, vnode.dom, nextSibling)\n\t}\n\tvar possibleParents = {caption: \"table\", thead: \"table\", tbody: \"table\", tfoot: \"table\", tr: \"tbody\", th: \"tr\", td: \"tr\", colgroup: \"table\", col: \"colgroup\"}\n\tfunction createHTML(parent, vnode, ns, nextSibling) {\n\t\tvar match = vnode.children.match(/^\\s*?<(\\w+)/im) || []\n\t\t// not using the proper parent makes the child element(s) vanish.\n\t\t//     var div = document.createElement(\"div\")\n\t\t//     div.innerHTML = \"<td>i</td><td>j</td>\"\n\t\t//     console.log(div.innerHTML)\n\t\t// --> \"ij\", no <td> in sight.\n\t\tvar temp = $doc.createElement(possibleParents[match[1]] || \"div\")\n\t\tif (ns === \"http://www.w3.org/2000/svg\") {\n\t\t\ttemp.innerHTML = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\" + vnode.children + \"</svg>\"\n\t\t\ttemp = temp.firstChild\n\t\t} else {\n\t\t\ttemp.innerHTML = vnode.children\n\t\t}\n\t\tvnode.dom = temp.firstChild\n\t\tvnode.domSize = temp.childNodes.length\n\t\t// Capture nodes to remove, so we don't confuse them.\n\t\tvnode.instance = []\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tvar child\n\t\twhile (child = temp.firstChild) {\n\t\t\tvnode.instance.push(child)\n\t\t\tfragment.appendChild(child)\n\t\t}\n\t\tinsertNode(parent, fragment, nextSibling)\n\t}\n\tfunction createFragment(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tif (vnode.children != null) {\n\t\t\tvar children = vnode.children\n\t\t\tcreateNodes(fragment, children, 0, children.length, hooks, null, ns)\n\t\t}\n\t\tvnode.dom = fragment.firstChild\n\t\tvnode.domSize = fragment.childNodes.length\n\t\tinsertNode(parent, fragment, nextSibling)\n\t}\n\tfunction createElement(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tvar attrs = vnode.attrs\n\t\tvar is = attrs && attrs.is\n\n\t\tns = getNameSpace(vnode) || ns\n\n\t\tvar element = ns ?\n\t\t\tis ? $doc.createElementNS(ns, tag, {is: is}) : $doc.createElementNS(ns, tag) :\n\t\t\tis ? $doc.createElement(tag, {is: is}) : $doc.createElement(tag)\n\t\tvnode.dom = element\n\n\t\tif (attrs != null) {\n\t\t\tsetAttrs(vnode, attrs, ns)\n\t\t}\n\n\t\tinsertNode(parent, element, nextSibling)\n\n\t\tif (!maybeSetContentEditable(vnode)) {\n\t\t\tif (vnode.text != null) {\n\t\t\t\tif (vnode.text !== \"\") element.textContent = vnode.text\n\t\t\t\telse vnode.children = [Vnode(\"#\", undefined, undefined, vnode.text, undefined, undefined)]\n\t\t\t}\n\t\t\tif (vnode.children != null) {\n\t\t\t\tvar children = vnode.children\n\t\t\t\tcreateNodes(element, children, 0, children.length, hooks, null, ns)\n\t\t\t\tif (vnode.tag === \"select\" && attrs != null) setLateSelectAttrs(vnode, attrs)\n\t\t\t}\n\t\t}\n\t}\n\tfunction initComponent(vnode, hooks) {\n\t\tvar sentinel\n\t\tif (typeof vnode.tag.view === \"function\") {\n\t\t\tvnode.state = Object.create(vnode.tag)\n\t\t\tsentinel = vnode.state.view\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t} else {\n\t\t\tvnode.state = void 0\n\t\t\tsentinel = vnode.tag\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t\tvnode.state = (vnode.tag.prototype != null && typeof vnode.tag.prototype.view === \"function\") ? new vnode.tag(vnode) : vnode.tag(vnode)\n\t\t}\n\t\tinitLifecycle(vnode.state, vnode, hooks)\n\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\tvnode.instance = Vnode.normalize(callHook.call(vnode.state.view, vnode))\n\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\tsentinel.$$reentrantLock$$ = null\n\t}\n\tfunction createComponent(parent, vnode, hooks, ns, nextSibling) {\n\t\tinitComponent(vnode, hooks)\n\t\tif (vnode.instance != null) {\n\t\t\tcreateNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.dom != null ? vnode.instance.domSize : 0\n\t\t}\n\t\telse {\n\t\t\tvnode.domSize = 0\n\t\t}\n\t}\n\n\t//update\n\t/**\n\t * @param {Element|Fragment} parent - the parent element\n\t * @param {Vnode[] | null} old - the list of vnodes of the last `render()` call for\n\t *                               this part of the tree\n\t * @param {Vnode[] | null} vnodes - as above, but for the current `render()` call.\n\t * @param {Function[]} hooks - an accumulator of post-render hooks (oncreate/onupdate)\n\t * @param {Element | null} nextSibling - the next DOM node if we're dealing with a\n\t *                                       fragment that is not the last item in its\n\t *                                       parent\n\t * @param {'svg' | 'math' | String | null} ns) - the current XML namespace, if any\n\t * @returns void\n\t */\n\t// This function diffs and patches lists of vnodes, both keyed and unkeyed.\n\t//\n\t// We will:\n\t//\n\t// 1. describe its general structure\n\t// 2. focus on the diff algorithm optimizations\n\t// 3. discuss DOM node operations.\n\n\t// ## Overview:\n\t//\n\t// The updateNodes() function:\n\t// - deals with trivial cases\n\t// - determines whether the lists are keyed or unkeyed based on the first non-null node\n\t//   of each list.\n\t// - diffs them and patches the DOM if needed (that's the brunt of the code)\n\t// - manages the leftovers: after diffing, are there:\n\t//   - old nodes left to remove?\n\t// \t - new nodes to insert?\n\t// \t deal with them!\n\t//\n\t// The lists are only iterated over once, with an exception for the nodes in `old` that\n\t// are visited in the fourth part of the diff and in the `removeNodes` loop.\n\n\t// ## Diffing\n\t//\n\t// Reading https://github.com/localvoid/ivi/blob/ddc09d06abaef45248e6133f7040d00d3c6be853/packages/ivi/src/vdom/implementation.ts#L617-L837\n\t// may be good for context on longest increasing subsequence-based logic for moving nodes.\n\t//\n\t// In order to diff keyed lists, one has to\n\t//\n\t// 1) match nodes in both lists, per key, and update them accordingly\n\t// 2) create the nodes present in the new list, but absent in the old one\n\t// 3) remove the nodes present in the old list, but absent in the new one\n\t// 4) figure out what nodes in 1) to move in order to minimize the DOM operations.\n\t//\n\t// To achieve 1) one can create a dictionary of keys => index (for the old list), then iterate\n\t// over the new list and for each new vnode, find the corresponding vnode in the old list using\n\t// the map.\n\t// 2) is achieved in the same step: if a new node has no corresponding entry in the map, it is new\n\t// and must be created.\n\t// For the removals, we actually remove the nodes that have been updated from the old list.\n\t// The nodes that remain in that list after 1) and 2) have been performed can be safely removed.\n\t// The fourth step is a bit more complex and relies on the longest increasing subsequence (LIS)\n\t// algorithm.\n\t//\n\t// the longest increasing subsequence is the list of nodes that can remain in place. Imagine going\n\t// from `1,2,3,4,5` to `4,5,1,2,3` where the numbers are not necessarily the keys, but the indices\n\t// corresponding to the keyed nodes in the old list (keyed nodes `e,d,c,b,a` => `b,a,e,d,c` would\n\t//  match the above lists, for example).\n\t//\n\t// In there are two increasing subsequences: `4,5` and `1,2,3`, the latter being the longest. We\n\t// can update those nodes without moving them, and only call `insertNode` on `4` and `5`.\n\t//\n\t// @localvoid adapted the algo to also support node deletions and insertions (the `lis` is actually\n\t// the longest increasing subsequence *of old nodes still present in the new list*).\n\t//\n\t// It is a general algorithm that is fireproof in all circumstances, but it requires the allocation\n\t// and the construction of a `key => oldIndex` map, and three arrays (one with `newIndex => oldIndex`,\n\t// the `LIS` and a temporary one to create the LIS).\n\t//\n\t// So we cheat where we can: if the tails of the lists are identical, they are guaranteed to be part of\n\t// the LIS and can be updated without moving them.\n\t//\n\t// If two nodes are swapped, they are guaranteed not to be part of the LIS, and must be moved (with\n\t// the exception of the last node if the list is fully reversed).\n\t//\n\t// ## Finding the next sibling.\n\t//\n\t// `updateNode()` and `createNode()` expect a nextSibling parameter to perform DOM operations.\n\t// When the list is being traversed top-down, at any index, the DOM nodes up to the previous\n\t// vnode reflect the content of the new list, whereas the rest of the DOM nodes reflect the old\n\t// list. The next sibling must be looked for in the old list using `getNextSibling(... oldStart + 1 ...)`.\n\t//\n\t// In the other scenarios (swaps, upwards traversal, map-based diff),\n\t// the new vnodes list is traversed upwards. The DOM nodes at the bottom of the list reflect the\n\t// bottom part of the new vnodes list, and we can use the `v.dom`  value of the previous node\n\t// as the next sibling (cached in the `nextSibling` variable).\n\n\n\t// ## DOM node moves\n\t//\n\t// In most scenarios `updateNode()` and `createNode()` perform the DOM operations. However,\n\t// this is not the case if the node moved (second and fourth part of the diff algo). We move\n\t// the old DOM nodes before updateNode runs because it enables us to use the cached `nextSibling`\n\t// variable rather than fetching it using `getNextSibling()`.\n\t//\n\t// The fourth part of the diff currently inserts nodes unconditionally, leading to issues\n\t// like #1791 and #1999. We need to be smarter about those situations where adjascent old\n\t// nodes remain together in the new list in a way that isn't covered by parts one and\n\t// three of the diff algo.\n\n\tfunction updateNodes(parent, old, vnodes, hooks, nextSibling, ns) {\n\t\tif (old === vnodes || old == null && vnodes == null) return\n\t\telse if (old == null || old.length === 0) createNodes(parent, vnodes, 0, vnodes.length, hooks, nextSibling, ns)\n\t\telse if (vnodes == null || vnodes.length === 0) removeNodes(parent, old, 0, old.length)\n\t\telse {\n\t\t\tvar isOldKeyed = old[0] != null && old[0].key != null\n\t\t\tvar isKeyed = vnodes[0] != null && vnodes[0].key != null\n\t\t\tvar start = 0, oldStart = 0\n\t\t\tif (!isOldKeyed) while (oldStart < old.length && old[oldStart] == null) oldStart++\n\t\t\tif (!isKeyed) while (start < vnodes.length && vnodes[start] == null) start++\n\t\t\tif (isKeyed === null && isOldKeyed == null) return // both lists are full of nulls\n\t\t\tif (isOldKeyed !== isKeyed) {\n\t\t\t\tremoveNodes(parent, old, oldStart, old.length)\n\t\t\t\tcreateNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns)\n\t\t\t} else if (!isKeyed) {\n\t\t\t\t// Don't index past the end of either list (causes deopts).\n\t\t\t\tvar commonLength = old.length < vnodes.length ? old.length : vnodes.length\n\t\t\t\t// Rewind if necessary to the first non-null index on either side.\n\t\t\t\t// We could alternatively either explicitly create or remove nodes when `start !== oldStart`\n\t\t\t\t// but that would be optimizing for sparse lists which are more rare than dense ones.\n\t\t\t\tstart = start < oldStart ? start : oldStart\n\t\t\t\tfor (; start < commonLength; start++) {\n\t\t\t\t\to = old[start]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t\tif (o === v || o == null && v == null) continue\n\t\t\t\t\telse if (o == null) createNode(parent, v, hooks, ns, getNextSibling(old, start + 1, nextSibling))\n\t\t\t\t\telse if (v == null) removeNode(parent, o)\n\t\t\t\t\telse updateNode(parent, o, v, hooks, getNextSibling(old, start + 1, nextSibling), ns)\n\t\t\t\t}\n\t\t\t\tif (old.length > commonLength) removeNodes(parent, old, start, old.length)\n\t\t\t\tif (vnodes.length > commonLength) createNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns)\n\t\t\t} else {\n\t\t\t\t// keyed diff\n\t\t\t\tvar oldEnd = old.length - 1, end = vnodes.length - 1, map, o, v, oe, ve, topSibling\n\n\t\t\t\t// bottom-up\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t\tif (oe.key !== ve.key) break\n\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldEnd--, end--\n\t\t\t\t}\n\t\t\t\t// top-down\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\to = old[oldStart]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t\tif (o.key !== v.key) break\n\t\t\t\t\toldStart++, start++\n\t\t\t\t\tif (o !== v) updateNode(parent, o, v, hooks, getNextSibling(old, oldStart, nextSibling), ns)\n\t\t\t\t}\n\t\t\t\t// swaps and list reversals\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\tif (start === end) break\n\t\t\t\t\tif (o.key !== ve.key || oe.key !== v.key) break\n\t\t\t\t\ttopSibling = getNextSibling(old, oldStart, nextSibling)\n\t\t\t\t\tmoveNodes(parent, oe, topSibling)\n\t\t\t\t\tif (oe !== v) updateNode(parent, oe, v, hooks, topSibling, ns)\n\t\t\t\t\tif (++start <= --end) moveNodes(parent, o, nextSibling)\n\t\t\t\t\tif (o !== ve) updateNode(parent, o, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldStart++; oldEnd--\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t\to = old[oldStart]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t}\n\t\t\t\t// bottom up once again\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\tif (oe.key !== ve.key) break\n\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldEnd--, end--\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t}\n\t\t\t\tif (start > end) removeNodes(parent, old, oldStart, oldEnd + 1)\n\t\t\t\telse if (oldStart > oldEnd) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)\n\t\t\t\telse {\n\t\t\t\t\t// inspired by ivi https://github.com/ivijs/ivi/ by Boris Kaul\n\t\t\t\t\tvar originalNextSibling = nextSibling, vnodesLength = end - start + 1, oldIndices = new Array(vnodesLength), li=0, i=0, pos = 2147483647, matched = 0, map, lisIndices\n\t\t\t\t\tfor (i = 0; i < vnodesLength; i++) oldIndices[i] = -1\n\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\tif (map == null) map = getKeyMap(old, oldStart, oldEnd + 1)\n\t\t\t\t\t\tve = vnodes[i]\n\t\t\t\t\t\tvar oldIndex = map[ve.key]\n\t\t\t\t\t\tif (oldIndex != null) {\n\t\t\t\t\t\t\tpos = (oldIndex < pos) ? oldIndex : -1 // becomes -1 if nodes were re-ordered\n\t\t\t\t\t\t\toldIndices[i-start] = oldIndex\n\t\t\t\t\t\t\toe = old[oldIndex]\n\t\t\t\t\t\t\told[oldIndex] = null\n\t\t\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\t\t\tmatched++\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tnextSibling = originalNextSibling\n\t\t\t\t\tif (matched !== oldEnd - oldStart + 1) removeNodes(parent, old, oldStart, oldEnd + 1)\n\t\t\t\t\tif (matched === 0) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (pos === -1) {\n\t\t\t\t\t\t\t// the indices of the indices of the items that are part of the\n\t\t\t\t\t\t\t// longest increasing subsequence in the oldIndices list\n\t\t\t\t\t\t\tlisIndices = makeLisIndices(oldIndices)\n\t\t\t\t\t\t\tli = lisIndices.length - 1\n\t\t\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\t\t\tv = vnodes[i]\n\t\t\t\t\t\t\t\tif (oldIndices[i-start] === -1) createNode(parent, v, hooks, ns, nextSibling)\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tif (lisIndices[li] === i - start) li--\n\t\t\t\t\t\t\t\t\telse moveNodes(parent, v, nextSibling)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (v.dom != null) nextSibling = vnodes[i].dom\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\t\t\tv = vnodes[i]\n\t\t\t\t\t\t\t\tif (oldIndices[i-start] === -1) createNode(parent, v, hooks, ns, nextSibling)\n\t\t\t\t\t\t\t\tif (v.dom != null) nextSibling = vnodes[i].dom\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction updateNode(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tvar oldTag = old.tag, tag = vnode.tag\n\t\tif (oldTag === tag) {\n\t\t\tvnode.state = old.state\n\t\t\tvnode.events = old.events\n\t\t\tif (shouldNotUpdate(vnode, old)) return\n\t\t\tif (typeof oldTag === \"string\") {\n\t\t\t\tif (vnode.attrs != null) {\n\t\t\t\t\tupdateLifecycle(vnode.attrs, vnode, hooks)\n\t\t\t\t}\n\t\t\t\tswitch (oldTag) {\n\t\t\t\t\tcase \"#\": updateText(old, vnode); break\n\t\t\t\t\tcase \"<\": updateHTML(parent, old, vnode, ns, nextSibling); break\n\t\t\t\t\tcase \"[\": updateFragment(parent, old, vnode, hooks, nextSibling, ns); break\n\t\t\t\t\tdefault: updateElement(old, vnode, hooks, ns)\n\t\t\t\t}\n\t\t\t}\n\t\t\telse updateComponent(parent, old, vnode, hooks, nextSibling, ns)\n\t\t}\n\t\telse {\n\t\t\tremoveNode(parent, old)\n\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t}\n\t}\n\tfunction updateText(old, vnode) {\n\t\tif (old.children.toString() !== vnode.children.toString()) {\n\t\t\told.dom.nodeValue = vnode.children\n\t\t}\n\t\tvnode.dom = old.dom\n\t}\n\tfunction updateHTML(parent, old, vnode, ns, nextSibling) {\n\t\tif (old.children !== vnode.children) {\n\t\t\tremoveHTML(parent, old)\n\t\t\tcreateHTML(parent, vnode, ns, nextSibling)\n\t\t}\n\t\telse {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t\tvnode.instance = old.instance\n\t\t}\n\t}\n\tfunction updateFragment(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tupdateNodes(parent, old.children, vnode.children, hooks, nextSibling, ns)\n\t\tvar domSize = 0, children = vnode.children\n\t\tvnode.dom = null\n\t\tif (children != null) {\n\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\tvar child = children[i]\n\t\t\t\tif (child != null && child.dom != null) {\n\t\t\t\t\tif (vnode.dom == null) vnode.dom = child.dom\n\t\t\t\t\tdomSize += child.domSize || 1\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (domSize !== 1) vnode.domSize = domSize\n\t\t}\n\t}\n\tfunction updateElement(old, vnode, hooks, ns) {\n\t\tvar element = vnode.dom = old.dom\n\t\tns = getNameSpace(vnode) || ns\n\n\t\tif (vnode.tag === \"textarea\") {\n\t\t\tif (vnode.attrs == null) vnode.attrs = {}\n\t\t\tif (vnode.text != null) {\n\t\t\t\tvnode.attrs.value = vnode.text //FIXME handle multiple children\n\t\t\t\tvnode.text = undefined\n\t\t\t}\n\t\t}\n\t\tupdateAttrs(vnode, old.attrs, vnode.attrs, ns)\n\t\tif (!maybeSetContentEditable(vnode)) {\n\t\t\tif (old.text != null && vnode.text != null && vnode.text !== \"\") {\n\t\t\t\tif (old.text.toString() !== vnode.text.toString()) old.dom.firstChild.nodeValue = vnode.text\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (old.text != null) old.children = [Vnode(\"#\", undefined, undefined, old.text, undefined, old.dom.firstChild)]\n\t\t\t\tif (vnode.text != null) vnode.children = [Vnode(\"#\", undefined, undefined, vnode.text, undefined, undefined)]\n\t\t\t\tupdateNodes(element, old.children, vnode.children, hooks, null, ns)\n\t\t\t}\n\t\t}\n\t}\n\tfunction updateComponent(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tvnode.instance = Vnode.normalize(callHook.call(vnode.state.view, vnode))\n\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\tupdateLifecycle(vnode.state, vnode, hooks)\n\t\tif (vnode.attrs != null) updateLifecycle(vnode.attrs, vnode, hooks)\n\t\tif (vnode.instance != null) {\n\t\t\tif (old.instance == null) createNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\telse updateNode(parent, old.instance, vnode.instance, hooks, nextSibling, ns)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.instance.domSize\n\t\t}\n\t\telse if (old.instance != null) {\n\t\t\tremoveNode(parent, old.instance)\n\t\t\tvnode.dom = undefined\n\t\t\tvnode.domSize = 0\n\t\t}\n\t\telse {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t}\n\t}\n\tfunction getKeyMap(vnodes, start, end) {\n\t\tvar map = Object.create(null)\n\t\tfor (; start < end; start++) {\n\t\t\tvar vnode = vnodes[start]\n\t\t\tif (vnode != null) {\n\t\t\t\tvar key = vnode.key\n\t\t\t\tif (key != null) map[key] = start\n\t\t\t}\n\t\t}\n\t\treturn map\n\t}\n\t// Lifted from ivi https://github.com/ivijs/ivi/\n\t// takes a list of unique numbers (-1 is special and can\n\t// occur multiple times) and returns an array with the indices\n\t// of the items that are part of the longest increasing\n\t// subsequece\n\tvar lisTemp = []\n\tfunction makeLisIndices(a) {\n\t\tvar result = [0]\n\t\tvar u = 0, v = 0, i = 0\n\t\tvar il = lisTemp.length = a.length\n\t\tfor (var i = 0; i < il; i++) lisTemp[i] = a[i]\n\t\tfor (var i = 0; i < il; ++i) {\n\t\t\tif (a[i] === -1) continue\n\t\t\tvar j = result[result.length - 1]\n\t\t\tif (a[j] < a[i]) {\n\t\t\t\tlisTemp[i] = j\n\t\t\t\tresult.push(i)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tu = 0\n\t\t\tv = result.length - 1\n\t\t\twhile (u < v) {\n\t\t\t\t// Fast integer average without overflow.\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tvar c = (u >>> 1) + (v >>> 1) + (u & v & 1)\n\t\t\t\tif (a[result[c]] < a[i]) {\n\t\t\t\t\tu = c + 1\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tv = c\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (a[i] < a[result[u]]) {\n\t\t\t\tif (u > 0) lisTemp[i] = result[u - 1]\n\t\t\t\tresult[u] = i\n\t\t\t}\n\t\t}\n\t\tu = result.length\n\t\tv = result[u - 1]\n\t\twhile (u-- > 0) {\n\t\t\tresult[u] = v\n\t\t\tv = lisTemp[v]\n\t\t}\n\t\tlisTemp.length = 0\n\t\treturn result\n\t}\n\n\tfunction getNextSibling(vnodes, i, nextSibling) {\n\t\tfor (; i < vnodes.length; i++) {\n\t\t\tif (vnodes[i] != null && vnodes[i].dom != null) return vnodes[i].dom\n\t\t}\n\t\treturn nextSibling\n\t}\n\n\t// This covers a really specific edge case:\n\t// - Parent node is keyed and contains child\n\t// - Child is removed, returns unresolved promise in `onbeforeremove`\n\t// - Parent node is moved in keyed diff\n\t// - Remaining children still need moved appropriately\n\t//\n\t// Ideally, I'd track removed nodes as well, but that introduces a lot more\n\t// complexity and I'm not exactly interested in doing that.\n\tfunction moveNodes(parent, vnode, nextSibling) {\n\t\tvar frag = $doc.createDocumentFragment()\n\t\tmoveChildToFrag(parent, frag, vnode)\n\t\tinsertNode(parent, frag, nextSibling)\n\t}\n\tfunction moveChildToFrag(parent, frag, vnode) {\n\t\t// Dodge the recursion overhead in a few of the most common cases.\n\t\twhile (vnode.dom != null && vnode.dom.parentNode === parent) {\n\t\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\t\tvnode = vnode.instance\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else if (vnode.tag === \"<\") {\n\t\t\t\tfor (var i = 0; i < vnode.instance.length; i++) {\n\t\t\t\t\tfrag.appendChild(vnode.instance[i])\n\t\t\t\t}\n\t\t\t} else if (vnode.tag !== \"[\") {\n\t\t\t\t// Don't recurse for text nodes *or* elements, just fragments\n\t\t\t\tfrag.appendChild(vnode.dom)\n\t\t\t} else if (vnode.children.length === 1) {\n\t\t\t\tvnode = vnode.children[0]\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else {\n\t\t\t\tfor (var i = 0; i < vnode.children.length; i++) {\n\t\t\t\t\tvar child = vnode.children[i]\n\t\t\t\t\tif (child != null) moveChildToFrag(parent, frag, child)\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\n\tfunction insertNode(parent, dom, nextSibling) {\n\t\tif (nextSibling != null) parent.insertBefore(dom, nextSibling)\n\t\telse parent.appendChild(dom)\n\t}\n\n\tfunction maybeSetContentEditable(vnode) {\n\t\tif (vnode.attrs == null || (\n\t\t\tvnode.attrs.contenteditable == null && // attribute\n\t\t\tvnode.attrs.contentEditable == null // property\n\t\t)) return false\n\t\tvar children = vnode.children\n\t\tif (children != null && children.length === 1 && children[0].tag === \"<\") {\n\t\t\tvar content = children[0].children\n\t\t\tif (vnode.dom.innerHTML !== content) vnode.dom.innerHTML = content\n\t\t}\n\t\telse if (vnode.text != null || children != null && children.length !== 0) throw new Error(\"Child node of a contenteditable must be trusted\")\n\t\treturn true\n\t}\n\n\t//remove\n\tfunction removeNodes(parent, vnodes, start, end) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) removeNode(parent, vnode)\n\t\t}\n\t}\n\tfunction removeNode(parent, vnode) {\n\t\tvar mask = 0\n\t\tvar original = vnode.state\n\t\tvar stateResult, attrsResult\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onbeforeremove === \"function\") {\n\t\t\tvar result = callHook.call(vnode.state.onbeforeremove, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\tmask = 1\n\t\t\t\tstateResult = result\n\t\t\t}\n\t\t}\n\t\tif (vnode.attrs && typeof vnode.attrs.onbeforeremove === \"function\") {\n\t\t\tvar result = callHook.call(vnode.attrs.onbeforeremove, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tmask |= 2\n\t\t\t\tattrsResult = result\n\t\t\t}\n\t\t}\n\t\tcheckState(vnode, original)\n\n\t\t// If we can, try to fast-path it and avoid all the overhead of awaiting\n\t\tif (!mask) {\n\t\t\tonremove(vnode)\n\t\t\tremoveChild(parent, vnode)\n\t\t} else {\n\t\t\tif (stateResult != null) {\n\t\t\t\tvar next = function () {\n\t\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\t\tif (mask & 1) { mask &= 2; if (!mask) reallyRemove() }\n\t\t\t\t}\n\t\t\t\tstateResult.then(next, next)\n\t\t\t}\n\t\t\tif (attrsResult != null) {\n\t\t\t\tvar next = function () {\n\t\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\t\tif (mask & 2) { mask &= 1; if (!mask) reallyRemove() }\n\t\t\t\t}\n\t\t\t\tattrsResult.then(next, next)\n\t\t\t}\n\t\t}\n\n\t\tfunction reallyRemove() {\n\t\t\tcheckState(vnode, original)\n\t\t\tonremove(vnode)\n\t\t\tremoveChild(parent, vnode)\n\t\t}\n\t}\n\tfunction removeHTML(parent, vnode) {\n\t\tfor (var i = 0; i < vnode.instance.length; i++) {\n\t\t\tparent.removeChild(vnode.instance[i])\n\t\t}\n\t}\n\tfunction removeChild(parent, vnode) {\n\t\t// Dodge the recursion overhead in a few of the most common cases.\n\t\twhile (vnode.dom != null && vnode.dom.parentNode === parent) {\n\t\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\t\tvnode = vnode.instance\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else if (vnode.tag === \"<\") {\n\t\t\t\tremoveHTML(parent, vnode)\n\t\t\t} else {\n\t\t\t\tif (vnode.tag !== \"[\") {\n\t\t\t\t\tparent.removeChild(vnode.dom)\n\t\t\t\t\tif (!Array.isArray(vnode.children)) break\n\t\t\t\t}\n\t\t\t\tif (vnode.children.length === 1) {\n\t\t\t\t\tvnode = vnode.children[0]\n\t\t\t\t\tif (vnode != null) continue\n\t\t\t\t} else {\n\t\t\t\t\tfor (var i = 0; i < vnode.children.length; i++) {\n\t\t\t\t\t\tvar child = vnode.children[i]\n\t\t\t\t\t\tif (child != null) removeChild(parent, child)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\tfunction onremove(vnode) {\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onremove === \"function\") callHook.call(vnode.state.onremove, vnode)\n\t\tif (vnode.attrs && typeof vnode.attrs.onremove === \"function\") callHook.call(vnode.attrs.onremove, vnode)\n\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\tif (vnode.instance != null) onremove(vnode.instance)\n\t\t} else {\n\t\t\tvar children = vnode.children\n\t\t\tif (Array.isArray(children)) {\n\t\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\t\tvar child = children[i]\n\t\t\t\t\tif (child != null) onremove(child)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t//attrs\n\tfunction setAttrs(vnode, attrs, ns) {\n\t\tfor (var key in attrs) {\n\t\t\tsetAttr(vnode, key, null, attrs[key], ns)\n\t\t}\n\t}\n\tfunction setAttr(vnode, key, old, value, ns) {\n\t\tif (key === \"key\" || key === \"is\" || value == null || isLifecycleMethod(key) || (old === value && !isFormAttribute(vnode, key)) && typeof value !== \"object\") return\n\t\tif (key[0] === \"o\" && key[1] === \"n\") return updateEvent(vnode, key, value)\n\t\tif (key.slice(0, 6) === \"xlink:\") vnode.dom.setAttributeNS(\"http://www.w3.org/1999/xlink\", key.slice(6), value)\n\t\telse if (key === \"style\") updateStyle(vnode.dom, old, value)\n\t\telse if (hasPropertyKey(vnode, key, ns)) {\n\t\t\tif (key === \"value\") {\n\t\t\t\t// Only do the coercion if we're actually going to check the value.\n\t\t\t\t/* eslint-disable no-implicit-coercion */\n\t\t\t\t//setting input[value] to same value by typing on focused element moves cursor to end in Chrome\n\t\t\t\tif ((vnode.tag === \"input\" || vnode.tag === \"textarea\") && vnode.dom.value === \"\" + value && vnode.dom === activeElement()) return\n\t\t\t\t//setting select[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\t\tif (vnode.tag === \"select\" && old !== null && vnode.dom.value === \"\" + value) return\n\t\t\t\t//setting option[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\t\tif (vnode.tag === \"option\" && old !== null && vnode.dom.value === \"\" + value) return\n\t\t\t\t/* eslint-enable no-implicit-coercion */\n\t\t\t}\n\t\t\t// If you assign an input type that is not supported by IE 11 with an assignment expression, an error will occur.\n\t\t\tif (vnode.tag === \"input\" && key === \"type\") vnode.dom.setAttribute(key, value)\n\t\t\telse vnode.dom[key] = value\n\t\t} else {\n\t\t\tif (typeof value === \"boolean\") {\n\t\t\t\tif (value) vnode.dom.setAttribute(key, \"\")\n\t\t\t\telse vnode.dom.removeAttribute(key)\n\t\t\t}\n\t\t\telse vnode.dom.setAttribute(key === \"className\" ? \"class\" : key, value)\n\t\t}\n\t}\n\tfunction removeAttr(vnode, key, old, ns) {\n\t\tif (key === \"key\" || key === \"is\" || old == null || isLifecycleMethod(key)) return\n\t\tif (key[0] === \"o\" && key[1] === \"n\" && !isLifecycleMethod(key)) updateEvent(vnode, key, undefined)\n\t\telse if (key === \"style\") updateStyle(vnode.dom, old, null)\n\t\telse if (\n\t\t\thasPropertyKey(vnode, key, ns)\n\t\t\t&& key !== \"className\"\n\t\t\t&& !(key === \"value\" && (\n\t\t\t\tvnode.tag === \"option\"\n\t\t\t\t|| vnode.tag === \"select\" && vnode.dom.selectedIndex === -1 && vnode.dom === activeElement()\n\t\t\t))\n\t\t\t&& !(vnode.tag === \"input\" && key === \"type\")\n\t\t) {\n\t\t\tvnode.dom[key] = null\n\t\t} else {\n\t\t\tvar nsLastIndex = key.indexOf(\":\")\n\t\t\tif (nsLastIndex !== -1) key = key.slice(nsLastIndex + 1)\n\t\t\tif (old !== false) vnode.dom.removeAttribute(key === \"className\" ? \"class\" : key)\n\t\t}\n\t}\n\tfunction setLateSelectAttrs(vnode, attrs) {\n\t\tif (\"value\" in attrs) {\n\t\t\tif(attrs.value === null) {\n\t\t\t\tif (vnode.dom.selectedIndex !== -1) vnode.dom.value = null\n\t\t\t} else {\n\t\t\t\tvar normalized = \"\" + attrs.value // eslint-disable-line no-implicit-coercion\n\t\t\t\tif (vnode.dom.value !== normalized || vnode.dom.selectedIndex === -1) {\n\t\t\t\t\tvnode.dom.value = normalized\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (\"selectedIndex\" in attrs) setAttr(vnode, \"selectedIndex\", null, attrs.selectedIndex, undefined)\n\t}\n\tfunction updateAttrs(vnode, old, attrs, ns) {\n\t\tif (attrs != null) {\n\t\t\tfor (var key in attrs) {\n\t\t\t\tsetAttr(vnode, key, old && old[key], attrs[key], ns)\n\t\t\t}\n\t\t}\n\t\tvar val\n\t\tif (old != null) {\n\t\t\tfor (var key in old) {\n\t\t\t\tif (((val = old[key]) != null) && (attrs == null || attrs[key] == null)) {\n\t\t\t\t\tremoveAttr(vnode, key, val, ns)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction isFormAttribute(vnode, attr) {\n\t\treturn attr === \"value\" || attr === \"checked\" || attr === \"selectedIndex\" || attr === \"selected\" && vnode.dom === activeElement() || vnode.tag === \"option\" && vnode.dom.parentNode === $doc.activeElement\n\t}\n\tfunction isLifecycleMethod(attr) {\n\t\treturn attr === \"oninit\" || attr === \"oncreate\" || attr === \"onupdate\" || attr === \"onremove\" || attr === \"onbeforeremove\" || attr === \"onbeforeupdate\"\n\t}\n\tfunction hasPropertyKey(vnode, key, ns) {\n\t\t// Filter out namespaced keys\n\t\treturn ns === undefined && (\n\t\t\t// If it's a custom element, just keep it.\n\t\t\tvnode.tag.indexOf(\"-\") > -1 || vnode.attrs != null && vnode.attrs.is ||\n\t\t\t// If it's a normal element, let's try to avoid a few browser bugs.\n\t\t\tkey !== \"href\" && key !== \"list\" && key !== \"form\" && key !== \"width\" && key !== \"height\"// && key !== \"type\"\n\t\t\t// Defer the property check until *after* we check everything.\n\t\t) && key in vnode.dom\n\t}\n\n\t//style\n\tvar uppercaseRegex = /[A-Z]/g\n\tfunction toLowerCase(capital) { return \"-\" + capital.toLowerCase() }\n\tfunction normalizeKey(key) {\n\t\treturn key[0] === \"-\" && key[1] === \"-\" ? key :\n\t\t\tkey === \"cssFloat\" ? \"float\" :\n\t\t\t\tkey.replace(uppercaseRegex, toLowerCase)\n\t}\n\tfunction updateStyle(element, old, style) {\n\t\tif (old === style) {\n\t\t\t// Styles are equivalent, do nothing.\n\t\t} else if (style == null) {\n\t\t\t// New style is missing, just clear it.\n\t\t\telement.style.cssText = \"\"\n\t\t} else if (typeof style !== \"object\") {\n\t\t\t// New style is a string, let engine deal with patching.\n\t\t\telement.style.cssText = style\n\t\t} else if (old == null || typeof old !== \"object\") {\n\t\t\t// `old` is missing or a string, `style` is an object.\n\t\t\telement.style.cssText = \"\"\n\t\t\t// Add new style properties\n\t\t\tfor (var key in style) {\n\t\t\t\tvar value = style[key]\n\t\t\t\tif (value != null) element.style.setProperty(normalizeKey(key), String(value))\n\t\t\t}\n\t\t} else {\n\t\t\t// Both old & new are (different) objects.\n\t\t\t// Update style properties that have changed\n\t\t\tfor (var key in style) {\n\t\t\t\tvar value = style[key]\n\t\t\t\tif (value != null && (value = String(value)) !== String(old[key])) {\n\t\t\t\t\telement.style.setProperty(normalizeKey(key), value)\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Remove style properties that no longer exist\n\t\t\tfor (var key in old) {\n\t\t\t\tif (old[key] != null && style[key] == null) {\n\t\t\t\t\telement.style.removeProperty(normalizeKey(key))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Here's an explanation of how this works:\n\t// 1. The event names are always (by design) prefixed by `on`.\n\t// 2. The EventListener interface accepts either a function or an object\n\t//    with a `handleEvent` method.\n\t// 3. The object does not inherit from `Object.prototype`, to avoid\n\t//    any potential interference with that (e.g. setters).\n\t// 4. The event name is remapped to the handler before calling it.\n\t// 5. In function-based event handlers, `ev.target === this`. We replicate\n\t//    that below.\n\t// 6. In function-based event handlers, `return false` prevents the default\n\t//    action and stops event propagation. We replicate that below.\n\tfunction EventDict() {\n\t\t// Save this, so the current redraw is correctly tracked.\n\t\tthis._ = currentRedraw\n\t}\n\tEventDict.prototype = Object.create(null)\n\tEventDict.prototype.handleEvent = function (ev) {\n\t\tvar handler = this[\"on\" + ev.type]\n\t\tvar result\n\t\tif (typeof handler === \"function\") result = handler.call(ev.currentTarget, ev)\n\t\telse if (typeof handler.handleEvent === \"function\") handler.handleEvent(ev)\n\t\tif (this._ && ev.redraw !== false) (0, this._)()\n\t\tif (result === false) {\n\t\t\tev.preventDefault()\n\t\t\tev.stopPropagation()\n\t\t}\n\t}\n\n\t//event\n\tfunction updateEvent(vnode, key, value) {\n\t\tif (vnode.events != null) {\n\t\t\tif (vnode.events[key] === value) return\n\t\t\tif (value != null && (typeof value === \"function\" || typeof value === \"object\")) {\n\t\t\t\tif (vnode.events[key] == null) vnode.dom.addEventListener(key.slice(2), vnode.events, false)\n\t\t\t\tvnode.events[key] = value\n\t\t\t} else {\n\t\t\t\tif (vnode.events[key] != null) vnode.dom.removeEventListener(key.slice(2), vnode.events, false)\n\t\t\t\tvnode.events[key] = undefined\n\t\t\t}\n\t\t} else if (value != null && (typeof value === \"function\" || typeof value === \"object\")) {\n\t\t\tvnode.events = new EventDict()\n\t\t\tvnode.dom.addEventListener(key.slice(2), vnode.events, false)\n\t\t\tvnode.events[key] = value\n\t\t}\n\t}\n\n\t//lifecycle\n\tfunction initLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.oninit === \"function\") callHook.call(source.oninit, vnode)\n\t\tif (typeof source.oncreate === \"function\") hooks.push(callHook.bind(source.oncreate, vnode))\n\t}\n\tfunction updateLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.onupdate === \"function\") hooks.push(callHook.bind(source.onupdate, vnode))\n\t}\n\tfunction shouldNotUpdate(vnode, old) {\n\t\tdo {\n\t\t\tif (vnode.attrs != null && typeof vnode.attrs.onbeforeupdate === \"function\") {\n\t\t\t\tvar force = callHook.call(vnode.attrs.onbeforeupdate, vnode, old)\n\t\t\t\tif (force !== undefined && !force) break\n\t\t\t}\n\t\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onbeforeupdate === \"function\") {\n\t\t\t\tvar force = callHook.call(vnode.state.onbeforeupdate, vnode, old)\n\t\t\t\tif (force !== undefined && !force) break\n\t\t\t}\n\t\t\treturn false\n\t\t} while (false); // eslint-disable-line no-constant-condition\n\t\tvnode.dom = old.dom\n\t\tvnode.domSize = old.domSize\n\t\tvnode.instance = old.instance\n\t\t// One would think having the actual latest attributes would be ideal,\n\t\t// but it doesn't let us properly diff based on our current internal\n\t\t// representation. We have to save not only the old DOM info, but also\n\t\t// the attributes used to create it, as we diff *that*, not against the\n\t\t// DOM directly (with a few exceptions in `setAttr`). And, of course, we\n\t\t// need to save the children and text as they are conceptually not\n\t\t// unlike special \"attributes\" internally.\n\t\tvnode.attrs = old.attrs\n\t\tvnode.children = old.children\n\t\tvnode.text = old.text\n\t\treturn true\n\t}\n\n\treturn function(dom, vnodes, redraw) {\n\t\tif (!dom) throw new TypeError(\"Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.\")\n\t\tvar hooks = []\n\t\tvar active = activeElement()\n\t\tvar namespace = dom.namespaceURI\n\n\t\t// First time rendering into a node clears it out\n\t\tif (dom.vnodes == null) dom.textContent = \"\"\n\n\t\tvnodes = Vnode.normalizeChildren(Array.isArray(vnodes) ? vnodes : [vnodes])\n\t\tvar prevRedraw = currentRedraw\n\t\ttry {\n\t\t\tcurrentRedraw = typeof redraw === \"function\" ? redraw : undefined\n\t\t\tupdateNodes(dom, dom.vnodes, vnodes, hooks, null, namespace === \"http://www.w3.org/1999/xhtml\" ? undefined : namespace)\n\t\t} finally {\n\t\t\tcurrentRedraw = prevRedraw\n\t\t}\n\t\tdom.vnodes = vnodes\n\t\t// `document.activeElement` can return null: https://html.spec.whatwg.org/multipage/interaction.html#dom-document-activeelement\n\t\tif (active != null && activeElement() !== active && typeof active.focus === \"function\") active.focus()\n\t\tfor (var i = 0; i < hooks.length; i++) hooks[i]()\n\t}\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function(html) {\n\tif (html == null) html = \"\"\n\treturn Vnode(\"<\", undefined, undefined, html, undefined, undefined)\n}\n","\"use strict\"\n\nfunction Vnode(tag, key, attrs, children, text, dom) {\n\treturn {tag: tag, key: key, attrs: attrs, children: children, text: text, dom: dom, domSize: undefined, state: undefined, events: undefined, instance: undefined}\n}\nVnode.normalize = function(node) {\n\tif (Array.isArray(node)) return Vnode(\"[\", undefined, undefined, Vnode.normalizeChildren(node), undefined, undefined)\n\tif (node == null || typeof node === \"boolean\") return null\n\tif (typeof node === \"object\") return node\n\treturn Vnode(\"#\", undefined, undefined, String(node), undefined, undefined)\n}\nVnode.normalizeChildren = function(input) {\n\tvar children = []\n\tif (input.length) {\n\t\tvar isKeyed = input[0] != null && input[0].key != null\n\t\t// Note: this is a *very* perf-sensitive check.\n\t\t// Fun fact: merging the loop like this is somehow faster than splitting\n\t\t// it, noticeably so.\n\t\tfor (var i = 1; i < input.length; i++) {\n\t\t\tif ((input[i] != null && input[i].key != null) !== isKeyed) {\n\t\t\t\tthrow new TypeError(\"Vnodes must either always have keys or never have keys!\")\n\t\t\t}\n\t\t}\n\t\tfor (var i = 0; i < input.length; i++) {\n\t\t\tchildren[i] = Vnode.normalize(input[i])\n\t\t}\n\t}\n\treturn children\n}\n\nmodule.exports = Vnode\n","\"use strict\"\n\nvar PromisePolyfill = require(\"./promise/promise\")\nvar mountRedraw = require(\"./mount-redraw\")\n\nmodule.exports = require(\"./request/request\")(window, PromisePolyfill, mountRedraw.redraw)\n","\"use strict\"\n\nvar buildPathname = require(\"../pathname/build\")\n\nmodule.exports = function($window, Promise, oncompletion) {\n\tvar callbackCount = 0\n\n\tfunction PromiseProxy(executor) {\n\t\treturn new Promise(executor)\n\t}\n\n\t// In case the global Promise is some userland library's where they rely on\n\t// `foo instanceof this.constructor`, `this.constructor.resolve(value)`, or\n\t// similar. Let's *not* break them.\n\tPromiseProxy.prototype = Promise.prototype\n\tPromiseProxy.__proto__ = Promise // eslint-disable-line no-proto\n\n\tfunction makeRequest(factory) {\n\t\treturn function(url, args) {\n\t\t\tif (typeof url !== \"string\") { args = url; url = url.url }\n\t\t\telse if (args == null) args = {}\n\t\t\tvar promise = new Promise(function(resolve, reject) {\n\t\t\t\tfactory(buildPathname(url, args.params), args, function (data) {\n\t\t\t\t\tif (typeof args.type === \"function\") {\n\t\t\t\t\t\tif (Array.isArray(data)) {\n\t\t\t\t\t\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\t\t\t\t\t\tdata[i] = new args.type(data[i])\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse data = new args.type(data)\n\t\t\t\t\t}\n\t\t\t\t\tresolve(data)\n\t\t\t\t}, reject)\n\t\t\t})\n\t\t\tif (args.background === true) return promise\n\t\t\tvar count = 0\n\t\t\tfunction complete() {\n\t\t\t\tif (--count === 0 && typeof oncompletion === \"function\") oncompletion()\n\t\t\t}\n\n\t\t\treturn wrap(promise)\n\n\t\t\tfunction wrap(promise) {\n\t\t\t\tvar then = promise.then\n\t\t\t\t// Set the constructor, so engines know to not await or resolve\n\t\t\t\t// this as a native promise. At the time of writing, this is\n\t\t\t\t// only necessary for V8, but their behavior is the correct\n\t\t\t\t// behavior per spec. See this spec issue for more details:\n\t\t\t\t// https://github.com/tc39/ecma262/issues/1577. Also, see the\n\t\t\t\t// corresponding comment in `request/tests/test-request.js` for\n\t\t\t\t// a bit more background on the issue at hand.\n\t\t\t\tpromise.constructor = PromiseProxy\n\t\t\t\tpromise.then = function() {\n\t\t\t\t\tcount++\n\t\t\t\t\tvar next = then.apply(promise, arguments)\n\t\t\t\t\tnext.then(complete, function(e) {\n\t\t\t\t\t\tcomplete()\n\t\t\t\t\t\tif (count === 0) throw e\n\t\t\t\t\t})\n\t\t\t\t\treturn wrap(next)\n\t\t\t\t}\n\t\t\t\treturn promise\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction hasHeader(args, name) {\n\t\tfor (var key in args.headers) {\n\t\t\tif ({}.hasOwnProperty.call(args.headers, key) && name.test(key)) return true\n\t\t}\n\t\treturn false\n\t}\n\n\treturn {\n\t\trequest: makeRequest(function(url, args, resolve, reject) {\n\t\t\tvar method = args.method != null ? args.method.toUpperCase() : \"GET\"\n\t\t\tvar body = args.body\n\t\t\tvar assumeJSON = (args.serialize == null || args.serialize === JSON.serialize) && !(body instanceof $window.FormData)\n\t\t\tvar responseType = args.responseType || (typeof args.extract === \"function\" ? \"\" : \"json\")\n\n\t\t\tvar xhr = new $window.XMLHttpRequest(), aborted = false\n\t\t\tvar original = xhr, replacedAbort\n\t\t\tvar abort = xhr.abort\n\n\t\t\txhr.abort = function() {\n\t\t\t\taborted = true\n\t\t\t\tabort.call(this)\n\t\t\t}\n\n\t\t\txhr.open(method, url, args.async !== false, typeof args.user === \"string\" ? args.user : undefined, typeof args.password === \"string\" ? args.password : undefined)\n\n\t\t\tif (assumeJSON && body != null && !hasHeader(args, /^content-type$/i)) {\n\t\t\t\txhr.setRequestHeader(\"Content-Type\", \"application/json; charset=utf-8\")\n\t\t\t}\n\t\t\tif (typeof args.deserialize !== \"function\" && !hasHeader(args, /^accept$/i)) {\n\t\t\t\txhr.setRequestHeader(\"Accept\", \"application/json, text/*\")\n\t\t\t}\n\t\t\tif (args.withCredentials) xhr.withCredentials = args.withCredentials\n\t\t\tif (args.timeout) xhr.timeout = args.timeout\n\t\t\txhr.responseType = responseType\n\n\t\t\tfor (var key in args.headers) {\n\t\t\t\tif ({}.hasOwnProperty.call(args.headers, key)) {\n\t\t\t\t\txhr.setRequestHeader(key, args.headers[key])\n\t\t\t\t}\n\t\t\t}\n\n\t\t\txhr.onreadystatechange = function(ev) {\n\t\t\t\t// Don't throw errors on xhr.abort().\n\t\t\t\tif (aborted) return\n\n\t\t\t\tif (ev.target.readyState === 4) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar success = (ev.target.status >= 200 && ev.target.status < 300) || ev.target.status === 304 || (/^file:\\/\\//i).test(url)\n\t\t\t\t\t\t// When the response type isn't \"\" or \"text\",\n\t\t\t\t\t\t// `xhr.responseText` is the wrong thing to use.\n\t\t\t\t\t\t// Browsers do the right thing and throw here, and we\n\t\t\t\t\t\t// should honor that and do the right thing by\n\t\t\t\t\t\t// preferring `xhr.response` where possible/practical.\n\t\t\t\t\t\tvar response = ev.target.response, message\n\n\t\t\t\t\t\tif (responseType === \"json\") {\n\t\t\t\t\t\t\t// For IE and Edge, which don't implement\n\t\t\t\t\t\t\t// `responseType: \"json\"`.\n\t\t\t\t\t\t\tif (!ev.target.responseType && typeof args.extract !== \"function\") response = JSON.parse(ev.target.responseText)\n\t\t\t\t\t\t} else if (!responseType || responseType === \"text\") {\n\t\t\t\t\t\t\t// Only use this default if it's text. If a parsed\n\t\t\t\t\t\t\t// document is needed on old IE and friends (all\n\t\t\t\t\t\t\t// unsupported), the user should use a custom\n\t\t\t\t\t\t\t// `config` instead. They're already using this at\n\t\t\t\t\t\t\t// their own risk.\n\t\t\t\t\t\t\tif (response == null) response = ev.target.responseText\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (typeof args.extract === \"function\") {\n\t\t\t\t\t\t\tresponse = args.extract(ev.target, args)\n\t\t\t\t\t\t\tsuccess = true\n\t\t\t\t\t\t} else if (typeof args.deserialize === \"function\") {\n\t\t\t\t\t\t\tresponse = args.deserialize(response)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (success) resolve(response)\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttry { message = ev.target.responseText }\n\t\t\t\t\t\t\tcatch (e) { message = response }\n\t\t\t\t\t\t\tvar error = new Error(message)\n\t\t\t\t\t\t\terror.code = ev.target.status\n\t\t\t\t\t\t\terror.response = response\n\t\t\t\t\t\t\treject(error)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\treject(e)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (typeof args.config === \"function\") {\n\t\t\t\txhr = args.config(xhr, args, url) || xhr\n\n\t\t\t\t// Propagate the `abort` to any replacement XHR as well.\n\t\t\t\tif (xhr !== original) {\n\t\t\t\t\treplacedAbort = xhr.abort\n\t\t\t\t\txhr.abort = function() {\n\t\t\t\t\t\taborted = true\n\t\t\t\t\t\treplacedAbort.call(this)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (body == null) xhr.send()\n\t\t\telse if (typeof args.serialize === \"function\") xhr.send(args.serialize(body))\n\t\t\telse if (body instanceof $window.FormData) xhr.send(body)\n\t\t\telse xhr.send(JSON.stringify(body))\n\t\t}),\n\t\tjsonp: makeRequest(function(url, args, resolve, reject) {\n\t\t\tvar callbackName = args.callbackName || \"_mithril_\" + Math.round(Math.random() * 1e16) + \"_\" + callbackCount++\n\t\t\tvar script = $window.document.createElement(\"script\")\n\t\t\t$window[callbackName] = function(data) {\n\t\t\t\tdelete $window[callbackName]\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\tresolve(data)\n\t\t\t}\n\t\t\tscript.onerror = function() {\n\t\t\t\tdelete $window[callbackName]\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\treject(new Error(\"JSONP request failed\"))\n\t\t\t}\n\t\t\tscript.src = url + (url.indexOf(\"?\") < 0 ? \"?\" : \"&\") +\n\t\t\t\tencodeURIComponent(args.callbackKey || \"callback\") + \"=\" +\n\t\t\t\tencodeURIComponent(callbackName)\n\t\t\t$window.document.documentElement.appendChild(script)\n\t\t}),\n\t}\n}\n","\"use strict\"\n\nvar mountRedraw = require(\"./mount-redraw\")\n\nmodule.exports = require(\"./api/router\")(window, mountRedraw)\n","\"use strict\"\n\nmodule.exports = require(\"./stream/stream\")\n","/* eslint-disable */\n;(function() {\n\"use strict\"\n/* eslint-enable */\nStream.SKIP = {}\nStream.lift = lift\nStream.scan = scan\nStream.merge = merge\nStream.combine = combine\nStream.scanMerge = scanMerge\nStream[\"fantasy-land/of\"] = Stream\n\nvar warnedHalt = false\nObject.defineProperty(Stream, \"HALT\", {\n\tget: function() {\n\t\twarnedHalt || console.log(\"HALT is deprecated and has been renamed to SKIP\");\n\t\twarnedHalt = true\n\t\treturn Stream.SKIP\n\t}\n})\n\nfunction Stream(value) {\n\tvar dependentStreams = []\n\tvar dependentFns = []\n\n\tfunction stream(v) {\n\t\tif (arguments.length && v !== Stream.SKIP) {\n\t\t\tvalue = v\n\t\t\tif (open(stream)) {\n\t\t\t\tstream._changing()\n\t\t\t\tstream._state = \"active\"\n\t\t\t\tdependentStreams.forEach(function(s, i) { s(dependentFns[i](value)) })\n\t\t\t}\n\t\t}\n\n\t\treturn value\n\t}\n\n\tstream.constructor = Stream\n\tstream._state = arguments.length && value !== Stream.SKIP ? \"active\" : \"pending\"\n\tstream._parents = []\n\n\tstream._changing = function() {\n\t\tif (open(stream)) stream._state = \"changing\"\n\t\tdependentStreams.forEach(function(s) {\n\t\t\ts._changing()\n\t\t})\n\t}\n\n\tstream._map = function(fn, ignoreInitial) {\n\t\tvar target = ignoreInitial ? Stream() : Stream(fn(value))\n\t\ttarget._parents.push(stream)\n\t\tdependentStreams.push(target)\n\t\tdependentFns.push(fn)\n\t\treturn target\n\t}\n\n\tstream.map = function(fn) {\n\t\treturn stream._map(fn, stream._state !== \"active\")\n\t}\n\n\tvar end\n\tfunction createEnd() {\n\t\tend = Stream()\n\t\tend.map(function(value) {\n\t\t\tif (value === true) {\n\t\t\t\tstream._parents.forEach(function (p) {p._unregisterChild(stream)})\n\t\t\t\tstream._state = \"ended\"\n\t\t\t\tstream._parents.length = dependentStreams.length = dependentFns.length = 0\n\t\t\t}\n\t\t\treturn value\n\t\t})\n\t\treturn end\n\t}\n\n\tstream.toJSON = function() { return value != null && typeof value.toJSON === \"function\" ? value.toJSON() : value }\n\n\tstream[\"fantasy-land/map\"] = stream.map\n\tstream[\"fantasy-land/ap\"] = function(x) { return combine(function(s1, s2) { return s1()(s2()) }, [x, stream]) }\n\n\tstream._unregisterChild = function(child) {\n\t\tvar childIndex = dependentStreams.indexOf(child)\n\t\tif (childIndex !== -1) {\n\t\t\tdependentStreams.splice(childIndex, 1)\n\t\t\tdependentFns.splice(childIndex, 1)\n\t\t}\n\t}\n\n\tObject.defineProperty(stream, \"end\", {\n\t\tget: function() { return end || createEnd() }\n\t})\n\n\treturn stream\n}\n\nfunction combine(fn, streams) {\n\tvar ready = streams.every(function(s) {\n\t\tif (s.constructor !== Stream)\n\t\t\tthrow new Error(\"Ensure that each item passed to stream.combine/stream.merge/lift is a stream\")\n\t\treturn s._state === \"active\"\n\t})\n\tvar stream = ready\n\t\t? Stream(fn.apply(null, streams.concat([streams])))\n\t\t: Stream()\n\n\tvar changed = []\n\n\tvar mappers = streams.map(function(s) {\n\t\treturn s._map(function(value) {\n\t\t\tchanged.push(s)\n\t\t\tif (ready || streams.every(function(s) { return s._state !== \"pending\" })) {\n\t\t\t\tready = true\n\t\t\t\tstream(fn.apply(null, streams.concat([changed])))\n\t\t\t\tchanged = []\n\t\t\t}\n\t\t\treturn value\n\t\t}, true)\n\t})\n\n\tvar endStream = stream.end.map(function(value) {\n\t\tif (value === true) {\n\t\t\tmappers.forEach(function(mapper) { mapper.end(true) })\n\t\t\tendStream.end(true)\n\t\t}\n\t\treturn undefined\n\t})\n\n\treturn stream\n}\n\nfunction merge(streams) {\n\treturn combine(function() { return streams.map(function(s) { return s() }) }, streams)\n}\n\nfunction scan(fn, acc, origin) {\n\tvar stream = origin.map(function(v) {\n\t\tvar next = fn(acc, v)\n\t\tif (next !== Stream.SKIP) acc = next\n\t\treturn next\n\t})\n\tstream(acc)\n\treturn stream\n}\n\nfunction scanMerge(tuples, seed) {\n\tvar streams = tuples.map(function(tuple) { return tuple[0] })\n\n\tvar stream = combine(function() {\n\t\tvar changed = arguments[arguments.length - 1]\n\t\tstreams.forEach(function(stream, i) {\n\t\t\tif (changed.indexOf(stream) > -1)\n\t\t\t\tseed = tuples[i][1](seed, stream())\n\t\t})\n\n\t\treturn seed\n\t}, streams)\n\n\tstream(seed)\n\n\treturn stream\n}\n\nfunction lift() {\n\tvar fn = arguments[0]\n\tvar streams = Array.prototype.slice.call(arguments, 1)\n\treturn merge(streams).map(function(streams) {\n\t\treturn fn.apply(undefined, streams)\n\t})\n}\n\nfunction open(s) {\n\treturn s._state === \"pending\" || s._state === \"active\" || s._state === \"changing\"\n}\n\nif (typeof module !== \"undefined\") module[\"exports\"] = Stream\nelse if (typeof window.m === \"function\" && !(\"stream\" in window.m)) window.m.stream = Stream\nelse window.m = {stream : Stream}\n\n}());\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7E]/; // non-ASCII chars\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, fn) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = fn(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(string, fn) {\n\tconst parts = string.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tstring = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tstring = string.replace(regexSeparators, '\\x2E');\n\tconst labels = string.split('.');\n\tconst encoded = map(labels, fn).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = array => String.fromCodePoint(...array);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint - 0x30 < 0x0A) {\n\t\treturn codePoint - 0x16;\n\t}\n\tif (codePoint - 0x41 < 0x1A) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint - 0x61 < 0x1A) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t//  0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tlet oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tlet inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tlet basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue == n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.1.0',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode };\nexport default punycode;\n","/* jshint browser: true */\n\n(function () {\n\n// We'll copy the properties below into the mirror div.\n// Note that some browsers, such as Firefox, do not concatenate properties\n// into their shorthand (e.g. padding-top, padding-bottom etc. -> padding),\n// so we have to list every single property explicitly.\nvar properties = [\n  'direction',  // RTL support\n  'boxSizing',\n  'width',  // on Chrome and IE, exclude the scrollbar, so the mirror div wraps exactly as the textarea does\n  'height',\n  'overflowX',\n  'overflowY',  // copy the scrollbar for IE\n\n  'borderTopWidth',\n  'borderRightWidth',\n  'borderBottomWidth',\n  'borderLeftWidth',\n  'borderStyle',\n\n  'paddingTop',\n  'paddingRight',\n  'paddingBottom',\n  'paddingLeft',\n\n  // https://developer.mozilla.org/en-US/docs/Web/CSS/font\n  'fontStyle',\n  'fontVariant',\n  'fontWeight',\n  'fontStretch',\n  'fontSize',\n  'fontSizeAdjust',\n  'lineHeight',\n  'fontFamily',\n\n  'textAlign',\n  'textTransform',\n  'textIndent',\n  'textDecoration',  // might not make a difference, but better be safe\n\n  'letterSpacing',\n  'wordSpacing',\n\n  'tabSize',\n  'MozTabSize'\n\n];\n\nvar isBrowser = (typeof window !== 'undefined');\nvar isFirefox = (isBrowser && window.mozInnerScreenX != null);\n\nfunction getCaretCoordinates(element, position, options) {\n  if (!isBrowser) {\n    throw new Error('textarea-caret-position#getCaretCoordinates should only be called in a browser');\n  }\n\n  var debug = options && options.debug || false;\n  if (debug) {\n    var el = document.querySelector('#input-textarea-caret-position-mirror-div');\n    if (el) el.parentNode.removeChild(el);\n  }\n\n  // The mirror div will replicate the textarea's style\n  var div = document.createElement('div');\n  div.id = 'input-textarea-caret-position-mirror-div';\n  document.body.appendChild(div);\n\n  var style = div.style;\n  var computed = window.getComputedStyle ? window.getComputedStyle(element) : element.currentStyle;  // currentStyle for IE < 9\n  var isInput = element.nodeName === 'INPUT';\n\n  // Default textarea styles\n  style.whiteSpace = 'pre-wrap';\n  if (!isInput)\n    style.wordWrap = 'break-word';  // only for textarea-s\n\n  // Position off-screen\n  style.position = 'absolute';  // required to return coordinates properly\n  if (!debug)\n    style.visibility = 'hidden';  // not 'display: none' because we want rendering\n\n  // Transfer the element's properties to the div\n  properties.forEach(function (prop) {\n    if (isInput && prop === 'lineHeight') {\n      // Special case for <input>s because text is rendered centered and line height may be != height\n      style.lineHeight = computed.height;\n    } else {\n      style[prop] = computed[prop];\n    }\n  });\n\n  if (isFirefox) {\n    // Firefox lies about the overflow property for textareas: https://bugzilla.mozilla.org/show_bug.cgi?id=984275\n    if (element.scrollHeight > parseInt(computed.height))\n      style.overflowY = 'scroll';\n  } else {\n    style.overflow = 'hidden';  // for Chrome to not render a scrollbar; IE keeps overflowY = 'scroll'\n  }\n\n  div.textContent = element.value.substring(0, position);\n  // The second special handling for input type=\"text\" vs textarea:\n  // spaces need to be replaced with non-breaking spaces - http://stackoverflow.com/a/13402035/1269037\n  if (isInput)\n    div.textContent = div.textContent.replace(/\\s/g, '\\u00a0');\n\n  var span = document.createElement('span');\n  // Wrapping must be replicated *exactly*, including when a long word gets\n  // onto the next line, with whitespace at the end of the line before (#7).\n  // The  *only* reliable way to do that is to copy the *entire* rest of the\n  // textarea's content into the <span> created at the caret position.\n  // For inputs, just '.' would be enough, but no need to bother.\n  span.textContent = element.value.substring(position) || '.';  // || because a completely empty faux span doesn't render at all\n  div.appendChild(span);\n\n  var coordinates = {\n    top: span.offsetTop + parseInt(computed['borderTopWidth']),\n    left: span.offsetLeft + parseInt(computed['borderLeftWidth']),\n    height: parseInt(computed['lineHeight'])\n  };\n\n  if (debug) {\n    span.style.backgroundColor = '#aaa';\n  } else {\n    document.body.removeChild(div);\n  }\n\n  return coordinates;\n}\n\nif (typeof module != 'undefined' && typeof module.exports != 'undefined') {\n  module.exports = getCaretCoordinates;\n} else if(isBrowser) {\n  window.getCaretCoordinates = getCaretCoordinates;\n}\n\n}());\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../../babel-loader/lib/index.js??ruleSet[1].rules[0]!./jquery.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"$\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"$\"] = ___EXPOSE_LOADER_IMPORT___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"jQuery\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"jQuery\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../../babel-loader/lib/index.js??ruleSet[1].rules[0]!./color-thief.min.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"ColorThief\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"ColorThief\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../babel-loader/lib/index.js??ruleSet[1].rules[0]!./dayjs.min.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"dayjs\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"dayjs\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../babel-loader/lib/index.js??ruleSet[1].rules[0]!./index.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"m\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"m\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../babel-loader/lib/index.js??ruleSet[1].rules[0]!./punycode.es6.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"punycode\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"punycode\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","function _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n  for (var i = 0, arr2 = new Array(len); i < len; i++) {\n    arr2[i] = arr[i];\n  }\n  return arr2;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayWithHoles(arr) {\n  if (Array.isArray(arr)) return arr;\n}\nmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n  return self;\n}\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _defineProperties(target, props) {\n  for (var i = 0; i < props.length; i++) {\n    var descriptor = props[i];\n    descriptor.enumerable = descriptor.enumerable || false;\n    descriptor.configurable = true;\n    if (\"value\" in descriptor) descriptor.writable = true;\n    Object.defineProperty(target, descriptor.key, descriptor);\n  }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  Object.defineProperty(Constructor, \"prototype\", {\n    writable: false\n  });\n  return Constructor;\n}\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n  return obj;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _getPrototypeOf(o) {\n  module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n    return o.__proto__ || Object.getPrototypeOf(o);\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  return _getPrototypeOf(o);\n}\nmodule.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\nfunction _inherits(subClass, superClass) {\n  if (typeof superClass !== \"function\" && superClass !== null) {\n    throw new TypeError(\"Super expression must either be null or a function\");\n  }\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      writable: true,\n      configurable: true\n    }\n  });\n  Object.defineProperty(subClass, \"prototype\", {\n    writable: false\n  });\n  if (superClass) setPrototypeOf(subClass, superClass);\n}\nmodule.exports = _inherits, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArrayLimit(arr, i) {\n  var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n  if (_i == null) return;\n  var _arr = [];\n  var _n = true;\n  var _d = false;\n  var _s, _e;\n  try {\n    for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n      _arr.push(_s.value);\n      if (i && _arr.length === i) break;\n    }\n  } catch (err) {\n    _d = true;\n    _e = err;\n  } finally {\n    try {\n      if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n    } finally {\n      if (_d) throw _e;\n    }\n  }\n  return _arr;\n}\nmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableRest() {\n  throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\nfunction _possibleConstructorReturn(self, call) {\n  if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n    return call;\n  } else if (call !== void 0) {\n    throw new TypeError(\"Derived constructors may only return object or undefined\");\n  }\n  return assertThisInitialized(self);\n}\nmodule.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n  \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n  module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n    return exports;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  var exports = {},\n    Op = Object.prototype,\n    hasOwn = Op.hasOwnProperty,\n    defineProperty = Object.defineProperty || function (obj, key, desc) {\n      obj[key] = desc.value;\n    },\n    $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n    iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n    asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n    toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n  function define(obj, key, value) {\n    return Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: !0,\n      configurable: !0,\n      writable: !0\n    }), obj[key];\n  }\n  try {\n    define({}, \"\");\n  } catch (err) {\n    define = function define(obj, key, value) {\n      return obj[key] = value;\n    };\n  }\n  function wrap(innerFn, outerFn, self, tryLocsList) {\n    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n      generator = Object.create(protoGenerator.prototype),\n      context = new Context(tryLocsList || []);\n    return defineProperty(generator, \"_invoke\", {\n      value: makeInvokeMethod(innerFn, self, context)\n    }), generator;\n  }\n  function tryCatch(fn, obj, arg) {\n    try {\n      return {\n        type: \"normal\",\n        arg: fn.call(obj, arg)\n      };\n    } catch (err) {\n      return {\n        type: \"throw\",\n        arg: err\n      };\n    }\n  }\n  exports.wrap = wrap;\n  var ContinueSentinel = {};\n  function Generator() {}\n  function GeneratorFunction() {}\n  function GeneratorFunctionPrototype() {}\n  var IteratorPrototype = {};\n  define(IteratorPrototype, iteratorSymbol, function () {\n    return this;\n  });\n  var getProto = Object.getPrototypeOf,\n    NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n  NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n  var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n  function defineIteratorMethods(prototype) {\n    [\"next\", \"throw\", \"return\"].forEach(function (method) {\n      define(prototype, method, function (arg) {\n        return this._invoke(method, arg);\n      });\n    });\n  }\n  function AsyncIterator(generator, PromiseImpl) {\n    function invoke(method, arg, resolve, reject) {\n      var record = tryCatch(generator[method], generator, arg);\n      if (\"throw\" !== record.type) {\n        var result = record.arg,\n          value = result.value;\n        return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n          invoke(\"next\", value, resolve, reject);\n        }, function (err) {\n          invoke(\"throw\", err, resolve, reject);\n        }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n          result.value = unwrapped, resolve(result);\n        }, function (error) {\n          return invoke(\"throw\", error, resolve, reject);\n        });\n      }\n      reject(record.arg);\n    }\n    var previousPromise;\n    defineProperty(this, \"_invoke\", {\n      value: function value(method, arg) {\n        function callInvokeWithMethodAndArg() {\n          return new PromiseImpl(function (resolve, reject) {\n            invoke(method, arg, resolve, reject);\n          });\n        }\n        return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n      }\n    });\n  }\n  function makeInvokeMethod(innerFn, self, context) {\n    var state = \"suspendedStart\";\n    return function (method, arg) {\n      if (\"executing\" === state) throw new Error(\"Generator is already running\");\n      if (\"completed\" === state) {\n        if (\"throw\" === method) throw arg;\n        return doneResult();\n      }\n      for (context.method = method, context.arg = arg;;) {\n        var delegate = context.delegate;\n        if (delegate) {\n          var delegateResult = maybeInvokeDelegate(delegate, context);\n          if (delegateResult) {\n            if (delegateResult === ContinueSentinel) continue;\n            return delegateResult;\n          }\n        }\n        if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n          if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n          context.dispatchException(context.arg);\n        } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n        state = \"executing\";\n        var record = tryCatch(innerFn, self, context);\n        if (\"normal\" === record.type) {\n          if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n          return {\n            value: record.arg,\n            done: context.done\n          };\n        }\n        \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n      }\n    };\n  }\n  function maybeInvokeDelegate(delegate, context) {\n    var method = delegate.iterator[context.method];\n    if (undefined === method) {\n      if (context.delegate = null, \"throw\" === context.method) {\n        if (delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method)) return ContinueSentinel;\n        context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a 'throw' method\");\n      }\n      return ContinueSentinel;\n    }\n    var record = tryCatch(method, delegate.iterator, context.arg);\n    if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n    var info = record.arg;\n    return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n  }\n  function pushTryEntry(locs) {\n    var entry = {\n      tryLoc: locs[0]\n    };\n    1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n  }\n  function resetTryEntry(entry) {\n    var record = entry.completion || {};\n    record.type = \"normal\", delete record.arg, entry.completion = record;\n  }\n  function Context(tryLocsList) {\n    this.tryEntries = [{\n      tryLoc: \"root\"\n    }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n  }\n  function values(iterable) {\n    if (iterable) {\n      var iteratorMethod = iterable[iteratorSymbol];\n      if (iteratorMethod) return iteratorMethod.call(iterable);\n      if (\"function\" == typeof iterable.next) return iterable;\n      if (!isNaN(iterable.length)) {\n        var i = -1,\n          next = function next() {\n            for (; ++i < iterable.length;) {\n              if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n            }\n            return next.value = undefined, next.done = !0, next;\n          };\n        return next.next = next;\n      }\n    }\n    return {\n      next: doneResult\n    };\n  }\n  function doneResult() {\n    return {\n      value: undefined,\n      done: !0\n    };\n  }\n  return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n    value: GeneratorFunctionPrototype,\n    configurable: !0\n  }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n    value: GeneratorFunction,\n    configurable: !0\n  }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n    var ctor = \"function\" == typeof genFun && genFun.constructor;\n    return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n  }, exports.mark = function (genFun) {\n    return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n  }, exports.awrap = function (arg) {\n    return {\n      __await: arg\n    };\n  }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n    return this;\n  }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n    void 0 === PromiseImpl && (PromiseImpl = Promise);\n    var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n    return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n      return result.done ? result.value : iter.next();\n    });\n  }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n    return this;\n  }), define(Gp, \"toString\", function () {\n    return \"[object Generator]\";\n  }), exports.keys = function (val) {\n    var object = Object(val),\n      keys = [];\n    for (var key in object) {\n      keys.push(key);\n    }\n    return keys.reverse(), function next() {\n      for (; keys.length;) {\n        var key = keys.pop();\n        if (key in object) return next.value = key, next.done = !1, next;\n      }\n      return next.done = !0, next;\n    };\n  }, exports.values = values, Context.prototype = {\n    constructor: Context,\n    reset: function reset(skipTempReset) {\n      if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {\n        \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n      }\n    },\n    stop: function stop() {\n      this.done = !0;\n      var rootRecord = this.tryEntries[0].completion;\n      if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n      return this.rval;\n    },\n    dispatchException: function dispatchException(exception) {\n      if (this.done) throw exception;\n      var context = this;\n      function handle(loc, caught) {\n        return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n      }\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i],\n          record = entry.completion;\n        if (\"root\" === entry.tryLoc) return handle(\"end\");\n        if (entry.tryLoc <= this.prev) {\n          var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n            hasFinally = hasOwn.call(entry, \"finallyLoc\");\n          if (hasCatch && hasFinally) {\n            if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n            if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n          } else if (hasCatch) {\n            if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n          } else {\n            if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n            if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n          }\n        }\n      }\n    },\n    abrupt: function abrupt(type, arg) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n          var finallyEntry = entry;\n          break;\n        }\n      }\n      finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n      var record = finallyEntry ? finallyEntry.completion : {};\n      return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n    },\n    complete: function complete(record, afterLoc) {\n      if (\"throw\" === record.type) throw record.arg;\n      return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n    },\n    finish: function finish(finallyLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n      }\n    },\n    \"catch\": function _catch(tryLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc === tryLoc) {\n          var record = entry.completion;\n          if (\"throw\" === record.type) {\n            var thrown = record.arg;\n            resetTryEntry(entry);\n          }\n          return thrown;\n        }\n      }\n      throw new Error(\"illegal catch attempt\");\n    },\n    delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n      return this.delegate = {\n        iterator: values(iterable),\n        resultName: resultName,\n        nextLoc: nextLoc\n      }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n    }\n  }, exports;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _setPrototypeOf(o, p) {\n  module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  return _setPrototypeOf(o, p);\n}\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithHoles = require(\"./arrayWithHoles.js\");\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableRest = require(\"./nonIterableRest.js\");\nfunction _slicedToArray(arr, i) {\n  return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n    return typeof obj;\n  } : function (obj) {\n    return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n  regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n  if (typeof globalThis === \"object\") {\n    globalThis.regeneratorRuntime = runtime;\n  } else {\n    Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n  }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","function bidi(node, prop) {\n  var type = node.tag === 'select' ? (node.attrs.multi ? 'multi' : 'select') : node.attrs.type;\n\n  // Setup: bind listeners\n  if (type === 'multi') {\n    node.attrs.onchange = function () {\n      prop(\n        [].slice.call(this.selectedOptions, function (x) {\n          return x.value;\n        })\n      );\n    };\n  } else if (type === 'select') {\n    node.attrs.onchange = function (e) {\n      prop(this.selectedOptions[0].value);\n    };\n  } else if (type === 'checkbox') {\n    node.attrs.onchange = function (e) {\n      prop(this.checked);\n    };\n  } else {\n    node.attrs.onchange = node.attrs.oninput = function (e) {\n      prop(this.value);\n    };\n  }\n\n  if (node.tag === 'select') {\n    node.children.forEach(function (option) {\n      if (option.attrs.value === prop() || option.children[0] === prop()) {\n        option.attrs.selected = true;\n      }\n    });\n  } else if (type === 'checkbox') {\n    node.attrs.checked = prop();\n  } else if (type === 'radio') {\n    node.attrs.checked = prop() === node.attrs.value;\n  } else {\n    node.attrs.value = prop();\n  }\n\n  node.attrs.bidi = null;\n\n  return node;\n}\n\nbidi.view = function (ctrl, node, prop) {\n  return bidi(node, node.attrs.bidi);\n};\n\nexport default bidi;\n","import bidi from './bidi';\n\nexport default function patchMithril(global) {\n  const defaultMithril = global.m;\n\n  const modifiedMithril = function (comp, ...args) {\n    const node = defaultMithril.apply(this, arguments);\n\n    if (!node.attrs) node.attrs = {};\n\n    // Allows the use of the bidi attr.\n    if (node.attrs.bidi) {\n      bidi(node, node.attrs.bidi);\n    }\n\n    return node;\n  };\n\n  Object.keys(defaultMithril).forEach((key) => (modifiedMithril[key] = defaultMithril[key]));\n\n  global.m = modifiedMithril;\n}\n","import type Application from './Application';\n\n// Used to fix typings\nconst w = window as any;\n\n/**\n * Proxy app. Common JS is run first, at which point `window.app` is not\n * set as this is done by the namespaced JS.\n *\n * When the corrent value is set, this code would retain the reference to\n * the original invalid value.\n *\n * By using a proxy, we can ensure that our `window.app` value is always\n * up-to-date with the latest reference.\n */\nconst appProxy = new Proxy(\n  {},\n  {\n    get(_, properties) {\n      return Reflect.get(w.app, properties, w.app);\n    },\n    set(_, properties, value) {\n      return Reflect.set(w.app, properties, value, w.app);\n    },\n  }\n);\n\n/**\n * The instance of Application within the common namespace.\n */\nexport default appProxy as Application;\n","// Expose jQuery, mithril and dayjs to the window browser object\nimport 'expose-loader?exposes=$,jQuery!jquery';\nimport 'expose-loader?exposes=m!mithril';\nimport 'expose-loader?exposes=dayjs!dayjs';\n\nimport 'bootstrap/js/affix';\nimport 'bootstrap/js/dropdown';\nimport 'bootstrap/js/tooltip';\nimport 'bootstrap/js/transition';\nimport 'jquery.hotkeys/jquery.hotkeys';\n\nimport relativeTime from 'dayjs/plugin/relativeTime';\nimport localizedFormat from 'dayjs/plugin/localizedFormat';\n\ndayjs.extend(relativeTime);\ndayjs.extend(localizedFormat);\n\nimport patchMithril from './utils/patchMithril';\n\npatchMithril(window);\n\nimport app from './app';\n\nexport { app };\n\nimport './utils/arrayFlatPolyfill';\n\nconst tooltipGen = $.fn.tooltip;\n\n// Remove in a future version of Flarum.\n// @ts-ignore\n$.fn.tooltip = function (options, caller) {\n  // Show a warning when `$.tooltip` is used outside of the Tooltip component.\n  // This functionality is deprecated and should not be used.\n  if (!['DANGEROUS_tooltip_jquery_fn_deprecation_exempt'].includes(caller)) {\n    console.warn(\n      \"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\"\n    );\n  }\n\n  tooltipGen.bind(this)(options);\n};\n","export default function _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n  return self;\n}","export default function _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n  return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n  setPrototypeOf(subClass, superClass);\n}","export default function _extends() {\n  _extends = Object.assign ? Object.assign.bind() : function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n    return target;\n  };\n  return _extends.apply(this, arguments);\n}","import type Mithril from 'mithril';\n\n/**\n * Mithril 2 does not completely rerender the page if a route change leads to the same route\n * (or the same component handling a different route). This util calls m.route.set, forcing a reonit.\n *\n * @see https://mithril.js.org/route.html#key-parameter\n */\nexport default function setRouteWithForcedRefresh(route: string, params = null, options: Mithril.RouteOptions = {}) {\n  const newOptions = { ...options };\n  newOptions.state = newOptions.state || {};\n  newOptions.state.key = Date.now();\n\n  m.route.set(route, params, newOptions);\n}\n","import setRouteWithForcedRefresh from '../../common/utils/setRouteWithForcedRefresh';\nimport IHistory, { HistoryEntry } from '../../common/IHistory';\n\n/**\n * The `History` class keeps track and manages a stack of routes that the user\n * has navigated to in their session.\n *\n * An item can be pushed to the top of the stack using the `push` method. An\n * item in the stack has a name and a URL. The name need not be unique; if it is\n * the same as the item before it, that will be overwritten with the new URL. In\n * this way, if a user visits a discussion, and then visits another discussion,\n * popping the history stack will still take them back to the discussion list\n * rather than the previous discussion.\n */\nexport default class History implements IHistory {\n  /**\n   * The stack of routes that have been navigated to.\n   */\n  protected stack: HistoryEntry[] = [];\n\n  /**\n   * Get the item on the top of the stack.\n   */\n  getCurrent(): HistoryEntry {\n    return this.stack[this.stack.length - 1];\n  }\n\n  /**\n   * Get the previous item on the stack.\n   */\n  getPrevious(): HistoryEntry {\n    return this.stack[this.stack.length - 2];\n  }\n\n  /**\n   * Push an item to the top of the stack.\n   *\n   * @param {string} name The name of the route.\n   * @param {string} title The title of the route.\n   * @param {string} [url] The URL of the route. The current URL will be used if\n   *     not provided.\n   */\n  push(name: string, title: string, url = m.route.get()) {\n    // If we're pushing an item with the same name as second-to-top item in the\n    // stack, we will assume that the user has clicked the 'back' button in\n    // their browser. In this case, we don't want to push a new item, so we will\n    // pop off the top item, and then the second-to-top item will be overwritten\n    // below.\n    const secondTop = this.stack[this.stack.length - 2];\n    if (secondTop && secondTop.name === name) {\n      this.stack.pop();\n    }\n\n    // If we're pushing an item with the same name as the top item in the stack,\n    // then we'll overwrite it with the new URL.\n    const top = this.getCurrent();\n    if (top && top.name === name) {\n      Object.assign(top, { url, title });\n    } else {\n      this.stack.push({ name, url, title });\n    }\n  }\n\n  /**\n   * Check whether or not the history stack is able to be popped.\n   */\n  canGoBack(): boolean {\n    return this.stack.length > 1;\n  }\n\n  /**\n   * Go back to the previous route in the history stack.\n   */\n  back() {\n    if (!this.canGoBack()) {\n      return this.home();\n    }\n\n    this.stack.pop();\n\n    m.route.set(this.getCurrent().url);\n  }\n\n  /**\n   * Get the URL of the previous page.\n   */\n  backUrl(): string {\n    const secondTop = this.stack[this.stack.length - 2];\n\n    return secondTop.url;\n  }\n\n  /**\n   * Go to the first route in the history stack.\n   */\n  home() {\n    this.stack.splice(0);\n\n    setRouteWithForcedRefresh('/');\n  }\n}\n","/**\n * The `Pane` class manages the page's discussion list sidepane. The pane is a\n * part of the content view (DiscussionPage component), but its visibility is\n * determined by CSS classes applied to the outer page element. This class\n * manages the application of those CSS classes.\n */\nexport default class Pane {\n  constructor(element) {\n    /**\n     * The localStorage key to store the pane's pinned state with.\n     *\n     * @type {String}\n     * @protected\n     */\n    this.pinnedKey = 'panePinned';\n\n    /**\n     * The page element.\n     *\n     * @type {jQuery}\n     * @protected\n     */\n    this.$element = $(element);\n\n    /**\n     * Whether or not the pane is currently pinned.\n     *\n     * @type {Boolean}\n     * @protected\n     */\n    this.pinned = localStorage.getItem(this.pinnedKey) === 'true';\n\n    /**\n     * Whether or not the pane is currently exists.\n     *\n     * @type {Boolean}\n     * @protected\n     */\n    this.active = false;\n\n    /**\n     * Whether or not the pane is currently showing, or is hidden off the edge\n     * of the screen.\n     *\n     * @type {Boolean}\n     * @protected\n     */\n    this.showing = false;\n\n    this.render();\n  }\n\n  /**\n   * Enable the pane.\n   */\n  enable() {\n    this.active = true;\n    this.render();\n  }\n\n  /**\n   * Disable the pane.\n   */\n  disable() {\n    this.active = false;\n    this.showing = false;\n    this.render();\n  }\n\n  /**\n   * Show the pane.\n   */\n  show() {\n    clearTimeout(this.hideTimeout);\n    this.showing = true;\n    this.render();\n  }\n\n  /**\n   * Hide the pane.\n   */\n  hide() {\n    this.showing = false;\n    this.render();\n  }\n\n  /**\n   * Begin a timeout to hide the pane, which can be cancelled by showing the\n   * pane.\n   */\n  onmouseleave() {\n    this.hideTimeout = setTimeout(this.hide.bind(this), 250);\n  }\n\n  /**\n   * Toggle whether or not the pane is pinned.\n   */\n  togglePinned() {\n    this.pinned = !this.pinned;\n\n    localStorage.setItem(this.pinnedKey, this.pinned ? 'true' : 'false');\n\n    this.render();\n  }\n\n  /**\n   * Apply the appropriate CSS classes to the page element.\n   *\n   * @protected\n   */\n  render() {\n    this.$element.toggleClass('panePinned', this.pinned).toggleClass('hasPane', this.active).toggleClass('paneShowing', this.showing);\n  }\n}\n","import type Mithril from 'mithril';\n\nexport interface ComponentAttrs extends Mithril.Attributes {}\n\n/**\n * The `Component` class defines a user interface 'building block'. A component\n * generates a virtual DOM to be rendered on each redraw.\n *\n * Essentially, this is a wrapper for Mithril's components that adds several useful features:\n *\n *  - In the `oninit` and `onbeforeupdate` lifecycle hooks, we store vnode attrs in `this.attrs.\n *    This allows us to use attrs across components without having to pass the vnode to every single\n *    method.\n *  - The static `initAttrs` method allows a convenient way to provide defaults (or to otherwise modify)\n *    the attrs that have been passed into a component.\n *  - When the component is created in the DOM, we store its DOM element under `this.element`; this lets\n *    us use jQuery to modify child DOM state from internal methods via the `this.$()` method.\n *  - A convenience `component` method, which serves as an alternative to hyperscript and JSX.\n *\n * As with other Mithril components, components extending Component can be initialized\n * and nested using JSX, hyperscript, or a combination of both. The `component` method can also\n * be used.\n *\n * @example\n * return m('div', <MyComponent foo=\"bar\"><p>Hello World</p></MyComponent>);\n *\n * @example\n * return m('div', MyComponent.component({foo: 'bar'), m('p', 'Hello World!'));\n *\n * @see https://mithril.js.org/components.html\n */\nexport default abstract class Component<Attrs extends ComponentAttrs = ComponentAttrs, State = undefined> implements Mithril.ClassComponent<Attrs> {\n  /**\n   * The root DOM element for the component.\n   */\n  element!: Element;\n\n  /**\n   * The attributes passed into the component.\n   *\n   * @see https://mithril.js.org/components.html#passing-data-to-components\n   */\n  attrs!: Attrs;\n\n  /**\n   * Class component state that is persisted between redraws.\n   *\n   * Updating this will **not** automatically trigger a redraw, unlike\n   * other frameworks.\n   *\n   * This is different to Vnode state, which is always an instance of your\n   * class component.\n   *\n   * This is `undefined` by default.\n   */\n  state!: State;\n\n  /**\n   * @inheritdoc\n   */\n  abstract view(vnode: Mithril.Vnode<Attrs, this>): Mithril.Children;\n\n  /**\n   * @inheritdoc\n   */\n  oninit(vnode: Mithril.Vnode<Attrs, this>) {\n    this.setAttrs(vnode.attrs);\n  }\n\n  /**\n   * @inheritdoc\n   */\n  oncreate(vnode: Mithril.VnodeDOM<Attrs, this>) {\n    this.element = vnode.dom;\n  }\n\n  /**\n   * @inheritdoc\n   */\n  onbeforeupdate(vnode: Mithril.VnodeDOM<Attrs, this>) {\n    this.setAttrs(vnode.attrs);\n  }\n\n  /**\n   * @inheritdoc\n   */\n  onupdate(vnode: Mithril.VnodeDOM<Attrs, this>) {}\n\n  /**\n   * @inheritdoc\n   */\n  onbeforeremove(vnode: Mithril.VnodeDOM<Attrs, this>) {}\n\n  /**\n   * @inheritdoc\n   */\n  onremove(vnode: Mithril.VnodeDOM<Attrs, this>) {}\n\n  /**\n   * Returns a jQuery object for this component's element. If you pass in a\n   * selector string, this method will return a jQuery object, using the current\n   * element as its buffer.\n   *\n   * For example, calling `component.$('li')` will return a jQuery object\n   * containing all of the `li` elements inside the DOM element of this\n   * component.\n   *\n   * @param [selector] a jQuery-compatible selector string\n   * @returns the jQuery object for the DOM node\n   * @final\n   */\n  $(selector?: string): JQuery {\n    const $element = $(this.element) as JQuery<HTMLElement>;\n\n    return selector ? $element.find(selector) : $element;\n  }\n\n  /**\n   * Convenience method to attach a component without JSX.\n   * Has the same effect as calling `m(THIS_CLASS, attrs, children)`.\n   *\n   * @see https://mithril.js.org/hyperscript.html#mselector,-attributes,-children\n   */\n  static component<SAttrs extends ComponentAttrs = ComponentAttrs>(attrs: SAttrs = {} as SAttrs, children: Mithril.Children = null): Mithril.Vnode {\n    const componentAttrs = { ...attrs };\n\n    return m(this as any, componentAttrs, children);\n  }\n\n  /**\n   * Saves a reference to the vnode attrs after running them through initAttrs,\n   * and checking for common issues.\n   */\n  private setAttrs(attrs: Attrs = {} as Attrs): void {\n    (this.constructor as typeof Component).initAttrs(attrs);\n\n    if (attrs) {\n      if ('children' in attrs) {\n        throw new Error(\n          `[${\n            (this.constructor as typeof Component).name\n          }] The \"children\" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute`\n        );\n      }\n\n      if ('tag' in attrs) {\n        throw new Error(`[${(this.constructor as typeof Component).name}] You cannot use the \"tag\" attribute name with Mithril 2.`);\n      }\n    }\n\n    this.attrs = attrs;\n  }\n\n  /**\n   * Initialize the component's attrs.\n   *\n   * This can be used to assign default values for missing, optional attrs.\n   */\n  static initAttrs(attrs: unknown): void {}\n}\n","/**\n * Check if class A is the same as or a subclass of class B.\n */\nexport default function subclassOf(A, B) {\n  return A && (A === B || A.prototype instanceof B);\n}\n","import subclassOf from '../../common/utils/subclassOf';\n\nexport default class PageState {\n  constructor(type, data = {}) {\n    this.type = type;\n    this.data = data;\n  }\n\n  /**\n   * Determine whether the page matches the given class and data.\n   *\n   * @param {object} type The page class to check against. Subclasses are accepted as well.\n   * @param {Record<string, unknown>} data\n   * @return {boolean}\n   */\n  matches(type, data = {}) {\n    // Fail early when the page is of a different type\n    if (!subclassOf(this.type, type)) return false;\n\n    // Now that the type is known to be correct, we loop through the provided\n    // data to see whether it matches the data in our state.\n    return Object.keys(data).every((key) => this.data[key] === data[key]);\n  }\n\n  get(key) {\n    return this.data[key];\n  }\n\n  set(key, value) {\n    this.data[key] = value;\n  }\n}\n","import type Mithril from 'mithril';\nimport app from '../app';\nimport Component from '../Component';\nimport PageState from '../states/PageState';\n\nexport interface IPageAttrs {\n  key?: number;\n  routeName: string;\n}\n\n/**\n * The `Page` component\n *\n * @abstract\n */\nexport default abstract class Page<CustomAttrs extends IPageAttrs = IPageAttrs, CustomState = undefined> extends Component<CustomAttrs, CustomState> {\n  /**\n   * A class name to apply to the body while the route is active.\n   */\n  protected bodyClass = '';\n\n  /**\n   * Whether we should scroll to the top of the page when its rendered.\n   */\n  protected scrollTopOnCreate = true;\n\n  /**\n   * Whether the browser should restore scroll state on refreshes.\n   */\n  protected useBrowserScrollRestoration = true;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    app.previous = app.current;\n    app.current = new PageState(this.constructor, { routeName: this.attrs.routeName });\n\n    app.drawer.hide();\n    app.modal.close();\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    if (this.bodyClass) {\n      $('#app').addClass(this.bodyClass);\n    }\n\n    if (this.scrollTopOnCreate) {\n      $(window).scrollTop(0);\n    }\n\n    if ('scrollRestoration' in history) {\n      history.scrollRestoration = this.useBrowserScrollRestoration ? 'auto' : 'manual';\n    }\n  }\n\n  onremove(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onremove(vnode);\n\n    if (this.bodyClass) {\n      $('#app').removeClass(this.bodyClass);\n    }\n  }\n}\n","function _defineProperties(target, props) {\n  for (var i = 0; i < props.length; i++) {\n    var descriptor = props[i];\n    descriptor.enumerable = descriptor.enumerable || false;\n    descriptor.configurable = true;\n    if (\"value\" in descriptor) descriptor.writable = true;\n    Object.defineProperty(target, descriptor.key, descriptor);\n  }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  Object.defineProperty(Constructor, \"prototype\", {\n    writable: false\n  });\n  return Constructor;\n}","/**\n * Returns if the passed value is an object.\n *\n * In this context, \"object\" refers to **any non-primitive value**, including\n * arrays, function, maps, dates, and more.\n *\n * @example\n * isObject({}); // true\n * @example\n * isObject([]); // true\n * @example\n * isObject(function () {}); // true\n * @example\n * isObject(Object(1)); // true\n * @example\n * isObject(null); // false\n * @example\n * isObject(1); // false\n * @example\n * isObject(\"hello world\"); // false\n *\n * @see https://github.com/jashkenas/underscore/blob/943977e34e2279503528a71ddcc2dd5f96483945/underscore.js#L87-L91\n */\nexport default function isObject(obj: unknown): obj is object {\n  const type = typeof obj;\n  return type === 'function' || (type === 'object' && !!obj);\n}\n","import isObject from './isObject';\n\nexport interface IItemObject<T> {\n  content: T;\n  itemName: string;\n  priority: number;\n}\n\nclass Item<T> {\n  content: T;\n  priority: number;\n\n  constructor(content: T, priority: number) {\n    this.content = content;\n    this.priority = priority;\n  }\n}\n\n/**\n * The `ItemList` class collects items and then arranges them into an array\n * by priority.\n */\nexport default class ItemList<T> {\n  /**\n   * The items in the list.\n   */\n  protected _items: Record<string, Item<T>> = {};\n\n  // TODO: [Flarum 2.0] Remove `.items` getter.\n  /**\n   * A **read-only copy** of items in the list.\n   *\n   * We don't allow adding new items to the ItemList via setting new properties,\n   * nor do we allow modifying existing items directly.\n   *\n   * @deprecated Use {@link ItemList.toObject} instead.\n   */\n  get items(): DeepReadonly<Record<string, Item<T>>> {\n    return new Proxy(this._items, {\n      set() {\n        console.warn('Modifying `ItemList.items` is not allowed.');\n        return false;\n      },\n    });\n  }\n\n  /**\n   * Check whether the list is empty.\n   */\n  isEmpty(): boolean {\n    return Object.keys(this._items).length === 0;\n  }\n\n  /**\n   * Check whether an item is present in the list.\n   */\n  has(key: string): boolean {\n    return Object.keys(this._items).includes(key);\n  }\n\n  /**\n   * Get the content of an item.\n   */\n  get(key: string): T {\n    return this._items[key].content;\n  }\n\n  /**\n   * Get the priority of an item.\n   */\n  getPriority(key: string): number {\n    return this._items[key].priority;\n  }\n\n  /**\n   * Add an item to the list.\n   *\n   * @param key A unique key for the item.\n   * @param content The item's content.\n   * @param priority The priority of the item. Items with a higher priority\n   * will be positioned before items with a lower priority.\n   */\n  add(key: string, content: T, priority: number = 0): this {\n    this._items[key] = new Item(content, priority);\n\n    return this;\n  }\n\n  // TODO: [Flarum 2.0] Remove deprecated `.replace()` method.\n  /**\n   * Replace an item and/or priority in the list, only if it is already present.\n   *\n   * If `content` or `priority` are `null`, these values will not be replaced.\n   *\n   * If the provided `key` is not present, nothing will happen.\n   *\n   * @deprecated Please use the {@link ItemList.setContent} and {@link ItemList.setPriority}\n   * methods to replace items and their priorities. This method will be removed in Flarum 2.0.\n   *\n   * @param key The key of the item in the list\n   * @param content The item's new content\n   * @param priority The item's new priority\n   *\n   * @example <caption>Replace priority and not content.</caption>\n   * items.replace('myItem', null, 10);\n   *\n   * @example <caption>Replace content and not priority.</caption>\n   * items.replace('myItem', <p>My new value.</p>);\n   *\n   * @example <caption>Replace content and priority.</caption>\n   * items.replace('myItem', <p>My new value.</p>, 10);\n   */\n  replace(key: string, content: T | null = null, priority: number | null = null): this {\n    if (!this.has(key)) return this;\n\n    if (content !== null) {\n      this._items[key].content = content;\n    }\n\n    if (priority !== null) {\n      this._items[key].priority = priority;\n    }\n\n    return this;\n  }\n\n  /**\n   * Replaces an item's content, if the provided item key exists.\n   *\n   * If the provided `key` is not present, an error will be thrown.\n   *\n   * @param key The key of the item in the list\n   * @param content The item's new content\n   *\n   * @example <caption>Replace item content.</caption>\n   * items.setContent('myItem', <p>My new value.</p>);\n   *\n   * @example <caption>Replace item content and priority.</caption>\n   *          items\n   *            .setContent('myItem', <p>My new value.</p>)\n   *            .setPriority('myItem', 10);\n   *\n   * @throws If the provided `key` is not present in the ItemList.\n   */\n  setContent(key: string, content: T): this {\n    if (!this.has(key)) {\n      throw new Error(`[ItemList] Cannot set content of Item. Key \\`${key}\\` is not present.`);\n    }\n\n    // Saves on bundle size to call the deprecated method internally\n    return this.replace(key, content);\n  }\n\n  /**\n   * Replaces an item's priority, if the provided item key exists.\n   *\n   * If the provided `key` is not present, an error will be thrown.\n   *\n   * @param key The key of the item in the list\n   * @param priority The item's new priority\n   *\n   * @example <caption>Replace item priority.</caption>\n   * items.setPriority('myItem', 10);\n   *\n   * @example <caption>Replace item priority and content.</caption>\n   *          items\n   *            .setPriority('myItem', 10)\n   *            .setContent('myItem', <p>My new value.</p>);\n   *\n   * @throws If the provided `key` is not present in the ItemList.\n   */\n  setPriority(key: string, priority: number): this {\n    if (!this.has(key)) {\n      throw new Error(`[ItemList] Cannot set priority of Item. Key \\`${key}\\` is not present.`);\n    }\n\n    this._items[key].priority = priority;\n\n    return this;\n  }\n\n  /**\n   * Remove an item from the list.\n   *\n   * If the provided `key` is not present, nothing will happen.\n   */\n  remove(key: string): this {\n    delete this._items[key];\n\n    return this;\n  }\n\n  /**\n   * Merge another list's items into this one.\n   *\n   * The list passed to this function will overwrite items which already exist\n   * with the same key.\n   */\n  merge(otherList: ItemList<T>): ItemList<T> {\n    Object.keys(otherList._items).forEach((key) => {\n      const val = otherList._items[key];\n\n      if (val instanceof Item) {\n        this._items[key] = val;\n      }\n    });\n\n    return this;\n  }\n\n  /**\n   * Convert the list into an array of item content arranged by priority.\n   *\n   * This **does not** preserve the original types of primitives and proxies\n   * all content values to make `itemName` accessible on them.\n   *\n   * **NOTE:** If your ItemList holds primitive types (such as numbers, booleans\n   * or strings), these will be converted to their object counterparts if you do\n   * not provide `true` to this function.\n   *\n   * **NOTE:** Modifying any objects in the final array may also update the\n   * content of the original ItemList.\n   *\n   * @param keepPrimitives Converts item content to objects and sets the\n   * `itemName` property on them.\n   *\n   * @see https://github.com/flarum/core/issues/3030\n   */\n  toArray(keepPrimitives?: false): (T & { itemName: string })[];\n  /**\n   * Convert the list into an array of item content arranged by priority.\n   *\n   * Content values that are already objects will be proxied and have\n   * `itemName` accessible on them. Primitive values will not have the\n   * `itemName` property accessible.\n   *\n   * **NOTE:** Modifying any objects in the final array may also update the\n   * content of the original ItemList.\n   *\n   * @param keepPrimitives Converts item content to objects and sets the\n   * `itemName` property on them.\n   */\n  toArray(keepPrimitives: true): (T extends object ? T & Readonly<{ itemName: string }> : T)[];\n\n  toArray(keepPrimitives: boolean = false): T[] | (T & Readonly<{ itemName: string }>)[] {\n    const items: Item<T>[] = Object.keys(this._items).map((key, i) => {\n      const item = this._items[key];\n\n      if (!keepPrimitives || isObject(item.content)) {\n        // Convert content to object, then proxy it\n        return {\n          ...item,\n          content: this.createItemContentProxy(isObject(item.content) ? item.content : Object(item.content), key),\n        };\n      } else {\n        // ...otherwise just return a clone of the item.\n        return { ...item };\n      }\n    });\n\n    return items.sort((a, b) => b.priority - a.priority).map((item) => item.content);\n  }\n\n  /**\n   * A read-only map of all keys to their respective items in no particular order.\n   *\n   * We don't allow adding new items to the ItemList via setting new properties,\n   * nor do we allow modifying existing items directly. You should use the\n   * {@link ItemList.add}, {@link ItemList.setContent} and\n   * {@link ItemList.setPriority} methods instead.\n   *\n   * To match the old behaviour of the `ItemList.items` property, call\n   * `Object.values(ItemList.toObject())`.\n   *\n   * @example\n   * const items = new ItemList();\n   * items.add('b', 'My cool value', 20);\n   * items.add('a', 'My value', 10);\n   * items.toObject();\n   * // {\n   * //   a: { content: 'My value', priority: 10, itemName: 'a' },\n   * //   b: { content: 'My cool value', priority: 20, itemName: 'b' },\n   * // }\n   */\n  toObject(): DeepReadonly<Record<string, IItemObject<T>>> {\n    return Object.keys(this._items).reduce((map, key) => {\n      const obj = {\n        content: this.get(key),\n        itemName: key,\n        priority: this.getPriority(key),\n      };\n\n      map[key] = obj;\n\n      return map;\n    }, {} as Record<string, IItemObject<T>>);\n  }\n\n  /**\n   * Proxies an item's content, adding the `itemName` readonly property to it.\n   *\n   * @example\n   * createItemContentProxy({ foo: 'bar' }, 'myItem');\n   * // { foo: 'bar', itemName: 'myItem' }\n   *\n   * @param content The item's content (objects only)\n   * @param key The item's key\n   * @return Proxied content\n   *\n   * @internal\n   */\n  private createItemContentProxy<C extends object>(content: C, key: string): Readonly<C & { itemName: string }> {\n    return new Proxy(content, {\n      get(target, property, receiver) {\n        if (property === 'itemName') return key;\n\n        return Reflect.get(target, property, receiver);\n      },\n      set(target, property, value, receiver) {\n        if (key !== null && property === 'itemName') {\n          throw new Error('`itemName` property is read-only');\n        }\n\n        return Reflect.set(target, property, value, receiver);\n      },\n    }) as C & { itemName: string };\n  }\n}\n","import Component from '../Component';\n\n/**\n * The `Separator` component defines a menu separator item.\n */\nclass Separator extends Component {\n  view() {\n    return <li className=\"Dropdown-separator\" />;\n  }\n}\n\nSeparator.isListItem = true;\n\nexport default Separator;\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f);else for(t in e)e[t]&&(n&&(n+=\" \"),n+=t);return n}export function clsx(){for(var e,t,f=0,n=\"\";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","import clsx from 'clsx';\n\n/**\n * This util exposes `clsx` to core and extensions as a re-usable utility.\n *\n * For full documentation, see `clsx` on GitHub.\n *\n * @see https://github.com/lukeed/clsx\n */\nconst classList = clsx;\n\nexport default classList;\n","import type Mithril from 'mithril';\nimport Component, { ComponentAttrs } from '../Component';\nimport Separator from '../components/Separator';\nimport classList from '../utils/classList';\n\ntype ModdedVnodeAttrs = {\n  itemClassName?: string;\n  key?: string;\n};\n\ntype ModdedTag = Mithril.Vnode['tag'] & {\n  isListItem?: boolean;\n  isActive?: (attrs: ComponentAttrs) => boolean;\n};\n\ntype ModdedVnode = Mithril.Vnode<ModdedVnodeAttrs> & { itemName?: string; itemClassName?: string; tag: ModdedTag };\n\ntype ModdedChild = ModdedVnode | string | number | boolean | null | undefined;\ntype ModdedChildArray = ModdedChildren[];\ntype ModdedChildren = ModdedChild | ModdedChildArray;\n\n/**\n * This type represents an element of a list returned by `ItemList.toArray()`,\n * coupled with some static properties used on various components.\n */\nexport type ModdedChildrenWithItemName = ModdedChildren & { itemName?: string };\n\nfunction isVnode(item: ModdedChildren): item is Mithril.Vnode {\n  return typeof item === 'object' && item !== null && 'tag' in item;\n}\n\nfunction isSeparator(item: ModdedChildren): boolean {\n  return isVnode(item) && item.tag === Separator;\n}\n\nfunction withoutUnnecessarySeparators(items: ModdedChildrenWithItemName[]): ModdedChildrenWithItemName[] {\n  const newItems: ModdedChildrenWithItemName[] = [];\n  let prevItem: ModdedChildren;\n\n  items.filter(Boolean).forEach((item, i: number) => {\n    if (!isSeparator(item) || (prevItem && !isSeparator(prevItem) && i !== items.length - 1)) {\n      prevItem = item;\n      newItems.push(item);\n    }\n  });\n\n  return newItems;\n}\n\n/**\n * The `listItems` helper wraps an array of components in the provided tag,\n * stripping out any unnecessary `Separator` components.\n *\n * By default, this tag is an `<li>` tag, but this is customisable through the\n * second function parameter, `customTag`.\n */\nexport default function listItems<Attrs extends ComponentAttrs>(\n  rawItems: ModdedChildrenWithItemName[],\n  customTag: VnodeElementTag<Attrs> = 'li',\n  attributes: Attrs = {} as Attrs\n): Mithril.Vnode[] {\n  const items = rawItems instanceof Array ? rawItems : [rawItems];\n  const Tag = customTag;\n\n  return withoutUnnecessarySeparators(items).map((item) => {\n    const classes = [item.itemName && `item-${item.itemName}`];\n\n    if (isVnode(item) && item.tag.isListItem) {\n      item.attrs = item.attrs || {};\n      item.attrs.key = item.attrs.key || item.itemName;\n      item.key = item.attrs.key;\n\n      return item;\n    }\n\n    if (isVnode(item)) {\n      classes.push(item.attrs?.itemClassName || item.itemClassName);\n\n      if (item.tag.isActive?.(item.attrs)) {\n        classes.push('active');\n      }\n    }\n\n    const key = (isVnode(item) && item?.attrs?.key) || item.itemName;\n\n    return (\n      <Tag className={classList(classes)} key={key} {...attributes}>\n        {item}\n      </Tag>\n    );\n  });\n}\n","import Component from '../../common/Component';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\n\n/**\n * The `DiscussionHero` component displays the hero on a discussion page.\n *\n * ### attrs\n *\n * - `discussion`\n */\nexport default class DiscussionHero extends Component {\n  view() {\n    return (\n      <header className=\"Hero DiscussionHero\">\n        <div className=\"container\">\n          <ul className=\"DiscussionHero-items\">{listItems(this.items().toArray())}</ul>\n        </div>\n      </header>\n    );\n  }\n\n  /**\n   * Build an item list for the contents of the discussion hero.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  items() {\n    const items = new ItemList();\n    const discussion = this.attrs.discussion;\n    const badges = discussion.badges().toArray();\n\n    if (badges.length) {\n      items.add('badges', <ul className=\"DiscussionHero-badges badges\">{listItems(badges)}</ul>, 10);\n    }\n\n    items.add('title', <h1 className=\"DiscussionHero-title\">{discussion.title()}</h1>);\n\n    return items;\n  }\n}\n","export default function _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = Object.keys(source);\n  var key, i;\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (excluded.indexOf(key) >= 0) continue;\n    target[key] = source[key];\n  }\n  return target;\n}","/**\n * The `extract` utility deletes a property from an object and returns its\n * value.\n *\n * @param object The object that owns the property\n * @param property The name of the property to extract\n * @return The value of the property\n */\nexport default function extract<T, K extends keyof T>(object: T, property: K): T[K] {\n  const value = object[property];\n\n  delete object[property];\n\n  return value;\n}\n","/**\n * Truncate a string to the given length, appending ellipses if necessary.\n */\nexport function truncate(string: string, length: number, start: number = 0): string {\n  return (start > 0 ? '...' : '') + string.substring(start, start + length) + (string.length > start + length ? '...' : '');\n}\n\n/**\n * Create a slug out of the given string depending on the selected mode.\n * Invalid characters are converted to hyphens.\n *\n * NOTE: This method does not use the comparably sophisticated transliteration\n * mechanism that is employed in the backend. Therefore, it should only be used\n * to *suggest* slugs that can be overridden by the user.\n */\nexport function slug(string: string, mode: SluggingMode = SluggingMode.ALPHANUMERIC): string {\n  switch (mode) {\n    case SluggingMode.UTF8:\n      return (\n        string\n          .toLowerCase()\n          // Match non-word characters (take UTF8 into consideration) and replace with a dash.\n          .replace(/[^\\p{L}\\p{N}\\p{M}]/giu, '-')\n          .replace(/-+/g, '-')\n          .replace(/-$|^-/g, '')\n      );\n\n    case SluggingMode.ALPHANUMERIC:\n    default:\n      return string\n        .toLowerCase()\n        .replace(/[^a-z0-9]/gi, '-')\n        .replace(/-+/g, '-')\n        .replace(/-$|^-/g, '');\n  }\n}\n\nenum SluggingMode {\n  ALPHANUMERIC = 'alphanum',\n  UTF8 = 'utf8',\n}\n\n/**\n * Strip HTML tags and quotes out of the given string, replacing them with\n * meaningful punctuation.\n */\nexport function getPlainContent(string: string): string {\n  const html = string.replace(/(<\\/p>|<br>)/g, '$1 &nbsp;').replace(/<img\\b[^>]*>/gi, ' ');\n\n  const element = new DOMParser().parseFromString(html, 'text/html').documentElement;\n\n  getPlainContent.removeSelectors.forEach((selector) => {\n    const el = element.querySelectorAll(selector);\n    el.forEach((e) => {\n      e.remove();\n    });\n  });\n\n  return element.innerText.replace(/\\s+/g, ' ').trim();\n}\n\n/**\n * An array of DOM selectors to remove when getting plain content.\n *\n * @type {Array}\n */\ngetPlainContent.removeSelectors = ['blockquote', 'script'];\n\n/**\n * Make a string's first character uppercase.\n */\nexport function ucfirst(string: string): string {\n  return string.substr(0, 1).toUpperCase() + string.substr(1);\n}\n\n/**\n * Transform a camel case string to snake case.\n */\nexport function camelCaseToSnakeCase(str: string): string {\n  return str.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`);\n}\n\n/**\n * Generate a random string (a-z, 0-9) of a given length.\n *\n * Providing a length of less than 0 will result in an error.\n *\n * @param length Length of the random string to generate\n * @returns A random string of provided length\n */\nexport function generateRandomString(length: number): string {\n  if (length < 0) throw new Error('Cannot generate a random string with length less than 0.');\n  if (length === 0) return '';\n\n  const arr = new Uint8Array(length / 2);\n  window.crypto.getRandomValues(arr);\n\n  return Array.from(arr, (dec) => {\n    return dec.toString(16).padStart(2, '0');\n  }).join('');\n}\n","import Component from '../Component';\nimport extract from '../utils/extract';\n\n/**\n * The link component enables both internal and external links.\n * It will return a regular HTML link for any links to external sites,\n * and it will use Mithril's m.route.Link for any internal links.\n *\n * Links will default to internal; the 'external' attr must be set to\n * `true` for the link to be external.\n */\nexport default class Link extends Component {\n  view(vnode) {\n    let { options = {}, ...attrs } = vnode.attrs;\n\n    attrs.href ||= '';\n\n    // For some reason, m.route.Link does not like vnode.text, so if present, we\n    // need to convert it to text vnodes and store it in children.\n    const children = vnode.children || { tag: '#', children: vnode.text };\n\n    if (attrs.external) {\n      return <a {...attrs}>{children}</a>;\n    }\n\n    // If the href URL of the link is the same as the current page path\n    // we will not add a new entry to the browser history.\n    // This allows us to still refresh the Page component\n    // without adding endless history entries.\n    if (attrs.href === m.route.get()) {\n      if (!('replace' in options)) options.replace = true;\n    }\n\n    // Mithril 2 does not completely rerender the page if a route change leads to the same route\n    // (or the same component handling a different route).\n    // Here, the `force` parameter will use Mithril's key system to force a full rerender\n    // see https://mithril.js.org/route.html#key-parameter\n    if (extract(attrs, 'force')) {\n      if (!('state' in options)) options.state = {};\n      if (!('key' in options.state)) options.state.key = Date.now();\n    }\n\n    attrs.options = options;\n\n    return <m.route.Link {...attrs}>{children}</m.route.Link>;\n  }\n}\n","import type Mithril from 'mithril';\nimport type { ComponentAttrs } from '../Component';\nimport User from '../models/User';\nimport classList from '../utils/classList';\n\nexport interface AvatarAttrs extends ComponentAttrs {}\n\n/**\n * The `avatar` helper displays a user's avatar.\n *\n * @param user\n * @param attrs Attributes to apply to the avatar element\n */\nexport default function avatar(user: User | null, attrs: ComponentAttrs = {}): Mithril.Vnode {\n  attrs.className = classList('Avatar', attrs.className);\n  attrs.loading ??= 'lazy';\n  let content: string = '';\n\n  // If the `title` attribute is set to null or false, we don't want to give the\n  // avatar a title. On the other hand, if it hasn't been given at all, we can\n  // safely default it to the user's username.\n  const hasTitle: boolean | string = attrs.title === 'undefined' || attrs.title;\n  if (!hasTitle) delete attrs.title;\n\n  // If a user has been passed, then we will set up an avatar using their\n  // uploaded image, or the first letter of their username if they haven't\n  // uploaded one.\n  if (user) {\n    const username = user.displayName() || '?';\n    const avatarUrl = user.avatarUrl();\n\n    if (hasTitle) attrs.title = attrs.title || username;\n\n    if (avatarUrl) {\n      return <img {...attrs} src={avatarUrl} alt=\"\" />;\n    }\n\n    content = username.charAt(0).toUpperCase();\n    attrs.style = { '--avatar-bg': user.color() };\n  }\n\n  return <span {...attrs}>{content}</span>;\n}\n","import type Mithril from 'mithril';\nimport { truncate } from '../utils/string';\n\n/**\n * The `highlight` helper searches for a word phrase in a string, and wraps\n * matches with the <mark> tag.\n *\n * @param string The string to highlight.\n * @param phrase The word or words to highlight.\n * @param [length] The number of characters to truncate the string to.\n *     The string will be truncated surrounding the first match.\n */\nexport default function highlight(string: string, phrase?: string | RegExp, length?: number): Mithril.Vnode<any, any> | string {\n  if (!phrase && !length) return string;\n\n  // Convert the word phrase into a global regular expression (if it isn't\n  // already) so we can search the string for matched.\n  const regexp = phrase instanceof RegExp ? phrase : new RegExp(phrase ?? '', 'gi');\n\n  let highlighted = string;\n  let start = 0;\n\n  // If a length was given, the truncate the string surrounding the first match.\n  if (length) {\n    if (phrase) start = Math.max(0, string.search(regexp) - length / 2);\n\n    highlighted = truncate(highlighted, length, start);\n  }\n\n  // Convert the string into HTML entities, then highlight all matches with\n  // <mark> tags. Then we will return the result as a trusted HTML string.\n  highlighted = $('<div/>').text(highlighted).html();\n\n  if (phrase) highlighted = highlighted.replace(regexp, '<mark>$&</mark>');\n\n  return m.trust(highlighted);\n}\n","import type Mithril from 'mithril';\nimport classList from '../utils/classList';\n\n/**\n * The `icon` helper displays an icon.\n *\n * @param fontClass The full icon class, prefix and the icon’s name.\n * @param attrs Any other attributes to apply.\n */\nexport default function icon(fontClass: string, attrs: Mithril.Attributes = {}): Mithril.Vnode {\n  attrs.className = classList('icon', fontClass, attrs.className);\n\n  return <i aria-hidden=\"true\" {...attrs} />;\n}\n","import type Mithril from 'mithril';\n\n/**\n * Extract the text nodes from a virtual element.\n */\nexport default function extractText(vdom: Mithril.Children): string {\n  if (vdom instanceof Array) {\n    return vdom.map((element) => extractText(element)).join('');\n  } else if (typeof vdom === 'object' && vdom !== null) {\n    return vdom.children ? extractText(vdom.children) : String(vdom.text);\n  } else {\n    return String(vdom);\n  }\n}\n","import app from '../../common/app';\nimport dayjs from 'dayjs';\nimport extractText from './extractText';\n\n/**\n * The `humanTime` utility converts a date to a localized, human-readable time-\n * ago string.\n */\nexport default function humanTime(time: dayjs.ConfigType): string {\n  let d = dayjs(time);\n  const now = dayjs();\n\n  // To prevent showing things like \"in a few seconds\" due to small offsets\n  // between client and server time, we always reset future dates to the\n  // current time. This will result in \"just now\" being shown instead.\n  if (d.isAfter(now)) {\n    d = now;\n  }\n\n  const day = 864e5;\n  const diff = d.diff(dayjs());\n  let ago: string;\n\n  // If this date was more than a month ago, we'll show the name of the month\n  // in the string. If it wasn't this year, we'll show the year as well.\n  if (diff < -30 * day) {\n    if (d.year() === dayjs().year()) {\n      ago = d.format(extractText(app.translator.trans('core.lib.datetime_formats.humanTimeShort')));\n    } else {\n      ago = d.format(extractText(app.translator.trans('core.lib.datetime_formats.humanTimeLong')));\n    }\n  } else {\n    ago = d.fromNow();\n  }\n\n  return ago;\n}\n","import app from '../../common/app';\nimport extractText from './extractText';\n\n/**\n * The `abbreviateNumber` utility converts a number to a shorter localized form.\n *\n * @example\n * abbreviateNumber(1234);\n * // \"1.2K\"\n */\nexport default function abbreviateNumber(number: number): string {\n  // TODO: translation\n  if (number >= 1000000) {\n    return Math.floor(number / 1000000) + extractText(app.translator.trans('core.lib.number_suffix.mega_text'));\n  } else if (number >= 1000) {\n    return (number / 1000).toFixed(1) + extractText(app.translator.trans('core.lib.number_suffix.kilo_text'));\n  } else {\n    return number.toString();\n  }\n}\n","import app from '../../common/app';\nimport Component, { ComponentAttrs } from '../Component';\nimport icon from '../helpers/icon';\nimport listItems, { ModdedChildrenWithItemName } from '../helpers/listItems';\nimport extractText from '../utils/extractText';\nimport type Mithril from 'mithril';\n\nexport interface IDropdownAttrs extends ComponentAttrs {\n  /** A class name to apply to the dropdown toggle button. */\n  buttonClassName?: string;\n  /** A class name to apply to the dropdown menu. */\n  menuClassName?: string;\n  /** The name of an icon to show in the dropdown toggle button. */\n  icon?: string;\n  /** The name of an icon to show on the right of the button. */\n  caretIcon?: string;\n  /** The label of the dropdown toggle button. Defaults to 'Controls'. */\n  label: Mithril.Children;\n  /** The label used to describe the dropdown toggle button to assistive readers. Defaults to 'Toggle dropdown menu'. */\n  accessibleToggleLabel?: string;\n  /** An action to take when the dropdown is collapsed. */\n  onhide?: () => void;\n  /** An action to take when the dropdown is opened. */\n  onshow?: () => void;\n\n  lazyDraw?: boolean;\n}\n\n/**\n * The `Dropdown` component displays a button which, when clicked, shows a\n * dropdown menu beneath it.\n *\n * The children will be displayed as a list inside the dropdown menu.\n */\nexport default class Dropdown<CustomAttrs extends IDropdownAttrs = IDropdownAttrs> extends Component<CustomAttrs> {\n  protected showing = false;\n\n  static initAttrs(attrs: IDropdownAttrs) {\n    attrs.className ||= '';\n    attrs.buttonClassName ||= '';\n    attrs.menuClassName ||= '';\n    attrs.label ||= '';\n    attrs.caretIcon ??= 'fas fa-caret-down';\n    attrs.accessibleToggleLabel ||= extractText(app.translator.trans('core.lib.dropdown.toggle_dropdown_accessible_label'));\n  }\n\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    const items = vnode.children ? listItems(vnode.children as ModdedChildrenWithItemName[]) : [];\n    const renderItems = this.attrs.lazyDraw ? this.showing : true;\n\n    return (\n      <div className={'ButtonGroup Dropdown dropdown ' + this.attrs.className + ' itemCount' + items.length + (this.showing ? ' open' : '')}>\n        {this.getButton(vnode.children as Mithril.ChildArray)}\n        {renderItems && this.getMenu(items)}\n      </div>\n    );\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    // When opening the dropdown menu, work out if the menu goes beyond the\n    // bottom of the viewport. If it does, we will apply class to make it show\n    // above the toggle button instead of below it.\n    this.$().on('shown.bs.dropdown', () => {\n      const { lazyDraw, onshow } = this.attrs;\n\n      this.showing = true;\n\n      // If using lazy drawing, redraw before calling `onshow` function\n      // to make sure the menu DOM exists in case the callback tries to use it.\n      if (lazyDraw) {\n        m.redraw.sync();\n      }\n\n      if (typeof onshow === 'function') {\n        onshow();\n      }\n\n      // If not using lazy drawing, keep previous functionality\n      // of redrawing after calling onshow()\n      if (!lazyDraw) {\n        m.redraw();\n      }\n\n      const $menu = this.$('.Dropdown-menu');\n      const isRight = $menu.hasClass('Dropdown-menu--right');\n\n      const top = $menu.offset()?.top ?? 0;\n      const height = $menu.height() ?? 0;\n      const windowSrollTop = $(window).scrollTop() ?? 0;\n      const windowHeight = $(window).height() ?? 0;\n\n      $menu.removeClass('Dropdown-menu--top Dropdown-menu--right');\n\n      $menu.toggleClass('Dropdown-menu--top', top + height > windowSrollTop + windowHeight);\n\n      if (($menu.offset()?.top || 0) < 0) {\n        $menu.removeClass('Dropdown-menu--top');\n      }\n\n      const left = $menu.offset()?.left ?? 0;\n      const width = $menu.width() ?? 0;\n      const windowScrollLeft = $(window).scrollLeft() ?? 0;\n      const windowWidth = $(window).width() ?? 0;\n\n      $menu.toggleClass('Dropdown-menu--right', isRight || left + width > windowScrollLeft + windowWidth);\n    });\n\n    this.$().on('hidden.bs.dropdown', () => {\n      this.showing = false;\n\n      if (this.attrs.onhide) {\n        this.attrs.onhide();\n      }\n\n      m.redraw();\n    });\n  }\n\n  /**\n   * Get the template for the button.\n   */\n  getButton(children: Mithril.ChildArray): Mithril.Vnode<any, any> {\n    return (\n      <button\n        className={'Dropdown-toggle ' + this.attrs.buttonClassName}\n        aria-haspopup=\"menu\"\n        aria-label={this.attrs.accessibleToggleLabel}\n        data-toggle=\"dropdown\"\n        onclick={this.attrs.onclick}\n      >\n        {this.getButtonContent(children)}\n      </button>\n    );\n  }\n\n  /**\n   * Get the template for the button's content.\n   */\n  getButtonContent(children: Mithril.ChildArray): Mithril.ChildArray {\n    return [\n      this.attrs.icon ? icon(this.attrs.icon, { className: 'Button-icon' }) : '',\n      <span className=\"Button-label\">{this.attrs.label}</span>,\n      this.attrs.caretIcon ? icon(this.attrs.caretIcon, { className: 'Button-caret' }) : '',\n    ];\n  }\n\n  getMenu(items: Mithril.Vnode<any, any>[]): Mithril.Vnode<any, any> {\n    return <ul className={'Dropdown-menu dropdown-menu ' + this.attrs.menuClassName}>{items}</ul>;\n  }\n}\n","import dayjs from 'dayjs';\nimport type Mithril from 'mithril';\nimport humanTimeUtil from '../utils/humanTime';\n\n/**\n * The `humanTime` helper displays a time in a human-friendly time-ago format\n * (e.g. '12 days ago'), wrapped in a <time> tag with other information about\n * the time.\n */\nexport default function humanTime(time: Date): Mithril.Vnode {\n  const d = dayjs(time);\n\n  const datetime = d.format();\n  const full = d.format('LLLL');\n  const ago = humanTimeUtil(time);\n\n  return (\n    <time pubdate datetime={datetime} title={full} data-humantime>\n      {ago}\n    </time>\n  );\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport humanTime from '../../common/helpers/humanTime';\nimport icon from '../../common/helpers/icon';\n\n/**\n * Displays information about a the first or last post in a discussion.\n *\n * ### Attrs\n *\n * - `discussion`\n * - `lastPost`\n */\nexport default class TerminalPost extends Component {\n  view() {\n    const discussion = this.attrs.discussion;\n    const lastPost = this.attrs.lastPost && discussion.replyCount();\n\n    const user = discussion[lastPost ? 'lastPostedUser' : 'user']();\n    const time = discussion[lastPost ? 'lastPostedAt' : 'createdAt']();\n\n    return (\n      <span>\n        {!!lastPost && icon('fas fa-reply')}{' '}\n        {app.translator.trans('core.forum.discussion_list.' + (lastPost ? 'replied' : 'started') + '_text', {\n          user,\n          ago: humanTime(time),\n        })}\n      </span>\n    );\n  }\n}\n","/**\n * The `SubtreeRetainer` class keeps track of a number of pieces of data,\n * comparing the values of these pieces at every iteration.\n *\n * This is useful for preventing redraws to relatively static (or huge)\n * components whose VDOM only depends on very few values, when none of them\n * have changed.\n *\n * @example\n * // Check two callbacks for changes on each update\n * this.subtree = new SubtreeRetainer(\n *   () => this.attrs.post.freshness,\n *   () => this.showing\n * );\n *\n * // Add more callbacks to be checked for updates\n * this.subtree.check(() => this.attrs.user.freshness);\n *\n * // In a component's onbeforeupdate() method:\n * return this.subtree.needsRebuild()\n *\n * @see https://mithril.js.org/lifecycle-methods.html#onbeforeupdate\n */\nexport default class SubtreeRetainer {\n  protected callbacks: (() => any)[];\n  protected data: Record<string, any>;\n\n  /**\n   * @param callbacks Functions returning data to keep track of.\n   */\n  constructor(...callbacks: (() => any)[]) {\n    this.callbacks = callbacks;\n    this.data = {};\n\n    // Build the initial data, so it is available when calling\n    // needsRebuild from the onbeforeupdate hook.\n    this.needsRebuild();\n  }\n\n  /**\n   * Return whether any data has changed since the last check.\n   * If so, Mithril needs to re-diff the vnode and its children.\n   */\n  needsRebuild(): boolean {\n    let needsRebuild = false;\n\n    this.callbacks.forEach((callback, i) => {\n      const result = callback();\n\n      if (result !== this.data[i]) {\n        this.data[i] = result;\n        needsRebuild = true;\n      }\n    });\n\n    return needsRebuild;\n  }\n\n  /**\n   * Add another callback to be checked.\n   */\n  check(...callbacks: (() => any)[]): void {\n    this.callbacks = this.callbacks.concat(callbacks);\n    // Update the data cache when new checks are added.\n    this.needsRebuild();\n  }\n\n  /**\n   * Invalidate the subtree, forcing it to be redrawn.\n   */\n  invalidate(): void {\n    this.data = {};\n  }\n}\n","import app from '../../common/app';\nimport Component, { ComponentAttrs } from '../Component';\nimport classList from '../utils/classList';\n\nexport interface LoadingIndicatorAttrs extends ComponentAttrs {\n  /**\n   * Custom classes for the loading indicator's container.\n   */\n  className?: string;\n  /**\n   * Custom classes for the loading indicator's container.\n   */\n  containerClassName?: string;\n  /**\n   * Optional size for the loading indicator.\n   */\n  size?: 'large' | 'medium' | 'small';\n  /**\n   * Optional attributes to apply to the loading indicator's container.\n   */\n  containerAttrs?: Partial<ComponentAttrs>;\n  /**\n   * Display type of the spinner.\n   *\n   * @default 'block'\n   */\n  display?: 'block' | 'inline' | 'unset';\n}\n\n/**\n * The `LoadingIndicator` component displays a simple CSS-based loading spinner.\n *\n * To set a custom color, use the CSS `color` property.\n *\n * To increase spacing around the spinner, use the CSS `height` property on the\n * spinner's **container**. Setting the `display` attribute to `block` will set\n * a height of `100px` by default.\n *\n * To apply a custom size to the loading indicator, set the `--size` and\n * `--thickness` CSS custom properties on the loading indicator container.\n *\n * If you *really* want to change how this looks as part of your custom theme,\n * you can override the `border-radius` and `border` then set either a\n * background image, or use `content: \"\\<glyph>\"` (e.g. `content: \"\\f1ce\"`)\n * and `font-family: 'Font Awesome 5 Free'` to set an FA icon if you'd rather.\n *\n * ### Attrs\n *\n * - `containerClassName` Class name(s) to apply to the indicator's parent\n * - `className` Class name(s) to apply to the indicator itself\n * - `display` Determines how the spinner should be displayed (`inline`, `block` (default) or `unset`)\n * - `size` Size of the loading indicator (`small`, `medium` or `large`)\n * - `containerAttrs` Optional attrs to be applied to the container DOM element\n *\n * All other attrs will be assigned as attributes on the DOM element.\n */\nexport default class LoadingIndicator extends Component<LoadingIndicatorAttrs> {\n  view() {\n    const { display = 'block', size = 'medium', containerClassName, className, ...attrs } = this.attrs;\n\n    const completeClassName = classList('LoadingIndicator', className);\n    const completeContainerClassName = classList(\n      'LoadingIndicator-container',\n      display !== 'unset' && `LoadingIndicator-container--${display}`,\n      size && `LoadingIndicator-container--${size}`,\n      containerClassName\n    );\n\n    return (\n      <div\n        aria-label={app.translator.trans('core.lib.loading_indicator.accessible_label')}\n        role=\"status\"\n        {...attrs.containerAttrs}\n        data-size={size}\n        className={completeContainerClassName}\n      >\n        <div aria-hidden=\"true\" className={completeClassName} {...attrs} />\n      </div>\n    );\n  }\n}\n","import Component from '../Component';\n\n/**\n * The `ConfirmDocumentUnload` component can be used to register a global\n * event handler that prevents closing the browser window/tab based on the\n * return value of a given callback prop.\n *\n * ### Attrs\n *\n * - `when` - a callback returning true when the browser should prompt for\n *            confirmation before closing the window/tab\n */\nexport default class ConfirmDocumentUnload extends Component {\n  handler() {\n    return this.attrs.when() || undefined;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.boundHandler = this.handler.bind(this);\n    $(window).on('beforeunload', this.boundHandler);\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    $(window).off('beforeunload', this.boundHandler);\n  }\n\n  view(vnode) {\n    return <>{vnode.children}</>;\n  }\n}\n","import app from '../app';\n\n/**\n * Calls `console.warn` with the provided arguments, but only if the forum is in debug mode.\n *\n * This function is intended to provide warnings to extension developers about issues with\n * their extensions that may not be easily noticed when testing, such as accessibility\n * issues.\n *\n * These warnings should be hidden on production forums to ensure webmasters are not\n * inundated with do-gooders telling them they have an issue when it isn't something they\n * can fix.\n */\nexport default function fireDebugWarning(...args: Parameters<typeof console.warn>): void {\n  if (!app.forum.attribute('debug')) return;\n\n  console.warn(...args);\n}\n\n/**\n * Fire a Flarum deprecation warning which is shown in the JS console.\n *\n * These warnings are only shown when the forum is in debug mode, and the function exists to\n * reduce bundle size caused by multiple warnings across our JavaScript.\n *\n * @param message The message to display. (Short, but sweet, please!)\n * @param githubId The PR or Issue ID with more info in relation to this change.\n * @param [removedFrom] The version in which this feature will be completely removed. (default: 2.0)\n * @param [repo] The repo which the issue or PR is located in. (default: flarum/core)\n *\n * @see {@link fireDebugWarning}\n */\nexport function fireDeprecationWarning(message: string, githubId: string, removedFrom: string = '2.0', repo: string = 'flarum/core'): void {\n  // GitHub auto-redirects between `/pull` and `/issues` for us, so using `/pull` saves 2 bytes!\n  fireDebugWarning(`[Flarum ${removedFrom} Deprecation] ${message}\\n\\nSee: https://github.com/${repo}/pull/${githubId}`);\n}\n","import type Mithril from 'mithril';\nimport Component, { ComponentAttrs } from '../Component';\nimport fireDebugWarning from '../helpers/fireDebugWarning';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport extractText from '../utils/extractText';\nimport LoadingIndicator from './LoadingIndicator';\n\nexport interface IButtonAttrs extends ComponentAttrs {\n  /**\n   * Class(es) of an optional icon to be rendered within the button.\n   *\n   * If provided, the button will gain a `has-icon` class.\n   */\n  icon?: string;\n  /**\n   * Disables button from user input.\n   *\n   * Default: `false`\n   */\n  disabled?: boolean;\n  /**\n   * Show a loading spinner within the button.\n   *\n   * If `true`, also disables the button.\n   *\n   * Default: `false`\n   */\n  loading?: boolean;\n  /**\n   * **DEPRECATED:** Please use the `aria-label` attribute instead. For tooltips, use\n   * the `<Tooltip>` component.\n   *\n   * Accessible text for the button. This should always be present if the button only\n   * contains an icon.\n   *\n   * The textual content of this attribute is passed to the DOM element as `aria-label`.\n   *\n   * @deprecated\n   */\n  title?: string | Mithril.ChildArray;\n  /**\n   * Accessible text for the button. This should always be present if the button only\n   * contains an icon.\n   *\n   * The textual content of this attribute is passed to the DOM element as `aria-label`.\n   */\n  'aria-label'?: string | Mithril.ChildArray;\n  /**\n   * Button type.\n   *\n   * Default: `\"button\"`\n   *\n   * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type\n   */\n  type?: string;\n}\n\n/**\n * The `Button` component defines an element which, when clicked, performs an\n * action.\n *\n * Other attrs will be assigned as attributes on the `<button>` element.\n *\n * Note that a Button has no default class names. This is because a Button can\n * be used to represent any generic clickable control, like a menu item. Common\n * styles can be applied by providing `className=\"Button\"` to the Button component.\n */\nexport default class Button<CustomAttrs extends IButtonAttrs = IButtonAttrs> extends Component<CustomAttrs> {\n  view(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    let { type, title, 'aria-label': ariaLabel, icon: iconName, disabled, loading, className, class: _class, ...attrs } = this.attrs;\n\n    // If no `type` attr provided, set to \"button\"\n    type ||= 'button';\n\n    // Use `title` attribute as `aria-label` if none provided\n    ariaLabel ||= title;\n\n    // If given a translation object, extract the text.\n    if (typeof ariaLabel === 'object') {\n      ariaLabel = extractText(ariaLabel);\n    }\n\n    if (disabled || loading) {\n      delete attrs.onclick;\n    }\n\n    className = classList(_class, className, {\n      hasIcon: iconName,\n      disabled: disabled || loading,\n      loading: loading,\n    });\n\n    const buttonAttrs = {\n      disabled,\n      className,\n      type,\n      'aria-label': ariaLabel,\n      ...attrs,\n    };\n\n    return <button {...buttonAttrs}>{this.getButtonContent(vnode.children)}</button>;\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    const { 'aria-label': ariaLabel } = this.attrs;\n\n    if (this.view === Button.prototype.view && !ariaLabel && !extractText(vnode.children) && !this.element?.getAttribute?.('aria-label')) {\n      fireDebugWarning(\n        '[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',\n        this.element\n      );\n    }\n  }\n\n  /**\n   * Get the template for the button's content.\n   */\n  protected getButtonContent(children: Mithril.Children): Mithril.ChildArray {\n    const iconName = this.attrs.icon;\n\n    return [\n      iconName && icon(iconName, { className: 'Button-icon' }),\n      children && <span className=\"Button-label\">{children}</span>,\n      this.attrs.loading && <LoadingIndicator size=\"small\" display=\"inline\" />,\n    ];\n  }\n}\n","/*\n * Original Copyright GitHub, Inc. Licensed under the MIT License.\n * See license text at https://github.com/github/markdown-toolbar-element/blob/master/LICENSE.\n */\n\nexport interface SelectionRange {\n  text: string;\n  selectionStart: number | undefined;\n  selectionEnd: number | undefined;\n}\n\nlet canInsertText: boolean | null = null;\n\nexport default function insertText(textarea: HTMLTextAreaElement, { text, selectionStart, selectionEnd }: SelectionRange) {\n  const originalSelectionStart = textarea.selectionStart;\n  const before = textarea.value.slice(0, originalSelectionStart);\n  const after = textarea.value.slice(textarea.selectionEnd);\n\n  if (canInsertText === null || canInsertText === true) {\n    textarea.contentEditable = 'true';\n    try {\n      canInsertText = document.execCommand('insertText', false, text);\n    } catch (error) {\n      canInsertText = false;\n    }\n    textarea.contentEditable = 'false';\n  }\n\n  if (canInsertText && !textarea.value.slice(0, textarea.selectionStart).endsWith(text)) {\n    canInsertText = false;\n  }\n\n  if (!canInsertText) {\n    textarea.value = before + text + after;\n    textarea.dispatchEvent(new CustomEvent('input', { bubbles: true, cancelable: true }));\n  }\n\n  if (selectionStart != null && selectionEnd != null) {\n    textarea.setSelectionRange(selectionStart, selectionEnd);\n  } else {\n    textarea.setSelectionRange(originalSelectionStart, textarea.selectionEnd);\n  }\n}\n","import getCaretCoordinates from 'textarea-caret';\nimport insertText from './insertText';\nimport ItemList from './ItemList';\nimport type EditorDriverInterface from './EditorDriverInterface';\nimport { type EditorDriverParams } from './EditorDriverInterface';\n\nexport default class BasicEditorDriver implements EditorDriverInterface {\n  el: HTMLTextAreaElement;\n\n  constructor(dom: HTMLElement, params: EditorDriverParams) {\n    this.el = document.createElement('textarea');\n\n    this.build(dom, params);\n  }\n\n  protected build(dom: HTMLElement, params: EditorDriverParams) {\n    this.el.className = params.classNames.join(' ');\n    this.el.disabled = params.disabled;\n    this.el.placeholder = params.placeholder;\n    this.el.value = params.value;\n\n    const callInputListeners = (e: Event) => {\n      params.inputListeners.forEach((listener) => {\n        listener();\n      });\n\n      e.redraw = false;\n    };\n\n    this.el.oninput = (e) => {\n      params.oninput(this.el.value);\n      callInputListeners(e);\n    };\n\n    this.el.onclick = callInputListeners;\n    this.el.onkeyup = callInputListeners;\n\n    this.el.addEventListener('keydown', (e) => {\n      this.keyHandlers(params)\n        .toArray()\n        .forEach((handler) => handler(e));\n    });\n\n    dom.append(this.el);\n  }\n\n  protected keyHandlers(params: EditorDriverParams) {\n    const items = new ItemList<(e: KeyboardEvent) => void>();\n\n    items.add('submit', function (e: KeyboardEvent) {\n      if ((e.metaKey || e.ctrlKey) && e.key === 'Enter') {\n        params.onsubmit();\n      }\n    });\n\n    return items;\n  }\n\n  moveCursorTo(position: number) {\n    this.setSelectionRange(position, position);\n  }\n\n  getSelectionRange(): Array<number> {\n    return [this.el.selectionStart, this.el.selectionEnd];\n  }\n\n  getLastNChars(n: number): string {\n    const value = this.el.value;\n\n    return value.slice(Math.max(0, this.el.selectionStart - n), this.el.selectionStart);\n  }\n\n  insertAtCursor(text: string) {\n    this.insertAt(this.el.selectionStart, text);\n  }\n\n  insertAt(pos: number, text: string) {\n    this.insertBetween(pos, pos, text);\n  }\n\n  insertBetween(selectionStart: number, selectionEnd: number, text: string) {\n    this.setSelectionRange(selectionStart, selectionEnd);\n\n    const cursorPos = selectionStart + text.length;\n    insertText(this.el, { text, selectionStart: cursorPos, selectionEnd: cursorPos });\n  }\n\n  replaceBeforeCursor(start: number, text: string) {\n    this.insertBetween(start, this.el.selectionStart, text);\n  }\n\n  protected setSelectionRange(start: number, end: number) {\n    this.el.setSelectionRange(start, end);\n    this.focus();\n  }\n\n  getCaretCoordinates(position: number) {\n    const relCoords = getCaretCoordinates(this.el, position);\n\n    return {\n      top: relCoords.top - this.el.scrollTop,\n      left: relCoords.left,\n    };\n  }\n\n  // DOM Interactions\n\n  /**\n   * Set the disabled status of the editor.\n   */\n  disabled(disabled: boolean) {\n    this.el.disabled = disabled;\n  }\n\n  /**\n   * Focus on the editor.\n   */\n  focus() {\n    this.el.focus();\n  }\n\n  /**\n   * Destroy the editor\n   */\n  destroy() {\n    this.el.remove();\n  }\n}\n","import Component from '../Component';\nimport type Mithril from 'mithril';\nimport classList from '../utils/classList';\nimport extractText from '../utils/extractText';\n\nexport interface TooltipAttrs extends Mithril.CommonAttributes<TooltipAttrs, Tooltip> {\n  /**\n   * Tooltip textual content.\n   *\n   * String arrays, like those provided by the translator, will be flattened\n   * into strings.\n   */\n  text: string | string[];\n  /**\n   * Use to manually show or hide the tooltip. `undefined` will show based on cursor events.\n   *\n   * Default: `undefined`.\n   */\n  tooltipVisible?: boolean;\n  /**\n   * Whether to show on focus.\n   *\n   * Default: `true`.\n   */\n  showOnFocus?: boolean;\n  /**\n   * Tooltip position around element.\n   *\n   * Default: `'top'`.\n   */\n  position?: 'top' | 'bottom' | 'left' | 'right';\n  /**\n   * Whether HTML content is allowed in the tooltip.\n   *\n   * **Warning:** this is a possible XSS attack vector. This option shouldn't\n   * be used wherever possible, and may not work when we migrate to another\n   * tooltip library. Be prepared for this to break in Flarum stable.\n   *\n   * Default: `false`.\n   *\n   * @deprecated\n   */\n  html?: boolean;\n  /**\n   * Sets the delay between a trigger state occurring and the tooltip appearing\n   * on-screen.\n   *\n   * **Warning:** this option may be removed when switching to another tooltip\n   * library. Be prepared for this to break in Flarum stable.\n   *\n   * Default: `0`.\n   *\n   * @deprecated\n   */\n  delay?: number;\n  /**\n   * Used to disable the warning for passing text to the `title` attribute.\n   *\n   * Tooltip text should be passed to the `text` attribute.\n   */\n  ignoreTitleWarning?: boolean;\n}\n\n/**\n * The `Tooltip` component is used to create a tooltip for an element. It\n * requires a single child element to be passed to it. Passing multiple\n * children or fragments will throw an error.\n *\n * You should use this for any tooltips you create to allow for backwards\n * compatibility when we switch to another tooltip library instead of\n * Bootstrap tooltips.\n *\n * If you need to pass multiple children, surround them with another element,\n * such as a `<span>` or `<div>`.\n *\n * **Note:** this component will overwrite the `title` attribute of the first\n * child you pass to it, as this is how the current tooltip system works in\n * Flarum. This shouldn't be an issue if you're using this component correctly.\n *\n * @example <caption>Basic usage</caption>\n *          <Tooltip text=\"You wish!\">\n *            <Button>\n *              Click for free money!\n *            </Button>\n *          </Tooltip>\n *\n * @example <caption>Use of `position` and `showOnFocus` attrs</caption>\n *          <Tooltip text=\"Woah! That's cool!\" position=\"bottom\" showOnFocus>\n *            <span>3 replies</span>\n *          </Tooltip>\n *\n * @example <caption>Incorrect usage</caption>\n *          // This is wrong! Surround the children with a <span> or similar.\n *          <Tooltip text=\"This won't work\">\n *            Click\n *            <a href=\"/\">here</a>\n *          </Tooltip>\n */\nexport default class Tooltip extends Component<TooltipAttrs> {\n  private firstChild: Mithril.Vnode<any, any> | null = null;\n  private childDomNode: HTMLElement | null = null;\n\n  private oldText: string = '';\n  private oldVisibility: boolean | undefined;\n\n  private shouldRecreateTooltip: boolean = false;\n  private shouldChangeTooltipVisibility: boolean = false;\n\n  view(vnode: Mithril.Vnode<TooltipAttrs, this>) {\n    /**\n     * We know this will be a ChildArray and not a primitive as this\n     * vnode is a component, not a text or trusted HTML vnode.\n     */\n    const children = vnode.children as Mithril.ChildArray | undefined;\n\n    // We remove these to get the remaining attrs to pass to the DOM element\n    const { text, tooltipVisible, showOnFocus = true, position = 'top', ignoreTitleWarning = false, html = false, delay = 0, ...attrs } = this.attrs;\n\n    if ((this.attrs as any).title && !ignoreTitleWarning) {\n      console.warn(\n        '`title` attribute was passed to Tooltip component. Was this intentional? Tooltip content should be passed to the `text` attr instead.'\n      );\n    }\n\n    const realText = this.getRealText();\n\n    // We need to recreate the tooltip if the text has changed\n    if (realText !== this.oldText) {\n      this.oldText = realText;\n      this.shouldRecreateTooltip = true;\n    }\n\n    if (tooltipVisible !== this.oldVisibility) {\n      this.oldVisibility = this.attrs.tooltipVisible;\n      this.shouldChangeTooltipVisibility = true;\n    }\n\n    // We'll try our best to detect any issues created by devs before they cause any weird effects.\n    // Throwing an error will prevent the forum rendering, but will be better at alerting devs to\n    // an issue.\n\n    if (typeof children === 'undefined') {\n      throw new Error(\n        `Tooltip component was provided with no direct child DOM element. Tooltips must contain a single direct DOM node to attach to.`\n      );\n    }\n\n    if (children.length !== 1) {\n      throw new Error(\n        `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>.`\n      );\n    }\n\n    const firstChild = children[0];\n\n    if (typeof firstChild !== 'object' || Array.isArray(firstChild) || firstChild === null) {\n      throw new Error(\n        `Tooltip component was provided with no direct child DOM element. Tooltips must contain a single direct DOM node to attach to.`\n      );\n    }\n\n    if (typeof firstChild.tag === 'string' && ['#', '[', '<'].includes(firstChild.tag)) {\n      throw new Error(\n        `Tooltip component with provided with a vnode with tag \"${firstChild.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>.`\n      );\n    }\n\n    this.firstChild = firstChild;\n\n    return children;\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<TooltipAttrs, this>) {\n    super.oncreate(vnode);\n\n    this.checkDomNodeChanged();\n    this.recreateTooltip();\n  }\n\n  onupdate(vnode: Mithril.VnodeDOM<TooltipAttrs, this>) {\n    super.onupdate(vnode);\n\n    this.checkDomNodeChanged();\n    this.recreateTooltip();\n  }\n\n  private recreateTooltip() {\n    if (this.shouldRecreateTooltip && this.childDomNode !== null) {\n      $(this.childDomNode).tooltip(\n        'destroy',\n        // @ts-expect-error We don't want this arg to be part of the public API. It only exists to prevent deprecation warnings when using `$.tooltip` in this component.\n        'DANGEROUS_tooltip_jquery_fn_deprecation_exempt'\n      );\n      this.createTooltip();\n      this.shouldRecreateTooltip = false;\n    }\n\n    if (this.shouldChangeTooltipVisibility) {\n      this.shouldChangeTooltipVisibility = false;\n      this.updateVisibility();\n    }\n  }\n\n  private updateVisibility() {\n    if (this.childDomNode === null) return;\n\n    if (this.attrs.tooltipVisible === true) {\n      $(this.childDomNode).tooltip(\n        'show',\n        // @ts-expect-error We don't want this arg to be part of the public API. It only exists to prevent deprecation warnings when using `$.tooltip` in this component.\n        'DANGEROUS_tooltip_jquery_fn_deprecation_exempt'\n      );\n    } else if (this.attrs.tooltipVisible === false) {\n      $(this.childDomNode).tooltip(\n        'hide',\n        // @ts-expect-error We don't want this arg to be part of the public API. It only exists to prevent deprecation warnings when using `$.tooltip` in this component.\n        'DANGEROUS_tooltip_jquery_fn_deprecation_exempt'\n      );\n    }\n  }\n\n  private createTooltip() {\n    if (this.childDomNode === null) return;\n\n    const {\n      showOnFocus = true,\n      position = 'top',\n      delay,\n      // This will have no effect when switching to CSS tooltips\n      html = false,\n      tooltipVisible,\n      text,\n    } = this.attrs;\n\n    // Fancy \"hack\" to assemble the trigger string\n    const trigger = typeof tooltipVisible === 'boolean' ? 'manual' : classList('hover', [showOnFocus && 'focus']);\n\n    const realText = this.getRealText();\n    this.childDomNode.setAttribute('title', realText);\n    this.childDomNode.setAttribute('aria-label', realText);\n\n    // https://getbootstrap.com/docs/3.3/javascript/#tooltips-options\n    $(this.childDomNode).tooltip(\n      {\n        html,\n        delay,\n        placement: position,\n        trigger,\n      },\n      // @ts-expect-error We don't want this arg to be part of the public API. It only exists to prevent deprecation warnings when using `$.tooltip` in this component.\n      'DANGEROUS_tooltip_jquery_fn_deprecation_exempt'\n    );\n  }\n\n  private getRealText(): string {\n    const { text } = this.attrs;\n\n    return Array.isArray(text) ? extractText(text) : text;\n  }\n\n  /**\n   * Checks if the tooltip DOM node has changed.\n   *\n   * If it has, it updates `this.childDomNode` to the new node, and sets\n   * `shouldRecreateTooltip` to `true`.\n   */\n  private checkDomNodeChanged() {\n    const domNode = (this.firstChild as Mithril.VnodeDOM<any, any>).dom as HTMLElement;\n\n    if (domNode && !domNode.isSameNode(this.childDomNode)) {\n      this.childDomNode = domNode;\n      this.shouldRecreateTooltip = true;\n    }\n  }\n}\n","import app from '../../common/app';\n\nimport Component from '../Component';\nimport ItemList from '../utils/ItemList';\nimport listItems from '../helpers/listItems';\nimport Button from './Button';\n\nimport BasicEditorDriver from '../utils/BasicEditorDriver';\nimport Tooltip from './Tooltip';\n\n/**\n * The `TextEditor` component displays a textarea with controls, including a\n * submit button.\n *\n * ### Attrs\n *\n * - `composer`\n * - `submitLabel`\n * - `value`\n * - `placeholder`\n * - `disabled`\n * - `preview`\n */\nexport default class TextEditor extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * The value of the editor.\n     *\n     * @type {String}\n     */\n    this.value = this.attrs.value || '';\n\n    /**\n     * Whether the editor is disabled.\n     */\n    this.disabled = !!this.attrs.disabled;\n  }\n\n  view() {\n    return (\n      <div className=\"TextEditor\">\n        <div className=\"TextEditor-editorContainer\"></div>\n\n        <ul className=\"TextEditor-controls Composer-footer\">\n          {listItems(this.controlItems().toArray())}\n          <li className=\"TextEditor-toolbar\">{this.toolbarItems().toArray()}</li>\n        </ul>\n      </div>\n    );\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.attrs.composer.editor = this.buildEditor(this.$('.TextEditor-editorContainer')[0]);\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    const newDisabled = !!this.attrs.disabled;\n\n    if (this.disabled !== newDisabled) {\n      this.disabled = newDisabled;\n      this.attrs.composer.editor.disabled(newDisabled);\n    }\n  }\n\n  buildEditorParams() {\n    return {\n      classNames: ['FormControl', 'Composer-flexible', 'TextEditor-editor'],\n      disabled: this.disabled,\n      placeholder: this.attrs.placeholder || '',\n      value: this.value,\n      oninput: this.oninput.bind(this),\n      inputListeners: [],\n      onsubmit: () => {\n        this.onsubmit();\n        m.redraw();\n      },\n    };\n  }\n\n  buildEditor(dom) {\n    return new BasicEditorDriver(dom, this.buildEditorParams());\n  }\n\n  /**\n   * Build an item list for the text editor controls.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controlItems() {\n    const items = new ItemList();\n\n    items.add(\n      'submit',\n      <Button icon=\"fas fa-paper-plane\" className=\"Button Button--primary\" itemClassName=\"App-primaryControl\" onclick={this.onsubmit.bind(this)}>\n        {this.attrs.submitLabel}\n      </Button>\n    );\n\n    if (this.attrs.preview) {\n      items.add(\n        'preview',\n        <Tooltip text={app.translator.trans('core.forum.composer.preview_tooltip')}>\n          <Button icon=\"far fa-eye\" className=\"Button Button--icon\" onclick={this.attrs.preview} />\n        </Tooltip>\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the toolbar controls.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  toolbarItems() {\n    return new ItemList();\n  }\n\n  /**\n   * Handle input into the textarea.\n   *\n   * @param {string} value\n   */\n  oninput(value) {\n    this.value = value;\n\n    this.attrs.onchange(this.value);\n  }\n\n  /**\n   * Handle the submit button being clicked.\n   */\n  onsubmit() {\n    this.attrs.onsubmit(this.value);\n  }\n}\n","import Component from '../../common/Component';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport ConfirmDocumentUnload from '../../common/components/ConfirmDocumentUnload';\nimport TextEditor from '../../common/components/TextEditor';\nimport avatar from '../../common/helpers/avatar';\nimport listItems from '../../common/helpers/listItems';\nimport ItemList from '../../common/utils/ItemList';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `ComposerBody` component handles the body, or the content, of the\n * composer. Subclasses should implement the `onsubmit` method and override\n * `headerTimes`.\n *\n * ### Attrs\n *\n * - `composer`\n * - `originalContent`\n * - `submitLabel`\n * - `placeholder`\n * - `user`\n * - `confirmExit`\n * - `disabled`\n *\n * @abstract\n */\nexport default class ComposerBody extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.composer = this.attrs.composer;\n\n    /**\n     * Whether or not the component is loading.\n     *\n     * @type {Boolean}\n     */\n    this.loading = false;\n\n    // Let the composer state know to ask for confirmation under certain\n    // circumstances, if the body supports / requires it and has a corresponding\n    // confirmation question to ask.\n    if (this.attrs.confirmExit) {\n      this.composer.preventClosingWhen(() => this.hasChanges(), this.attrs.confirmExit);\n    }\n\n    this.composer.fields.content(this.attrs.originalContent || '');\n  }\n\n  view() {\n    return (\n      <ConfirmDocumentUnload when={this.hasChanges.bind(this)}>\n        <div className={classList('ComposerBody', this.attrs.className)}>\n          {avatar(this.attrs.user, { className: 'ComposerBody-avatar' })}\n          <div className=\"ComposerBody-content\">\n            <ul className=\"ComposerBody-header\">{listItems(this.headerItems().toArray())}</ul>\n            <div className=\"ComposerBody-editor\">\n              <TextEditor\n                submitLabel={this.attrs.submitLabel}\n                placeholder={this.attrs.placeholder}\n                disabled={this.loading || this.attrs.disabled}\n                composer={this.composer}\n                preview={this.jumpToPreview?.bind(this)}\n                onchange={this.composer.fields.content}\n                onsubmit={this.onsubmit.bind(this)}\n                value={this.composer.fields.content()}\n              />\n            </div>\n          </div>\n          <LoadingIndicator display=\"unset\" containerClassName={classList('ComposerBody-loading', this.loading && 'active')} size=\"large\" />\n        </div>\n      </ConfirmDocumentUnload>\n    );\n  }\n\n  /**\n   * Check if there is any unsaved data.\n   *\n   * @return {boolean}\n   */\n  hasChanges() {\n    const content = this.composer.fields.content();\n\n    return content && content !== this.attrs.originalContent;\n  }\n\n  /**\n   * Build an item list for the composer's header.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  headerItems() {\n    return new ItemList();\n  }\n\n  /**\n   * Handle the submit event of the text editor.\n   *\n   * @abstract\n   */\n  onsubmit() {}\n\n  /**\n   * Stop loading.\n   */\n  loaded() {\n    this.loading = false;\n    m.redraw();\n  }\n}\n","import app from '../../forum/app';\nimport ComposerBody from './ComposerBody';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport icon from '../../common/helpers/icon';\nimport extractText from '../../common/utils/extractText';\n\nfunction minimizeComposerIfFullScreen(e) {\n  if (app.composer.isFullScreen()) {\n    app.composer.minimize();\n    e.stopPropagation();\n  }\n}\n\n/**\n * The `ReplyComposer` component displays the composer content for replying to a\n * discussion.\n *\n * ### Attrs\n *\n * - All of the attrs of ComposerBody\n * - `discussion`\n */\nexport default class ReplyComposer extends ComposerBody {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.placeholder = attrs.placeholder || extractText(app.translator.trans('core.forum.composer_reply.body_placeholder'));\n    attrs.submitLabel = attrs.submitLabel || app.translator.trans('core.forum.composer_reply.submit_button');\n    attrs.confirmExit = attrs.confirmExit || extractText(app.translator.trans('core.forum.composer_reply.discard_confirmation'));\n  }\n\n  headerItems() {\n    const items = super.headerItems();\n    const discussion = this.attrs.discussion;\n\n    items.add(\n      'title',\n      <h3>\n        {icon('fas fa-reply')}{' '}\n        <Link href={app.route.discussion(discussion)} onclick={minimizeComposerIfFullScreen}>\n          {discussion.title()}\n        </Link>\n      </h3>\n    );\n\n    return items;\n  }\n\n  /**\n   * Jump to the preview when triggered by the text editor.\n   */\n  jumpToPreview(e) {\n    minimizeComposerIfFullScreen(e);\n\n    m.route.set(app.route.discussion(this.attrs.discussion, 'reply'));\n  }\n\n  /**\n   * Get the data to submit to the server when the reply is saved.\n   *\n   * @return {Record<string, unknown>}\n   */\n  data() {\n    return {\n      content: this.composer.fields.content(),\n      relationships: { discussion: this.attrs.discussion },\n    };\n  }\n\n  onsubmit() {\n    const discussion = this.attrs.discussion;\n\n    this.loading = true;\n    m.redraw();\n\n    const data = this.data();\n\n    app.store\n      .createRecord('posts')\n      .save(data)\n      .then((post) => {\n        // If we're currently viewing the discussion which this reply was made\n        // in, then we can update the post stream and scroll to the post.\n        if (app.viewingDiscussion(discussion)) {\n          const stream = app.current.get('stream');\n          stream.update().then(() => stream.goToNumber(post.number()));\n        } else {\n          // Otherwise, we'll create an alert message to inform the user that\n          // their reply has been posted, containing a button which will\n          // transition to their new post when clicked.\n          let alert;\n          const viewButton = (\n            <Button\n              className=\"Button Button--link\"\n              onclick={() => {\n                m.route.set(app.route.post(post));\n                app.alerts.dismiss(alert);\n              }}\n            >\n              {app.translator.trans('core.forum.composer_reply.view_button')}\n            </Button>\n          );\n          alert = app.alerts.show(\n            {\n              type: 'success',\n              controls: [viewButton],\n            },\n            app.translator.trans('core.forum.composer_reply.posted_message')\n          );\n        }\n\n        this.composer.hide();\n      }, this.loaded.bind(this));\n  }\n}\n","import Component, { ComponentAttrs } from '../Component';\nimport Button from './Button';\nimport listItems from '../helpers/listItems';\nimport extract from '../utils/extract';\nimport type Mithril from 'mithril';\nimport classList from '../utils/classList';\nimport app from '../app';\nimport iconHelper from '../helpers/icon';\n\nexport interface AlertAttrs extends ComponentAttrs {\n  /** The type of alert this is. Will be used to give the alert a class name of `Alert--{type}`. */\n  type?: string;\n  /** Title of the alert. Optional. */\n  title?: Mithril.Children;\n  /** Icon used next to the title. Optional. */\n  icon?: string;\n  /** An array of controls to show in the alert. */\n  controls?: Mithril.Children;\n  /** Whether or not the alert can be dismissed. */\n  dismissible?: boolean;\n  /** A callback to run when the alert is dismissed */\n  ondismiss?: Function;\n}\n\n/**\n * The `Alert` component represents an alert box, which contains a message,\n * some controls, and may be dismissible.\n */\nexport default class Alert<T extends AlertAttrs = AlertAttrs> extends Component<T> {\n  view(vnode: Mithril.VnodeDOM<T, this>) {\n    const attrs = Object.assign({}, this.attrs);\n\n    const type = extract(attrs, 'type');\n    attrs.className = classList('Alert', `Alert--${type}`, attrs.className);\n\n    const title = extract(attrs, 'title');\n    const icon = extract(attrs, 'icon');\n    const content = extract(attrs, 'content') || vnode.children;\n    const controls = (extract(attrs, 'controls') || []) as Mithril.Vnode[];\n\n    // If the alert is meant to be dismissible (which is the case by default),\n    // then we will create a dismiss button to append as the final control in\n    // the alert.\n    const dismissible = extract(attrs, 'dismissible');\n    const ondismiss = extract(attrs, 'ondismiss');\n    const dismissControl: Mithril.Vnode[] = [];\n\n    if (dismissible || dismissible === undefined) {\n      dismissControl.push(\n        <Button\n          aria-label={app.translator.trans('core.lib.alert.dismiss_a11y_label')}\n          icon=\"fas fa-times\"\n          className=\"Button Button--link Button--icon Alert-dismiss\"\n          onclick={ondismiss}\n        />\n      );\n    }\n\n    return (\n      <div {...attrs}>\n        {!!title && (\n          <div className=\"Alert-title\">\n            {!!icon && <span className=\"Alert-title-icon\">{iconHelper(icon)}</span>}\n            <span className=\"Alert-title-text\">{title}</span>\n          </div>\n        )}\n        <span className=\"Alert-body\">{content}</span>\n        <ul className=\"Alert-controls\">{listItems(controls.concat(dismissControl))}</ul>\n      </div>\n    );\n  }\n}\n","import app from '../../common/app';\nimport Component from '../Component';\nimport Alert, { AlertAttrs } from './Alert';\nimport Button from './Button';\n\nimport type Mithril from 'mithril';\nimport type ModalManagerState from '../states/ModalManagerState';\nimport type RequestError from '../utils/RequestError';\nimport type ModalManager from './ModalManager';\nimport fireDebugWarning from '../helpers/fireDebugWarning';\nimport classList from '../utils/classList';\n\nexport interface IInternalModalAttrs {\n  state: ModalManagerState;\n  animateShow: ModalManager['animateShow'];\n  animateHide: ModalManager['animateHide'];\n}\n\nexport interface IDismissibleOptions {\n  /**\n   * @deprecated Check specific individual attributes instead. Will be removed in Flarum 2.0.\n   */\n  isDismissible: boolean;\n  viaCloseButton: boolean;\n  viaEscKey: boolean;\n  viaBackdropClick: boolean;\n}\n\n/**\n * The `Modal` component displays a modal dialog, wrapped in a form. Subclasses\n * should implement the `className`, `title`, and `content` methods.\n */\nexport default abstract class Modal<ModalAttrs extends IInternalModalAttrs = IInternalModalAttrs, CustomState = undefined> extends Component<\n  ModalAttrs,\n  CustomState\n> {\n  // TODO: [Flarum 2.0] remove `isDismissible` static attribute\n  /**\n   * Determine whether or not the modal should be dismissible via an 'x' button.\n   *\n   * @deprecated Use the individual `isDismissibleVia...` attributes instead and remove references to this.\n   */\n  static readonly isDismissible: boolean = true;\n\n  /**\n   * Can the model be dismissed with a close button (X)?\n   *\n   * If `false`, no close button is shown.\n   */\n  protected static readonly isDismissibleViaCloseButton: boolean = true;\n  /**\n   * Can the modal be dismissed by pressing the Esc key on a keyboard?\n   */\n  protected static readonly isDismissibleViaEscKey: boolean = true;\n  /**\n   * Can the modal be dismissed via a click on the backdrop.\n   */\n  protected static readonly isDismissibleViaBackdropClick: boolean = true;\n\n  static get dismissibleOptions(): IDismissibleOptions {\n    // If someone sets this to `false`, provide the same behaviour as previous versions of Flarum.\n    if (!this.isDismissible) {\n      return {\n        isDismissible: false,\n        viaCloseButton: false,\n        viaEscKey: false,\n        viaBackdropClick: false,\n      };\n    }\n\n    return {\n      isDismissible: true,\n      viaCloseButton: this.isDismissibleViaCloseButton,\n      viaEscKey: this.isDismissibleViaEscKey,\n      viaBackdropClick: this.isDismissibleViaBackdropClick,\n    };\n  }\n\n  protected loading: boolean = false;\n\n  /**\n   * Attributes for an alert component to show below the header.\n   */\n  alertAttrs: AlertAttrs | null = null;\n\n  oninit(vnode: Mithril.Vnode<ModalAttrs, this>) {\n    super.oninit(vnode);\n\n    // TODO: [Flarum 2.0] Remove the code below.\n    // This code prevents extensions which do not implement all abstract methods of this class from breaking\n    // the forum frontend. Without it, function calls would would error rather than returning `undefined.`\n\n    const missingMethods: string[] = [];\n\n    ['className', 'title', 'content', 'onsubmit'].forEach((method) => {\n      if (!(this as any)[method]) {\n        (this as any)[method] = function (): void {};\n        missingMethods.push(method);\n      }\n    });\n\n    if (missingMethods.length > 0) {\n      fireDebugWarning(\n        `Modal \\`${this.constructor.name}\\` does not implement all abstract methods of the Modal super class. Missing methods: ${missingMethods.join(\n          ', '\n        )}.`\n      );\n    }\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<ModalAttrs, this>) {\n    super.oncreate(vnode);\n\n    this.attrs.animateShow(() => this.onready());\n  }\n\n  onbeforeremove(vnode: Mithril.VnodeDOM<ModalAttrs, this>): Promise<void> | void {\n    super.onbeforeremove(vnode);\n\n    // If the global modal state currently contains a modal,\n    // we've just opened up a new one, and accordingly,\n    // we don't need to show a hide animation.\n    if (!this.attrs.state.modal) {\n      // Here, we ensure that the animation has time to complete.\n      // See https://mithril.js.org/lifecycle-methods.html#onbeforeremove\n      // Bootstrap's Modal.TRANSITION_DURATION is 300 ms.\n      return new Promise((resolve) => setTimeout(resolve, 300));\n    }\n  }\n\n  /**\n   * @todo split into FormModal and Modal in 2.0\n   */\n  view() {\n    if (this.alertAttrs) {\n      this.alertAttrs.dismissible = false;\n    }\n\n    return (\n      <div className={classList('Modal modal-dialog fade', this.className())}>\n        <div className=\"Modal-content\">\n          {this.dismissibleOptions.viaCloseButton && (\n            <div className=\"Modal-close App-backControl\">\n              <Button\n                icon=\"fas fa-times\"\n                onclick={() => this.hide()}\n                className=\"Button Button--icon Button--link\"\n                aria-label={app.translator.trans('core.lib.modal.close')}\n              />\n            </div>\n          )}\n\n          <form onsubmit={this.onsubmit.bind(this)}>\n            <div className=\"Modal-header\">\n              <h3 className=\"App-titleControl App-titleControl--text\">{this.title()}</h3>\n            </div>\n\n            {!!this.alertAttrs && (\n              <div className=\"Modal-alert\">\n                <Alert {...this.alertAttrs} />\n              </div>\n            )}\n\n            {this.content()}\n          </form>\n        </div>\n      </div>\n    );\n  }\n\n  /**\n   * Get the class name to apply to the modal.\n   */\n  abstract className(): string;\n\n  /**\n   * Get the title of the modal dialog.\n   */\n  abstract title(): Mithril.Children;\n\n  /**\n   * Get the content of the modal.\n   */\n  abstract content(): Mithril.Children;\n\n  /**\n   * Handle the modal form's submit event.\n   */\n  onsubmit(e: SubmitEvent): void {\n    // ...\n  }\n\n  /**\n   * Callback executed when the modal is shown and ready to be interacted with.\n   *\n   * @remark Focuses the first input in the modal.\n   */\n  onready(): void {\n    this.$().find('input, select, textarea').first().trigger('focus').trigger('select');\n  }\n\n  /**\n   * Hides the modal.\n   */\n  hide(): void {\n    this.attrs.animateHide();\n  }\n\n  /**\n   * Sets `loading` to false and triggers a redraw.\n   */\n  loaded(): void {\n    this.loading = false;\n    m.redraw();\n  }\n\n  /**\n   * Shows an alert describing an error returned from the API, and gives focus to\n   * the first relevant field involved in the error.\n   */\n  onerror(error: RequestError): void {\n    this.alertAttrs = error.alert;\n\n    m.redraw();\n\n    if (error.status === 422 && error.response?.errors) {\n      this.$('form [name=' + (error.response.errors as any[])[0].source.pointer.replace('/data/attributes/', '') + ']').trigger('select');\n    } else {\n      this.onready();\n    }\n  }\n\n  private get dismissibleOptions(): IDismissibleOptions {\n    return (this.constructor as typeof Modal).dismissibleOptions;\n  }\n}\n","import Stream from 'mithril/stream';\n\nexport default Stream;\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport extractText from '../../common/utils/extractText';\nimport Stream from '../../common/utils/Stream';\nimport Mithril from 'mithril';\nimport RequestError from '../../common/utils/RequestError';\nimport ItemList from '../../common/utils/ItemList';\n\nexport interface IForgotPasswordModalAttrs extends IInternalModalAttrs {\n  email?: string;\n}\n\n/**\n * The `ForgotPasswordModal` component displays a modal which allows the user to\n * enter their email address and request a link to reset their password.\n */\nexport default class ForgotPasswordModal<CustomAttrs extends IForgotPasswordModalAttrs = IForgotPasswordModalAttrs> extends Modal<CustomAttrs> {\n  /**\n   * The value of the email input.\n   */\n  email!: Stream<string>;\n\n  success: boolean = false;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.email = Stream(this.attrs.email || '');\n  }\n\n  className() {\n    return 'ForgotPasswordModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.forgot_password.title');\n  }\n\n  content() {\n    if (this.success) {\n      return (\n        <div className=\"Modal-body\">\n          <div className=\"Form Form--centered\">\n            <p className=\"helpText\">{app.translator.trans('core.forum.forgot_password.email_sent_message')}</p>\n            <div className=\"Form-group\">\n              <Button className=\"Button Button--primary Button--block\" onclick={this.hide.bind(this)}>\n                {app.translator.trans('core.forum.forgot_password.dismiss_button')}\n              </Button>\n            </div>\n          </div>\n        </div>\n      );\n    }\n\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">\n          <p className=\"helpText\">{app.translator.trans('core.forum.forgot_password.text')}</p>\n          {this.fields().toArray()}\n        </div>\n      </div>\n    );\n  }\n\n  fields() {\n    const items = new ItemList();\n\n    const emailLabel = extractText(app.translator.trans('core.forum.forgot_password.email_placeholder'));\n\n    items.add(\n      'email',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"email\"\n          type=\"email\"\n          placeholder={emailLabel}\n          aria-label={emailLabel}\n          bidi={this.email}\n          disabled={this.loading}\n        />\n      </div>,\n      50\n    );\n\n    items.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.forum.forgot_password.submit_button')}\n        </Button>\n      </div>,\n      -10\n    );\n\n    return items;\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    app\n      .request({\n        method: 'POST',\n        url: app.forum.attribute('apiUrl') + '/forgot',\n        body: this.requestParams(),\n        errorHandler: this.onerror.bind(this),\n      })\n      .then(() => {\n        this.success = true;\n        this.alertAttrs = null;\n      })\n      .catch(() => {})\n      .then(this.loaded.bind(this));\n  }\n\n  requestParams(): Record<string, unknown> {\n    const data = {\n      email: this.email(),\n    };\n\n    return data;\n  }\n\n  onerror(error: RequestError) {\n    if (error.status === 404 && error.alert) {\n      error.alert.content = app.translator.trans('core.forum.forgot_password.not_found_message');\n    }\n\n    super.onerror(error);\n  }\n}\n","import Component from '../../common/Component';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `LogInButtons` component displays a collection of social login buttons.\n */\nexport default class LogInButtons extends Component {\n  view() {\n    return <div className=\"LogInButtons\">{this.items().toArray()}</div>;\n  }\n\n  /**\n   * Build a list of LogInButton components.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  items() {\n    return new ItemList();\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport LogInModal from './LogInModal';\nimport Button from '../../common/components/Button';\nimport LogInButtons from './LogInButtons';\nimport extractText from '../../common/utils/extractText';\nimport ItemList from '../../common/utils/ItemList';\nimport Stream from '../../common/utils/Stream';\nimport type Mithril from 'mithril';\n\nexport interface ISignupModalAttrs extends IInternalModalAttrs {\n  username?: string;\n  email?: string;\n  password?: string;\n  token?: string;\n  provided?: string[];\n}\n\nexport type SignupBody = {\n  username: string;\n  email: string;\n} & ({ token: string } | { password: string });\n\nexport default class SignUpModal<CustomAttrs extends ISignupModalAttrs = ISignupModalAttrs> extends Modal<CustomAttrs> {\n  /**\n   * The value of the username input.\n   */\n  username!: Stream<string>;\n\n  /**\n   * The value of the email input.\n   */\n  email!: Stream<string>;\n\n  /**\n   * The value of the password input.\n   */\n  password!: Stream<string>;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.username = Stream(this.attrs.username || '');\n    this.email = Stream(this.attrs.email || '');\n    this.password = Stream(this.attrs.password || '');\n  }\n\n  className() {\n    return 'Modal--small SignUpModal';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.sign_up.title');\n  }\n\n  content() {\n    return [<div className=\"Modal-body\">{this.body()}</div>, <div className=\"Modal-footer\">{this.footer()}</div>];\n  }\n\n  isProvided(field: string): boolean {\n    return this.attrs.provided?.includes(field) ?? false;\n  }\n\n  body() {\n    return [!this.attrs.token && <LogInButtons />, <div className=\"Form Form--centered\">{this.fields().toArray()}</div>];\n  }\n\n  fields() {\n    const items = new ItemList();\n\n    const usernameLabel = extractText(app.translator.trans('core.forum.sign_up.username_placeholder'));\n    const emailLabel = extractText(app.translator.trans('core.forum.sign_up.email_placeholder'));\n    const passwordLabel = extractText(app.translator.trans('core.forum.sign_up.password_placeholder'));\n\n    items.add(\n      'username',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"username\"\n          type=\"text\"\n          placeholder={usernameLabel}\n          aria-label={usernameLabel}\n          bidi={this.username}\n          disabled={this.loading || this.isProvided('username')}\n        />\n      </div>,\n      30\n    );\n\n    items.add(\n      'email',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"email\"\n          type=\"email\"\n          placeholder={emailLabel}\n          aria-label={emailLabel}\n          bidi={this.email}\n          disabled={this.loading || this.isProvided('email')}\n        />\n      </div>,\n      20\n    );\n\n    if (!this.attrs.token) {\n      items.add(\n        'password',\n        <div className=\"Form-group\">\n          <input\n            className=\"FormControl\"\n            name=\"password\"\n            type=\"password\"\n            autocomplete=\"new-password\"\n            placeholder={passwordLabel}\n            aria-label={passwordLabel}\n            bidi={this.password}\n            disabled={this.loading}\n          />\n        </div>,\n        10\n      );\n    }\n\n    items.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.forum.sign_up.submit_button')}\n        </Button>\n      </div>,\n      -10\n    );\n\n    return items;\n  }\n\n  footer() {\n    return [\n      <p className=\"SignUpModal-logIn\">{app.translator.trans('core.forum.sign_up.log_in_text', { a: <a onclick={this.logIn.bind(this)} /> })}</p>,\n    ];\n  }\n\n  /**\n   * Open the log in modal, prefilling it with an email/username/password if\n   * the user has entered one.\n   */\n  logIn() {\n    const attrs = {\n      identification: this.email() || this.username(),\n    };\n\n    app.modal.show(LogInModal, attrs);\n  }\n\n  onready() {\n    if (this.attrs.username && !this.attrs.email) {\n      this.$('[name=email]').select();\n    } else {\n      this.$('[name=username]').select();\n    }\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    const body = this.submitData();\n\n    app\n      .request({\n        url: app.forum.attribute('baseUrl') + '/register',\n        method: 'POST',\n        body,\n        errorHandler: this.onerror.bind(this),\n      })\n      .then(() => window.location.reload(), this.loaded.bind(this));\n  }\n\n  /**\n   * Get the data that should be submitted in the sign-up request.\n   */\n  submitData(): SignupBody {\n    const authData = this.attrs.token ? { token: this.attrs.token } : { password: this.password() };\n\n    const data = {\n      username: this.username(),\n      email: this.email(),\n      ...authData,\n    };\n\n    return data;\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport ForgotPasswordModal from './ForgotPasswordModal';\nimport SignUpModal from './SignUpModal';\nimport Button from '../../common/components/Button';\nimport LogInButtons from './LogInButtons';\nimport extractText from '../../common/utils/extractText';\nimport ItemList from '../../common/utils/ItemList';\nimport Stream from '../../common/utils/Stream';\nimport type Mithril from 'mithril';\nimport RequestError from '../../common/utils/RequestError';\nimport type { LoginParams } from '../../common/Session';\n\nexport interface ILoginModalAttrs extends IInternalModalAttrs {\n  identification?: string;\n  password?: string;\n  remember?: boolean;\n}\n\nexport default class LogInModal<CustomAttrs extends ILoginModalAttrs = ILoginModalAttrs> extends Modal<CustomAttrs> {\n  /**\n   * The value of the identification input.\n   */\n  identification!: Stream<string>;\n  /**\n   * The value of the password input.\n   */\n  password!: Stream<string>;\n  /**\n   * The value of the remember me input.\n   */\n  remember!: Stream<boolean>;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.identification = Stream(this.attrs.identification || '');\n    this.password = Stream(this.attrs.password || '');\n    this.remember = Stream(!!this.attrs.remember);\n  }\n\n  className() {\n    return 'LogInModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.log_in.title');\n  }\n\n  content() {\n    return [<div className=\"Modal-body\">{this.body()}</div>, <div className=\"Modal-footer\">{this.footer()}</div>];\n  }\n\n  body() {\n    return [<LogInButtons />, <div className=\"Form Form--centered\">{this.fields().toArray()}</div>];\n  }\n\n  fields() {\n    const items = new ItemList();\n\n    const identificationLabel = extractText(app.translator.trans('core.forum.log_in.username_or_email_placeholder'));\n    const passwordLabel = extractText(app.translator.trans('core.forum.log_in.password_placeholder'));\n\n    items.add(\n      'identification',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"identification\"\n          type=\"text\"\n          placeholder={identificationLabel}\n          aria-label={identificationLabel}\n          bidi={this.identification}\n          disabled={this.loading}\n        />\n      </div>,\n      30\n    );\n\n    items.add(\n      'password',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"password\"\n          type=\"password\"\n          autocomplete=\"current-password\"\n          placeholder={passwordLabel}\n          aria-label={passwordLabel}\n          bidi={this.password}\n          disabled={this.loading}\n        />\n      </div>,\n      20\n    );\n\n    items.add(\n      'remember',\n      <div className=\"Form-group\">\n        <div>\n          <label className=\"checkbox\">\n            <input type=\"checkbox\" bidi={this.remember} disabled={this.loading} />\n            {app.translator.trans('core.forum.log_in.remember_me_label')}\n          </label>\n        </div>\n      </div>,\n      10\n    );\n\n    items.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.forum.log_in.submit_button')}\n        </Button>\n      </div>,\n      -10\n    );\n\n    return items;\n  }\n\n  footer() {\n    return (\n      <>\n        <p className=\"LogInModal-forgotPassword\">\n          <a onclick={this.forgotPassword.bind(this)}>{app.translator.trans('core.forum.log_in.forgot_password_link')}</a>\n        </p>\n        {app.forum.attribute<boolean>('allowSignUp') && (\n          <p className=\"LogInModal-signUp\">{app.translator.trans('core.forum.log_in.sign_up_text', { a: <a onclick={this.signUp.bind(this)} /> })}</p>\n        )}\n      </>\n    );\n  }\n\n  /**\n   * Open the forgot password modal, prefilling it with an email if the user has\n   * entered one.\n   */\n  forgotPassword() {\n    const email = this.identification();\n    const attrs = email.includes('@') ? { email } : undefined;\n\n    app.modal.show(ForgotPasswordModal, attrs);\n  }\n\n  /**\n   * Open the sign up modal, prefilling it with an email/username/password if\n   * the user has entered one.\n   */\n  signUp() {\n    const identification = this.identification();\n\n    const attrs = {\n      [identification.includes('@') ? 'email' : 'username']: identification,\n    };\n\n    app.modal.show(SignUpModal, attrs);\n  }\n\n  onready() {\n    this.$('[name=' + (this.identification() ? 'password' : 'identification') + ']').trigger('select');\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    app.session.login(this.loginParams(), { errorHandler: this.onerror.bind(this) }).then(() => window.location.reload(), this.loaded.bind(this));\n  }\n\n  loginParams(): LoginParams {\n    const data = {\n      identification: this.identification(),\n      password: this.password(),\n      remember: this.remember(),\n    };\n\n    return data;\n  }\n\n  onerror(error: RequestError) {\n    if (error.status === 401 && error.alert) {\n      error.alert.content = app.translator.trans('core.forum.log_in.invalid_login_message');\n      this.password('');\n    }\n\n    super.onerror(error);\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport Stream from '../../common/utils/Stream';\nimport Mithril from 'mithril';\nimport Discussion from '../../common/models/Discussion';\n\nexport interface IRenameDiscussionModalAttrs extends IInternalModalAttrs {\n  discussion: Discussion;\n  currentTitle: string;\n}\n\n/**\n * The 'RenameDiscussionModal' displays a modal dialog with an input to rename a discussion\n */\nexport default class RenameDiscussionModal<CustomAttrs extends IRenameDiscussionModalAttrs = IRenameDiscussionModalAttrs> extends Modal<CustomAttrs> {\n  discussion!: Discussion;\n  currentTitle!: string;\n  newTitle!: Stream<string>;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.discussion = this.attrs.discussion;\n    this.currentTitle = this.attrs.currentTitle;\n    this.newTitle = Stream(this.currentTitle);\n  }\n\n  className() {\n    return 'RenameDiscussionModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.rename_discussion.title');\n  }\n\n  content() {\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">\n          <div className=\"Form-group\">\n            <input className=\"FormControl\" bidi={this.newTitle} type=\"text\" />\n          </div>\n          <div className=\"Form-group\">\n            <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n              {app.translator.trans('core.forum.rename_discussion.submit_button')}\n            </Button>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  onsubmit(e: SubmitEvent): Promise<void> | void {\n    e.preventDefault();\n\n    this.loading = true;\n\n    const title = this.newTitle();\n    const currentTitle = this.currentTitle;\n\n    // If the title is different to what it was before, then save it. After the\n    // save has completed, update the post stream as there will be a new post\n    // indicating that the discussion was renamed.\n    if (title && title !== currentTitle) {\n      return this.discussion\n        .save({ title })\n        .then(() => {\n          if (app.viewingDiscussion(this.discussion)) {\n            app.current.get('stream').update();\n          }\n          m.redraw();\n          this.hide();\n        })\n        .catch(() => {\n          this.loading = false;\n          m.redraw();\n        });\n    } else {\n      this.hide();\n    }\n  }\n}\n","import app from '../../forum/app';\nimport DiscussionPage from '../components/DiscussionPage';\nimport ReplyComposer from '../components/ReplyComposer';\nimport LogInModal from '../components/LogInModal';\nimport Button from '../../common/components/Button';\nimport Separator from '../../common/components/Separator';\nimport RenameDiscussionModal from '../components/RenameDiscussionModal';\nimport ItemList from '../../common/utils/ItemList';\nimport extractText from '../../common/utils/extractText';\n\n/**\n * The `DiscussionControls` utility constructs a list of buttons for a\n * discussion which perform actions on it.\n */\nexport default {\n  /**\n   * Get a list of controls for a discussion.\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controls(discussion, context) {\n    const items = new ItemList();\n\n    ['user', 'moderation', 'destructive'].forEach((section) => {\n      const controls = this[section + 'Controls'](discussion, context).toArray();\n      if (controls.length) {\n        controls.forEach((item) => items.add(item.itemName, item));\n        items.add(section + 'Separator', <Separator />);\n      }\n    });\n\n    return items;\n  },\n\n  /**\n   * Get controls for a discussion pertaining to the current user (e.g. reply,\n   * follow).\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  userControls(discussion, context) {\n    const items = new ItemList();\n\n    // Only add a reply control if this is the discussion's controls dropdown\n    // for the discussion page itself. We don't want it to show up for\n    // discussions in the discussion list, etc.\n    if (context instanceof DiscussionPage) {\n      items.add(\n        'reply',\n        !app.session.user || discussion.canReply() ? (\n          <Button\n            icon=\"fas fa-reply\"\n            onclick={() => {\n              // If the user is not logged in, the promise rejects, and a login modal shows up.\n              // Since that's already handled, we dont need to show an error message in the console.\n              return this.replyAction\n                .bind(discussion)(true, false)\n                .catch(() => {});\n            }}\n          >\n            {app.translator.trans(\n              app.session.user ? 'core.forum.discussion_controls.reply_button' : 'core.forum.discussion_controls.log_in_to_reply_button'\n            )}\n          </Button>\n        ) : (\n          <Button\n            icon=\"fas fa-reply\"\n            className=\"disabled\"\n            title={extractText(app.translator.trans('core.forum.discussion_controls.cannot_reply_text'))}\n          >\n            {app.translator.trans('core.forum.discussion_controls.cannot_reply_button')}\n          </Button>\n        )\n      );\n    }\n\n    return items;\n  },\n\n  /**\n   * Get controls for a discussion pertaining to moderation (e.g. rename, lock).\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  moderationControls(discussion) {\n    const items = new ItemList();\n\n    if (discussion.canRename()) {\n      items.add(\n        'rename',\n        <Button icon=\"fas fa-pencil-alt\" onclick={this.renameAction.bind(discussion)}>\n          {app.translator.trans('core.forum.discussion_controls.rename_button')}\n        </Button>\n      );\n    }\n\n    return items;\n  },\n\n  /**\n   * Get controls for a discussion which are destructive (e.g. delete).\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  destructiveControls(discussion) {\n    const items = new ItemList();\n\n    if (!discussion.isHidden()) {\n      if (discussion.canHide()) {\n        items.add(\n          'hide',\n          <Button icon=\"far fa-trash-alt\" onclick={this.hideAction.bind(discussion)}>\n            {app.translator.trans('core.forum.discussion_controls.delete_button')}\n          </Button>\n        );\n      }\n    } else {\n      if (discussion.canHide()) {\n        items.add(\n          'restore',\n          <Button icon=\"fas fa-reply\" onclick={this.restoreAction.bind(discussion)}>\n            {app.translator.trans('core.forum.discussion_controls.restore_button')}\n          </Button>\n        );\n      }\n\n      if (discussion.canDelete()) {\n        items.add(\n          'delete',\n          <Button icon=\"fas fa-times\" onclick={this.deleteAction.bind(discussion)}>\n            {app.translator.trans('core.forum.discussion_controls.delete_forever_button')}\n          </Button>\n        );\n      }\n    }\n\n    return items;\n  },\n\n  /**\n   * Open the reply composer for the discussion. A promise will be returned,\n   * which resolves when the composer opens successfully. If the user is not\n   * logged in, they will be prompted. If they don't have permission to\n   * reply, the promise will be rejected.\n   *\n   * @param {boolean} goToLast Whether or not to scroll down to the last post if the discussion is being viewed.\n   * @param {boolean} forceRefresh Whether or not to force a reload of the composer component, even if it is already open for this discussion.\n   *\n   * @return {Promise<void>}\n   */\n  replyAction(goToLast, forceRefresh) {\n    return new Promise((resolve, reject) => {\n      if (app.session.user) {\n        if (this.canReply()) {\n          if (!app.composer.composingReplyTo(this) || forceRefresh) {\n            app.composer.load(ReplyComposer, {\n              user: app.session.user,\n              discussion: this,\n            });\n          }\n          app.composer.show();\n\n          if (goToLast && app.viewingDiscussion(this) && !app.composer.isFullScreen()) {\n            app.current.get('stream').goToNumber('reply');\n          }\n\n          return resolve(app.composer);\n        } else {\n          return reject();\n        }\n      }\n\n      app.modal.show(LogInModal);\n\n      return reject();\n    });\n  },\n\n  /**\n   * Hide a discussion.\n   *\n   * @return {Promise<void>}\n   */\n  hideAction() {\n    this.pushData({ attributes: { hiddenAt: new Date() }, relationships: { hiddenUser: app.session.user } });\n\n    return this.save({ isHidden: true });\n  },\n\n  /**\n   * Restore a discussion.\n   *\n   * @return {Promise<void>}\n   */\n  restoreAction() {\n    this.pushData({ attributes: { hiddenAt: null }, relationships: { hiddenUser: null } });\n\n    return this.save({ isHidden: false });\n  },\n\n  /**\n   * Delete the discussion after confirming with the user.\n   *\n   * @return {Promise<void>}\n   */\n  deleteAction() {\n    if (confirm(extractText(app.translator.trans('core.forum.discussion_controls.delete_confirmation')))) {\n      // If we're currently viewing the discussion that was deleted, go back\n      // to the previous page.\n      if (app.viewingDiscussion(this)) {\n        app.history.back();\n      }\n\n      return this.delete().then(() => app.discussions.removeDiscussion(this));\n    }\n  },\n\n  /**\n   * Rename the discussion.\n   */\n  renameAction() {\n    return app.modal.show(RenameDiscussionModal, {\n      currentTitle: this.title(),\n      discussion: this,\n    });\n  },\n};\n","/**\n * The `slidable` utility adds touch gestures to an element so that it can be\n * slid away to reveal controls underneath, and then released to activate those\n * controls.\n *\n * It relies on the element having children with particular CSS classes.\n *\n * The function returns a record with a `reset` proeprty. This is a function\n * which reverts the slider to its original position. This should be called,\n * for example, when a controls dropdown is closed.\n *\n * @param {HTMLElement | SVGElement | Element} element\n * @return {{ reset : () => void }}\n */\nexport default function slidable(element) {\n  const $element = $(element);\n  const threshold = 50;\n\n  let $underneathLeft;\n  let $underneathRight;\n\n  let startX;\n  let startY;\n  let couldBeSliding = false;\n  let isSliding = false;\n  let pos = 0;\n\n  /**\n   * Animate the slider to a new position.\n   *\n   * @param {number} newPos\n   * @param {Partial<JQueryAnimationOptions>} [options]\n   */\n  const animatePos = (newPos, options = {}) => {\n    // Since we can't animate the transform property with jQuery, we'll use a\n    // bit of a workaround. We set up the animation with a step function that\n    // will set the transform property, but then we animate an unused property\n    // (background-position-x) with jQuery.\n    options.duration ||= 'fast';\n    options.step = function (x) {\n      $(this).css('transform', 'translate(' + x + 'px, 0)');\n    };\n\n    $element.find('.Slidable-content').animate({ 'background-position-x': newPos }, options);\n  };\n\n  /**\n   * Revert the slider to its original position.\n   */\n  const reset = () => {\n    animatePos(0, {\n      complete: function () {\n        $element.removeClass('sliding');\n        $underneathLeft.hide();\n        $underneathRight.hide();\n        isSliding = false;\n      },\n    });\n  };\n\n  $element\n    .find('.Slidable-content')\n    .on('touchstart', function (e) {\n      // Update the references to the elements underneath the slider, provided\n      // they're not disabled.\n      $underneathLeft = $element.find('.Slidable-underneath--left:not(.disabled)');\n      $underneathRight = $element.find('.Slidable-underneath--right:not(.disabled)');\n\n      startX = e.originalEvent.targetTouches[0].clientX;\n      startY = e.originalEvent.targetTouches[0].clientY;\n\n      couldBeSliding = true;\n      pos = 0;\n    })\n\n    .on('touchmove', function (e) {\n      const newX = e.originalEvent.targetTouches[0].clientX;\n      const newY = e.originalEvent.targetTouches[0].clientY;\n\n      // Once the user moves their touch in a direction that's more up/down than\n      // left/right, we'll assume they're scrolling the page. But if they do\n      // move in a horizontal direction at first, then we'll lock their touch\n      // into the slider.\n      if (couldBeSliding && Math.abs(newX - startX) > Math.abs(newY - startY)) {\n        isSliding = true;\n      }\n      couldBeSliding = false;\n\n      if (isSliding) {\n        pos = newX - startX;\n\n        // If there are controls underneath the either side, then we'll show/hide\n        // them depending on the slider's position. We also make the controls\n        // icon get a bit bigger the further they slide.\n        const toggle = ($underneath, side) => {\n          if ($underneath.length) {\n            const active = side === 'left' ? pos > 0 : pos < 0;\n\n            if (active && $underneath.hasClass('Slidable-underneath--elastic')) {\n              pos -= pos * 0.5;\n            }\n            $underneath.toggle(active);\n\n            const scale = Math.max(0, Math.min(1, (Math.abs(pos) - 25) / threshold));\n            $underneath.find('.icon').css('transform', 'scale(' + scale + ')');\n          } else {\n            pos = Math[side === 'left' ? 'min' : 'max'](0, pos);\n          }\n        };\n\n        toggle($underneathLeft, 'left');\n        toggle($underneathRight, 'right');\n\n        $(this).css('transform', 'translate(' + pos + 'px, 0)');\n        $(this).css('background-position-x', pos + 'px');\n\n        $element.toggleClass('sliding', !!pos);\n\n        e.preventDefault();\n      }\n    })\n\n    .on('touchend', function () {\n      // If the user releases the touch and the slider is past the threshold\n      // position on either side, then we will activate the control for that\n      // side. We will also animate the slider's position all the way to the\n      // other side, or back to its original position, depending on whether or\n      // not the side is 'elastic'.\n      const activate = ($underneath) => {\n        $underneath.click();\n\n        if ($underneath.hasClass('Slidable-underneath--elastic')) {\n          reset();\n        } else {\n          animatePos((pos > 0 ? 1 : -1) * $element.width());\n        }\n      };\n\n      if ($underneathRight.length && pos < -threshold) {\n        activate($underneathRight);\n      } else if ($underneathLeft.length && pos > threshold) {\n        activate($underneathLeft);\n      } else {\n        reset();\n      }\n\n      couldBeSliding = false;\n      isSliding = false;\n    });\n\n  return { reset };\n}\n","const specialChars = /[.*+?^${}()|[\\]\\\\]/g;\n\n/**\n * Escapes the `RegExp` special characters in `input`.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n */\nexport default function escapeRegExp(input: string): string {\n  return input.replace(specialChars, '\\\\$&');\n}\n","import app from '../../forum/app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport Link from '../../common/components/Link';\nimport avatar from '../../common/helpers/avatar';\nimport listItems from '../../common/helpers/listItems';\nimport highlight from '../../common/helpers/highlight';\nimport icon from '../../common/helpers/icon';\nimport humanTime from '../../common/utils/humanTime';\nimport ItemList from '../../common/utils/ItemList';\nimport abbreviateNumber from '../../common/utils/abbreviateNumber';\nimport Dropdown from '../../common/components/Dropdown';\nimport TerminalPost from './TerminalPost';\nimport SubtreeRetainer from '../../common/utils/SubtreeRetainer';\nimport DiscussionControls from '../utils/DiscussionControls';\nimport slidable from '../utils/slidable';\nimport classList from '../../common/utils/classList';\nimport DiscussionPage from './DiscussionPage';\nimport escapeRegExp from '../../common/utils/escapeRegExp';\nimport Tooltip from '../../common/components/Tooltip';\nimport type Discussion from '../../common/models/Discussion';\nimport type Mithril from 'mithril';\nimport type { DiscussionListParams } from '../states/DiscussionListState';\n\nexport interface IDiscussionListItemAttrs extends ComponentAttrs {\n  discussion: Discussion;\n  params: DiscussionListParams;\n}\n\n/**\n * The `DiscussionListItem` component shows a single discussion in the\n * discussion list.\n */\nexport default class DiscussionListItem<CustomAttrs extends IDiscussionListItemAttrs = IDiscussionListItemAttrs> extends Component<CustomAttrs> {\n  /**\n   * Ensures that the discussion will not be redrawn\n   * unless new data comes in.\n   */\n  subtree!: SubtreeRetainer;\n\n  highlightRegExp?: RegExp;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.subtree = new SubtreeRetainer(\n      () => this.attrs.discussion.freshness,\n      () => {\n        const time = app.session.user && app.session.user.markedAllAsReadAt();\n        return time && time.getTime();\n      },\n      () => this.active()\n    );\n  }\n\n  elementAttrs() {\n    return {\n      className: classList('DiscussionListItem', {\n        active: this.active(),\n        'DiscussionListItem--hidden': this.attrs.discussion.isHidden(),\n        Slidable: 'ontouchstart' in window,\n      }),\n    };\n  }\n\n  view() {\n    const attrs = this.elementAttrs();\n\n    return <div {...attrs}>{this.viewItems().toArray()}</div>;\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    const discussion = this.attrs.discussion;\n    const controls = DiscussionControls.controls(discussion, this).toArray();\n\n    items.add('controls', this.controlsView(controls), 100);\n    items.add('slidableUnderneath', this.slidableUnderneathView(), 90);\n    items.add('content', this.contentView(), 80);\n\n    return items;\n  }\n\n  controlsView(controls: Mithril.ChildArray): Mithril.Children {\n    return (\n      <>\n        {!!controls.length && (\n          <Dropdown\n            icon=\"fas fa-ellipsis-v\"\n            className=\"DiscussionListItem-controls\"\n            buttonClassName=\"Button Button--icon Button--flat Slidable-underneath Slidable-underneath--right\"\n            accessibleToggleLabel={app.translator.trans('core.forum.discussion_controls.toggle_dropdown_accessible_label')}\n          >\n            {controls}\n          </Dropdown>\n        )}\n      </>\n    );\n  }\n\n  slidableUnderneathView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n    const isUnread = discussion.isUnread();\n\n    return (\n      <span\n        className={classList('Slidable-underneath Slidable-underneath--left Slidable-underneath--elastic', { disabled: !isUnread })}\n        onclick={this.markAsRead.bind(this)}\n      >\n        {icon('fas fa-check')}\n      </span>\n    );\n  }\n\n  contentView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n    const isUnread = discussion.isUnread();\n    const isRead = discussion.isRead();\n\n    return (\n      <div className={classList('DiscussionListItem-content', 'Slidable-content', { unread: isUnread, read: isRead })}>\n        {this.contentItems().toArray()}\n      </div>\n    );\n  }\n\n  contentItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('authorAvatar', this.authorAvatarView(), 100);\n    items.add('badges', this.badgesView(), 90);\n    items.add('main', this.mainView(), 80);\n    items.add('replyCount', this.replyCountItem(), 70);\n\n    return items;\n  }\n\n  authorAvatarView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n    const user = discussion.user();\n\n    return (\n      <Tooltip\n        text={app.translator.trans('core.forum.discussion_list.started_text', { user, ago: humanTime(discussion.createdAt()) })}\n        position=\"right\"\n      >\n        <Link className=\"DiscussionListItem-author\" href={user ? app.route.user(user) : '#'}>\n          {avatar(user || null, { title: '' })}\n        </Link>\n      </Tooltip>\n    );\n  }\n\n  badgesView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n\n    return <ul className=\"DiscussionListItem-badges badges\">{listItems(discussion.badges().toArray())}</ul>;\n  }\n\n  mainView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n    const jumpTo = this.getJumpTo();\n\n    return (\n      <Link href={app.route.discussion(discussion, jumpTo)} className=\"DiscussionListItem-main\">\n        {this.mainItems().toArray()}\n      </Link>\n    );\n  }\n\n  mainItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    const discussion = this.attrs.discussion;\n\n    items.add('title', <h2 className=\"DiscussionListItem-title\">{highlight(discussion.title(), this.highlightRegExp)}</h2>, 100);\n    items.add('info', <ul className=\"DiscussionListItem-info\">{listItems(this.infoItems().toArray())}</ul>, 90);\n\n    return items;\n  }\n\n  getJumpTo() {\n    const discussion = this.attrs.discussion;\n    let jumpTo = 0;\n\n    if (this.attrs.params.q) {\n      const post = discussion.mostRelevantPost();\n      if (post) {\n        jumpTo = post.number();\n      }\n\n      const phrase = escapeRegExp(this.attrs.params.q);\n      this.highlightRegExp = new RegExp(phrase + '|' + phrase.trim().replace(/\\s+/g, '|'), 'gi');\n    } else {\n      jumpTo = Math.min(discussion.lastPostNumber() ?? 0, (discussion.lastReadPostNumber() || 0) + 1);\n    }\n\n    return jumpTo;\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    // If we're on a touch device, set up the discussion row to be slidable.\n    // This allows the user to drag the row to either side of the screen to\n    // reveal controls.\n    if ('ontouchstart' in window) {\n      const slidableInstance = slidable(this.element);\n\n      this.$('.DiscussionListItem-controls').on('hidden.bs.dropdown', () => slidableInstance.reset());\n    }\n  }\n\n  onbeforeupdate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onbeforeupdate(vnode);\n\n    return this.subtree.needsRebuild();\n  }\n\n  /**\n   * Determine whether or not the discussion is currently being viewed.\n   */\n  active() {\n    return app.current.matches(DiscussionPage, { discussion: this.attrs.discussion });\n  }\n\n  /**\n   * Determine whether or not information about who started the discussion\n   * should be displayed instead of information about the most recent reply to\n   * the discussion.\n   */\n  showFirstPost() {\n    return ['newest', 'oldest'].includes(this.attrs.params.sort ?? '');\n  }\n\n  /**\n   * Determine whether or not the number of replies should be shown instead of\n   * the number of unread posts.\n   *\n   * @return {boolean}\n   */\n  showRepliesCount() {\n    return this.attrs.params.sort === 'replies';\n  }\n\n  /**\n   * Mark the discussion as read.\n   */\n  markAsRead() {\n    const discussion = this.attrs.discussion;\n\n    if (discussion.isUnread()) {\n      discussion.save({ lastReadPostNumber: discussion.lastPostNumber() });\n      m.redraw();\n    }\n  }\n\n  /**\n   * Build an item list of info for a discussion listing. By default this is\n   * just the first/last post indicator.\n   */\n  infoItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.attrs.params.q) {\n      const post = this.attrs.discussion.mostRelevantPost() || this.attrs.discussion.firstPost();\n\n      if (post && post.contentType() === 'comment') {\n        const excerpt = highlight(post.contentPlain() ?? '', this.highlightRegExp, 175);\n        items.add('excerpt', excerpt, -100);\n      }\n    } else {\n      items.add('terminalPost', <TerminalPost discussion={this.attrs.discussion} lastPost={!this.showFirstPost()} />);\n    }\n\n    return items;\n  }\n\n  replyCountItem() {\n    const discussion = this.attrs.discussion;\n    const showUnread = !this.showRepliesCount() && discussion.isUnread();\n\n    if (showUnread) {\n      return (\n        <button className=\"Button--ua-reset DiscussionListItem-count\" onclick={this.markAsRead.bind(this)}>\n          <span aria-hidden=\"true\">{abbreviateNumber(discussion.unreadCount())}</span>\n\n          <span className=\"visually-hidden\">\n            {app.translator.trans('core.forum.discussion_list.unread_replies_a11y_label', { count: discussion.replyCount() })}\n          </span>\n        </button>\n      );\n    }\n\n    return (\n      <span className=\"DiscussionListItem-count\">\n        <span aria-hidden=\"true\">{abbreviateNumber(discussion.replyCount())}</span>\n\n        <span className=\"visually-hidden\">\n          {app.translator.trans('core.forum.discussion_list.total_replies_a11y_label', { count: discussion.replyCount() })}\n        </span>\n      </span>\n    );\n  }\n}\n","import Component from '../Component';\n\n/**\n * The `Placeholder` component displays a muted text with some call to action,\n * usually used as an empty state.\n *\n * ### Attrs\n *\n * - `text`\n */\nexport default class Placeholder extends Component {\n  view() {\n    return (\n      <div className=\"Placeholder\">\n        <p>{this.attrs.text}</p>\n      </div>\n    );\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport DiscussionListItem from './DiscussionListItem';\nimport Button from '../../common/components/Button';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport Placeholder from '../../common/components/Placeholder';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `DiscussionList` component displays a list of discussions.\n *\n * ### Attrs\n *\n * - `state` A DiscussionListState object that represents the discussion lists's state.\n */\nexport default class DiscussionList extends Component {\n  view() {\n    /**\n     * @type {import('../states/DiscussionListState').default}\n     */\n    const state = this.attrs.state;\n\n    const params = state.getParams();\n    const isLoading = state.isInitialLoading() || state.isLoadingNext();\n\n    let loading;\n\n    if (isLoading) {\n      loading = <LoadingIndicator />;\n    } else if (state.hasNext()) {\n      loading = (\n        <Button className=\"Button\" onclick={state.loadNext.bind(state)}>\n          {app.translator.trans('core.forum.discussion_list.load_more_button')}\n        </Button>\n      );\n    }\n\n    if (state.isEmpty()) {\n      const text = app.translator.trans('core.forum.discussion_list.empty_text');\n      return (\n        <div className=\"DiscussionList\">\n          <Placeholder text={text} />\n        </div>\n      );\n    }\n\n    const pageSize = state.pageSize;\n\n    return (\n      <div className={classList('DiscussionList', { 'DiscussionList--searchResults': state.isSearchResults() })}>\n        <ul role=\"feed\" aria-busy={isLoading} className=\"DiscussionList-discussions\">\n          {state.getPages().map((pg, pageNum) => {\n            return pg.items.map((discussion, itemNum) => (\n              <li key={discussion.id()} data-id={discussion.id()} role=\"article\" aria-setsize=\"-1\" aria-posinset={pageNum * pageSize + itemNum}>\n                <DiscussionListItem discussion={discussion} params={params} />\n              </li>\n            ));\n          })}\n        </ul>\n        <div className=\"DiscussionList-loadMore\">{loading}</div>\n      </div>\n    );\n  }\n}\n","import app from '../../forum/app';\nimport DiscussionList from './DiscussionList';\nimport Component from '../../common/Component';\nimport DiscussionPage from './DiscussionPage';\n\nconst hotEdge = (e) => {\n  if (e.pageX < 10) app.pane.show();\n};\n\n/**\n * The `DiscussionListPane` component displays the list of previously viewed\n * discussions in a panel that can be displayed by moving the mouse to the left\n * edge of the screen, where it can also be pinned in place.\n *\n * ### Attrs\n *\n * - `state` A DiscussionListState object that represents the discussion lists's state.\n */\nexport default class DiscussionListPane extends Component {\n  view() {\n    if (!this.attrs.state.hasItems()) {\n      return;\n    }\n\n    return <aside className=\"DiscussionPage-list\">{this.enoughSpace() && <DiscussionList state={this.attrs.state} />}</aside>;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    const $list = $(vnode.dom);\n\n    // When the mouse enters and leaves the discussions pane, we want to show\n    // and hide the pane respectively. We also create a 10px 'hot edge' on the\n    // left of the screen to activate the pane.\n    const pane = app.pane;\n    $list.hover(pane.show.bind(pane), pane.onmouseleave.bind(pane));\n\n    $(document).on('mousemove', hotEdge);\n\n    // When coming from another discussion, scroll to the previous postition\n    // to prevent the discussion list jumping around.\n    if (app.previous.matches(DiscussionPage)) {\n      const top = app.cache.discussionListPaneScrollTop || 0;\n      $list.scrollTop(top);\n    } else {\n      // If the discussion we are viewing is listed in the discussion list, then\n      // we will make sure it is visible in the viewport – if it is not we will\n      // scroll the list down to it.\n      const $discussion = $list.find('.DiscussionListItem.active');\n      if ($discussion.length) {\n        const listTop = $list.offset().top;\n        const listBottom = listTop + $list.outerHeight();\n        const discussionTop = $discussion.offset().top;\n        const discussionBottom = discussionTop + $discussion.outerHeight();\n\n        if (discussionTop < listTop || discussionBottom > listBottom) {\n          $list.scrollTop($list.scrollTop() - listTop + discussionTop);\n        }\n      }\n    }\n  }\n\n  onremove(vnode) {\n    app.cache.discussionListPaneScrollTop = $(vnode.dom).scrollTop();\n    $(document).off('mousemove', hotEdge);\n  }\n\n  /**\n   * Are we on a device that's larger than we consider \"mobile\"?\n   *\n   * @returns {boolean}\n   */\n  enoughSpace() {\n    return !$('.App-navigation').is(':visible');\n  }\n}\n","/**\n * The `ScrollListener` class sets up a listener that handles window scroll\n * events.\n */\nexport default class ScrollListener {\n  /**\n   * @param {(top: number) => void} callback The callback to run when the scroll position\n   *     changes.\n   */\n  constructor(callback) {\n    this.callback = callback;\n    this.ticking = false;\n  }\n\n  /**\n   * On each animation frame, as long as the listener is active, run the\n   * `update` method.\n   *\n   * @protected\n   */\n  loop() {\n    // THROTTLE: If the callback is still running (or hasn't yet run), we ignore\n    // further scroll events.\n    if (this.ticking) return;\n\n    // Schedule the callback to be executed soon (TM), and stop throttling once\n    // the callback is done.\n    requestAnimationFrame(() => {\n      this.update();\n      this.ticking = false;\n    });\n\n    this.ticking = true;\n  }\n\n  /**\n   * Run the callback, whether there was a scroll event or not.\n   */\n  update() {\n    this.callback(window.pageYOffset);\n  }\n\n  /**\n   * Start listening to and handling the window's scroll position.\n   */\n  start() {\n    if (!this.active) {\n      window.addEventListener('scroll', (this.active = this.loop.bind(this)), { passive: true });\n    }\n  }\n\n  /**\n   * Stop listening to and handling the window's scroll position.\n   */\n  stop() {\n    window.removeEventListener('scroll', this.active);\n\n    this.active = null;\n  }\n}\n","import Component from '../../common/Component';\nimport avatar from '../../common/helpers/avatar';\n\n/**\n * The `LoadingPost` component shows a placeholder that looks like a post,\n * indicating that the post is loading.\n */\nexport default class LoadingPost extends Component {\n  view() {\n    return (\n      <div className=\"Post CommentPost LoadingPost\">\n        <header className=\"Post-header\">\n          {avatar(null, { className: 'PostUser-avatar' })}\n          <div className=\"fakeText\" />\n        </header>\n\n        <div className=\"Post-body\">\n          <div className=\"fakeText\" />\n          <div className=\"fakeText\" />\n          <div className=\"fakeText\" />\n        </div>\n      </div>\n    );\n  }\n}\n","import app from '../../common/app';\nimport type Mithril from 'mithril';\nimport User from '../models/User';\n\n/**\n * The `username` helper displays a user's username in a <span className=\"username\">\n * tag. If the user doesn't exist, the username will be displayed as [deleted].\n */\nexport default function username(user: User | null | undefined | false): Mithril.Vnode {\n  const name = (user && user.displayName()) || app.translator.trans('core.lib.username.deleted_text');\n\n  return <span className=\"username\">{name}</span>;\n}\n","/*global s9e*/\n\nimport Component from '../../common/Component';\n\n/**\n * The `ComposerPostPreview` component renders Markdown as HTML using the\n * TextFormatter library, polling a data source for changes every 50ms. This is\n * done to prevent expensive redraws on e.g. every single keystroke, while\n * still retaining the perception of live updates for the user.\n *\n * ### Attrs\n *\n * - `composer` The state of the composer controlling this preview.\n * - `className` A CSS class for the element surrounding the preview.\n * - `surround` A callback that can execute code before and after re-render, e.g. for scroll anchoring.\n */\nexport default class ComposerPostPreview extends Component {\n  static initAttrs(attrs) {\n    attrs.className = attrs.className || '';\n    attrs.surround = attrs.surround || ((preview) => preview());\n  }\n\n  view() {\n    return <div className={this.attrs.className} />;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    // Every 50ms, if the composer content has changed, then update the post's\n    // body with a preview.\n    let preview;\n    const updatePreview = () => {\n      // Since we're polling, the composer may have been closed in the meantime,\n      // so we bail in that case.\n      if (!this.attrs.composer.isVisible()) return;\n\n      const content = this.attrs.composer.fields.content();\n\n      if (preview === content) return;\n\n      preview = content;\n\n      this.attrs.surround(() => s9e.TextFormatter.preview(preview || '', vnode.dom));\n    };\n    updatePreview();\n\n    this.updateInterval = setInterval(updatePreview, 50);\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    clearInterval(this.updateInterval);\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport DiscussionControls from '../utils/DiscussionControls';\nimport ComposerPostPreview from './ComposerPostPreview';\nimport listItems from '../../common/helpers/listItems';\n\n/**\n * The `ReplyPlaceholder` component displays a placeholder for a reply, which,\n * when clicked, opens the reply composer.\n *\n * ### Attrs\n *\n * - `discussion`\n */\nexport default class ReplyPlaceholder extends Component {\n  view() {\n    if (app.composer.composingReplyTo(this.attrs.discussion)) {\n      return (\n        <article className=\"Post CommentPost editing\" aria-busy=\"true\">\n          <header className=\"Post-header\">\n            <div className=\"PostUser\">\n              <h3 className=\"PostUser-name\">\n                {avatar(app.session.user, { className: 'PostUser-avatar' })}\n                {username(app.session.user)}\n              </h3>\n              <ul className=\"PostUser-badges badges\">{listItems(app.session.user.badges().toArray())}</ul>\n            </div>\n          </header>\n          <ComposerPostPreview className=\"Post-body\" composer={app.composer} surround={this.anchorPreview.bind(this)} />\n        </article>\n      );\n    }\n\n    const reply = () => {\n      DiscussionControls.replyAction.call(this.attrs.discussion, true).catch(() => {});\n    };\n\n    return (\n      <button className=\"Post ReplyPlaceholder\" onclick={reply}>\n        <span className=\"Post-header\">\n          {avatar(app.session.user, { className: 'PostUser-avatar' })} {app.translator.trans('core.forum.post_stream.reply_placeholder')}\n        </span>\n      </button>\n    );\n  }\n\n  anchorPreview(preview) {\n    const anchorToBottom = $(window).scrollTop() + $(window).height() >= $(document).height();\n\n    preview();\n\n    if (anchorToBottom) {\n      $(window).scrollTop($(document).height());\n    }\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport ScrollListener from '../../common/utils/ScrollListener';\nimport PostLoading from './LoadingPost';\nimport ReplyPlaceholder from './ReplyPlaceholder';\nimport Button from '../../common/components/Button';\nimport ItemList from '../../common/utils/ItemList';\nimport extractText from '../../common/utils/extractText';\n\n/**\n * The `PostStream` component displays an infinitely-scrollable wall of posts in\n * a discussion. Posts that have not loaded will be displayed as placeholders.\n *\n * ### Attrs\n *\n * - `discussion`\n * - `stream`\n * - `targetPost`\n * - `onPositionChange`\n */\nexport default class PostStream extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.discussion = this.attrs.discussion;\n    this.stream = this.attrs.stream;\n\n    this.scrollListener = new ScrollListener(this.onscroll.bind(this));\n  }\n\n  view() {\n    let lastTime;\n\n    const viewingEnd = this.stream.viewingEnd();\n    const posts = this.stream.posts();\n    const postIds = this.discussion.postIds();\n\n    const postFadeIn = (vnode) => {\n      $(vnode.dom).addClass('fadeIn');\n      // 500 is the duration of the fadeIn CSS animation + 100ms,\n      // so the animation has time to complete\n      setTimeout(() => $(vnode.dom).removeClass('fadeIn'), 500);\n    };\n\n    const items = posts.map((post, i) => {\n      let content;\n      const attrs = { 'data-index': this.stream.visibleStart + i };\n\n      if (post) {\n        const time = post.createdAt();\n        const PostComponent = app.postComponents[post.contentType()];\n        content = !!PostComponent && <PostComponent post={post} />;\n\n        attrs.key = 'post' + post.id();\n        attrs.oncreate = postFadeIn;\n        attrs['data-time'] = time.toISOString();\n        attrs['data-number'] = post.number();\n        attrs['data-id'] = post.id();\n        attrs['data-type'] = post.contentType();\n\n        // If the post before this one was more than 4 days ago, we will\n        // display a 'time gap' indicating how long it has been in between\n        // the posts.\n        const dt = time - lastTime;\n\n        if (dt > 1000 * 60 * 60 * 24 * 4) {\n          content = [\n            <div className=\"PostStream-timeGap\">\n              <span>{app.translator.trans('core.forum.post_stream.time_lapsed_text', { period: dayjs().add(dt, 'ms').fromNow(true) })}</span>\n            </div>,\n            content,\n          ];\n        }\n\n        lastTime = time;\n      } else {\n        attrs.key = 'post' + postIds[this.stream.visibleStart + i];\n\n        content = <PostLoading />;\n      }\n\n      const postStreamElement = (\n        <div className=\"PostStream-item\" {...attrs}>\n          {content}\n        </div>\n      );\n\n      // If we're on the first post, call the afterFirstPostItems method and add any additional elements.\n      if (i === 0 && this.afterFirstPostItems().toArray().length > 0) {\n        // Using m.fragment to return multiple elements without an enclosing container\n        return m.fragment({ ...attrs }, [\n          postStreamElement,\n          <div className=\"PostStream-item PostStream-afterFirstPost\" key=\"afterFirstPost\">\n            {this.afterFirstPostItems().toArray()}\n          </div>,\n        ]);\n      }\n\n      return postStreamElement;\n    });\n\n    if (!viewingEnd && posts[this.stream.visibleEnd - this.stream.visibleStart - 1]) {\n      items.push(\n        <div className=\"PostStream-loadMore\" key=\"loadMore\">\n          <Button className=\"Button\" onclick={this.stream.loadNext.bind(this.stream)}>\n            {app.translator.trans('core.forum.post_stream.load_more_button')}\n          </Button>\n        </div>\n      );\n    }\n\n    // Allow extensions to add items to the end of the post stream.\n    if (viewingEnd) {\n      items.push(...this.endItems().toArray());\n    }\n\n    // If we're viewing the end of the discussion, the user can reply, and\n    // is not already doing so, then show a 'write a reply' placeholder.\n    if (viewingEnd && (!app.session.user || this.discussion.canReply())) {\n      items.push(\n        <div className=\"PostStream-item\" key=\"reply\" data-index={this.stream.count()} oncreate={postFadeIn}>\n          <ReplyPlaceholder discussion={this.discussion} />\n        </div>\n      );\n    }\n\n    return (\n      <div className=\"PostStream\" role=\"feed\" aria-live=\"off\" aria-busy={this.stream.pagesLoading ? 'true' : 'false'}>\n        {items}\n      </div>\n    );\n  }\n\n  /**\n   * @returns {ItemList<import('mithril').Children>}\n   */\n  afterFirstPostItems() {\n    const items = new ItemList();\n\n    return items;\n  }\n\n  /**\n   * @returns {ItemList<import('mithril').Children>}\n   */\n  endItems() {\n    const items = new ItemList();\n\n    return items;\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    this.triggerScroll();\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.triggerScroll();\n\n    // This is wrapped in setTimeout due to the following Mithril issue:\n    // https://github.com/lhorie/mithril.js/issues/637\n    setTimeout(() => this.scrollListener.start());\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    this.scrollListener.stop();\n    clearTimeout(this.calculatePositionTimeout);\n  }\n\n  /**\n   * Start scrolling, if appropriate, to a newly-targeted post.\n   */\n  triggerScroll() {\n    if (!this.stream.needsScroll) return;\n\n    const target = this.stream.targetPost;\n    this.stream.needsScroll = false;\n\n    if ('number' in target) {\n      this.scrollToNumber(target.number, this.stream.animateScroll);\n    } else if ('index' in target) {\n      this.scrollToIndex(target.index, this.stream.animateScroll, target.reply);\n    }\n  }\n\n  /**\n   *\n   * @param {number} top\n   */\n  onscroll(top = window.pageYOffset) {\n    if (this.stream.paused || this.stream.pagesLoading) return;\n\n    this.updateScrubber(top);\n\n    this.loadPostsIfNeeded(top);\n\n    // Throttle calculation of our position (start/end numbers of posts in the\n    // viewport) to 100ms.\n    clearTimeout(this.calculatePositionTimeout);\n    this.calculatePositionTimeout = setTimeout(this.calculatePosition.bind(this, top), 100);\n  }\n\n  /**\n   * Check if either extreme of the post stream is in the viewport,\n   * and if so, trigger loading the next/previous page.\n   *\n   * @param {number} top\n   */\n  loadPostsIfNeeded(top = window.pageYOffset) {\n    const marginTop = this.getMarginTop();\n    const viewportHeight = $(window).height() - marginTop;\n    const viewportTop = top + marginTop;\n    const loadAheadDistance = 300;\n\n    if (this.stream.visibleStart > 0) {\n      const $item = this.$('.PostStream-item[data-index=' + this.stream.visibleStart + ']');\n\n      if ($item.length && $item.offset().top > viewportTop - loadAheadDistance) {\n        this.stream.loadPrevious();\n      }\n    }\n\n    if (this.stream.visibleEnd < this.stream.count()) {\n      const $item = this.$('.PostStream-item[data-index=' + (this.stream.visibleEnd - 1) + ']');\n\n      if ($item.length && $item.offset().top + $item.outerHeight(true) < viewportTop + viewportHeight + loadAheadDistance) {\n        this.stream.loadNext();\n      }\n    }\n  }\n\n  updateScrubber(top = window.pageYOffset) {\n    const marginTop = this.getMarginTop();\n    const viewportHeight = $(window).height() - marginTop;\n    const viewportTop = top + marginTop;\n\n    // Before looping through all of the posts, we reset the scrollbar\n    // properties to a 'default' state. These values reflect what would be\n    // seen if the browser were scrolled right up to the top of the page,\n    // and the viewport had a height of 0.\n    const $items = this.$('.PostStream-item[data-index]');\n    let visible = 0;\n    let period = '';\n    let indexFromViewPort = null;\n\n    // Now loop through each of the items in the discussion. An 'item' is\n    // either a single post or a 'gap' of one or more posts that haven't\n    // been loaded yet.\n    $items.each(function () {\n      const $this = $(this);\n      const top = $this.offset().top;\n      const height = $this.outerHeight(true);\n\n      // If this item is above the top of the viewport, skip to the next\n      // one. If it's below the bottom of the viewport, break out of the\n      // loop.\n      if (top + height < viewportTop) {\n        return true;\n      }\n      if (top > viewportTop + viewportHeight) {\n        return false;\n      }\n\n      // Work out how many pixels of this item are visible inside the viewport.\n      // Then add the proportion of this item's total height to the index.\n      const visibleTop = Math.max(0, viewportTop - top);\n      const visibleBottom = Math.min(height, viewportTop + viewportHeight - top);\n      const visiblePost = visibleBottom - visibleTop;\n\n      // We take the index of the first item that passed the previous checks.\n      // It is the item that is first visible in the viewport.\n      if (indexFromViewPort === null) {\n        indexFromViewPort = parseFloat($this.data('index')) + visibleTop / height;\n      }\n\n      if (visiblePost > 0) {\n        visible += visiblePost / height;\n      }\n\n      // If this item has a time associated with it, then set the\n      // scrollbar's current period to a formatted version of this time.\n      const time = $this.data('time');\n      if (time) period = time;\n    });\n\n    // If indexFromViewPort is null, it means no posts are visible in the\n    // viewport. This can happen, when drafting a long reply post. In that case\n    // set the index to the last post.\n    this.stream.index = indexFromViewPort !== null ? indexFromViewPort + 1 : this.stream.count();\n    this.stream.visible = visible;\n    if (period) this.stream.description = dayjs(period).format(extractText(app.translator.trans('core.lib.datetime_formats.scrubber')));\n  }\n\n  /**\n   * Work out which posts (by number) are currently visible in the viewport, and\n   * fire an event with the information.\n   */\n  calculatePosition(top = window.pageYOffset) {\n    const marginTop = this.getMarginTop();\n    const $window = $(window);\n    const viewportHeight = $window.height() - marginTop;\n    const scrollTop = $window.scrollTop() + marginTop;\n    const viewportTop = top + marginTop;\n\n    let startNumber;\n    let endNumber;\n\n    this.$('.PostStream-item').each(function () {\n      const $item = $(this);\n      const top = $item.offset().top;\n      const height = $item.outerHeight(true);\n      const visibleTop = Math.max(0, viewportTop - top);\n\n      const threeQuartersVisible = visibleTop / height < 0.75;\n      const coversQuarterOfViewport = (height - visibleTop) / viewportHeight > 0.25;\n      if (startNumber === undefined && (threeQuartersVisible || coversQuarterOfViewport)) {\n        startNumber = $item.data('number');\n      }\n\n      if (top + height > scrollTop) {\n        if (top + height < scrollTop + viewportHeight) {\n          if ($item.data('number')) {\n            endNumber = $item.data('number');\n          }\n        } else return false;\n      }\n    });\n\n    if (startNumber) {\n      this.attrs.onPositionChange(startNumber || 1, endNumber, startNumber);\n    }\n  }\n\n  /**\n   * Get the distance from the top of the viewport to the point at which we\n   * would consider a post to be the first one visible.\n   *\n   * @return {number}\n   */\n  getMarginTop() {\n    const headerId = app.screen() === 'phone' ? '#app-navigation' : '#header';\n\n    return this.$() && $(headerId).outerHeight() + parseInt(this.$().css('margin-top'), 10);\n  }\n\n  /**\n   * Scroll down to a certain post by number and 'flash' it.\n   *\n   * @param {number} number\n   * @param {boolean} animate\n   * @return {JQueryDeferred}\n   */\n  scrollToNumber(number, animate) {\n    const $item = this.$(`.PostStream-item[data-number=${number}]`);\n\n    return this.scrollToItem($item, animate).then(this.flashItem.bind(this, $item));\n  }\n\n  /**\n   * Scroll down to a certain post by index.\n   *\n   * @param {number} index\n   * @param {boolean} animate\n   * @param {boolean} reply Whether or not to scroll to the reply placeholder.\n   * @return {JQueryDeferred}\n   */\n  scrollToIndex(index, animate, reply) {\n    const $item = reply ? $('.PostStream-item:last-child') : this.$(`.PostStream-item[data-index=${index}]`);\n\n    this.scrollToItem($item, animate, true, reply);\n\n    if (reply) {\n      this.flashItem($item);\n    }\n  }\n\n  /**\n   * Scroll down to the given post.\n   *\n   * @param {JQuery} $item\n   * @param {boolean} animate\n   * @param {boolean} force Whether or not to force scrolling to the item, even\n   *     if it is already in the viewport.\n   * @param {boolean} reply Whether or not to scroll to the reply placeholder.\n   * @return {JQueryDeferred}\n   */\n  scrollToItem($item, animate, force, reply) {\n    const $container = $('html, body').stop(true);\n    const index = $item.data('index');\n\n    if ($item.length) {\n      const itemTop = $item.offset().top - this.getMarginTop();\n      const itemBottom = $item.offset().top + $item.height();\n      const scrollTop = $(document).scrollTop();\n      const scrollBottom = scrollTop + $(window).height();\n\n      // If the item is already in the viewport, we may not need to scroll.\n      // If we're scrolling to the reply placeholder, we'll make sure its\n      // bottom will line up with the top of the composer.\n      if (force || itemTop < scrollTop || itemBottom > scrollBottom) {\n        const top = reply ? itemBottom - $(window).height() + app.composer.computedHeight() : $item.is(':first-child') ? 0 : itemTop;\n\n        if (!animate) {\n          $container.scrollTop(top);\n        } else if (top !== scrollTop) {\n          $container.animate({ scrollTop: top }, 'fast');\n        }\n      }\n    }\n\n    const updateScrubberHeight = () => {\n      // We manually set the index because we want to display the index of the\n      // exact post we've scrolled to, not just that of the first post within viewport.\n      this.updateScrubber();\n      if (index !== undefined) this.stream.index = index + 1;\n    };\n\n    // If we don't update this before the scroll, the scrubber will start\n    // at the top, and animate down, which can be confusing\n    updateScrubberHeight();\n    this.stream.forceUpdateScrubber = true;\n\n    return Promise.all([$container.promise(), this.stream.loadPromise]).then(() => {\n      m.redraw.sync();\n\n      // Rendering post contents will probably throw off our position.\n      // To counter this, we'll scroll either:\n      //   - To the reply placeholder (aligned with composer top)\n      //   - To the top of the page if we're on the first post\n      //   - To the top of a post (if that post exists)\n      // If the post does not currently exist, it's probably\n      // outside of the range we loaded in, so we won't adjust anything,\n      // as it will soon be rendered by the \"load more\" system.\n      let itemOffset;\n      if (reply) {\n        const $placeholder = $('.PostStream-item:last-child');\n        $(window).scrollTop($placeholder.offset().top + $placeholder.height() - $(window).height() + app.composer.computedHeight());\n      } else if (index === 0) {\n        $(window).scrollTop(0);\n      } else if ((itemOffset = $(`.PostStream-item[data-index=${index}]`).offset())) {\n        $(window).scrollTop(itemOffset.top - this.getMarginTop());\n      }\n\n      // We want to adjust this again after posts have been loaded in\n      // and position adjusted so that the scrubber's height is accurate.\n      updateScrubberHeight();\n\n      this.calculatePosition();\n      this.stream.paused = false;\n      // Check if we need to load more posts after scrolling.\n      this.loadPostsIfNeeded();\n    });\n  }\n\n  /**\n   * 'Flash' the given post, drawing the user's attention to it.\n   *\n   * @param {JQuery} $item\n   */\n  flashItem($item) {\n    // This might execute before the fadeIn class has been removed in PostStreamItem's\n    // oncreate, so we remove it just to be safe and avoid a double animation.\n    $item.removeClass('fadeIn');\n    $item.addClass('flash').on('animationend webkitAnimationEnd', (e) => {\n      $item.removeClass('flash');\n    });\n  }\n}\n","import app from '../../common/app';\n\n/**\n * The `formatNumber` utility localizes a number into a string with the\n * appropriate punctuation based on the provided locale otherwise will default to the users locale.\n *\n * @example\n * formatNumber(1234);\n * // 1,234\n */\nexport default function formatNumber(number: number, locale: string = app.data.locale): string {\n  return new Intl.NumberFormat(locale).format(number);\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport icon from '../../common/helpers/icon';\nimport formatNumber from '../../common/utils/formatNumber';\nimport ScrollListener from '../../common/utils/ScrollListener';\n\n/**\n * The `PostStreamScrubber` component displays a scrubber which can be used to\n * navigate/scrub through a post stream.\n *\n * ### Attrs\n *\n * - `stream`\n * - `className`\n */\nexport default class PostStreamScrubber extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.stream = this.attrs.stream;\n    this.handlers = {};\n\n    this.scrollListener = new ScrollListener(this.updateScrubberValues.bind(this, { fromScroll: true, forceHeightChange: true }));\n  }\n\n  view() {\n    const count = this.stream.count();\n\n    // Index is left blank for performance reasons, it is filled in in updateScubberValues\n    const viewing = app.translator.trans('core.forum.post_scrubber.viewing_text', {\n      count,\n      index: <span className=\"Scrubber-index\"></span>,\n      formattedCount: <span className=\"Scrubber-count\">{formatNumber(count)}</span>,\n    });\n\n    const unreadCount = this.stream.discussion.unreadCount();\n    const unreadPercent = count ? Math.min(count - this.stream.index, unreadCount) / count : 0;\n\n    function styleUnread(vnode) {\n      const $element = $(vnode.dom);\n      const newStyle = {\n        top: 100 - unreadPercent * 100 + '%',\n        height: unreadPercent * 100 + '%',\n        opacity: unreadPercent ? 1 : 0,\n      };\n\n      if (vnode.state.oldStyle) {\n        $element.stop(true).css(vnode.state.oldStyle).animate(newStyle);\n      } else {\n        $element.css(newStyle);\n      }\n\n      vnode.state.oldStyle = newStyle;\n    }\n    const classNames = ['PostStreamScrubber', 'Dropdown'];\n    if (this.attrs.className) classNames.push(this.attrs.className);\n\n    return (\n      <div className={classNames.join(' ')}>\n        <button className=\"Button Dropdown-toggle\" data-toggle=\"dropdown\">\n          {viewing} {icon('fas fa-sort')}\n        </button>\n\n        <div className=\"Dropdown-menu dropdown-menu\">\n          <div className=\"Scrubber\">\n            <a className=\"Scrubber-first\" onclick={this.goToFirst.bind(this)}>\n              {icon('fas fa-angle-double-up')} {this.firstPostLabel()}\n            </a>\n\n            <div className=\"Scrubber-scrollbar\">\n              <div className=\"Scrubber-before\" />\n              <div className=\"Scrubber-handle\">\n                <div className=\"Scrubber-bar\" />\n                <div className=\"Scrubber-info\">\n                  <strong>{viewing}</strong>\n                  <span className=\"Scrubber-description\"></span>\n                </div>\n              </div>\n              <div className=\"Scrubber-after\" />\n\n              <div className=\"Scrubber-unread\" oncreate={styleUnread} onupdate={styleUnread}>\n                {this.unreadLabel(unreadCount)}\n              </div>\n            </div>\n\n            <a className=\"Scrubber-last\" onclick={this.goToLast.bind(this)}>\n              {icon('fas fa-angle-double-down')} {this.lastPostLabel()}\n            </a>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  firstPostLabel() {\n    return app.translator.trans('core.forum.post_scrubber.original_post_link');\n  }\n\n  unreadLabel(unreadCount) {\n    return app.translator.trans('core.forum.post_scrubber.unread_text', { count: unreadCount });\n  }\n\n  lastPostLabel() {\n    return app.translator.trans('core.forum.post_scrubber.now_link');\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    if (this.stream.forceUpdateScrubber) {\n      this.stream.forceUpdateScrubber = false;\n      this.stream.loadPromise.then(() => this.updateScrubberValues({ animate: true, forceHeightChange: true }));\n    }\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    // Whenever the window is resized, adjust the height of the scrollbar\n    // so that it fills the height of the sidebar.\n    $(window)\n      .on('resize', (this.handlers.onresize = this.onresize.bind(this)))\n      .resize();\n\n    // When any part of the whole scrollbar is clicked, we want to jump to\n    // that position.\n    this.$('.Scrubber-scrollbar')\n      .bind('click', this.onclick.bind(this))\n\n      // Now we want to make the scrollbar handle draggable. Let's start by\n      // preventing default browser events from messing things up.\n      .bind('dragstart mousedown touchstart', (e) => e.preventDefault());\n\n    // When the mouse is pressed on the scrollbar handle, we capture some\n    // information about its current position. We will store this\n    // information in an object and pass it on to the document's\n    // mousemove/mouseup events later.\n    this.dragging = false;\n    this.mouseStart = 0;\n    this.indexStart = 0;\n\n    this.$('.Scrubber-handle')\n      .bind('mousedown touchstart', this.onmousedown.bind(this))\n\n      // Exempt the scrollbar handle from the 'jump to' click event.\n      .click((e) => e.stopPropagation());\n\n    // When the mouse moves and when it is released, we pass the\n    // information that we captured when the mouse was first pressed onto\n    // some event handlers. These handlers will move the scrollbar/stream-\n    // content as appropriate.\n    $(document)\n      .on('mousemove touchmove', (this.handlers.onmousemove = this.onmousemove.bind(this)))\n      .on('mouseup touchend', (this.handlers.onmouseup = this.onmouseup.bind(this)));\n\n    setTimeout(() => this.scrollListener.start());\n\n    this.stream.loadPromise.then(() => this.updateScrubberValues({ animate: false, forceHeightChange: true }));\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    this.scrollListener.stop();\n    $(window).off('resize', this.handlers.onresize);\n\n    $(document).off('mousemove touchmove', this.handlers.onmousemove).off('mouseup touchend', this.handlers.onmouseup);\n  }\n\n  /**\n   * Update the scrollbar's position to reflect the current values of the\n   * index/visible properties.\n   *\n   * @param {Partial<{fromScroll: boolean, forceHeightChange: boolean, animate: boolean}>} options\n   */\n  updateScrubberValues(options = {}) {\n    const index = this.stream.index;\n    const count = this.stream.count();\n    const visible = this.stream.visible || 1;\n    const percentPerPost = this.percentPerPost();\n\n    const $scrubber = this.$();\n    $scrubber.find('.Scrubber-index').text(formatNumber(this.stream.sanitizeIndex(Math.max(1, index))));\n    $scrubber.find('.Scrubber-description').text(this.stream.description);\n    $scrubber.toggleClass('disabled', this.stream.disabled());\n\n    const heights = {};\n    heights.before = Math.max(0, percentPerPost.index * Math.min(index - 1, count - visible));\n    heights.handle = Math.min(100 - heights.before, percentPerPost.visible * visible);\n    heights.after = 100 - heights.before - heights.handle;\n\n    // If the stream is paused, don't change height on scroll, as the viewport is being scrolled by the JS\n    // If a height change animation is already in progress, don't adjust height unless overriden\n    if ((options.fromScroll && this.stream.paused) || (this.adjustingHeight && !options.forceHeightChange)) return;\n\n    const func = options.animate ? 'animate' : 'css';\n    this.adjustingHeight = true;\n    const animationPromises = [];\n    for (const part in heights) {\n      const $part = $scrubber.find(`.Scrubber-${part}`);\n      animationPromises.push(\n        $part\n          .stop(true, true)\n          [func]({ height: heights[part] + '%' }, 'fast')\n          .promise()\n      );\n\n      // jQuery likes to put overflow:hidden, but because the scrollbar handle\n      // has a negative margin-left, we need to override.\n      if (func === 'animate') $part.css('overflow', 'visible');\n    }\n    Promise.all(animationPromises).then(() => (this.adjustingHeight = false));\n  }\n\n  /**\n   * Go to the first post in the discussion.\n   */\n  goToFirst() {\n    this.stream.goToFirst();\n    this.updateScrubberValues({ animate: true, forceHeightChange: true });\n  }\n\n  /**\n   * Go to the last post in the discussion.\n   */\n  goToLast() {\n    this.stream.goToLast();\n    this.updateScrubberValues({ animate: true, forceHeightChange: true });\n  }\n\n  onresize() {\n    // Adjust the height of the scrollbar so that it fills the height of\n    // the sidebar and doesn't overlap the footer.\n    const scrubber = this.$();\n    const scrollbar = this.$('.Scrubber-scrollbar');\n\n    scrollbar.css(\n      'max-height',\n      $(window).height() -\n        scrubber.offset().top +\n        $(window).scrollTop() -\n        parseInt($('#app').css('padding-bottom'), 10) -\n        (scrubber.outerHeight() - scrollbar.outerHeight())\n    );\n  }\n\n  onmousedown(e) {\n    e.redraw = false;\n    this.mouseStart = e.clientY || e.originalEvent.touches[0].clientY;\n    this.indexStart = this.stream.index;\n    this.dragging = true;\n    $('body').css('cursor', 'move');\n    this.$().toggleClass('dragging', this.dragging);\n  }\n\n  onmousemove(e) {\n    if (!this.dragging) return;\n\n    // Work out how much the mouse has moved by - first in pixels, then\n    // convert it to a percentage of the scrollbar's height, and then\n    // finally convert it into an index. Add this delta index onto\n    // the index at which the drag was started, and then scroll there.\n    const deltaPixels = (e.clientY || e.originalEvent.touches[0].clientY) - this.mouseStart;\n    const deltaPercent = (deltaPixels / this.$('.Scrubber-scrollbar').outerHeight()) * 100;\n    const deltaIndex = deltaPercent / this.percentPerPost().index || 0;\n    const newIndex = Math.min(this.indexStart + deltaIndex, this.stream.count() - 1);\n\n    this.stream.index = Math.max(0, newIndex);\n    this.updateScrubberValues();\n  }\n\n  onmouseup() {\n    this.$().toggleClass('dragging', this.dragging);\n    if (!this.dragging) return;\n\n    this.mouseStart = 0;\n    this.indexStart = 0;\n    this.dragging = false;\n    $('body').css('cursor', '');\n\n    this.$().removeClass('open');\n\n    // If the index we've landed on is in a gap, then tell the stream-\n    // content that we want to load those posts.\n    const intIndex = Math.floor(this.stream.index);\n    this.stream.goToIndex(intIndex);\n  }\n\n  onclick(e) {\n    // Calculate the index which we want to jump to based on the click position.\n\n    // 1. Get the offset of the click from the top of the scrollbar, as a\n    //    percentage of the scrollbar's height.\n    const $scrollbar = this.$('.Scrubber-scrollbar');\n    const offsetPixels = (e.pageY || e.originalEvent.touches[0].pageY) - $scrollbar.offset().top + $('body').scrollTop();\n    let offsetPercent = (offsetPixels / $scrollbar.outerHeight()) * 100;\n\n    // 2. We want the handle of the scrollbar to end up centered on the click\n    //    position. Thus, we calculate the height of the handle in percent and\n    //    use that to find a new offset percentage.\n    offsetPercent = offsetPercent - parseFloat($scrollbar.find('.Scrubber-handle')[0].style.height) / 2;\n\n    // 3. Now we can convert the percentage into an index, and tell the stream-\n    //    content component to jump to that index.\n    let offsetIndex = offsetPercent / this.percentPerPost().index;\n    offsetIndex = Math.max(0, Math.min(this.stream.count() - 1, offsetIndex));\n    this.stream.goToIndex(Math.floor(offsetIndex));\n    this.updateScrubberValues({ animate: true, forceHeightChange: true });\n\n    this.$().removeClass('open');\n  }\n\n  /**\n   * Get the percentage of the height of the scrubber that should be allocated\n   * to each post.\n   *\n   * @return {{ index: number, visible: number }}\n   * @property {Number} index The percent per post for posts on either side of\n   *     the visible part of the scrubber.\n   * @property {Number} visible The percent per post for the visible part of the\n   *     scrubber.\n   */\n  percentPerPost() {\n    const count = this.stream.count() || 1;\n    const visible = this.stream.visible || 1;\n\n    // To stop the handle of the scrollbar from getting too small when there\n    // are many posts, we define a minimum percentage height for the handle\n    // calculated from a 50 pixel limit. From this, we can calculate the\n    // minimum percentage per visible post. If this is greater than the actual\n    // percentage per post, then we need to adjust the 'before' percentage to\n    // account for it.\n    const minPercentVisible = (50 / this.$('.Scrubber-scrollbar').outerHeight()) * 100;\n    const percentPerVisiblePost = Math.max(100 / count, minPercentVisible / visible);\n    const percentPerPost = count === visible ? 0 : (100 - percentPerVisiblePost * visible) / (count - visible);\n\n    return {\n      index: percentPerPost,\n      visible: percentPerVisiblePost,\n    };\n  }\n}\n","import Dropdown, { IDropdownAttrs } from './Dropdown';\nimport Button from './Button';\nimport icon from '../helpers/icon';\nimport Mithril from 'mithril';\nimport classList from '../utils/classList';\n\nexport interface ISplitDropdownAttrs extends IDropdownAttrs {}\n\n/**\n * The `SplitDropdown` component is similar to `Dropdown`, but the first child\n * is displayed as its own button prior to the toggle button.\n */\nexport default class SplitDropdown extends Dropdown {\n  static initAttrs(attrs: ISplitDropdownAttrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = classList(attrs.className, 'Dropdown--split');\n    attrs.menuClassName = classList(attrs.menuClassName, 'Dropdown-menu--right');\n  }\n\n  getButton(children: Mithril.ChildArray): Mithril.Vnode<any, any> {\n    // Make a copy of the attrs of the first child component. We will assign\n    // these attrs to a new button, so that it has exactly the same behaviour as\n    // the first child.\n    const firstChild = this.getFirstChild(children);\n    const buttonAttrs = Object.assign({}, firstChild?.attrs);\n    buttonAttrs.className = classList(buttonAttrs.className, 'SplitDropdown-button Button', this.attrs.buttonClassName);\n\n    return (\n      <>\n        <Button {...buttonAttrs}>{firstChild.children}</Button>\n        <button\n          className={'Dropdown-toggle Button Button--icon ' + this.attrs.buttonClassName}\n          aria-haspopup=\"menu\"\n          aria-label={this.attrs.accessibleToggleLabel}\n          data-toggle=\"dropdown\"\n        >\n          {this.attrs.icon ? icon(this.attrs.icon, { className: 'Button-icon' }) : null}\n          {icon('fas fa-caret-down', { className: 'Button-caret' })}\n        </button>\n      </>\n    );\n  }\n\n  /**\n   * Get the first child. If the first child is an array, the first item in that\n   * array will be returned.\n   */\n  protected getFirstChild(children: Mithril.Children): Mithril.Vnode<any, any> {\n    let firstChild = children;\n\n    while (firstChild instanceof Array) firstChild = firstChild[0];\n\n    return firstChild as Mithril.Vnode<any, any>;\n  }\n}\n","/* eslint-disable no-undefined,no-param-reassign,no-shadow */\n\n/**\n * Throttle execution of a function. Especially useful for rate limiting\n * execution of handlers on events like resize and scroll.\n *\n * @param  {number}    delay -          A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param  {boolean}   [noTrailing] -   Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the\n *                                    throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time\n *                                    after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,\n *                                    the internal counter is reset).\n * @param  {Function}  callback -       A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n *                                    to `callback` when the throttled-function is executed.\n * @param  {boolean}   [debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),\n *                                    schedule `callback` to execute after `delay` ms.\n *\n * @returns {Function}  A new, throttled, function.\n */\nexport default function (delay, noTrailing, callback, debounceMode) {\n\t/*\n\t * After wrapper has stopped being called, this timeout ensures that\n\t * `callback` is executed at the proper times in `throttle` and `end`\n\t * debounce modes.\n\t */\n\tlet timeoutID;\n\tlet cancelled = false;\n\n\t// Keep track of the last time `callback` was executed.\n\tlet lastExec = 0;\n\n\t// Function to clear existing timeout\n\tfunction clearExistingTimeout() {\n\t\tif (timeoutID) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\t}\n\n\t// Function to cancel next exec\n\tfunction cancel() {\n\t\tclearExistingTimeout();\n\t\tcancelled = true;\n\t}\n\n\t// `noTrailing` defaults to falsy.\n\tif (typeof noTrailing !== 'boolean') {\n\t\tdebounceMode = callback;\n\t\tcallback = noTrailing;\n\t\tnoTrailing = undefined;\n\t}\n\n\t/*\n\t * The `wrapper` function encapsulates all of the throttling / debouncing\n\t * functionality and when executed will limit the rate at which `callback`\n\t * is executed.\n\t */\n\tfunction wrapper(...arguments_) {\n\t\tlet self = this;\n\t\tlet elapsed = Date.now() - lastExec;\n\n\t\tif (cancelled) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec() {\n\t\t\tlastExec = Date.now();\n\t\t\tcallback.apply(self, arguments_);\n\t\t}\n\n\t\t/*\n\t\t * If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t * to allow future `callback` executions.\n\t\t */\n\t\tfunction clear() {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif (debounceMode && !timeoutID) {\n\t\t\t/*\n\t\t\t * Since `wrapper` is being called for the first time and\n\t\t\t * `debounceMode` is true (at begin), execute `callback`.\n\t\t\t */\n\t\t\texec();\n\t\t}\n\n\t\tclearExistingTimeout();\n\n\t\tif (debounceMode === undefined && elapsed > delay) {\n\t\t\t/*\n\t\t\t * In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t * `callback`.\n\t\t\t */\n\t\t\texec();\n\t\t} else if (noTrailing !== true) {\n\t\t\t/*\n\t\t\t * In trailing throttle mode, since `delay` time has not been\n\t\t\t * exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t * recent execution.\n\t\t\t *\n\t\t\t * If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t * after `delay` ms.\n\t\t\t *\n\t\t\t * If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t * execute after `delay` ms.\n\t\t\t */\n\t\t\ttimeoutID = setTimeout(\n\t\t\t\tdebounceMode ? clear : exec,\n\t\t\t\tdebounceMode === undefined ? delay - elapsed : delay\n\t\t\t);\n\t\t}\n\t}\n\n\twrapper.cancel = cancel;\n\n\t// Return the wrapper function.\n\treturn wrapper;\n}\n","/* eslint-disable no-undefined */\n\nimport throttle from './throttle';\n\n/**\n * Debounce execution of a function. Debouncing, unlike throttling,\n * guarantees that a function is only executed a single time, either at the\n * very beginning of a series of calls, or at the very end.\n *\n * @param  {number}   delay -         A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param  {boolean}  [atBegin] -     Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds\n *                                  after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.\n *                                  (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).\n * @param  {Function} callback -      A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n *                                  to `callback` when the debounced-function is executed.\n *\n * @returns {Function} A new, debounced function.\n */\nexport default function (delay, atBegin, callback) {\n\treturn callback === undefined\n\t\t? throttle(delay, atBegin, false)\n\t\t: throttle(delay, callback, atBegin !== false);\n}\n","/**\n * The `anchorScroll` utility saves the scroll position relative to an element,\n * and then restores it after a callback has been run.\n *\n * This is useful if a redraw will change the page's content above the viewport.\n * Normally doing this will result in the content in the viewport being pushed\n * down or pulled up. By wrapping the redraw with this utility, the scroll\n * position can be anchor to an element that is in or below the viewport, so\n * the content in the viewport will stay the same.\n *\n * @param {string | HTMLElement | SVGElement | Element} element The element to anchor the scroll position to.\n * @param {() => void} callback The callback to run that will change page content.\n */\nexport default function anchorScroll(element, callback) {\n  const $window = $(window);\n  const relativeScroll = $(element).offset().top - $window.scrollTop();\n\n  callback();\n\n  $window.scrollTop($(element).offset().top - relativeScroll);\n}\n","import app from '../../forum/app';\nimport { throttle } from 'throttle-debounce';\nimport anchorScroll from '../../common/utils/anchorScroll';\nimport type Discussion from '../../common/models/Discussion';\nimport type Post from '../../common/models/Post';\n\nexport default class PostStreamState {\n  /**\n   * The number of posts to load per page.\n   */\n  static loadCount = 20;\n\n  /**\n   * The discussion to display the post stream for.\n   */\n  discussion: Discussion;\n\n  /**\n   * Whether or not the infinite-scrolling auto-load functionality is\n   * disabled.\n   */\n  paused = false;\n\n  loadPageTimeouts: Record<number, NodeJS.Timeout> = {};\n  pagesLoading = 0;\n\n  index = 0;\n  number = 1;\n\n  /**\n   * The number of posts that are currently visible in the viewport.\n   */\n  visible = 1;\n  visibleStart = 0;\n  visibleEnd = 0;\n\n  animateScroll = false;\n  needsScroll = false;\n  targetPost: { number: number } | { index: number; reply?: boolean } | null = null;\n\n  /**\n   * The description to render on the scrubber.\n   */\n  description = '';\n\n  /**\n   * When the page is scrolled, goToIndex is called, or the page is loaded,\n   * various listeners result in the scrubber being updated with a new\n   * position and values. However, if goToNumber is called, the scrubber\n   * will not be updated. Accordingly, we add logic to the scrubber's\n   * onupdate to update itself, but only when needed, as indicated by this\n   * property.\n   *\n   */\n  forceUpdateScrubber = false;\n\n  loadPromise: Promise<void> | null = null;\n\n  loadNext: () => void;\n  loadPrevious: () => void;\n\n  constructor(discussion: Discussion, includedPosts: Post[] = []) {\n    this.discussion = discussion;\n\n    this.loadNext = throttle(300, this._loadNext);\n    this.loadPrevious = throttle(300, this._loadPrevious);\n\n    this.show(includedPosts);\n  }\n\n  /**\n   * Update the stream so that it loads and includes the latest posts in the\n   * discussion, if the end is being viewed.\n   */\n  update() {\n    if (!this.viewingEnd()) return Promise.resolve();\n\n    this.visibleEnd = this.count();\n\n    return this.loadRange(this.visibleStart, this.visibleEnd);\n  }\n\n  /**\n   * Load and scroll up to the first post in the discussion.\n   */\n  goToFirst(): Promise<void> {\n    return this.goToIndex(0);\n  }\n\n  /**\n   * Load and scroll down to the last post in the discussion.\n   */\n  goToLast(): Promise<void> {\n    return this.goToIndex(this.count() - 1, true);\n  }\n\n  /**\n   * Load and scroll to a post with a certain number.\n   *\n   * @param number The post number to go to. If 'reply', go to the last post and scroll the reply preview into view.\n   */\n  goToNumber(number: number | 'reply', noAnimation = false): Promise<void> {\n    // If we want to go to the reply preview, then we will go to the end of the\n    // discussion and then scroll to the very bottom of the page.\n    if (number === 'reply') {\n      const resultPromise = this.goToLast();\n      this.targetPost = { ...(this.targetPost as { index: number }), reply: true };\n      return resultPromise;\n    }\n\n    this.paused = true;\n\n    this.loadPromise = this.loadNearNumber(number);\n\n    this.needsScroll = true;\n    this.targetPost = { number };\n    this.animateScroll = !noAnimation;\n    this.number = number;\n\n    // In this case, the redraw is only called after the response has been loaded\n    // because we need to know the indices of the post range before we can\n    // start scrolling to items. Calling redraw early causes issues.\n    // Since this is only used for external navigation to the post stream, the delay\n    // before the stream is moved is not an issue.\n    return this.loadPromise.then(() => m.redraw());\n  }\n\n  /**\n   * Load and scroll to a certain index within the discussion.\n   */\n  goToIndex(index: number, noAnimation = false): Promise<void> {\n    this.paused = true;\n\n    this.loadPromise = this.loadNearIndex(index);\n\n    this.needsScroll = true;\n    this.targetPost = { index };\n    this.animateScroll = !noAnimation;\n    this.index = index;\n\n    m.redraw();\n\n    return this.loadPromise;\n  }\n\n  /**\n   * Clear the stream and load posts near a certain number. Returns a promise.\n   * If the post with the given number is already loaded, the promise will be\n   * resolved immediately.\n   */\n  loadNearNumber(number: number): Promise<void> {\n    if (this.posts().some((post) => post && Number(post.number()) === Number(number))) {\n      return Promise.resolve();\n    }\n\n    this.reset();\n\n    return app.store\n      .find<Post[]>('posts', {\n        filter: { discussion: this.discussion.id() as string },\n        page: { near: number },\n      })\n      .then(this.show.bind(this));\n  }\n\n  /**\n   * Clear the stream and load posts near a certain index. A page of posts\n   * surrounding the given index will be loaded. Returns a promise. If the given\n   * index is already loaded, the promise will be resolved immediately.\n   */\n  loadNearIndex(index: number): Promise<void> {\n    if (index >= this.visibleStart && index < this.visibleEnd) {\n      return Promise.resolve();\n    }\n\n    const start = this.sanitizeIndex(index - PostStreamState.loadCount / 2);\n    const end = start + PostStreamState.loadCount;\n\n    this.reset(start, end);\n\n    return this.loadRange(start, end).then(this.show.bind(this));\n  }\n\n  /**\n   * Load the next page of posts.\n   */\n  _loadNext() {\n    const start = this.visibleEnd;\n    const end = (this.visibleEnd = this.sanitizeIndex(this.visibleEnd + PostStreamState.loadCount));\n\n    // Unload the posts which are two pages back from the page we're currently\n    // loading.\n    const twoPagesAway = start - PostStreamState.loadCount * 2;\n    if (twoPagesAway > this.visibleStart && twoPagesAway >= 0) {\n      this.visibleStart = twoPagesAway + PostStreamState.loadCount + 1;\n\n      if (this.loadPageTimeouts[twoPagesAway]) {\n        clearTimeout(this.loadPageTimeouts[twoPagesAway]);\n        delete this.loadPageTimeouts[twoPagesAway];\n        this.pagesLoading--;\n      }\n    }\n\n    this.loadPage(start, end);\n  }\n\n  /**\n   * Load the previous page of posts.\n   */\n  _loadPrevious() {\n    const end = this.visibleStart;\n    const start = (this.visibleStart = this.sanitizeIndex(this.visibleStart - PostStreamState.loadCount));\n\n    // Unload the posts which are two pages back from the page we're currently\n    // loading.\n    const twoPagesAway = start + PostStreamState.loadCount * 2;\n    if (twoPagesAway < this.visibleEnd && twoPagesAway <= this.count()) {\n      this.visibleEnd = twoPagesAway;\n\n      if (this.loadPageTimeouts[twoPagesAway]) {\n        clearTimeout(this.loadPageTimeouts[twoPagesAway]);\n        delete this.loadPageTimeouts[twoPagesAway];\n        this.pagesLoading--;\n      }\n    }\n\n    this.loadPage(start, end, true);\n  }\n\n  /**\n   * Load a page of posts into the stream and redraw.\n   */\n  loadPage(start: number, end: number, backwards = false) {\n    this.pagesLoading++;\n\n    const redraw = () => {\n      if (start < this.visibleStart || end > this.visibleEnd) return;\n\n      const anchorIndex = backwards ? this.visibleEnd - 1 : this.visibleStart;\n      anchorScroll(`.PostStream-item[data-index=\"${anchorIndex}\"]`, m.redraw.sync);\n    };\n    redraw();\n\n    this.loadPageTimeouts[start] = setTimeout(\n      () => {\n        this.loadRange(start, end).then(() => {\n          redraw();\n          this.pagesLoading--;\n        });\n        delete this.loadPageTimeouts[start];\n      },\n      this.pagesLoading - 1 ? 1000 : 0\n    );\n  }\n\n  /**\n   * Load and inject the specified range of posts into the stream, without\n   * clearing it.\n   */\n  loadRange(start: number, end: number): Promise<Post[]> {\n    const loadIds: string[] = [];\n    const loaded: Post[] = [];\n\n    this.discussion\n      .postIds()\n      .slice(start, end)\n      .forEach((id) => {\n        const post = app.store.getById<Post>('posts', id);\n\n        if (post && post.discussion() && typeof post.canEdit() !== 'undefined') {\n          loaded.push(post);\n        } else {\n          loadIds.push(id);\n        }\n      });\n\n    if (loadIds.length) {\n      return app.store.find<Post[]>('posts', loadIds).then((newPosts) => {\n        return loaded.concat(newPosts).sort((a, b) => a.number() - b.number());\n      });\n    }\n\n    return Promise.resolve(loaded);\n  }\n\n  /**\n   * Set up the stream with the given array of posts.\n   */\n  show(posts: Post[]) {\n    this.visibleStart = posts.length ? this.discussion.postIds().indexOf(posts[0].id() ?? '0') : 0;\n    this.visibleEnd = this.sanitizeIndex(this.visibleStart + posts.length);\n  }\n\n  /**\n   * Reset the stream so that a specific range of posts is displayed. If a range\n   * is not specified, the first page of posts will be displayed.\n   */\n  reset(start?: number, end?: number) {\n    this.visibleStart = start || 0;\n    this.visibleEnd = this.sanitizeIndex(end || PostStreamState.loadCount);\n  }\n\n  /**\n   * Get the visible page of posts.\n   */\n  posts(): (Post | null)[] {\n    return this.discussion\n      .postIds()\n      .slice(this.visibleStart, this.visibleEnd)\n      .map((id) => {\n        const post = app.store.getById<Post>('posts', id);\n\n        return post && post.discussion() && typeof post.canEdit() !== 'undefined' ? post : null;\n      });\n  }\n\n  /**\n   * Get the total number of posts in the discussion.\n   */\n  count(): number {\n    return this.discussion.postIds().length;\n  }\n\n  /**\n   * Check whether or not the scrubber should be disabled, i.e. if all of the\n   * posts are visible in the viewport.\n   */\n  disabled(): boolean {\n    return this.visible >= this.count();\n  }\n\n  /**\n   * Are we currently viewing the end of the discussion?\n   */\n  viewingEnd(): boolean {\n    // In some cases, such as if we've stickied a post, an event post\n    // may have been added / removed. This means that `this.visibleEnd`\n    // and`this.count()` will be out of sync by 1 post, but we are still\n    // \"viewing the end\" of the post stream, so we should still reload\n    // all posts up until the last one.\n    return Math.abs(this.count() - this.visibleEnd) <= 1;\n  }\n\n  /**\n   * Make sure that the given index is not outside of the possible range of\n   * indexes in the discussion.\n   */\n  sanitizeIndex(index: number) {\n    return Math.max(0, Math.min(this.count(), Math.floor(index)));\n  }\n}\n","import type Mithril from 'mithril';\n\nimport app from '../../forum/app';\nimport Page, { IPageAttrs } from '../../common/components/Page';\nimport ItemList from '../../common/utils/ItemList';\nimport DiscussionHero from './DiscussionHero';\nimport DiscussionListPane from './DiscussionListPane';\nimport PostStream from './PostStream';\nimport PostStreamScrubber from './PostStreamScrubber';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport SplitDropdown from '../../common/components/SplitDropdown';\nimport listItems from '../../common/helpers/listItems';\nimport DiscussionControls from '../utils/DiscussionControls';\nimport PostStreamState from '../states/PostStreamState';\nimport Discussion from '../../common/models/Discussion';\nimport Post from '../../common/models/Post';\nimport { ApiResponseSingle } from '../../common/Store';\n\nexport interface IDiscussionPageAttrs extends IPageAttrs {\n  id: string;\n  near?: number;\n}\n\n/**\n * The `DiscussionPage` component displays a whole discussion page, including\n * the discussion list pane, the hero, the posts, and the sidebar.\n */\nexport default class DiscussionPage<CustomAttrs extends IDiscussionPageAttrs = IDiscussionPageAttrs> extends Page<CustomAttrs> {\n  /**\n   * The discussion that is being viewed.\n   */\n  protected discussion: Discussion | null = null;\n\n  /**\n   * A public API for interacting with the post stream.\n   */\n  protected stream: PostStreamState | null = null;\n\n  /**\n   * The number of the first post that is currently visible in the viewport.\n   */\n  protected near: number = 0;\n\n  protected useBrowserScrollRestoration = true;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.load();\n\n    // If the discussion list has been loaded, then we'll enable the pane (and\n    // hide it by default). Also, if we've just come from another discussion\n    // page, then we don't want Mithril to redraw the whole page – if it did,\n    // then the pane would redraw which would be slow and would cause problems with\n    // event handlers.\n    // We will also enable the pane if the discussion list is empty but loading,\n    // because the DiscussionComposer refreshes the list and redirects to the new discussion at the same time.\n    if (app.discussions.hasItems() || app.discussions.isLoading()) {\n      app.pane?.enable();\n      app.pane?.hide();\n    }\n\n    this.bodyClass = 'App--discussion';\n  }\n\n  onremove(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onremove(vnode);\n\n    // If we are indeed navigating away from this discussion, then disable the\n    // discussion list pane. Also, if we're composing a reply to this\n    // discussion, minimize the composer – unless it's empty, in which case\n    // we'll just close it.\n    app.pane?.disable();\n\n    if (this.discussion && app.composer.composingReplyTo(this.discussion) && !app.composer?.fields?.content()) {\n      app.composer.hide();\n    } else {\n      app.composer.minimize();\n    }\n  }\n\n  view(): Mithril.Children {\n    return <div className=\"DiscussionPage\">{this.viewItems().toArray()}</div>;\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('pane', <DiscussionListPane state={app.discussions} />, 100);\n    items.add(\n      'discussions',\n      <div className=\"DiscussionPage-discussion\">{this.discussion ? this.pageContent().toArray() : this.loadingItems().toArray()}</div>,\n      90\n    );\n\n    return items;\n  }\n\n  /**\n   * List of components shown while the discussion is loading.\n   */\n  loadingItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('spinner', <LoadingIndicator />, 100);\n\n    return items;\n  }\n\n  /**\n   * Function that renders the `sidebarItems` ItemList.\n   */\n  sidebar(): Mithril.Children {\n    return (\n      <nav className=\"DiscussionPage-nav\">\n        <ul>{listItems(this.sidebarItems().toArray())}</ul>\n      </nav>\n    );\n  }\n\n  /**\n   * Renders the discussion's hero.\n   */\n  hero(): Mithril.Children {\n    return <DiscussionHero discussion={this.discussion} />;\n  }\n\n  /**\n   * List of items rendered as the main page content.\n   */\n  pageContent(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('hero', this.hero(), 100);\n    items.add('main', <div className=\"container\">{this.mainContent().toArray()}</div>, 10);\n\n    return items;\n  }\n\n  /**\n   * List of items rendered inside the main page content container.\n   */\n  mainContent(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('sidebar', this.sidebar(), 100);\n\n    items.add(\n      'poststream',\n      <div className=\"DiscussionPage-stream\">\n        <PostStream discussion={this.discussion} stream={this.stream} onPositionChange={this.positionChanged.bind(this)} />\n      </div>,\n      10\n    );\n\n    return items;\n  }\n\n  /**\n   * Load the discussion from the API or use the preloaded one.\n   */\n  load(): void {\n    const preloadedDiscussion = app.preloadedApiDocument<Discussion>();\n    if (preloadedDiscussion) {\n      // We must wrap this in a setTimeout because if we are mounting this\n      // component for the first time on page load, then any calls to m.redraw\n      // will be ineffective and thus any configs (scroll code) will be run\n      // before stuff is drawn to the page.\n      setTimeout(this.show.bind(this, preloadedDiscussion), 0);\n    } else {\n      const params = this.requestParams();\n\n      app.store.find<Discussion>('discussions', m.route.param('id'), params).then(this.show.bind(this));\n    }\n\n    m.redraw();\n  }\n\n  /**\n   * Get the parameters that should be passed in the API request to get the\n   * discussion.\n   */\n  requestParams(): Record<string, unknown> {\n    return {\n      bySlug: true,\n      page: { near: this.near },\n    };\n  }\n\n  /**\n   * Initialize the component to display the given discussion.\n   */\n  show(discussion: ApiResponseSingle<Discussion>): void {\n    app.history.push('discussion', discussion.title());\n    app.setTitle(discussion.title());\n    app.setTitleCount(0);\n\n    // When the API responds with a discussion, it will also include a number of\n    // posts. Some of these posts are included because they are on the first\n    // page of posts we want to display (determined by the `near` parameter) –\n    // others may be included because due to other relationships introduced by\n    // extensions. We need to distinguish the two so we don't end up displaying\n    // the wrong posts. We do so by filtering out the posts that don't have\n    // the 'discussion' relationship linked, then sorting and splicing.\n    let includedPosts: Post[] = [];\n    if (discussion.payload && discussion.payload.included) {\n      const discussionId = discussion.id();\n\n      includedPosts = discussion.payload.included\n        .filter(\n          (record) =>\n            record.type === 'posts' &&\n            record.relationships &&\n            record.relationships.discussion &&\n            !Array.isArray(record.relationships.discussion.data) &&\n            record.relationships.discussion.data.id === discussionId\n        )\n        // We can make this assertion because posts should be in the store,\n        // since they were in the discussion's payload.\n        .map((record) => app.store.getById<Post>('posts', record.id) as Post)\n        .sort((a: Post, b: Post) => a.number() - b.number())\n        .slice(0, 20);\n    }\n\n    // Set up the post stream for this discussion, along with the first page of\n    // posts we want to display. Tell the stream to scroll down and highlight\n    // the specific post that was routed to.\n    this.stream = new PostStreamState(discussion, includedPosts);\n    const rawNearParam = m.route.param('near');\n    const nearParam = rawNearParam === 'reply' ? 'reply' : parseInt(rawNearParam);\n    this.stream.goToNumber(nearParam || (includedPosts[0]?.number() ?? 0), true).then(() => {\n      this.discussion = discussion;\n\n      app.current.set('discussion', discussion);\n      app.current.set('stream', this.stream);\n    });\n  }\n\n  /**\n   * Build an item list for the contents of the sidebar.\n   */\n  sidebarItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.discussion) {\n      items.add(\n        'controls',\n        <SplitDropdown\n          icon=\"fas fa-ellipsis-v\"\n          className=\"App-primaryControl\"\n          buttonClassName=\"Button--primary\"\n          accessibleToggleLabel={app.translator.trans('core.forum.discussion_controls.toggle_dropdown_accessible_label')}\n        >\n          {DiscussionControls.controls(this.discussion, this).toArray()}\n        </SplitDropdown>,\n        100\n      );\n    }\n\n    items.add('scrubber', <PostStreamScrubber stream={this.stream} className=\"App-titleControl\" />, -100);\n\n    return items;\n  }\n\n  /**\n   * When the posts that are visible in the post stream change (i.e. the user\n   * scrolls up or down), then we update the URL and mark the posts as read.\n   */\n  positionChanged(startNumber: number, endNumber: number): void {\n    const discussion = this.discussion;\n\n    if (!discussion) return;\n\n    // Construct a URL to this discussion with the updated position, then\n    // replace it into the window's history and our own history stack.\n    const url = app.route.discussion(discussion, (this.near = startNumber));\n\n    window.history.replaceState(null, document.title, url);\n    app.history.push('discussion', discussion.title());\n\n    // If the user hasn't read past here before, then we'll update their read\n    // state and redraw.\n    if (app.session.user && endNumber > (discussion.lastReadPostNumber() || 0)) {\n      discussion.save({ lastReadPostNumber: endNumber });\n      m.redraw();\n    }\n  }\n}\n","import Component from '../../common/Component';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\n\n/**\n * The `HeaderPrimary` component displays primary header controls. On the\n * default skin, these are shown just to the right of the forum title.\n */\nexport default class HeaderPrimary extends Component {\n  view() {\n    return <ul className=\"Header-controls\">{listItems(this.items().toArray())}</ul>;\n  }\n\n  /**\n   * Build an item list for the controls.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  items() {\n    return new ItemList();\n  }\n}\n","import Button from './Button';\nimport Link from './Link';\n\n/**\n * The `LinkButton` component defines a `Button` which links to a route.\n *\n * ### Attrs\n *\n * All of the attrs accepted by `Button`, plus:\n *\n * - `active` Whether or not the page that this button links to is currently\n *   active.\n * - `href` The URL to link to. If the current URL `m.route()` matches this,\n *   the `active` prop will automatically be set to true.\n * - `force` Whether the page should be fully rerendered. Defaults to `true`.\n */\nexport default class LinkButton extends Button {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.active = this.isActive(attrs);\n    if (attrs.force === undefined) attrs.force = true;\n  }\n\n  view(vnode) {\n    const vdom = super.view(vnode);\n\n    vdom.tag = Link;\n    vdom.attrs.active = String(vdom.attrs.active);\n    delete vdom.attrs.type;\n\n    return vdom;\n  }\n\n  /**\n   * Determine whether a component with the given attrs is 'active'.\n   *\n   * @param {object} attrs\n   * @return {boolean}\n   */\n  static isActive(attrs) {\n    return typeof attrs.active !== 'undefined' ? attrs.active : m.route.get()?.split('?')[0] === attrs.href?.split('?')[0];\n  }\n}\n","import app from '../../forum/app';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport Dropdown, { IDropdownAttrs } from '../../common/components/Dropdown';\nimport LinkButton from '../../common/components/LinkButton';\nimport Button from '../../common/components/Button';\nimport ItemList from '../../common/utils/ItemList';\nimport Separator from '../../common/components/Separator';\nimport extractText from '../../common/utils/extractText';\nimport type Mithril from 'mithril';\n\nexport interface ISessionDropdownAttrs extends IDropdownAttrs {}\n\n/**\n * The `SessionDropdown` component shows a button with the current user's\n * avatar/name, with a dropdown of session controls.\n */\nexport default class SessionDropdown<CustomAttrs extends ISessionDropdownAttrs = ISessionDropdownAttrs> extends Dropdown<CustomAttrs> {\n  static initAttrs(attrs: ISessionDropdownAttrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = 'SessionDropdown';\n    attrs.buttonClassName = 'Button Button--user Button--flat';\n    attrs.menuClassName = 'Dropdown-menu--right';\n\n    attrs.accessibleToggleLabel = extractText(app.translator.trans('core.forum.header.session_dropdown_accessible_label'));\n  }\n\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    return super.view({ ...vnode, children: this.items().toArray() });\n  }\n\n  getButtonContent() {\n    const user = app.session.user;\n\n    return [avatar(user), ' ', <span className=\"Button-label\">{username(user)}</span>];\n  }\n\n  /**\n   * Build an item list for the contents of the dropdown menu.\n   */\n  items(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n    const user = app.session.user!;\n\n    items.add(\n      'profile',\n      <LinkButton icon=\"fas fa-user\" href={app.route.user(user)}>\n        {app.translator.trans('core.forum.header.profile_button')}\n      </LinkButton>,\n      100\n    );\n\n    items.add(\n      'settings',\n      <LinkButton icon=\"fas fa-cog\" href={app.route('settings')}>\n        {app.translator.trans('core.forum.header.settings_button')}\n      </LinkButton>,\n      50\n    );\n\n    if (app.forum.attribute('adminUrl')) {\n      items.add(\n        'administration',\n        <LinkButton icon=\"fas fa-wrench\" href={app.forum.attribute('adminUrl')} target=\"_blank\">\n          {app.translator.trans('core.forum.header.admin_button')}\n        </LinkButton>,\n        0\n      );\n    }\n\n    items.add('separator', <Separator />, -90);\n\n    items.add(\n      'logOut',\n      <Button icon=\"fas fa-sign-out-alt\" onclick={app.session.logout.bind(app.session)}>\n        {app.translator.trans('core.forum.header.log_out_button')}\n      </Button>,\n      -100\n    );\n\n    return items;\n  }\n}\n","import Dropdown, { IDropdownAttrs } from './Dropdown';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport type Component from '../Component';\nimport type Mithril from 'mithril';\n\n/**\n * Determines via a vnode is currently \"active\".\n * Due to changes in Mithril 2, attrs will not be instantiated until AFTER view()\n * is initially called on the parent component, so we can not always depend on the\n * active attr to determine which element should be displayed as the \"active child\".\n *\n * This is a temporary patch, and as so, is not exported / placed in utils.\n */\nfunction isActive(vnode: Mithril.Children): boolean {\n  if (!vnode || typeof vnode !== 'object' || vnode instanceof Array) return false;\n\n  const tag = vnode.tag;\n\n  // Allow non-selectable dividers/headers to be added.\n  if (typeof tag === 'string' && tag !== 'a' && tag !== 'button') return false;\n\n  if ((typeof tag === 'object' || typeof tag === 'function') && 'initAttrs' in tag) {\n    (tag as unknown as typeof Component).initAttrs(vnode.attrs);\n  }\n\n  return (typeof tag === 'object' || typeof tag === 'function') && 'isActive' in tag ? (tag as any).isActive(vnode.attrs) : vnode.attrs.active;\n}\n\nexport interface ISelectDropdownAttrs extends IDropdownAttrs {\n  defaultLabel: string;\n}\n\n/**\n * The `SelectDropdown` component is the same as a `Dropdown`, except the toggle\n * button's label is set as the label of the first child which has a truthy\n * `active` prop.\n */\nexport default class SelectDropdown<CustomAttrs extends ISelectDropdownAttrs = ISelectDropdownAttrs> extends Dropdown<CustomAttrs> {\n  static initAttrs(attrs: ISelectDropdownAttrs) {\n    attrs.caretIcon ??= 'fas fa-sort';\n\n    super.initAttrs(attrs);\n\n    attrs.className = classList(attrs.className, 'Dropdown--select');\n  }\n\n  getButtonContent(children: Mithril.ChildArray): Mithril.ChildArray {\n    const activeChild = children.find(isActive);\n    let label = (activeChild && typeof activeChild === 'object' && 'children' in activeChild && activeChild.children) || this.attrs.defaultLabel;\n\n    // @ts-ignore\n    if (Array.isArray(label)) label = label[0];\n\n    return [<span className=\"Button-label\">{label}</span>, this.attrs.caretIcon ? icon(this.attrs.caretIcon, { className: 'Button-caret' }) : null];\n  }\n}\n","import app from '../common/app';\nimport { FlarumRequestOptions } from './Application';\nimport { fireDeprecationWarning } from './helpers/fireDebugWarning';\nimport Store, { ApiPayloadSingle, ApiResponseSingle, MetaInformation } from './Store';\n\nexport interface ModelIdentifier {\n  type: string;\n  id: string;\n}\n\nexport interface ModelAttributes {\n  [key: string]: unknown;\n}\n\nexport interface ModelRelationships {\n  [relationship: string]: {\n    data: ModelIdentifier | ModelIdentifier[];\n  };\n}\n\nexport interface UnsavedModelData {\n  type?: string;\n  attributes?: ModelAttributes;\n  relationships?: ModelRelationships;\n}\n\nexport interface SavedModelData {\n  type: string;\n  id: string;\n  attributes?: ModelAttributes;\n  relationships?: ModelRelationships;\n}\n\nexport type ModelData = UnsavedModelData | SavedModelData;\n\nexport interface SaveRelationships {\n  [relationship: string]: null | Model | Model[];\n}\n\nexport interface SaveAttributes {\n  [key: string]: unknown;\n  relationships?: SaveRelationships;\n}\n\n/**\n * The `Model` class represents a local data resource. It provides methods to\n * persist changes via the API.\n */\nexport default abstract class Model {\n  /**\n   * The resource object from the API.\n   */\n  data: ModelData = {};\n\n  /**\n   * The time at which the model's data was last updated. Watching the value\n   * of this property is a fast way to retain/cache a subtree if data hasn't\n   * changed.\n   */\n  freshness: Date = new Date();\n\n  /**\n   * Whether or not the resource exists on the server.\n   */\n  exists: boolean = false;\n\n  /**\n   * The data store that this resource should be persisted to.\n   */\n  protected store: Store;\n\n  /**\n   * @param data A resource object from the API.\n   * @param store The data store that this model should be persisted to.\n   */\n  constructor(data: ModelData = {}, store = app.store) {\n    this.data = data;\n    this.store = store;\n  }\n\n  /**\n   * Get the model's ID.\n   *\n   * @final\n   */\n  id(): string | undefined {\n    return 'id' in this.data ? this.data.id : undefined;\n  }\n\n  /**\n   * Get one of the model's attributes.\n   *\n   * @final\n   */\n  attribute<T = unknown>(attribute: string): T {\n    return this.data?.attributes?.[attribute] as T;\n  }\n\n  /**\n   * Merge new data into this model locally.\n   *\n   * @param data A resource object to merge into this model\n   */\n  pushData(data: ModelData | { relationships?: SaveRelationships }): this {\n    if ('id' in data) {\n      (this.data as SavedModelData).id = data.id;\n    }\n\n    if ('type' in data) {\n      this.data.type = data.type;\n    }\n\n    if ('attributes' in data) {\n      this.data.attributes ||= {};\n\n      // @deprecated\n      // Filter out relationships that got in by accident.\n      for (const key in data.attributes) {\n        const val = data.attributes[key];\n        if (val && val instanceof Model) {\n          fireDeprecationWarning('Providing models as attributes to `Model.pushData()` or `Model.pushAttributes()` is deprecated.', '3249');\n          delete data.attributes[key];\n          data.relationships ||= {};\n          data.relationships[key] = { data: Model.getIdentifier(val) };\n        }\n      }\n\n      Object.assign(this.data.attributes, data.attributes);\n    }\n\n    if ('relationships' in data) {\n      const relationships = this.data.relationships ?? {};\n\n      // For every relationship field, we need to check if we've\n      // been handed a Model instance. If so, we will convert it to a\n      // relationship data object.\n      for (const r in data.relationships) {\n        const relationship = data.relationships[r];\n\n        if (relationship === null) {\n          delete relationships[r];\n          delete data.relationships[r];\n          continue;\n        }\n\n        let identifier: ModelRelationships[string];\n        if (relationship instanceof Model) {\n          identifier = { data: Model.getIdentifier(relationship) };\n        } else if (relationship instanceof Array) {\n          identifier = { data: relationship.map(Model.getIdentifier) };\n        } else {\n          identifier = relationship;\n        }\n\n        data.relationships[r] = identifier;\n        relationships[r] = identifier;\n      }\n\n      this.data.relationships = relationships;\n    }\n\n    // Now that we've updated the data, we can say that the model is fresh.\n    // This is an easy way to invalidate retained subtrees etc.\n    this.freshness = new Date();\n\n    return this;\n  }\n\n  /**\n   * Merge new attributes into this model locally.\n   *\n   * @param attributes The attributes to merge.\n   */\n  pushAttributes(attributes: ModelAttributes) {\n    this.pushData({ attributes });\n  }\n\n  /**\n   * Merge new attributes into this model, both locally and with persistence.\n   *\n   * @param attributes The attributes to save. If a 'relationships' key\n   *     exists, it will be extracted and relationships will also be saved.\n   */\n  save(\n    attributes: SaveAttributes,\n    options: Omit<FlarumRequestOptions<ApiPayloadSingle>, 'url'> & { meta?: MetaInformation } = {}\n  ): Promise<ApiResponseSingle<this>> {\n    const data: ModelData & { id?: string } = {\n      type: this.data.type,\n      attributes,\n    };\n\n    if ('id' in this.data) {\n      data.id = this.data.id;\n    }\n\n    // If a 'relationships' key exists, extract it from the attributes hash and\n    // set it on the top-level data object instead. We will be sending this data\n    // object to the API for persistence.\n    if (attributes.relationships) {\n      data.relationships = {};\n\n      for (const key in attributes.relationships) {\n        const model = attributes.relationships[key];\n\n        if (model === null) continue;\n\n        data.relationships[key] = {\n          data: model instanceof Array ? model.map(Model.getIdentifier) : Model.getIdentifier(model),\n        };\n      }\n\n      delete attributes.relationships;\n    }\n\n    // Before we update the model's data, we should make a copy of the model's\n    // old data so that we can revert back to it if something goes awry during\n    // persistence.\n    const oldData = this.copyData();\n\n    this.pushData(data);\n\n    const request = {\n      data,\n      meta: options.meta || undefined,\n    };\n\n    return app\n      .request<ApiPayloadSingle>({\n        method: this.exists ? 'PATCH' : 'POST',\n        url: app.forum.attribute('apiUrl') + this.apiEndpoint(),\n        body: request,\n        ...options,\n      })\n      .then(\n        // If everything went well, we'll make sure the store knows that this\n        // model exists now (if it didn't already), and we'll push the data that\n        // the API returned into the store.\n        (payload) => {\n          return this.store.pushPayload<this>(payload);\n        },\n\n        // If something went wrong, though... good thing we backed up our model's\n        // old data! We'll revert to that and let others handle the error.\n        (err: Error) => {\n          this.pushData(oldData);\n          m.redraw();\n          throw err;\n        }\n      );\n  }\n\n  /**\n   * Send a request to delete the resource.\n   *\n   * @param body Data to send along with the DELETE request.\n   */\n  delete(body: FlarumRequestOptions<void>['body'] = {}, options: Omit<FlarumRequestOptions<void>, 'url'> = {}): Promise<void> {\n    if (!this.exists) return Promise.resolve();\n\n    return app\n      .request({\n        method: 'DELETE',\n        url: app.forum.attribute('apiUrl') + this.apiEndpoint(),\n        body,\n        ...options,\n      })\n      .then(() => {\n        this.exists = false;\n\n        this.store.remove(this);\n      });\n  }\n\n  /**\n   * Construct a path to the API endpoint for this resource.\n   */\n  protected apiEndpoint(): string {\n    return '/' + this.data.type + ('id' in this.data ? '/' + this.data.id : '');\n  }\n\n  protected copyData(): ModelData {\n    return JSON.parse(JSON.stringify(this.data));\n  }\n\n  protected rawRelationship<M extends Model>(relationship: string): undefined | ModelIdentifier;\n  protected rawRelationship<M extends Model[]>(relationship: string): undefined | ModelIdentifier[];\n  protected rawRelationship<_M extends Model | Model[]>(relationship: string): undefined | ModelIdentifier | ModelIdentifier[] {\n    return this.data.relationships?.[relationship]?.data;\n  }\n\n  /**\n   * Generate a function which returns the value of the given attribute.\n   *\n   * @param transform A function to transform the attribute value\n   */\n  static attribute<T>(name: string): () => T;\n  static attribute<T, O = unknown>(name: string, transform: (attr: O) => T): () => T;\n  static attribute<T, O = unknown>(name: string, transform?: (attr: O) => T): () => T {\n    return function (this: Model) {\n      if (transform) {\n        return transform(this.attribute(name));\n      }\n\n      return this.attribute(name);\n    };\n  }\n\n  /**\n   * Generate a function which returns the value of the given has-one\n   * relationship.\n   *\n   * @return false if no information about the\n   *     relationship exists; undefined if the relationship exists but the model\n   *     has not been loaded; or the model if it has been loaded.\n   */\n  static hasOne<M extends Model>(name: string): () => M | false;\n  static hasOne<M extends Model | null>(name: string): () => M | null | false;\n  static hasOne<M extends Model>(name: string): () => M | false {\n    return function (this: Model) {\n      const relationshipData = this.data.relationships?.[name]?.data;\n\n      if (relationshipData && relationshipData instanceof Array) {\n        throw new Error(`Relationship ${name} on model ${this.data.type} is plural, so the hasOne method cannot be used to access it.`);\n      }\n\n      if (relationshipData) {\n        return this.store.getById<M>(relationshipData.type, relationshipData.id) as M;\n      }\n\n      return false;\n    };\n  }\n\n  /**\n   * Generate a function which returns the value of the given has-many\n   * relationship.\n   *\n   * @return false if no information about the relationship\n   *     exists; an array if it does, containing models if they have been\n   *     loaded, and undefined for those that have not.\n   */\n  static hasMany<M extends Model>(name: string): () => (M | undefined)[] | false {\n    return function (this: Model) {\n      const relationshipData = this.data.relationships?.[name]?.data;\n\n      if (relationshipData && !(relationshipData instanceof Array)) {\n        throw new Error(`Relationship ${name} on model ${this.data.type} is singular, so the hasMany method cannot be used to access it.`);\n      }\n\n      if (relationshipData) {\n        return relationshipData.map((data) => this.store.getById<M>(data.type, data.id));\n      }\n\n      return false;\n    };\n  }\n\n  /**\n   * Transform the given value into a Date object.\n   */\n  static transformDate(value: string): Date;\n  static transformDate(value: string | null): Date | null;\n  static transformDate(value: string | undefined): Date | undefined;\n  static transformDate(value: string | null | undefined): Date | null | undefined;\n  static transformDate(value: string | null | undefined): Date | null | undefined {\n    return value != null ? new Date(value) : value;\n  }\n\n  /**\n   * Get a resource identifier object for the given model.\n   */\n  protected static getIdentifier(model: Model): ModelIdentifier;\n  protected static getIdentifier(model?: Model): ModelIdentifier | null {\n    if (!model || !('id' in model.data)) return null;\n\n    return {\n      type: model.data.type,\n      id: model.data.id,\n    };\n  }\n}\n","import Model from '../Model';\n\n/**\n * The `computed` utility creates a function that will cache its output until\n * any of the dependent values are dirty.\n *\n * @param dependentKeys The keys of the dependent values.\n * @param compute The function which computes the value using the\n *     dependent values.\n */\nexport default function computed<T, M = Model>(...args: [...string[], (this: M, ...args: unknown[]) => T]): () => T {\n  const keys = args.slice(0, -1) as string[];\n  const compute = args.slice(-1)[0] as (this: M, ...args: unknown[]) => T;\n\n  const dependentValues: Record<string, unknown> = {};\n  let computedValue: T;\n\n  return function (this: M) {\n    let recompute = false;\n\n    // Read all of the dependent values. If any of them have changed since last\n    // time, then we'll want to recompute our output.\n    keys.forEach((key) => {\n      const attr = (this as Record<string, unknown | (() => unknown)>)[key];\n      const value = typeof attr === 'function' ? attr.call(this) : attr;\n\n      if (dependentValues[key] !== value) {\n        recompute = true;\n        dependentValues[key] = value;\n      }\n    });\n\n    if (recompute) {\n      computedValue = compute.apply(\n        this,\n        keys.map((key) => dependentValues[key])\n      );\n    }\n\n    return computedValue;\n  };\n}\n","/**\n * The `isDark` utility converts a hex color to rgb, and then calculates a YIQ\n * value in order to get the appropriate brightness value. See\n * https://www.w3.org/TR/AERT/#color-contrast for references.\n *\n * A YIQ value >= 128 corresponds to a light color according to the W3C\n * standards, but we use a custom threshold for each light and dark modes\n * to preserve design consistency.\n */\nexport default function isDark(hexcolor: string | null): boolean {\n  // return if hexcolor is undefined or shorter than 4 characters, shortest hex form is #333;\n  // decided against regex hex color validation for performance considerations\n  if (!hexcolor || hexcolor.length < 4) {\n    return false;\n  }\n\n  let hexnumbers = hexcolor.replace('#', '');\n\n  if (hexnumbers.length === 3) {\n    hexnumbers += hexnumbers;\n  }\n\n  const r = parseInt(hexnumbers.slice(0, 2), 16);\n  const g = parseInt(hexnumbers.slice(2, 4), 16);\n  const b = parseInt(hexnumbers.slice(4, 6), 16);\n  const yiq = (r * 299 + g * 587 + b * 114) / 1000;\n\n  const threshold = parseInt(getComputedStyle(document.body).getPropertyValue('--yiq-threshold').trim()) || 128;\n\n  return yiq < threshold;\n}\n","import isDark from '../utils/isDark';\n\nexport default function textContrastClass(hexcolor: string | null | undefined): string {\n  if (!hexcolor) return 'text-contrast--unchanged';\n\n  return isDark(hexcolor) ? 'text-contrast--light' : 'text-contrast--dark';\n}\n","type KeyboardEventHandler = (event: KeyboardEvent) => void;\ntype ShouldHandle = (event: KeyboardEvent) => boolean;\n\nenum Keys {\n  Enter = 13,\n  Escape = 27,\n  Space = 32,\n  ArrowUp = 38,\n  ArrowDown = 40,\n  ArrowLeft = 37,\n  ArrowRight = 39,\n  Tab = 9,\n  Backspace = 8,\n}\n\n/**\n * The `KeyboardNavigatable` class manages lists that can be navigated with the\n * keyboard, calling callbacks for each actions.\n *\n * This helper encapsulates the key binding logic, providing a simple fluent\n * API for use.\n */\nexport default class KeyboardNavigatable {\n  /**\n   * Callback to be executed for a specified input.\n   */\n  protected callbacks = new Map<number, KeyboardEventHandler>();\n\n  /**\n   * Callback that determines whether keyboard input should be handled.\n   * By default, always handle keyboard navigation.\n   */\n  protected whenCallback: ShouldHandle = (event: KeyboardEvent) => true;\n\n  /**\n   * Provide a callback to be executed when navigating upwards.\n   *\n   * This will be triggered by the Up key.\n   */\n  onUp(callback: KeyboardEventHandler): KeyboardNavigatable {\n    this.callbacks.set(Keys.ArrowUp, (e) => {\n      e.preventDefault();\n      callback(e);\n    });\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when navigating downwards.\n   *\n   * This will be triggered by the Down key.\n   */\n  onDown(callback: KeyboardEventHandler): KeyboardNavigatable {\n    this.callbacks.set(Keys.ArrowDown, (e) => {\n      e.preventDefault();\n      callback(e);\n    });\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when the current item is selected..\n   *\n   * This will be triggered by the Return key (and Tab key, if not disabled).\n   */\n  onSelect(callback: KeyboardEventHandler, ignoreTabPress: boolean = false): KeyboardNavigatable {\n    const handler: KeyboardEventHandler = (e) => {\n      e.preventDefault();\n      callback(e);\n    };\n\n    if (!ignoreTabPress) this.callbacks.set(Keys.Tab, handler);\n    this.callbacks.set(Keys.Enter, handler);\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when the current item is tabbed into.\n   *\n   * This will be triggered by the Tab key.\n   */\n  onTab(callback: KeyboardEventHandler): KeyboardNavigatable {\n    const handler: KeyboardEventHandler = (e) => {\n      e.preventDefault();\n      callback(e);\n    };\n\n    this.callbacks.set(9, handler);\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when the navigation is canceled.\n   *\n   * This will be triggered by the Escape key.\n   */\n  onCancel(callback: KeyboardEventHandler): KeyboardNavigatable {\n    this.callbacks.set(Keys.Escape, (e) => {\n      e.stopPropagation();\n      e.preventDefault();\n      callback(e);\n    });\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when previous input is removed.\n   *\n   * This will be triggered by the Backspace key.\n   */\n  onRemove(callback: KeyboardEventHandler): KeyboardNavigatable {\n    this.callbacks.set(Keys.Backspace, (e) => {\n      if (e instanceof KeyboardEvent && e.target instanceof HTMLInputElement && e.target.selectionStart === 0 && e.target.selectionEnd === 0) {\n        callback(e);\n        e.preventDefault();\n      }\n    });\n\n    return this;\n  }\n\n  /**\n   * Provide a callback that determines whether keyboard input should be handled.\n   */\n  when(callback: ShouldHandle): KeyboardNavigatable {\n    this.whenCallback = callback;\n\n    return this;\n  }\n\n  /**\n   * Set up the navigation key bindings on the given jQuery element.\n   */\n  bindTo($element: JQuery<HTMLElement>) {\n    // Handle navigation key events on the navigatable element.\n    $element[0].addEventListener('keydown', this.navigate.bind(this));\n  }\n\n  /**\n   * Interpret the given keyboard event as navigation commands.\n   */\n  navigate(event: KeyboardEvent) {\n    // This callback determines whether keyboard should be handled or ignored.\n    if (!this.whenCallback(event)) return;\n\n    const keyCallback = this.callbacks.get(event.which);\n    if (keyCallback) {\n      keyCallback(event);\n    }\n  }\n}\n","import Tooltip from './Tooltip';\nimport Component, { ComponentAttrs } from '../Component';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport textContrastClass from '../helpers/textContrastClass';\n\nexport interface IBadgeAttrs extends ComponentAttrs {\n  icon: string;\n  type?: string;\n  label?: string;\n  color?: string;\n}\n\n/**\n * The `Badge` component represents a user/discussion badge, indicating some\n * status (e.g. a discussion is stickied, a user is an admin).\n *\n * A badge may have the following special attrs:\n *\n * - `type` The type of badge this is. This will be used to give the badge a\n *   class name of `Badge--{type}`.\n * - `icon` The name of an icon to show inside the badge.\n * - `label`\n *\n * All other attrs will be assigned as attributes on the badge element.\n */\nexport default class Badge<CustomAttrs extends IBadgeAttrs = IBadgeAttrs> extends Component<CustomAttrs> {\n  view() {\n    const { type, icon: iconName, label, color, style = {}, ...attrs } = this.attrs;\n\n    const className = classList('Badge', [type && `Badge--${type}`], attrs.className, textContrastClass(color));\n\n    const iconChild = iconName ? icon(iconName, { className: 'Badge-icon' }) : m.trust('&nbsp;');\n\n    const newStyle = { ...style, '--badge-bg': color };\n\n    const badgeAttrs = {\n      ...attrs,\n      className,\n      style: newStyle,\n    };\n\n    const badgeNode = <div {...badgeAttrs}>{iconChild}</div>;\n\n    // If we don't have a tooltip label, don't render the tooltip component.\n    if (!label) return badgeNode;\n\n    return <Tooltip text={label}>{badgeNode}</Tooltip>;\n  }\n}\n","import app from '../../common/app';\nimport Model from '../Model';\nimport computed from '../utils/computed';\nimport ItemList from '../utils/ItemList';\nimport Badge from '../components/Badge';\nimport Mithril from 'mithril';\nimport Post from './Post';\nimport User from './User';\n\nexport default class Discussion extends Model {\n  title() {\n    return Model.attribute<string>('title').call(this);\n  }\n  slug() {\n    return Model.attribute<string>('slug').call(this);\n  }\n\n  createdAt() {\n    return Model.attribute<Date | undefined, string | undefined>('createdAt', Model.transformDate).call(this);\n  }\n  user() {\n    return Model.hasOne<User | null>('user').call(this);\n  }\n  firstPost() {\n    return Model.hasOne<Post | null>('firstPost').call(this);\n  }\n\n  lastPostedAt() {\n    return Model.attribute('lastPostedAt', Model.transformDate).call(this);\n  }\n  lastPostedUser() {\n    return Model.hasOne<User | null>('lastPostedUser').call(this);\n  }\n  lastPost() {\n    return Model.hasOne<Post | null>('lastPost').call(this);\n  }\n  lastPostNumber() {\n    return Model.attribute<number | null | undefined>('lastPostNumber').call(this);\n  }\n\n  commentCount() {\n    return Model.attribute<number | undefined>('commentCount').call(this);\n  }\n  replyCount() {\n    return computed<number, this>('commentCount', (commentCount) => Math.max(0, ((commentCount as number) ?? 0) - 1)).call(this);\n  }\n  posts() {\n    return Model.hasMany<Post>('posts').call(this);\n  }\n  mostRelevantPost() {\n    return Model.hasOne<Post | null>('mostRelevantPost').call(this);\n  }\n\n  lastReadAt() {\n    return Model.attribute('lastReadAt', Model.transformDate).call(this);\n  }\n  lastReadPostNumber() {\n    return Model.attribute<number | null | undefined>('lastReadPostNumber').call(this);\n  }\n  isUnread() {\n    return computed<boolean, this>('unreadCount', (unreadCount) => !!unreadCount).call(this);\n  }\n  isRead() {\n    return computed<boolean, this>('unreadCount', (unreadCount) => !!(app.session.user && !unreadCount)).call(this);\n  }\n\n  hiddenAt() {\n    return Model.attribute('hiddenAt', Model.transformDate).call(this);\n  }\n  hiddenUser() {\n    return Model.hasOne<User | null>('hiddenUser').call(this);\n  }\n  isHidden() {\n    return computed<boolean, this>('hiddenAt', (hiddenAt) => !!hiddenAt).call(this);\n  }\n\n  canReply() {\n    return Model.attribute<boolean | undefined>('canReply').call(this);\n  }\n  canRename() {\n    return Model.attribute<boolean | undefined>('canRename').call(this);\n  }\n  canHide() {\n    return Model.attribute<boolean | undefined>('canHide').call(this);\n  }\n  canDelete() {\n    return Model.attribute<boolean | undefined>('canDelete').call(this);\n  }\n\n  /**\n   * Remove a post from the discussion's posts relationship.\n   */\n  removePost(id: string): void {\n    const posts = this.rawRelationship<Post[]>('posts');\n\n    if (!posts) {\n      return;\n    }\n\n    posts.some((data, i) => {\n      if (id === data.id) {\n        posts.splice(i, 1);\n        return true;\n      }\n\n      return false;\n    });\n  }\n\n  /**\n   * Get the estimated number of unread posts in this discussion for the current\n   * user.\n   */\n  unreadCount(): number {\n    const user = app.session.user;\n\n    if (user && (user.markedAllAsReadAt()?.getTime() ?? 0) < this.lastPostedAt()?.getTime()!) {\n      const unreadCount = Math.max(0, (this.lastPostNumber() ?? 0) - (this.lastReadPostNumber() || 0));\n      // If posts have been deleted, it's possible that the unread count could exceed the\n      // actual post count. As such, we take the min of the two to ensure this isn't an issue.\n      return Math.min(unreadCount, this.commentCount() ?? 0);\n    }\n\n    return 0;\n  }\n\n  /**\n   * Get the Badge components that apply to this discussion.\n   */\n  badges(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.isHidden()) {\n      items.add('hidden', <Badge type=\"hidden\" icon=\"fas fa-trash\" label={app.translator.trans('core.lib.badge.hidden_tooltip')} />);\n    }\n\n    return items;\n  }\n\n  /**\n   * Get a list of all of the post IDs in this discussion.\n   */\n  postIds(): string[] {\n    return this.rawRelationship<Post[]>('posts')?.map((link) => link.id) ?? [];\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport listItems from '../../common/helpers/listItems';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport Discussion from '../../common/models/Discussion';\nimport ItemList from '../../common/utils/ItemList';\nimport Tooltip from '../../common/components/Tooltip';\n\n/**\n * The `NotificationList` component displays a list of the logged-in user's\n * notifications, grouped by discussion.\n */\nexport default class NotificationList extends Component {\n  view() {\n    const state = this.attrs.state;\n\n    return (\n      <div className=\"NotificationList\">\n        <div className=\"NotificationList-header\">\n          <h4 className=\"App-titleControl App-titleControl--text\">{app.translator.trans('core.forum.notifications.title')}</h4>\n\n          <div className=\"App-primaryControl\">{this.controlItems().toArray()}</div>\n        </div>\n\n        <div className=\"NotificationList-content\">{this.content(state)}</div>\n      </div>\n    );\n  }\n\n  controlItems() {\n    const items = new ItemList();\n    const state = this.attrs.state;\n\n    items.add(\n      'mark_all_as_read',\n      <Tooltip text={app.translator.trans('core.forum.notifications.mark_all_as_read_tooltip')}>\n        <Button\n          className=\"Button Button--link\"\n          data-container=\".NotificationList\"\n          icon=\"fas fa-check\"\n          title={app.translator.trans('core.forum.notifications.mark_all_as_read_tooltip')}\n          onclick={state.markAllAsRead.bind(state)}\n        />\n      </Tooltip>,\n      70\n    );\n\n    items.add(\n      'delete_all',\n      <Tooltip text={app.translator.trans('core.forum.notifications.delete_all_tooltip')}>\n        <Button\n          className=\"Button Button--link\"\n          data-container=\".NotificationList\"\n          icon=\"fas fa-trash-alt\"\n          title={app.translator.trans('core.forum.notifications.delete_all_tooltip')}\n          onclick={() => {\n            if (confirm(app.translator.trans('core.forum.notifications.delete_all_confirm'))) {\n              state.deleteAll.call(state);\n            }\n          }}\n        />\n      </Tooltip>,\n      50\n    );\n\n    return items;\n  }\n\n  content(state) {\n    if (state.isLoading()) {\n      return <LoadingIndicator className=\"LoadingIndicator--block\" />;\n    }\n\n    if (state.hasItems()) {\n      return state.getPages().map((page) => {\n        const groups = [];\n        const discussions = {};\n\n        page.items.forEach((notification) => {\n          const subject = notification.subject();\n\n          if (typeof subject === 'undefined') return;\n\n          // Get the discussion that this notification is related to. If it's not\n          // directly related to a discussion, it may be related to a post or\n          // other entity which is related to a discussion.\n          let discussion = null;\n          if (subject instanceof Discussion) discussion = subject;\n          else if (subject && subject.discussion) discussion = subject.discussion();\n\n          // If the notification is not related to a discussion directly or\n          // indirectly, then we will assign it to a neutral group.\n          const key = discussion ? discussion.id() : 0;\n          discussions[key] = discussions[key] || { discussion: discussion, notifications: [] };\n          discussions[key].notifications.push(notification);\n\n          if (groups.indexOf(discussions[key]) === -1) {\n            groups.push(discussions[key]);\n          }\n        });\n\n        return groups.map((group) => {\n          const badges = group.discussion && group.discussion.badges().toArray();\n\n          return (\n            <div className=\"NotificationGroup\">\n              {group.discussion ? (\n                <Link className=\"NotificationGroup-header\" href={app.route.discussion(group.discussion)}>\n                  {badges && !!badges.length && <ul className=\"NotificationGroup-badges badges\">{listItems(badges)}</ul>}\n                  <span>{group.discussion.title()}</span>\n                </Link>\n              ) : (\n                <div className=\"NotificationGroup-header\">{app.forum.attribute('title')}</div>\n              )}\n\n              <ul className=\"NotificationGroup-content\">\n                {group.notifications.map((notification) => {\n                  const NotificationComponent = app.notificationComponents[notification.contentType()];\n                  return (\n                    !!NotificationComponent && (\n                      <li>\n                        <NotificationComponent notification={notification} />\n                      </li>\n                    )\n                  );\n                })}\n              </ul>\n            </div>\n          );\n        });\n      });\n    }\n\n    return <div className=\"NotificationList-empty\">{app.translator.trans('core.forum.notifications.empty_text')}</div>;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.$notifications = this.$('.NotificationList-content');\n\n    // If we are on the notifications page, the window will be scrolling and not the $notifications element.\n    this.$scrollParent = this.inPanel() ? this.$notifications : $(window);\n\n    this.boundScrollHandler = this.scrollHandler.bind(this);\n    this.$scrollParent.on('scroll', this.boundScrollHandler);\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    this.$scrollParent.off('scroll', this.boundScrollHandler);\n  }\n\n  scrollHandler() {\n    const state = this.attrs.state;\n\n    // Whole-page scroll events are listened to on `window`, but we need to get the actual\n    // scrollHeight, scrollTop, and clientHeight from the document element.\n    const scrollParent = this.inPanel() ? this.$scrollParent[0] : document.documentElement;\n\n    // On very short screens, the scrollHeight + scrollTop might not reach the clientHeight\n    // by a fraction of a pixel, so we compensate for that.\n    const atBottom = Math.abs(scrollParent.scrollHeight - scrollParent.scrollTop - scrollParent.clientHeight) <= 1;\n\n    if (state.hasNext() && !state.isLoadingNext() && atBottom) {\n      state.loadNext();\n    }\n  }\n\n  /**\n   * If the NotificationList component isn't in a panel (e.g. on NotificationPage when mobile),\n   * we need to listen to scroll events on the window, and get scroll state from the body.\n   */\n  inPanel() {\n    return this.$notifications.css('overflow') === 'auto';\n  }\n}\n","import app from '../../forum/app';\nimport Dropdown, { IDropdownAttrs } from '../../common/components/Dropdown';\nimport icon from '../../common/helpers/icon';\nimport classList from '../../common/utils/classList';\nimport NotificationList from './NotificationList';\nimport extractText from '../../common/utils/extractText';\nimport type Mithril from 'mithril';\n\nexport interface INotificationsDropdown extends IDropdownAttrs {}\n\nexport default class NotificationsDropdown<CustomAttrs extends IDropdownAttrs = IDropdownAttrs> extends Dropdown<CustomAttrs> {\n  static initAttrs(attrs: INotificationsDropdown) {\n    attrs.className ||= 'NotificationsDropdown';\n    attrs.buttonClassName ||= 'Button Button--flat';\n    attrs.menuClassName ||= 'Dropdown-menu--right';\n    attrs.label ||= extractText(app.translator.trans('core.forum.notifications.tooltip'));\n    attrs.icon ||= 'fas fa-bell';\n\n    // For best a11y support, both `title` and `aria-label` should be used\n    attrs.accessibleToggleLabel ||= extractText(app.translator.trans('core.forum.notifications.toggle_dropdown_accessible_label'));\n\n    super.initAttrs(attrs);\n  }\n\n  getButton(children: Mithril.ChildArray): Mithril.Vnode<any, any> {\n    const newNotifications = this.getNewCount();\n\n    const vdom = super.getButton(children);\n\n    vdom.attrs.title = this.attrs.label;\n\n    vdom.attrs.className = classList(vdom.attrs.className, [newNotifications && 'new']);\n    vdom.attrs.onclick = this.onclick.bind(this);\n\n    return vdom;\n  }\n\n  getButtonContent(): Mithril.ChildArray {\n    const unread = this.getUnreadCount();\n\n    return [\n      this.attrs.icon ? icon(this.attrs.icon, { className: 'Button-icon' }) : null,\n      unread !== 0 && <span className=\"NotificationsDropdown-unread\">{unread}</span>,\n      <span className=\"Button-label\">{this.attrs.label}</span>,\n    ];\n  }\n\n  getMenu() {\n    return (\n      <div className={classList('Dropdown-menu', this.attrs.menuClassName)} onclick={this.menuClick.bind(this)}>\n        {this.showing && <NotificationList state={this.attrs.state} />}\n      </div>\n    );\n  }\n\n  onclick() {\n    if (app.drawer.isOpen()) {\n      this.goToRoute();\n    } else {\n      this.attrs.state.load();\n    }\n  }\n\n  goToRoute() {\n    m.route.set(app.route('notifications'));\n  }\n\n  getUnreadCount() {\n    return app.session.user!.unreadNotificationCount();\n  }\n\n  getNewCount() {\n    return app.session.user!.newNotificationCount();\n  }\n\n  menuClick(e: MouseEvent) {\n    // Don't close the notifications dropdown if the user is opening a link in a\n    // new tab or window.\n    if (e.shiftKey || e.metaKey || e.ctrlKey || e.button === 1) e.stopPropagation();\n  }\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n  try {\n    var info = gen[key](arg);\n    var value = info.value;\n  } catch (error) {\n    reject(error);\n    return;\n  }\n  if (info.done) {\n    resolve(value);\n  } else {\n    Promise.resolve(value).then(_next, _throw);\n  }\n}\nexport default function _asyncToGenerator(fn) {\n  return function () {\n    var self = this,\n      args = arguments;\n    return new Promise(function (resolve, reject) {\n      var gen = fn.apply(self, args);\n      function _next(value) {\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n      }\n      function _throw(err) {\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n      }\n      _next(undefined);\n    });\n  };\n}","import app from '../../forum/app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport Link from '../../common/components/Link';\nimport highlight from '../../common/helpers/highlight';\nimport Discussion from '../../common/models/Discussion';\nimport Post from '../../common/models/Post';\nimport type Mithril from 'mithril';\nimport ItemList from '../../common/utils/ItemList';\n\nexport interface DiscussionsSearchItemAttrs extends ComponentAttrs {\n  query: string;\n  discussion: Discussion;\n  mostRelevantPost: Post;\n}\n\nexport default class DiscussionsSearchItem extends Component<DiscussionsSearchItemAttrs> {\n  query!: string;\n  discussion!: Discussion;\n  mostRelevantPost!: Post | null | undefined;\n\n  oninit(vnode: Mithril.Vnode<DiscussionsSearchItemAttrs, this>) {\n    super.oninit(vnode);\n\n    this.query = this.attrs.query;\n    this.discussion = this.attrs.discussion;\n    this.mostRelevantPost = this.attrs.mostRelevantPost;\n  }\n\n  view() {\n    return (\n      <li className=\"DiscussionSearchResult\" data-index={'discussions' + this.discussion.id()}>\n        <Link href={app.route.discussion(this.discussion, (this.mostRelevantPost && this.mostRelevantPost.number()) || 0)}>\n          {this.viewItems().toArray()}\n        </Link>\n      </li>\n    );\n  }\n\n  discussionTitle() {\n    return this.discussion.title();\n  }\n\n  mostRelevantPostContent() {\n    return this.mostRelevantPost?.contentPlain();\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('discussion-title', <div className=\"DiscussionSearchResult-title\">{highlight(this.discussionTitle(), this.query)}</div>, 90);\n\n    !!this.mostRelevantPost &&\n      items.add(\n        'most-relevant',\n        <div className=\"DiscussionSearchResult-excerpt\">{highlight(this.mostRelevantPostContent() ?? '', this.query, 100)}</div>,\n        80\n      );\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport LinkButton from '../../common/components/LinkButton';\nimport { SearchSource } from './Search';\nimport type Mithril from 'mithril';\nimport Discussion from '../../common/models/Discussion';\nimport DiscussionsSearchItem from './DiscussionsSearchItem';\n\n/**\n * The `DiscussionsSearchSource` finds and displays discussion search results in\n * the search dropdown.\n */\nexport default class DiscussionsSearchSource implements SearchSource {\n  protected results = new Map<string, Discussion[]>();\n  queryString: string | null = null;\n\n  async search(query: string): Promise<void> {\n    query = query.toLowerCase();\n\n    this.results.set(query, []);\n\n    this.setQueryString(query);\n\n    const params = {\n      filter: { q: this.queryString || query },\n      page: { limit: this.limit() },\n      include: this.includes().join(','),\n    };\n\n    return app.store.find<Discussion[]>('discussions', params).then((results) => {\n      this.results.set(query, results);\n      m.redraw();\n    });\n  }\n\n  view(query: string): Array<Mithril.Vnode> {\n    query = query.toLowerCase();\n\n    const results = (this.results.get(query) || []).map((discussion) => {\n      const mostRelevantPost = discussion.mostRelevantPost();\n\n      return <DiscussionsSearchItem query={query} discussion={discussion} mostRelevantPost={mostRelevantPost} />;\n    }) as Array<Mithril.Vnode>;\n\n    return [\n      <li className=\"Dropdown-header\">{app.translator.trans('core.forum.search.discussions_heading')}</li>,\n      <li>\n        <LinkButton icon=\"fas fa-search\" href={app.route('index', { q: this.queryString })}>\n          {app.translator.trans('core.forum.search.all_discussions_button', { query })}\n        </LinkButton>\n      </li>,\n      ...results,\n    ];\n  }\n\n  includes(): string[] {\n    return ['mostRelevantPost'];\n  }\n\n  limit(): number {\n    return 3;\n  }\n\n  queryMutators(): string[] {\n    return [];\n  }\n\n  setQueryString(query: string): void {\n    this.queryString = query + ' ' + this.queryMutators().join(' ');\n  }\n}\n","import type Mithril from 'mithril';\n\nimport app from '../../forum/app';\nimport highlight from '../../common/helpers/highlight';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport Link from '../../common/components/Link';\nimport { SearchSource } from './Search';\nimport User from '../../common/models/User';\n\n/**\n * The `UsersSearchSource` finds and displays user search results in the search\n * dropdown.\n */\nexport default class UsersSearchResults implements SearchSource {\n  protected results = new Map<string, User[]>();\n\n  async search(query: string): Promise<void> {\n    return app.store\n      .find<User[]>('users', {\n        filter: { q: query },\n        page: { limit: 5 },\n      })\n      .then((results) => {\n        this.results.set(query, results);\n        m.redraw();\n      });\n  }\n\n  view(query: string): Array<Mithril.Vnode> {\n    query = query.toLowerCase();\n\n    const results = (this.results.get(query) || [])\n      .concat(\n        app.store\n          .all<User>('users')\n          .filter((user) => [user.username(), user.displayName()].some((value) => value.toLowerCase().substr(0, query.length) === query))\n      )\n      .filter((e, i, arr) => arr.lastIndexOf(e) === i)\n      .sort((a, b) => a.displayName().localeCompare(b.displayName()));\n\n    if (!results.length) return [];\n\n    return [\n      <li className=\"Dropdown-header\">{app.translator.trans('core.forum.search.users_heading')}</li>,\n      ...results.map((user) => {\n        const name = username(user);\n\n        const children = [highlight(name.text as string, query)];\n\n        return (\n          <li className=\"UserSearchResult\" data-index={'users' + user.id()}>\n            <Link href={app.route.user(user)}>\n              {avatar(user)}\n              {{ ...name, text: undefined, children }}\n            </Link>\n          </li>\n        );\n      }),\n    ];\n  }\n}\n","import app from '../../forum/app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport ItemList from '../../common/utils/ItemList';\nimport classList from '../../common/utils/classList';\nimport extractText from '../../common/utils/extractText';\nimport KeyboardNavigatable from '../../common/utils/KeyboardNavigatable';\nimport icon from '../../common/helpers/icon';\nimport SearchState from '../states/SearchState';\nimport DiscussionsSearchSource from './DiscussionsSearchSource';\nimport UsersSearchSource from './UsersSearchSource';\nimport { fireDeprecationWarning } from '../../common/helpers/fireDebugWarning';\nimport type Mithril from 'mithril';\n\n/**\n * The `SearchSource` interface defines a section of search results in the\n * search dropdown.\n *\n * Search sources should be registered with the `Search` component class\n * by extending the `sourceItems` method. When the user types a\n * query, each search source will be prompted to load search results via the\n * `search` method. When the dropdown is redrawn, it will be constructed by\n * putting together the output from the `view` method of each source.\n */\nexport interface SearchSource {\n  /**\n   * Make a request to get results for the given query.\n   * The results will be updated internally in the search source, not exposed.\n   */\n  search(query: string): Promise<void>;\n\n  /**\n   * Get an array of virtual <li>s that list the search results for the given\n   * query.\n   */\n  view(query: string): Array<Mithril.Vnode>;\n}\n\nexport interface SearchAttrs extends ComponentAttrs {\n  /** The type of alert this is. Will be used to give the alert a class name of `Alert--{type}`. */\n  state: SearchState;\n}\n\n/**\n * The `Search` component displays a menu of as-you-type results from a variety\n * of sources.\n *\n * The search box will be 'activated' if the app's search state's\n * getInitialSearch() value is a truthy value. If this is the case, an 'x'\n * button will be shown next to the search field, and clicking it will clear the search.\n *\n * ATTRS:\n *\n * - state: SearchState instance.\n */\nexport default class Search<T extends SearchAttrs = SearchAttrs> extends Component<T, SearchState> {\n  /**\n   * The minimum query length before sources are searched.\n   */\n  protected static MIN_SEARCH_LEN = 3;\n\n  /**\n   * The instance of `SearchState` for this component.\n   */\n  protected searchState!: SearchState;\n\n  /**\n   * The instance of `SearchState` for this component.\n   *\n   * @deprecated Replace with`this.searchState` instead.\n   */\n  // TODO: [Flarum 2.0] Remove this.\n  // @ts-expect-error This is a get accessor, while superclass defines this as a property. This is needed to prevent breaking changes, however.\n  get state() {\n    fireDeprecationWarning('`state` property of the Search component is deprecated', '3212');\n    return this.searchState;\n  }\n  set state(state: SearchState) {\n    // Workaround to prevent triggering deprecation warnings due to Mithril\n    // setting state to undefined when creating components\n    state !== undefined && fireDeprecationWarning('`state` property of the Search component is deprecated', '3212');\n    this.searchState = state;\n  }\n\n  /**\n   * Whether or not the search input has focus.\n   */\n  protected hasFocus = false;\n\n  /**\n   * An array of SearchSources.\n   */\n  protected sources?: SearchSource[];\n\n  /**\n   * The number of sources that are still loading results.\n   */\n  protected loadingSources = 0;\n\n  /**\n   * The index of the currently-selected <li> in the results list. This can be\n   * a unique string (to account for the fact that an item's position may jump\n   * around as new results load), but otherwise it will be numeric (the\n   * sequential position within the list).\n   */\n  protected index: number = 0;\n\n  protected navigator!: KeyboardNavigatable;\n\n  protected searchTimeout?: number;\n\n  private updateMaxHeightHandler?: () => void;\n\n  oninit(vnode: Mithril.Vnode<T, this>) {\n    super.oninit(vnode);\n\n    this.searchState = this.attrs.state;\n  }\n\n  view() {\n    const currentSearch = this.searchState.getInitialSearch();\n\n    // Initialize search sources in the view rather than the constructor so\n    // that we have access to app.forum.\n    if (!this.sources) this.sources = this.sourceItems().toArray();\n\n    // Hide the search view if no sources were loaded\n    if (!this.sources.length) return <div></div>;\n\n    const searchLabel = extractText(app.translator.trans('core.forum.header.search_placeholder'));\n\n    const isActive = !!currentSearch;\n    const shouldShowResults = !!(this.searchState.getValue() && this.hasFocus);\n    const shouldShowClearButton = !!(!this.loadingSources && this.searchState.getValue());\n\n    return (\n      <div\n        role=\"search\"\n        aria-label={app.translator.trans('core.forum.header.search_role_label')}\n        className={classList('Search', {\n          open: this.searchState.getValue() && this.hasFocus,\n          focused: this.hasFocus,\n          active: isActive,\n          loading: !!this.loadingSources,\n        })}\n      >\n        <div className=\"Search-input\">\n          <input\n            aria-label={searchLabel}\n            className=\"FormControl\"\n            type=\"search\"\n            placeholder={searchLabel}\n            value={this.searchState.getValue()}\n            oninput={(e: InputEvent) => this.searchState.setValue((e?.target as HTMLInputElement)?.value)}\n            onfocus={() => (this.hasFocus = true)}\n            onblur={() => (this.hasFocus = false)}\n          />\n          {!!this.loadingSources && <LoadingIndicator size=\"small\" display=\"inline\" containerClassName=\"Button Button--icon Button--link\" />}\n          {shouldShowClearButton && (\n            <button\n              className=\"Search-clear Button Button--icon Button--link\"\n              onclick={this.clear.bind(this)}\n              aria-label={app.translator.trans('core.forum.header.search_clear_button_accessible_label')}\n              type=\"button\"\n            >\n              {icon('fas fa-times-circle')}\n            </button>\n          )}\n        </div>\n        <ul\n          className=\"Dropdown-menu Search-results\"\n          aria-hidden={!shouldShowResults || undefined}\n          aria-live={shouldShowResults ? 'polite' : undefined}\n        >\n          {shouldShowResults && this.sources.map((source) => source.view(this.searchState.getValue()))}\n        </ul>\n      </div>\n    );\n  }\n\n  updateMaxHeight() {\n    // Since extensions might add elements above the search box on mobile,\n    // we need to calculate and set the max height dynamically.\n    const resultsElementMargin = 14;\n    const maxHeight =\n      window.innerHeight - this.element.querySelector('.Search-input>.FormControl')!.getBoundingClientRect().bottom - resultsElementMargin;\n\n    this.element.querySelector<HTMLElement>('.Search-results')?.style?.setProperty('max-height', `${maxHeight}px`);\n  }\n\n  onupdate(vnode: Mithril.VnodeDOM<T, this>) {\n    super.onupdate(vnode);\n\n    // Highlight the item that is currently selected.\n    this.setIndex(this.getCurrentNumericIndex());\n\n    // If there are no sources, the search view is not shown.\n    if (!this.sources?.length) return;\n\n    this.updateMaxHeight();\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<T, this>) {\n    super.oncreate(vnode);\n\n    // If there are no sources, we shouldn't initialize logic for\n    // search elements, as they will not be shown.\n    if (!this.sources?.length) return;\n\n    const search = this;\n    const state = this.searchState;\n\n    // Highlight the item that is currently selected.\n    this.setIndex(this.getCurrentNumericIndex());\n\n    this.$('.Search-results')\n      .on('mousedown', (e) => e.preventDefault())\n      .on('click', () => this.$('input').trigger('blur'))\n\n      // Whenever the mouse is hovered over a search result, highlight it.\n      .on('mouseenter', '> li:not(.Dropdown-header)', function () {\n        search.setIndex(search.selectableItems().index(this));\n      });\n\n    const $input = this.$('input') as JQuery<HTMLInputElement>;\n\n    this.navigator = new KeyboardNavigatable();\n    this.navigator\n      .onUp(() => this.setIndex(this.getCurrentNumericIndex() - 1, true))\n      .onDown(() => this.setIndex(this.getCurrentNumericIndex() + 1, true))\n      .onSelect(this.selectResult.bind(this), true)\n      .onCancel(this.clear.bind(this))\n      .bindTo($input);\n\n    // Handle input key events on the search input, triggering results to load.\n    $input\n      .on('input focus', function () {\n        const query = this.value.toLowerCase();\n\n        if (!query) return;\n\n        if (search.searchTimeout) clearTimeout(search.searchTimeout);\n        search.searchTimeout = window.setTimeout(() => {\n          if (state.isCached(query)) return;\n\n          if (query.length >= (search.constructor as typeof Search).MIN_SEARCH_LEN) {\n            search.sources?.map((source) => {\n              if (!source.search) return;\n\n              search.loadingSources++;\n\n              source.search(query).then(() => {\n                search.loadingSources = Math.max(0, search.loadingSources - 1);\n                m.redraw();\n              });\n            });\n          }\n\n          state.cache(query);\n          m.redraw();\n        }, 250);\n      })\n\n      .on('focus', function () {\n        $(this)\n          .one('mouseup', (e) => e.preventDefault())\n          .trigger('select');\n      });\n\n    this.updateMaxHeightHandler = this.updateMaxHeight.bind(this);\n    window.addEventListener('resize', this.updateMaxHeightHandler);\n  }\n\n  onremove(vnode: Mithril.VnodeDOM<T, this>) {\n    super.onremove(vnode);\n\n    if (this.updateMaxHeightHandler) {\n      window.removeEventListener('resize', this.updateMaxHeightHandler);\n    }\n  }\n\n  /**\n   * Navigate to the currently selected search result and close the list.\n   */\n  selectResult() {\n    if (this.searchTimeout) clearTimeout(this.searchTimeout);\n\n    this.loadingSources = 0;\n\n    const selectedUrl = this.getItem(this.index).find('a').attr('href');\n    if (this.searchState.getValue() && selectedUrl) {\n      m.route.set(selectedUrl);\n    } else {\n      this.clear();\n    }\n\n    this.$('input').blur();\n  }\n\n  /**\n   * Clear the search\n   */\n  clear() {\n    this.searchState.clear();\n  }\n\n  /**\n   * Build an item list of SearchSources.\n   */\n  sourceItems(): ItemList<SearchSource> {\n    const items = new ItemList<SearchSource>();\n\n    if (app.forum.attribute('canViewForum')) items.add('discussions', new DiscussionsSearchSource());\n    if (app.forum.attribute('canSearchUsers')) items.add('users', new UsersSearchSource());\n\n    return items;\n  }\n\n  /**\n   * Get all of the search result items that are selectable.\n   */\n  selectableItems(): JQuery {\n    return this.$('.Search-results > li:not(.Dropdown-header)');\n  }\n\n  /**\n   * Get the position of the currently selected search result item.\n   * Returns zero if not found.\n   */\n  getCurrentNumericIndex(): number {\n    return Math.max(0, this.selectableItems().index(this.getItem(this.index)));\n  }\n\n  /**\n   * Get the <li> in the search results with the given index (numeric or named).\n   */\n  getItem(index: number): JQuery {\n    const $items = this.selectableItems();\n    let $item = $items.filter(`[data-index=\"${index}\"]`);\n\n    if (!$item.length) {\n      $item = $items.eq(index);\n    }\n\n    return $item;\n  }\n\n  /**\n   * Set the currently-selected search result item to the one with the given\n   * index.\n   */\n  setIndex(index: number, scrollToItem: boolean = false) {\n    const $items = this.selectableItems();\n    const $dropdown = $items.parent();\n\n    let fixedIndex = index;\n    if (index < 0) {\n      fixedIndex = $items.length - 1;\n    } else if (index >= $items.length) {\n      fixedIndex = 0;\n    }\n\n    const $item = $items.removeClass('active').eq(fixedIndex).addClass('active');\n\n    this.index = parseInt($item.attr('data-index') as string) || fixedIndex;\n\n    if (scrollToItem) {\n      const dropdownScroll = $dropdown.scrollTop()!;\n      const dropdownTop = $dropdown.offset()!.top;\n      const dropdownBottom = dropdownTop + $dropdown.outerHeight()!;\n      const itemTop = $item.offset()!.top;\n      const itemBottom = itemTop + $item.outerHeight()!;\n\n      let scrollTop;\n      if (itemTop < dropdownTop) {\n        scrollTop = dropdownScroll - dropdownTop + itemTop - parseInt($dropdown.css('padding-top'), 10);\n      } else if (itemBottom > dropdownBottom) {\n        scrollTop = dropdownScroll - dropdownBottom + itemBottom + parseInt($dropdown.css('padding-bottom'), 10);\n      }\n\n      if (typeof scrollTop !== 'undefined') {\n        $dropdown.stop(true).animate({ scrollTop }, 100);\n      }\n    }\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport Button from '../../common/components/Button';\nimport LogInModal from './LogInModal';\nimport SignUpModal from './SignUpModal';\nimport SessionDropdown from './SessionDropdown';\nimport SelectDropdown from '../../common/components/SelectDropdown';\nimport NotificationsDropdown from './NotificationsDropdown';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\nimport Search from '../components/Search';\n\n/**\n * The `HeaderSecondary` component displays secondary header controls, such as\n * the search box and the user menu. On the default skin, these are shown on the\n * right side of the header.\n */\nexport default class HeaderSecondary extends Component {\n  view() {\n    return <ul className=\"Header-controls\">{listItems(this.items().toArray())}</ul>;\n  }\n\n  /**\n   * Build an item list for the controls.\n   *\n   * @return {ItemList}\n   */\n  items() {\n    const items = new ItemList();\n\n    items.add('search', <Search state={app.search} />, 30);\n\n    if (app.forum.attribute('showLanguageSelector') && Object.keys(app.data.locales).length > 1) {\n      const locales = [];\n\n      for (const locale in app.data.locales) {\n        locales.push(\n          <Button\n            active={app.data.locale === locale}\n            icon={app.data.locale === locale ? 'fas fa-check' : true}\n            onclick={() => {\n              if (app.session.user) {\n                app.session.user.savePreferences({ locale }).then(() => window.location.reload());\n              } else {\n                document.cookie = `locale=${locale}; path=/; expires=Tue, 19 Jan 2038 03:14:07 GMT`;\n                window.location.reload();\n              }\n            }}\n          >\n            {app.data.locales[locale]}\n          </Button>\n        );\n      }\n\n      items.add(\n        'locale',\n        <SelectDropdown\n          buttonClassName=\"Button Button--link\"\n          accessibleToggleLabel={app.translator.trans('core.forum.header.locale_dropdown_accessible_label')}\n        >\n          {locales}\n        </SelectDropdown>,\n        20\n      );\n    }\n\n    if (app.session.user) {\n      items.add('notifications', <NotificationsDropdown state={app.notifications} />, 10);\n      items.add('session', <SessionDropdown />, 0);\n    } else {\n      if (app.forum.attribute('allowSignUp')) {\n        items.add(\n          'signUp',\n          <Button className=\"Button Button--link\" onclick={() => app.modal.show(SignUpModal)}>\n            {app.translator.trans('core.forum.header.sign_up_link')}\n          </Button>,\n          10\n        );\n      }\n\n      items.add(\n        'logIn',\n        <Button className=\"Button Button--link\" onclick={() => app.modal.show(LogInModal)}>\n          {app.translator.trans('core.forum.header.log_in_link')}\n        </Button>,\n        0\n      );\n    }\n\n    return items;\n  }\n}\n","import Button from '../../common/components/Button';\n\n/**\n * The `ComposerButton` component displays a button suitable for the composer\n * controls.\n */\nexport default class ComposerButton extends Button {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = attrs.className || 'Button Button--icon Button--link';\n  }\n}\n","import app from '../../forum/app';\nimport subclassOf from '../../common/utils/subclassOf';\nimport Stream from '../../common/utils/Stream';\nimport ReplyComposer from '../components/ReplyComposer';\n\nclass ComposerState {\n  constructor() {\n    /**\n     * The composer's current position.\n     *\n     * @type {ComposerState.Position}\n     */\n    this.position = ComposerState.Position.HIDDEN;\n\n    /**\n     * The composer's intended height, which can be modified by the user\n     * (by dragging the composer handle).\n     *\n     * @type {number}\n     */\n    this.height = null;\n\n    /**\n     * The dynamic component being shown inside the composer.\n     *\n     * @type {Object}\n     */\n    this.body = { attrs: {} };\n\n    /**\n     * A reference to the text editor that allows text manipulation.\n     *\n     * @type {import('../../common/utils/EditorDriverInterface')|null}\n     */\n    this.editor = null;\n\n    this.clear();\n  }\n\n  /**\n   * Load a content component into the composer.\n   *\n   * @param {typeof import('../components/ComposerBody').default} componentClass\n   */\n  load(componentClass, attrs) {\n    const body = { componentClass, attrs };\n\n    if (this.preventExit()) return;\n\n    // If we load a similar component into the composer, then Mithril will be\n    // able to diff the old/new contents and some DOM-related state from the\n    // old composer will remain. To prevent this from happening, we clear the\n    // component and force a redraw, so that the new component will be working\n    // on a blank slate.\n    if (this.isVisible()) {\n      this.clear();\n      m.redraw.sync();\n    }\n\n    this.body = body;\n  }\n\n  /**\n   * Clear the composer's content component.\n   */\n  clear() {\n    this.position = ComposerState.Position.HIDDEN;\n    this.body = { attrs: {} };\n    this.onExit = null;\n\n    this.fields = {\n      content: Stream(''),\n    };\n\n    if (this.editor) {\n      this.editor.destroy();\n    }\n    this.editor = null;\n  }\n\n  /**\n   * Show the composer.\n   */\n  show() {\n    if (this.position === ComposerState.Position.NORMAL || this.position === ComposerState.Position.FULLSCREEN) return;\n\n    this.position = ComposerState.Position.NORMAL;\n    m.redraw.sync();\n  }\n\n  /**\n   * Close the composer.\n   */\n  hide() {\n    this.clear();\n    m.redraw();\n  }\n\n  /**\n   * Confirm with the user so they don't lose their content, then close the\n   * composer.\n   */\n  close() {\n    if (this.preventExit()) return;\n\n    this.hide();\n  }\n\n  /**\n   * Minimize the composer. Has no effect if the composer is hidden.\n   */\n  minimize() {\n    if (!this.isVisible()) return;\n\n    this.position = ComposerState.Position.MINIMIZED;\n    m.redraw();\n  }\n\n  /**\n   * Take the composer into fullscreen mode. Has no effect if the composer is\n   * hidden.\n   */\n  fullScreen() {\n    if (!this.isVisible()) return;\n\n    this.position = ComposerState.Position.FULLSCREEN;\n    m.redraw();\n  }\n\n  /**\n   * Exit fullscreen mode.\n   */\n  exitFullScreen() {\n    if (this.position !== ComposerState.Position.FULLSCREEN) return;\n\n    this.position = ComposerState.Position.NORMAL;\n    m.redraw();\n  }\n\n  /**\n   * Determine whether the body matches the given component class and data.\n   *\n   * @param {object} type The component class to check against. Subclasses are accepted as well.\n   * @param {object} data\n   * @return {boolean}\n   */\n  bodyMatches(type, data = {}) {\n    // Fail early when the body is of a different type\n    if (!subclassOf(this.body.componentClass, type)) return false;\n\n    // Now that the type is known to be correct, we loop through the provided\n    // data to see whether it matches the data in the attributes for the body.\n    return Object.keys(data).every((key) => this.body.attrs[key] === data[key]);\n  }\n\n  /**\n   * Determine whether or not the Composer is visible.\n   *\n   * True when the composer is displayed on the screen and has a body component.\n   * It could be open in \"normal\" or full-screen mode, or even minimized.\n   *\n   * @returns {boolean}\n   */\n  isVisible() {\n    return this.position !== ComposerState.Position.HIDDEN;\n  }\n\n  /**\n   * Determine whether or not the Composer is covering the screen.\n   *\n   * This will be true if the Composer is in full-screen mode on desktop,\n   * or if we are on a mobile device, where we always consider the composer as full-screen..\n   *\n   * @return {boolean}\n   */\n  isFullScreen() {\n    return this.position === ComposerState.Position.FULLSCREEN || app.screen() === 'phone';\n  }\n\n  /**\n   * Check whether or not the user is currently composing a reply to a\n   * discussion.\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @return {boolean}\n   */\n  composingReplyTo(discussion) {\n    return this.isVisible() && this.bodyMatches(ReplyComposer, { discussion });\n  }\n\n  /**\n   * Confirm with the user that they want to close the composer and lose their\n   * content.\n   *\n   * @return {boolean} Whether or not the exit was cancelled.\n   */\n  preventExit() {\n    if (!this.isVisible()) return;\n    if (!this.onExit) return;\n\n    if (this.onExit.callback()) {\n      return !confirm(this.onExit.message);\n    }\n  }\n\n  /**\n   * Configure when / what to ask the user before closing the composer.\n   *\n   * The provided callback will be used to determine whether asking for\n   * confirmation is necessary. If the callback returns true at the time of\n   * closing, the provided text will be shown in a standard confirmation dialog.\n   *\n   * @param {() => boolean} callback\n   * @param {string} message\n   */\n  preventClosingWhen(callback, message) {\n    this.onExit = { callback, message };\n  }\n\n  /**\n   * Minimum height of the Composer.\n   * @returns {number}\n   */\n  minimumHeight() {\n    return 200;\n  }\n\n  /**\n   * Maxmimum height of the Composer.\n   * @returns {number}\n   */\n  maximumHeight() {\n    return $(window).height() - $('#header').outerHeight();\n  }\n\n  /**\n   * Computed the composer's current height, based on the intended height, and\n   * the composer's current state. This will be applied to the composer\n   * content's DOM element.\n   * @returns {number | string}\n   */\n  computedHeight() {\n    // If the composer is minimized, then we don't want to set a height; we'll\n    // let the CSS decide how high it is. If it's fullscreen, then we need to\n    // make it as high as the window.\n    if (this.position === ComposerState.Position.MINIMIZED) {\n      return '';\n    } else if (this.position === ComposerState.Position.FULLSCREEN) {\n      return $(window).height();\n    }\n\n    // Otherwise, if it's normal or hidden, then we use the intended height.\n    // We don't let the composer get too small or too big, though.\n    return Math.max(this.minimumHeight(), Math.min(this.height, this.maximumHeight()));\n  }\n}\n\nComposerState.Position = {\n  HIDDEN: 'hidden',\n  NORMAL: 'normal',\n  MINIMIZED: 'minimized',\n  FULLSCREEN: 'fullScreen',\n};\n\nexport default ComposerState;\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport ItemList from '../../common/utils/ItemList';\nimport ComposerButton from './ComposerButton';\nimport listItems from '../../common/helpers/listItems';\nimport classList from '../../common/utils/classList';\nimport ComposerState from '../states/ComposerState';\n\n/**\n * The `Composer` component displays the composer. It can be loaded with a\n * content component with `load` and then its position/state can be altered with\n * `show`, `hide`, `close`, `minimize`, `fullScreen`, and `exitFullScreen`.\n */\nexport default class Composer extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * The composer's \"state\".\n     *\n     * @type {ComposerState}\n     */\n    this.state = this.attrs.state;\n\n    /**\n     * Whether or not the composer currently has focus.\n     *\n     * @type {Boolean}\n     */\n    this.active = false;\n\n    // Store the initial position so that we can trigger animations correctly.\n    this.prevPosition = this.state.position;\n  }\n\n  view() {\n    const body = this.state.body;\n    const classes = {\n      normal: this.state.position === ComposerState.Position.NORMAL,\n      minimized: this.state.position === ComposerState.Position.MINIMIZED,\n      fullScreen: this.state.position === ComposerState.Position.FULLSCREEN,\n      active: this.active,\n      visible: this.state.isVisible(),\n    };\n\n    // Set up a handler so that clicks on the content will show the composer.\n    const showIfMinimized = this.state.position === ComposerState.Position.MINIMIZED ? this.state.show.bind(this.state) : undefined;\n\n    const ComposerBody = body.componentClass;\n\n    return (\n      <div className={'Composer ' + classList(classes)}>\n        <div className=\"Composer-handle\" oncreate={this.configHandle.bind(this)} />\n        <ul className=\"Composer-controls\">{listItems(this.controlItems().toArray())}</ul>\n        <div className=\"Composer-content\" onclick={showIfMinimized}>\n          {ComposerBody && <ComposerBody {...body.attrs} composer={this.state} disabled={classes.minimized} />}\n        </div>\n      </div>\n    );\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    if (this.state.position === this.prevPosition) {\n      // Set the height of the Composer element and its contents on each redraw,\n      // so that they do not lose it if their DOM elements are recreated.\n      this.updateHeight();\n    } else {\n      this.animatePositionChange();\n\n      this.prevPosition = this.state.position;\n    }\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.initializeHeight();\n    this.$().hide().css('bottom', -this.state.computedHeight());\n\n    // Whenever any of the inputs inside the composer are have focus, we want to\n    // add a class to the composer to draw attention to it.\n    this.$().on('focus blur', ':input,.TextEditor-editorContainer', (e) => {\n      this.active = e.type === 'focusin';\n      m.redraw();\n    });\n\n    // When the escape key is pressed on any inputs, close the composer.\n    this.$().on('keydown', ':input,.TextEditor-editorContainer', 'esc', () => this.state.close());\n\n    this.handlers = {};\n\n    $(window)\n      .on('resize', (this.handlers.onresize = this.updateHeight.bind(this)))\n      .resize();\n\n    $(document)\n      .on('mousemove', (this.handlers.onmousemove = this.onmousemove.bind(this)))\n      .on('mouseup', (this.handlers.onmouseup = this.onmouseup.bind(this)));\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    $(window).off('resize', this.handlers.onresize);\n\n    $(document).off('mousemove', this.handlers.onmousemove).off('mouseup', this.handlers.onmouseup);\n  }\n\n  /**\n   * Add the necessary event handlers to the composer's handle so that it can\n   * be used to resize the composer.\n   */\n  configHandle(vnode) {\n    const composer = this;\n\n    $(vnode.dom)\n      .css('cursor', 'row-resize')\n      .bind('dragstart mousedown', (e) => e.preventDefault())\n      .mousedown(function (e) {\n        composer.mouseStart = e.clientY;\n        composer.heightStart = composer.$().height();\n        composer.handle = $(this);\n        $('body').css('cursor', 'row-resize');\n      });\n  }\n\n  /**\n   * Resize the composer according to mouse movement.\n   *\n   * @param {MouseEvent} e\n   */\n  onmousemove(e) {\n    if (!this.handle) return;\n\n    // Work out how much the mouse has been moved, and set the height\n    // relative to the old one based on that. Then update the content's\n    // height so that it fills the height of the composer, and update the\n    // body's padding.\n    const deltaPixels = this.mouseStart - e.clientY;\n    this.changeHeight(this.heightStart + deltaPixels);\n\n    // Update the body's padding-bottom so that no content on the page will ever\n    // get permanently hidden behind the composer. If the user is already\n    // scrolled to the bottom of the page, then we will keep them scrolled to\n    // the bottom after the padding has been updated.\n    const scrollTop = $(window).scrollTop();\n    const anchorToBottom = scrollTop > 0 && scrollTop + $(window).height() >= $(document).height();\n    this.updateBodyPadding(anchorToBottom);\n  }\n\n  /**\n   * Finish resizing the composer when the mouse is released.\n   */\n  onmouseup() {\n    if (!this.handle) return;\n\n    this.handle = null;\n    $('body').css('cursor', '');\n  }\n\n  /**\n   * Draw focus to the first focusable content element (the text editor).\n   */\n  focus() {\n    this.$('.Composer-content :input:enabled:visible, .TextEditor-editor').first().focus();\n  }\n\n  /**\n   * Update the DOM to reflect the composer's current height. This involves\n   * setting the height of the composer's root element, and adjusting the height\n   * of any flexible elements inside the composer's body.\n   */\n  updateHeight() {\n    const height = this.state.computedHeight();\n    const $flexible = this.$('.Composer-flexible');\n\n    this.$().height(height);\n\n    if ($flexible.length) {\n      const headerHeight = $flexible.offset().top - this.$().offset().top;\n      const paddingBottom = parseInt($flexible.css('padding-bottom'), 10);\n      const footerHeight = this.$('.Composer-footer').outerHeight(true);\n\n      $flexible.height(this.$().outerHeight() - headerHeight - paddingBottom - footerHeight);\n    }\n  }\n\n  /**\n   * Update the amount of padding-bottom on the body so that the page's\n   * content will still be visible above the composer when the page is\n   * scrolled right to the bottom.\n   */\n  updateBodyPadding() {\n    const visible =\n      this.state.position !== ComposerState.Position.HIDDEN && this.state.position !== ComposerState.Position.MINIMIZED && app.screen() !== 'phone';\n\n    const paddingBottom = visible ? this.state.computedHeight() - parseInt($('#app').css('padding-bottom'), 10) : 0;\n\n    $('#content').css({ paddingBottom });\n  }\n\n  /**\n   * Trigger the right animation depending on the desired new position.\n   */\n  animatePositionChange() {\n    // When exiting full-screen mode: focus content\n    if (this.prevPosition === ComposerState.Position.FULLSCREEN && this.state.position === ComposerState.Position.NORMAL) {\n      this.focus();\n      return;\n    }\n\n    switch (this.state.position) {\n      case ComposerState.Position.HIDDEN:\n        return this.hide();\n      case ComposerState.Position.MINIMIZED:\n        return this.minimize();\n      case ComposerState.Position.FULLSCREEN:\n        return this.focus();\n      case ComposerState.Position.NORMAL:\n        return this.show();\n    }\n  }\n\n  /**\n   * Animate the Composer into the new position by changing the height.\n   */\n  animateHeightChange() {\n    const $composer = this.$().stop(true);\n    const oldHeight = $composer.outerHeight();\n    const scrollTop = $(window).scrollTop();\n\n    $composer.show();\n    this.updateHeight();\n\n    const newHeight = $composer.outerHeight();\n\n    if (this.prevPosition === ComposerState.Position.HIDDEN) {\n      $composer.css({ bottom: -newHeight, height: newHeight });\n    } else {\n      $composer.css({ height: oldHeight });\n    }\n\n    const animation = $composer.animate({ bottom: 0, height: newHeight }, 'fast').promise();\n\n    this.updateBodyPadding();\n    $(window).scrollTop(scrollTop);\n    return animation;\n  }\n\n  /**\n   * Show the Composer backdrop.\n   */\n  showBackdrop() {\n    this.$backdrop = $('<div/>').addClass('composer-backdrop').appendTo('body');\n  }\n\n  /**\n   * Hide the Composer backdrop.\n   */\n  hideBackdrop() {\n    if (this.$backdrop) this.$backdrop.remove();\n  }\n\n  /**\n   * Animate the composer sliding up from the bottom to take its normal height.\n   *\n   * @private\n   */\n  show() {\n    this.animateHeightChange().then(() => this.focus());\n\n    if (app.screen() === 'phone') {\n      // On safari fixed position doesn't properly work on mobile,\n      // So we use absolute and set the top value.\n      // https://github.com/flarum/core/issues/2652\n\n      // Due to another safari bug, `scrollTop` is unreliable when\n      // at the very bottom of the page AND opening the composer.\n      // So we fallback to a calculated version of scrollTop.\n      // https://github.com/flarum/core/issues/2683\n      const scrollElement = document.documentElement;\n      const topOfViewport = Math.min(scrollElement.scrollTop, scrollElement.scrollHeight - scrollElement.clientHeight);\n      this.$().css('top', $('.App').is('.mobile-safari') ? topOfViewport : 0);\n      this.showBackdrop();\n    }\n  }\n\n  /**\n   * Animate closing the composer.\n   *\n   * @private\n   */\n  hide() {\n    const $composer = this.$();\n\n    // Animate the composer sliding down off the bottom edge of the viewport.\n    // Only when the animation is completed, update other elements on the page.\n    $composer.stop(true).animate({ bottom: -$composer.height() }, 'fast', () => {\n      $composer.hide();\n      this.hideBackdrop();\n      this.updateBodyPadding();\n    });\n  }\n\n  /**\n   * Shrink the composer until only its title is visible.\n   *\n   * @private\n   */\n  minimize() {\n    this.animateHeightChange();\n\n    this.$().css('top', 'auto');\n    this.hideBackdrop();\n  }\n\n  /**\n   * Build an item list for the composer's controls.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controlItems() {\n    const items = new ItemList();\n\n    if (this.state.position === ComposerState.Position.FULLSCREEN) {\n      items.add(\n        'exitFullScreen',\n        <ComposerButton\n          icon=\"fas fa-compress\"\n          title={app.translator.trans('core.forum.composer.exit_full_screen_tooltip')}\n          onclick={this.state.exitFullScreen.bind(this.state)}\n        />\n      );\n    } else {\n      if (this.state.position !== ComposerState.Position.MINIMIZED) {\n        items.add(\n          'minimize',\n          <ComposerButton\n            icon=\"fas fa-minus minimize\"\n            title={app.translator.trans('core.forum.composer.minimize_tooltip')}\n            onclick={this.state.minimize.bind(this.state)}\n            itemClassName=\"App-backControl\"\n          />\n        );\n\n        items.add(\n          'fullScreen',\n          <ComposerButton\n            icon=\"fas fa-expand\"\n            title={app.translator.trans('core.forum.composer.full_screen_tooltip')}\n            onclick={this.state.fullScreen.bind(this.state)}\n          />\n        );\n      }\n\n      items.add(\n        'close',\n        <ComposerButton\n          icon=\"fas fa-times\"\n          title={app.translator.trans('core.forum.composer.close_tooltip')}\n          onclick={this.state.close.bind(this.state)}\n        />\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Initialize default Composer height.\n   */\n  initializeHeight() {\n    this.state.height = localStorage.getItem('composerHeight');\n\n    if (!this.state.height) {\n      this.state.height = this.defaultHeight();\n    }\n  }\n\n  /**\n   * Default height of the Composer in case none is saved.\n   * @returns {number}\n   */\n  defaultHeight() {\n    return this.$().height();\n  }\n\n  /**\n   * Save a new Composer height and update the DOM.\n   * @param {number} height\n   */\n  changeHeight(height) {\n    this.state.height = height;\n    this.updateHeight();\n\n    localStorage.setItem('composerHeight', this.state.height);\n  }\n}\n","import app from '../../forum/app';\nimport type NotificationModel from '../../common/models/Notification';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport avatar from '../../common/helpers/avatar';\nimport icon from '../../common/helpers/icon';\nimport humanTime from '../../common/helpers/humanTime';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport classList from '../../common/utils/classList';\nimport type Mithril from 'mithril';\n\nexport interface INotificationAttrs extends ComponentAttrs {\n  notification: NotificationModel;\n}\n\n// TODO [Flarum 2.0]: Remove `?.` from abstract function calls.\n\n/**\n * The `Notification` component abstract displays a single notification.\n * Subclasses should implement the `icon`, `href`, and `content` methods.\n */\nexport default abstract class Notification<CustomAttrs extends INotificationAttrs = INotificationAttrs> extends Component<CustomAttrs> {\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    const notification = this.attrs.notification;\n    const href = this.href?.() ?? '';\n\n    const fromUser = notification.fromUser();\n\n    return (\n      <Link\n        className={classList('Notification', `Notification--${notification.contentType()}`, [!notification.isRead() && 'unread'])}\n        href={href}\n        external={href.includes('://')}\n        onclick={this.markAsRead.bind(this)}\n      >\n        {avatar(fromUser || null)}\n        {icon(this.icon?.(), { className: 'Notification-icon' })}\n        <span className=\"Notification-title\">\n          <span className=\"Notification-content\">{this.content?.()}</span>\n          <span className=\"Notification-title-spring\" />\n          {humanTime(notification.createdAt())}\n        </span>\n        {!notification.isRead() && (\n          <Button\n            className=\"Notification-action Button Button--link\"\n            icon=\"fas fa-check\"\n            title={app.translator.trans('core.forum.notifications.mark_as_read_tooltip')}\n            onclick={(e: Event) => {\n              e.preventDefault();\n              e.stopPropagation();\n\n              this.markAsRead();\n            }}\n          />\n        )}\n        <div className=\"Notification-excerpt\">{this.excerpt?.()}</div>\n      </Link>\n    );\n  }\n\n  /**\n   * Get the name of the icon that should be displayed in the notification.\n   */\n  abstract icon(): string;\n\n  /**\n   * Get the URL that the notification should link to.\n   */\n  abstract href(): string;\n\n  /**\n   * Get the content of the notification.\n   */\n  abstract content(): Mithril.Children;\n\n  /**\n   * Get the excerpt of the notification.\n   */\n  abstract excerpt(): Mithril.Children;\n\n  /**\n   * Mark the notification as read.\n   */\n  markAsRead() {\n    if (this.attrs.notification.isRead()) return;\n\n    app.session.user?.pushAttributes({ unreadNotificationCount: (app.session.user.unreadNotificationCount() ?? 1) - 1 });\n\n    this.attrs.notification.save({ isRead: true });\n  }\n}\n","import type Discussion from '../../common/models/Discussion';\nimport app from '../../forum/app';\nimport Notification from './Notification';\n\ninterface DiscussionRenamedContent {\n  postNumber: number;\n}\n\n/**\n * The `DiscussionRenamedNotification` component displays a notification which\n * indicates that a discussion has had its title changed.\n */\nexport default class DiscussionRenamedNotification extends Notification {\n  icon() {\n    return 'fas fa-pencil-alt';\n  }\n\n  href() {\n    const notification = this.attrs.notification;\n    const discussion = notification.subject();\n\n    if (!discussion) {\n      return '#';\n    }\n\n    return app.route.discussion(discussion as Discussion, notification.content<DiscussionRenamedContent>().postNumber);\n  }\n\n  content() {\n    return app.translator.trans('core.forum.notifications.discussion_renamed_text', { user: this.attrs.notification.fromUser() });\n  }\n\n  excerpt() {\n    return null;\n  }\n}\n","import app from '../../forum/app';\nimport ComposerBody from './ComposerBody';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport icon from '../../common/helpers/icon';\n\nfunction minimizeComposerIfFullScreen(e) {\n  if (app.composer.isFullScreen()) {\n    app.composer.minimize();\n    e.stopPropagation();\n  }\n}\n\n/**\n * The `EditPostComposer` component displays the composer content for editing a\n * post. It sets the initial content to the content of the post that is being\n * edited, and adds a header control to indicate which post is being edited.\n *\n * ### Attrs\n *\n * - All of the attrs for ComposerBody\n * - `post`\n */\nexport default class EditPostComposer extends ComposerBody {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.submitLabel = attrs.submitLabel || app.translator.trans('core.forum.composer_edit.submit_button');\n    attrs.confirmExit = attrs.confirmExit || app.translator.trans('core.forum.composer_edit.discard_confirmation');\n    attrs.originalContent = attrs.originalContent || attrs.post.content();\n    attrs.user = attrs.user || attrs.post.user();\n\n    attrs.post.editedContent = attrs.originalContent;\n  }\n\n  headerItems() {\n    const items = super.headerItems();\n    const post = this.attrs.post;\n\n    items.add(\n      'title',\n      <h3>\n        {icon('fas fa-pencil-alt')}{' '}\n        <Link href={app.route.discussion(post.discussion(), post.number())} onclick={minimizeComposerIfFullScreen}>\n          {app.translator.trans('core.forum.composer_edit.post_link', { number: post.number(), discussion: post.discussion().title() })}\n        </Link>\n      </h3>\n    );\n\n    return items;\n  }\n\n  /**\n   * Jump to the preview when triggered by the text editor.\n   */\n  jumpToPreview(e) {\n    minimizeComposerIfFullScreen(e);\n\n    m.route.set(app.route.post(this.attrs.post));\n  }\n\n  /**\n   * Get the data to submit to the server when the post is saved.\n   *\n   * @return {Record<string, unknown>}\n   */\n  data() {\n    return {\n      content: this.composer.fields.content(),\n    };\n  }\n\n  onsubmit() {\n    const discussion = this.attrs.post.discussion();\n\n    this.loading = true;\n\n    const data = this.data();\n\n    this.attrs.post.save(data).then((post) => {\n      // If we're currently viewing the discussion which this edit was made\n      // in, then we can scroll to the post.\n      if (app.viewingDiscussion(discussion)) {\n        app.current.get('stream').goToNumber(post.number());\n      } else {\n        // Otherwise, we'll create an alert message to inform the user that\n        // their edit has been made, containing a button which will\n        // transition to their edited post when clicked.\n        const alert = app.alerts.show(\n          {\n            type: 'success',\n            controls: [\n              <Button\n                className=\"Button Button--link\"\n                onclick={() => {\n                  m.route.set(app.route.post(post));\n                  app.alerts.dismiss(alert);\n                }}\n              >\n                {app.translator.trans('core.forum.composer_edit.view_button')}\n              </Button>,\n            ],\n          },\n          app.translator.trans('core.forum.composer_edit.edited_message')\n        );\n      }\n\n      this.composer.hide();\n    }, this.loaded.bind(this));\n  }\n}\n","import app from '../../forum/app';\nimport EditPostComposer from '../components/EditPostComposer';\nimport Button from '../../common/components/Button';\nimport Separator from '../../common/components/Separator';\nimport ItemList from '../../common/utils/ItemList';\nimport extractText from '../../common/utils/extractText';\n\n/**\n * The `PostControls` utility constructs a list of buttons for a post which\n * perform actions on it.\n */\nexport default {\n  /**\n   * Get a list of controls for a post.\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}')}\n   */\n  controls(post, context) {\n    const items = new ItemList();\n\n    ['user', 'moderation', 'destructive'].forEach((section) => {\n      const controls = this[section + 'Controls'](post, context).toArray();\n      if (controls.length) {\n        controls.forEach((item) => items.add(item.itemName, item));\n        items.add(section + 'Separator', <Separator />);\n      }\n    });\n\n    return items;\n  },\n\n  /**\n   * Get controls for a post pertaining to the current user (e.g. report).\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}')}\n   * @protected\n   */\n  userControls(post, context) {\n    return new ItemList();\n  },\n\n  /**\n   * Get controls for a post pertaining to moderation (e.g. edit).\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}')}\n   * @protected\n   */\n  moderationControls(post, context) {\n    const items = new ItemList();\n\n    if (post.contentType() === 'comment' && post.canEdit()) {\n      if (!post.isHidden()) {\n        items.add(\n          'edit',\n          <Button icon=\"fas fa-pencil-alt\" onclick={this.editAction.bind(post)}>\n            {app.translator.trans('core.forum.post_controls.edit_button')}\n          </Button>\n        );\n      }\n    }\n\n    return items;\n  },\n\n  /**\n   * Get controls for a post that are destructive (e.g. delete).\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}')}\n   * @protected\n   */\n  destructiveControls(post, context) {\n    const items = new ItemList();\n\n    if (post.contentType() === 'comment' && !post.isHidden()) {\n      if (post.canHide()) {\n        items.add(\n          'hide',\n          <Button icon=\"far fa-trash-alt\" onclick={this.hideAction.bind(post)}>\n            {app.translator.trans('core.forum.post_controls.delete_button')}\n          </Button>\n        );\n      }\n    } else {\n      if (post.contentType() === 'comment' && post.canHide()) {\n        items.add(\n          'restore',\n          <Button icon=\"fas fa-reply\" onclick={this.restoreAction.bind(post)}>\n            {app.translator.trans('core.forum.post_controls.restore_button')}\n          </Button>\n        );\n      }\n      if (post.canDelete()) {\n        items.add(\n          'delete',\n          <Button icon=\"fas fa-times\" onclick={this.deleteAction.bind(post, context)}>\n            {app.translator.trans('core.forum.post_controls.delete_forever_button')}\n          </Button>\n        );\n      }\n    }\n\n    return items;\n  },\n\n  /**\n   * Open the composer to edit a post.\n   *\n   * @return {Promise<void>}\n   */\n  editAction() {\n    return new Promise((resolve) => {\n      app.composer.load(EditPostComposer, { post: this });\n      app.composer.show();\n\n      return resolve();\n    });\n  },\n\n  /**\n   * Hide a post.\n   *\n   * @return {Promise<void>}\n   */\n  hideAction() {\n    if (!confirm(extractText(app.translator.trans('core.forum.post_controls.hide_confirmation')))) return;\n    this.pushData({ attributes: { hiddenAt: new Date() }, relationships: { hiddenUser: app.session.user } });\n\n    return this.save({ isHidden: true }).then(() => m.redraw());\n  },\n\n  /**\n   * Restore a post.\n   *\n   * @return {Promise<void>}\n   */\n  restoreAction() {\n    this.pushData({ attributes: { hiddenAt: null }, relationships: { hiddenUser: null } });\n\n    return this.save({ isHidden: false }).then(() => m.redraw());\n  },\n\n  /**\n   * Delete a post.\n   *\n   * @return {Promise<void>}\n   */\n  deleteAction(context) {\n    if (!confirm(extractText(app.translator.trans('core.forum.post_controls.delete_confirmation')))) return;\n    if (context) context.loading = true;\n\n    return this.delete()\n      .then(() => {\n        const discussion = this.discussion();\n\n        discussion.removePost(this.id());\n\n        // If this was the last post in the discussion, then we will assume that\n        // the whole discussion was deleted too.\n        if (!discussion.postIds().length) {\n          app.discussions.removeDiscussion(discussion);\n\n          if (app.viewingDiscussion(discussion)) {\n            app.history.back();\n          }\n        }\n      })\n      .catch(() => {})\n      .then(() => {\n        if (context) context.loading = false;\n        m.redraw();\n      });\n  },\n};\n","import app from '../../forum/app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport SubtreeRetainer from '../../common/utils/SubtreeRetainer';\nimport Dropdown from '../../common/components/Dropdown';\nimport PostControls from '../utils/PostControls';\nimport listItems, { ModdedChildrenWithItemName } from '../../common/helpers/listItems';\nimport ItemList from '../../common/utils/ItemList';\nimport type PostModel from '../../common/models/Post';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport type Mithril from 'mithril';\n\nexport interface IPostAttrs extends ComponentAttrs {\n  post: PostModel;\n}\n\n/**\n * The `Post` component displays a single post. The basic post template just\n * includes a controls dropdown; subclasses must implement `content` and `attrs`\n * methods.\n */\nexport default abstract class Post<CustomAttrs extends IPostAttrs = IPostAttrs> extends Component<CustomAttrs> {\n  /**\n   * May be set by subclasses.\n   */\n  loading = false;\n\n  /**\n   * Ensures that the post will not be redrawn\n   * unless new data comes in.\n   */\n  subtree!: SubtreeRetainer;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.loading = false;\n\n    this.subtree = new SubtreeRetainer(\n      () => this.loading,\n      () => this.attrs.post.freshness,\n      () => {\n        const user = this.attrs.post.user();\n        return user && user.freshness;\n      }\n    );\n  }\n\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    const attrs = this.elementAttrs();\n\n    attrs.className = this.classes(attrs.className as string | undefined).join(' ');\n\n    const controls = PostControls.controls(this.attrs.post, this).toArray();\n    const footerItems = this.footerItems().toArray();\n\n    return (\n      <article {...attrs}>\n        <div>{this.viewItems(controls, footerItems).toArray()}</div>\n      </article>\n    );\n  }\n\n  viewItems(controls: Mithril.Children[], footerItems: ModdedChildrenWithItemName[]): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('content', this.loading ? <LoadingIndicator /> : this.content(), 100);\n\n    items.add(\n      'actions',\n      <aside className=\"Post-actions\">\n        <ul>\n          {listItems(this.actionItems().toArray())}\n          {!!controls.length && (\n            <li>\n              <Dropdown\n                className=\"Post-controls\"\n                buttonClassName=\"Button Button--icon Button--flat\"\n                menuClassName=\"Dropdown-menu--right\"\n                icon=\"fas fa-ellipsis-h\"\n                onshow={() => this.$('.Post-controls').addClass('open')}\n                onhide={() => this.$('.Post-controls').removeClass('open')}\n                accessibleToggleLabel={app.translator.trans('core.forum.post_controls.toggle_dropdown_accessible_label')}\n              >\n                {controls}\n              </Dropdown>\n            </li>\n          )}\n        </ul>\n      </aside>,\n      90\n    );\n\n    items.add('footer', <footer className=\"Post-footer\">{footerItems.length > 0 ? <ul>{listItems(footerItems)}</ul> : <ul></ul>}</footer>, 80);\n\n    return items;\n  }\n\n  onbeforeupdate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onbeforeupdate(vnode);\n\n    return this.subtree.needsRebuild();\n  }\n\n  onupdate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onupdate(vnode);\n\n    const $actions = this.$('.Post-actions');\n    const $controls = this.$('.Post-controls');\n\n    $actions.toggleClass('openWithin', $controls.hasClass('open'));\n  }\n\n  /**\n   * Get attributes for the post element.\n   */\n  elementAttrs(): Record<string, unknown> {\n    return {};\n  }\n\n  /**\n   * Get the post's content.\n   */\n  content(): Mithril.Children {\n    // TODO: [Flarum 2.0] return `null`\n    return [];\n  }\n\n  /**\n   * Get the post's classes.\n   */\n  classes(existing?: string): string[] {\n    let classes = (existing || '').split(' ').concat(['Post']);\n\n    const user = this.attrs.post.user();\n    const discussion = this.attrs.post.discussion();\n\n    if (this.loading) {\n      classes.push('Post--loading');\n    }\n\n    if (user && user === app.session.user) {\n      classes.push('Post--by-actor');\n    }\n\n    if (user && user === discussion.user()) {\n      classes.push('Post--by-start-user');\n    }\n\n    return classes;\n  }\n\n  /**\n   * Build an item list for the post's actions.\n   */\n  actionItems(): ItemList<Mithril.Children> {\n    return new ItemList();\n  }\n\n  /**\n   * Build an item list for the post's footer.\n   */\n  footerItems(): ItemList<ModdedChildrenWithItemName> {\n    return new ItemList<ModdedChildrenWithItemName>();\n  }\n}\n","import Badge, { IBadgeAttrs } from './Badge';\nimport Group from '../models/Group';\n\nexport interface IGroupAttrs extends IBadgeAttrs {\n  group?: Group;\n}\n\nexport default class GroupBadge<CustomAttrs extends IGroupAttrs = IGroupAttrs> extends Badge<CustomAttrs> {\n  static initAttrs(attrs: IGroupAttrs): void {\n    super.initAttrs(attrs);\n\n    if (attrs.group) {\n      attrs.icon = attrs.group.icon() || '';\n      attrs.color = attrs.group.color() || '';\n      attrs.label = typeof attrs.label === 'undefined' ? attrs.group.nameSingular() : attrs.label;\n      attrs.type = 'group--' + attrs.group.id();\n\n      delete attrs.group;\n    }\n  }\n}\n","import Model from '../Model';\n\nexport default class Group extends Model {\n  static ADMINISTRATOR_ID = '1';\n  static GUEST_ID = '2';\n  static MEMBER_ID = '3';\n\n  nameSingular() {\n    return Model.attribute<string>('nameSingular').call(this);\n  }\n  namePlural() {\n    return Model.attribute<string>('namePlural').call(this);\n  }\n\n  color() {\n    return Model.attribute<string | null>('color').call(this);\n  }\n  icon() {\n    return Model.attribute<string | null>('icon').call(this);\n  }\n\n  isHidden() {\n    return Model.attribute<boolean>('isHidden').call(this);\n  }\n}\n","import app from '../../common/app';\nimport Modal, { IInternalModalAttrs } from './Modal';\nimport Button from './Button';\nimport GroupBadge from './GroupBadge';\nimport Group from '../models/Group';\nimport extractText from '../utils/extractText';\nimport ItemList from '../utils/ItemList';\nimport Stream from '../utils/Stream';\nimport type Mithril from 'mithril';\nimport type User from '../models/User';\nimport type { SaveAttributes, SaveRelationships } from '../Model';\n\nexport interface IEditUserModalAttrs extends IInternalModalAttrs {\n  user: User;\n}\n\nexport default class EditUserModal<CustomAttrs extends IEditUserModalAttrs = IEditUserModalAttrs> extends Modal<CustomAttrs> {\n  protected username!: Stream<string>;\n  protected email!: Stream<string>;\n  protected isEmailConfirmed!: Stream<boolean>;\n  protected setPassword!: Stream<boolean>;\n  protected password!: Stream<string>;\n  protected groups: Record<string, Stream<boolean>> = {};\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    const user = this.attrs.user;\n\n    this.username = Stream(user.username() || '');\n    this.email = Stream(user.email() || '');\n    this.isEmailConfirmed = Stream(user.isEmailConfirmed() || false);\n    this.setPassword = Stream(false as boolean);\n    this.password = Stream(user.password() || '');\n\n    const userGroups = user.groups() || [];\n\n    app.store\n      .all<Group>('groups')\n      .filter((group) => ![Group.GUEST_ID, Group.MEMBER_ID].includes(group.id()!))\n      .forEach((group) => (this.groups[group.id()!] = Stream(userGroups.includes(group))));\n  }\n\n  className() {\n    return 'EditUserModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.lib.edit_user.title');\n  }\n\n  content() {\n    const fields = this.fields().toArray();\n    return (\n      <div className=\"Modal-body\">\n        {fields.length > 1 ? <div className=\"Form\">{this.fields().toArray()}</div> : app.translator.trans('core.lib.edit_user.nothing_available')}\n      </div>\n    );\n  }\n\n  fields() {\n    const items = new ItemList();\n\n    if (this.attrs.user.canEditCredentials()) {\n      items.add(\n        'username',\n        <div className=\"Form-group\">\n          <label>{app.translator.trans('core.lib.edit_user.username_heading')}</label>\n          <input\n            className=\"FormControl\"\n            placeholder={extractText(app.translator.trans('core.lib.edit_user.username_label'))}\n            bidi={this.username}\n            disabled={this.nonAdminEditingAdmin()}\n          />\n        </div>,\n        40\n      );\n\n      if (app.session.user !== this.attrs.user) {\n        items.add(\n          'email',\n          <div className=\"Form-group\">\n            <label>{app.translator.trans('core.lib.edit_user.email_heading')}</label>\n            <div>\n              <input\n                className=\"FormControl\"\n                placeholder={extractText(app.translator.trans('core.lib.edit_user.email_label'))}\n                bidi={this.email}\n                disabled={this.nonAdminEditingAdmin()}\n              />\n            </div>\n            {!this.isEmailConfirmed() && this.userIsAdmin(app.session.user) && (\n              <div>\n                <Button className=\"Button Button--block\" loading={this.loading} onclick={this.activate.bind(this)}>\n                  {app.translator.trans('core.lib.edit_user.activate_button')}\n                </Button>\n              </div>\n            )}\n          </div>,\n          30\n        );\n\n        items.add(\n          'password',\n          <div className=\"Form-group\">\n            <label>{app.translator.trans('core.lib.edit_user.password_heading')}</label>\n            <div>\n              <label className=\"checkbox\">\n                <input\n                  type=\"checkbox\"\n                  onchange={(e: KeyboardEvent) => {\n                    const target = e.target as HTMLInputElement;\n                    this.setPassword(target.checked);\n                    m.redraw.sync();\n                    if (target.checked) this.$('[name=password]').select();\n                    e.redraw = false;\n                  }}\n                  disabled={this.nonAdminEditingAdmin()}\n                />\n                {app.translator.trans('core.lib.edit_user.set_password_label')}\n              </label>\n              {this.setPassword() && (\n                <input\n                  className=\"FormControl\"\n                  type=\"password\"\n                  name=\"password\"\n                  placeholder={extractText(app.translator.trans('core.lib.edit_user.password_label'))}\n                  bidi={this.password}\n                  disabled={this.nonAdminEditingAdmin()}\n                />\n              )}\n            </div>\n          </div>,\n          20\n        );\n      }\n    }\n\n    if (this.attrs.user.canEditGroups()) {\n      items.add(\n        'groups',\n        <div className=\"Form-group EditUserModal-groups\">\n          <label>{app.translator.trans('core.lib.edit_user.groups_heading')}</label>\n          <div>\n            {Object.keys(this.groups)\n              .map((id) => app.store.getById<Group>('groups', id))\n              .filter(Boolean)\n              .map(\n                (group) =>\n                  // Necessary because filter(Boolean) doesn't narrow out falsy values.\n                  group && (\n                    <label className=\"checkbox\">\n                      <input\n                        type=\"checkbox\"\n                        bidi={this.groups[group.id()!]}\n                        disabled={\n                          group.id() === Group.ADMINISTRATOR_ID && (this.attrs.user === app.session.user || !this.userIsAdmin(app.session.user))\n                        }\n                      />\n                      <GroupBadge group={group} label={null} /> {group.nameSingular()}\n                    </label>\n                  )\n              )}\n          </div>\n        </div>,\n        10\n      );\n    }\n\n    items.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.lib.edit_user.submit_button')}\n        </Button>\n      </div>,\n      -10\n    );\n\n    return items;\n  }\n\n  activate() {\n    this.loading = true;\n    const data = {\n      username: this.username(),\n      isEmailConfirmed: true,\n    };\n    this.attrs.user\n      .save(data, { errorHandler: this.onerror.bind(this) })\n      .then(() => {\n        this.isEmailConfirmed(true);\n        this.loading = false;\n        m.redraw();\n      })\n      .catch(() => {\n        this.loading = false;\n        m.redraw();\n      });\n  }\n\n  data() {\n    const data: SaveAttributes = {};\n    const relationships: SaveRelationships = {};\n\n    if (this.attrs.user.canEditCredentials() && !this.nonAdminEditingAdmin()) {\n      data.username = this.username();\n\n      if (app.session.user !== this.attrs.user) {\n        data.email = this.email();\n      }\n\n      if (this.setPassword()) {\n        data.password = this.password();\n      }\n    }\n\n    if (this.attrs.user.canEditGroups()) {\n      relationships.groups = Object.keys(this.groups)\n        .filter((id) => this.groups[id]())\n        .map((id) => app.store.getById<Group>('groups', id))\n        .filter((g): g is Group => g instanceof Group);\n    }\n\n    data.relationships = relationships;\n\n    return data;\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    this.attrs.user\n      .save(this.data(), { errorHandler: this.onerror.bind(this) })\n      .then(this.hide.bind(this))\n      .catch(() => {\n        this.loading = false;\n        m.redraw();\n      });\n  }\n\n  nonAdminEditingAdmin(): boolean {\n    return this.userIsAdmin(this.attrs.user) && !this.userIsAdmin(app.session.user);\n  }\n\n  /**\n   * @internal\n   */\n  protected userIsAdmin(user: User | null): boolean {\n    return !!(user?.groups() || []).some((g) => g?.id() === Group.ADMINISTRATOR_ID);\n  }\n}\n","import Component from '../../common/Component';\n\n/**\n * The `AffixedSidebar` component uses Bootstrap's \"affix\" plugin to keep a\n * sidebar navigation at the top of the viewport when scrolling.\n *\n * ### Children\n *\n * The component must wrap an element that itself wraps an <ul> element, which\n * will be \"affixed\".\n *\n * @see https://getbootstrap.com/docs/3.4/javascript/#affix\n */\nexport default class AffixedSidebar extends Component {\n  view(vnode) {\n    return vnode.children[0];\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    // Register the affix plugin to execute on every window resize (and trigger)\n    this.boundOnresize = this.onresize.bind(this);\n    $(window).on('resize', this.boundOnresize).resize();\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    $(window).off('resize', this.boundOnresize);\n  }\n\n  onresize() {\n    const $sidebar = this.$();\n    const $header = $('#header');\n    const $footer = $('#footer');\n    const $affixElement = $sidebar.find('> ul');\n\n    $(window).off('.affix');\n    $affixElement.removeClass('affix affix-top affix-bottom').removeData('bs.affix');\n\n    // Don't affix the sidebar if it is taller than the viewport (otherwise\n    // there would be no way to scroll through its content).\n    if ($sidebar.outerHeight(true) > $(window).height() - $header.outerHeight(true)) return;\n\n    $affixElement.affix({\n      offset: {\n        top: () => $sidebar.offset().top - $header.outerHeight(true) - parseInt($sidebar.css('margin-top'), 10),\n        bottom: () => (this.bottom = $footer.outerHeight(true)),\n      },\n    });\n  }\n}\n","import app from '../../forum/app';\nimport Page, { IPageAttrs } from '../../common/components/Page';\nimport ItemList from '../../common/utils/ItemList';\nimport UserCard from './UserCard';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport SelectDropdown from '../../common/components/SelectDropdown';\nimport LinkButton from '../../common/components/LinkButton';\nimport Separator from '../../common/components/Separator';\nimport listItems from '../../common/helpers/listItems';\nimport AffixedSidebar from './AffixedSidebar';\nimport type User from '../../common/models/User';\nimport type Mithril from 'mithril';\n\nexport interface IUserPageAttrs extends IPageAttrs {}\n\n/**\n * The `UserPage` component shows a user's profile. It can be extended to show\n * content inside of the content area. See `ActivityPage` and `SettingsPage` for\n * examples.\n *\n * @abstract\n */\nexport default class UserPage<CustomAttrs extends IUserPageAttrs = IUserPageAttrs, CustomState = undefined> extends Page<CustomAttrs, CustomState> {\n  /**\n   * The user this page is for.\n   */\n  user: User | null = null;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.bodyClass = 'App--user';\n  }\n\n  /**\n   * Base view template for the user page.\n   */\n  view() {\n    return (\n      <div className=\"UserPage\">\n        {this.user\n          ? [\n              <UserCard\n                user={this.user}\n                className=\"Hero UserHero\"\n                editable={this.user.canEdit() || this.user === app.session.user}\n                controlsButtonClassName=\"Button\"\n              />,\n              <div className=\"container\">\n                <div className=\"sideNavContainer\">\n                  <AffixedSidebar>\n                    <nav className=\"sideNav UserPage-nav\">\n                      <ul>{listItems(this.sidebarItems().toArray())}</ul>\n                    </nav>\n                  </AffixedSidebar>\n                  <div className=\"sideNavOffset UserPage-content\">{this.content()}</div>\n                </div>\n              </div>,\n            ]\n          : [<LoadingIndicator display=\"block\" />]}\n      </div>\n    );\n  }\n\n  /**\n   * Get the content to display in the user page.\n   */\n  content(): Mithril.Children | void {}\n\n  /**\n   * Initialize the component with a user, and trigger the loading of their\n   * activity feed.\n   *\n   * @protected\n   */\n  show(user: User): void {\n    this.user = user;\n\n    app.current.set('user', user);\n\n    app.setTitle(user.displayName());\n\n    m.redraw();\n  }\n\n  /**\n   * Given a username, load the user's profile from the store, or make a request\n   * if we don't have it yet. Then initialize the profile page with that user.\n   */\n  loadUser(username: string) {\n    const lowercaseUsername = username.toLowerCase();\n\n    // Load the preloaded user object, if any, into the global app store\n    // We don't use the output of the method because it returns raw JSON\n    // instead of the parsed models\n    app.preloadedApiDocument();\n\n    app.store.all<User>('users').some((user) => {\n      if ((user.username().toLowerCase() === lowercaseUsername || user.id() === username) && user.joinTime()) {\n        this.show(user);\n        return true;\n      }\n\n      return false;\n    });\n\n    if (!this.user) {\n      app.store.find<User>('users', username, { bySlug: true }).then(this.show.bind(this));\n    }\n  }\n\n  /**\n   * Build an item list for the content of the sidebar.\n   */\n  sidebarItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'nav',\n      <SelectDropdown className=\"App-titleControl\" buttonClassName=\"Button\">\n        {this.navItems().toArray()}\n      </SelectDropdown>\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the navigation in the sidebar.\n   */\n  navItems() {\n    const items = new ItemList<Mithril.Children>();\n    const user = this.user!;\n    const isActor = app.session.user === user;\n\n    items.add(\n      'posts',\n      <LinkButton href={app.route('user.posts', { username: user.slug() })} icon=\"far fa-comment\">\n        {app.translator.trans('core.forum.user.posts_link')} <span className=\"Button-badge\">{user.commentCount()}</span>\n      </LinkButton>,\n      100\n    );\n\n    items.add(\n      'discussions',\n      <LinkButton href={app.route('user.discussions', { username: user.slug() })} icon=\"fas fa-bars\">\n        {app.translator.trans('core.forum.user.discussions_link')} <span className=\"Button-badge\">{user.discussionCount()}</span>\n      </LinkButton>,\n      90\n    );\n\n    if (isActor) {\n      items.add('separator', <Separator />, -90);\n      items.add(\n        'settings',\n        <LinkButton href={app.route('settings')} icon=\"fas fa-cog\">\n          {app.translator.trans('core.forum.user.settings_link')}\n        </LinkButton>,\n        -100\n      );\n    }\n\n    if (isActor || app.forum.attribute<boolean>('canModerateAccessTokens')) {\n      if (!isActor) {\n        items.add('security-separator', <Separator />, -90);\n      }\n\n      items.add(\n        'security',\n        <LinkButton href={app.route('user.security', { username: user.slug() })} icon=\"fas fa-shield-alt\">\n          {app.translator.trans('core.forum.user.security_link')}\n        </LinkButton>,\n        -100\n      );\n    }\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Button from '../../common/components/Button';\nimport Separator from '../../common/components/Separator';\nimport EditUserModal from '../../common/components/EditUserModal';\nimport UserPage from '../components/UserPage';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `UserControls` utility constructs a list of buttons for a user which\n * perform actions on it.\n */\nexport default {\n  /**\n   * Get a list of controls for a user.\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controls(user, context) {\n    const items = new ItemList();\n\n    ['user', 'moderation', 'destructive'].forEach((section) => {\n      const controls = this[section + 'Controls'](user, context).toArray();\n      if (controls.length) {\n        controls.forEach((item) => items.add(item.itemName, item));\n        items.add(section + 'Separator', <Separator />);\n      }\n    });\n\n    return items;\n  },\n\n  /**\n   * Get controls for a user pertaining to the current user (e.g. poke, follow).\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  userControls() {\n    return new ItemList();\n  },\n\n  /**\n   * Get controls for a user pertaining to moderation (e.g. suspend, edit).\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  moderationControls(user) {\n    const items = new ItemList();\n\n    if (user.canEdit() || user.canEditCredentials() || user.canEditGroups()) {\n      items.add(\n        'edit',\n        <Button icon=\"fas fa-pencil-alt\" onclick={this.editAction.bind(this, user)}>\n          {app.translator.trans('core.forum.user_controls.edit_button')}\n        </Button>\n      );\n    }\n\n    return items;\n  },\n\n  /**\n   * Get controls for a user which are destructive (e.g. delete).\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  destructiveControls(user) {\n    const items = new ItemList();\n\n    if (user.id() !== '1' && user.canDelete()) {\n      items.add(\n        'delete',\n        <Button icon=\"fas fa-times\" onclick={this.deleteAction.bind(this, user)}>\n          {app.translator.trans('core.forum.user_controls.delete_button')}\n        </Button>\n      );\n    }\n\n    return items;\n  },\n\n  /**\n   * Delete the user.\n   *\n   * @param {import('../../common/models/User').default} user\n   */\n  deleteAction(user) {\n    if (!confirm(app.translator.trans('core.forum.user_controls.delete_confirmation'))) {\n      return;\n    }\n\n    user\n      .delete()\n      .then(() => {\n        this.showDeletionAlert(user, 'success');\n        if (app.current.matches(UserPage, { user })) {\n          app.history.back();\n        } else {\n          window.location.reload();\n        }\n      })\n      .catch(() => this.showDeletionAlert(user, 'error'));\n  },\n\n  /**\n   * Show deletion alert of user.\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {string} type\n   */\n  showDeletionAlert(user, type) {\n    const message = {\n      success: 'core.forum.user_controls.delete_success_message',\n      error: 'core.forum.user_controls.delete_error_message',\n    }[type];\n\n    app.alerts.show(\n      { type },\n      app.translator.trans(message, {\n        user,\n        email: user.email(),\n      })\n    );\n  },\n\n  /**\n   * Edit the user.\n   *\n   * @param {import('../../common/models/User').default} user\n   */\n  editAction(user) {\n    app.modal.show(EditUserModal, { user });\n  },\n};\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport avatar from '../../common/helpers/avatar';\nimport icon from '../../common/helpers/icon';\nimport listItems from '../../common/helpers/listItems';\nimport ItemList from '../../common/utils/ItemList';\nimport classList from '../../common/utils/classList';\nimport Button from '../../common/components/Button';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\n\n/**\n * The `AvatarEditor` component displays a user's avatar along with a dropdown\n * menu which allows the user to upload/remove the avatar.\n *\n * ### Attrs\n *\n * - `className`\n * - `user`\n */\nexport default class AvatarEditor extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * Whether or not an avatar upload is in progress.\n     *\n     * @type {Boolean}\n     */\n    this.loading = false;\n\n    /**\n     * Whether or not an image has been dragged over the dropzone.\n     *\n     * @type {Boolean}\n     */\n    this.isDraggedOver = false;\n  }\n\n  view() {\n    const user = this.attrs.user;\n\n    return (\n      <div className={classList(['AvatarEditor', 'Dropdown', this.attrs.className, this.loading && 'loading', this.isDraggedOver && 'dragover'])}>\n        {avatar(user, { loading: 'eager' })}\n        <a\n          className={user.avatarUrl() ? 'Dropdown-toggle' : 'Dropdown-toggle AvatarEditor--noAvatar'}\n          title={app.translator.trans('core.forum.user.avatar_upload_tooltip')}\n          data-toggle=\"dropdown\"\n          onclick={this.quickUpload.bind(this)}\n          ondragover={this.enableDragover.bind(this)}\n          ondragenter={this.enableDragover.bind(this)}\n          ondragleave={this.disableDragover.bind(this)}\n          ondragend={this.disableDragover.bind(this)}\n          ondrop={this.dropUpload.bind(this)}\n        >\n          {this.loading ? (\n            <LoadingIndicator display=\"unset\" size=\"large\" />\n          ) : user.avatarUrl() ? (\n            icon('fas fa-pencil-alt')\n          ) : (\n            icon('fas fa-plus-circle')\n          )}\n        </a>\n        <ul className=\"Dropdown-menu Menu\">{listItems(this.controlItems().toArray())}</ul>\n      </div>\n    );\n  }\n\n  /**\n   * Get the items in the edit avatar dropdown menu.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controlItems() {\n    const items = new ItemList();\n\n    items.add(\n      'upload',\n      <Button icon=\"fas fa-upload\" onclick={this.openPicker.bind(this)}>\n        {app.translator.trans('core.forum.user.avatar_upload_button')}\n      </Button>\n    );\n\n    items.add(\n      'remove',\n      <Button icon=\"fas fa-times\" onclick={this.remove.bind(this)}>\n        {app.translator.trans('core.forum.user.avatar_remove_button')}\n      </Button>\n    );\n\n    return items;\n  }\n\n  /**\n   * Enable dragover style\n   *\n   * @param {DragEvent} e\n   */\n  enableDragover(e) {\n    e.preventDefault();\n    e.stopPropagation();\n    this.isDraggedOver = true;\n  }\n\n  /**\n   * Disable dragover style\n   *\n   * @param {DragEvent} e\n   */\n  disableDragover(e) {\n    e.preventDefault();\n    e.stopPropagation();\n    this.isDraggedOver = false;\n  }\n\n  /**\n   * Upload avatar when file is dropped into dropzone.\n   *\n   * @param {DragEvent} e\n   */\n  dropUpload(e) {\n    e.preventDefault();\n    e.stopPropagation();\n    this.isDraggedOver = false;\n    this.upload(e.dataTransfer.files[0]);\n  }\n\n  /**\n   * If the user doesn't have an avatar, there's no point in showing the\n   * controls dropdown, because only one option would be viable: uploading.\n   * Thus, when the avatar editor's dropdown toggle button is clicked, we prompt\n   * the user to upload an avatar immediately.\n   *\n   * @param {MouseEvent} e\n   */\n  quickUpload(e) {\n    if (!this.attrs.user.avatarUrl()) {\n      e.preventDefault();\n      e.stopPropagation();\n      this.openPicker();\n    }\n  }\n\n  /**\n   * Upload avatar using file picker\n   */\n  openPicker() {\n    if (this.loading) return;\n\n    // Create a hidden HTML input element and click on it so the user can select\n    // an avatar file. Once they have, we will upload it via the API.\n    const $input = $('<input type=\"file\" accept=\".jpg, .jpeg, .png, .bmp, .gif\">');\n\n    $input\n      .appendTo('body')\n      .hide()\n      .click()\n      .on('input', (e) => {\n        this.upload($(e.target)[0].files[0]);\n      });\n  }\n\n  /**\n   * Upload avatar\n   *\n   * @param {File} file\n   */\n  upload(file) {\n    if (this.loading) return;\n\n    const user = this.attrs.user;\n    const data = new FormData();\n    data.append('avatar', file);\n\n    this.loading = true;\n    m.redraw();\n\n    app\n      .request({\n        method: 'POST',\n        url: `${app.forum.attribute('apiUrl')}/users/${user.id()}/avatar`,\n        serialize: (raw) => raw,\n        body: data,\n      })\n      .then(this.success.bind(this), this.failure.bind(this));\n  }\n\n  /**\n   * Remove the user's avatar.\n   */\n  remove() {\n    const user = this.attrs.user;\n\n    this.loading = true;\n    m.redraw();\n\n    app\n      .request({\n        method: 'DELETE',\n        url: `${app.forum.attribute('apiUrl')}/users/${user.id()}/avatar`,\n      })\n      .then(this.success.bind(this), this.failure.bind(this));\n  }\n\n  /**\n   * After a successful upload/removal, push the updated user data into the\n   * store, and force a re-computation of the user's avatar color.\n   *\n   * @param {object} response\n   * @protected\n   */\n  success(response) {\n    app.store.pushPayload(response);\n    delete this.attrs.user.avatarColor;\n\n    this.loading = false;\n    m.redraw();\n  }\n\n  /**\n   * If avatar upload/removal fails, stop loading.\n   *\n   * @param {object} response\n   * @protected\n   */\n  failure(response) {\n    this.loading = false;\n    m.redraw();\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport humanTime from '../../common/utils/humanTime';\nimport ItemList from '../../common/utils/ItemList';\nimport UserControls from '../utils/UserControls';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport icon from '../../common/helpers/icon';\nimport Dropdown from '../../common/components/Dropdown';\nimport Link from '../../common/components/Link';\nimport AvatarEditor from './AvatarEditor';\nimport listItems from '../../common/helpers/listItems';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `UserCard` component displays a user's profile card. This is used both on\n * the `UserPage` (in the hero) and in discussions, shown when hovering over a\n * post author.\n *\n * ### Attrs\n *\n * - `user`\n * - `className`\n * - `editable`\n * - `controlsButtonClassName`\n */\nexport default class UserCard extends Component {\n  view() {\n    const user = this.attrs.user;\n    const controls = UserControls.controls(user, this).toArray();\n    const color = user.color();\n    const badges = user.badges().toArray();\n\n    return (\n      <div className={classList('UserCard', this.attrs.className)} style={color && { '--usercard-bg': color }}>\n        <div className=\"darkenBackground\">\n          <div className=\"container\">\n            {!!controls.length && (\n              <Dropdown\n                className=\"UserCard-controls App-primaryControl\"\n                menuClassName=\"Dropdown-menu--right\"\n                buttonClassName={this.attrs.controlsButtonClassName}\n                label={app.translator.trans('core.forum.user_controls.button')}\n                accessibleToggleLabel={app.translator.trans('core.forum.user_controls.toggle_dropdown_accessible_label')}\n                icon=\"fas fa-ellipsis-v\"\n              >\n                {controls}\n              </Dropdown>\n            )}\n\n            <div className=\"UserCard-profile\">\n              <h1 className=\"UserCard-identity\">\n                {this.attrs.editable ? (\n                  <>\n                    <AvatarEditor user={user} className=\"UserCard-avatar\" /> {username(user)}\n                  </>\n                ) : (\n                  <Link href={app.route.user(user)}>\n                    <div className=\"UserCard-avatar\">{avatar(user, { loading: 'eager' })}</div>\n                    {username(user)}\n                  </Link>\n                )}\n              </h1>\n\n              {!!badges.length && <ul className=\"UserCard-badges badges\">{listItems(badges)}</ul>}\n\n              <ul className=\"UserCard-info\">{listItems(this.infoItems().toArray())}</ul>\n            </div>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  /**\n   * Build an item list of tidbits of info to show on this user's profile.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  infoItems() {\n    const items = new ItemList();\n    const user = this.attrs.user;\n    const lastSeenAt = user.lastSeenAt();\n\n    if (lastSeenAt) {\n      const online = user.isOnline();\n\n      items.add(\n        'lastSeen',\n        <span className={classList('UserCard-lastSeen', { online })}>\n          {online\n            ? [icon('fas fa-circle'), ' ', app.translator.trans('core.forum.user.online_text')]\n            : [icon('far fa-clock'), ' ', humanTime(lastSeenAt)]}\n        </span>,\n        100\n      );\n    }\n\n    items.add('joined', app.translator.trans('core.forum.user.joined_date_text', { ago: humanTime(user.joinTime()) }), 90);\n\n    return items;\n  }\n}\n","import type Mithril from 'mithril';\nimport User from '../models/User';\nimport icon from './icon';\n\n/**\n * The `useronline` helper displays a green circle if the user is online.\n */\nexport default function userOnline(user: User): Mithril.Vnode<{}, {}> | null {\n  if (user.lastSeenAt() && user.isOnline()) {\n    return <span className=\"UserOnline\">{icon('fas fa-circle')}</span>;\n  }\n\n  return null;\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport Link from '../../common/components/Link';\nimport UserCard from './UserCard';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport userOnline from '../../common/helpers/userOnline';\nimport listItems from '../../common/helpers/listItems';\n\n/**\n * The `PostUser` component shows the avatar and username of a post's author.\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class PostUser extends Component {\n  view() {\n    const post = this.attrs.post;\n    const user = post.user();\n\n    if (!user) {\n      return (\n        <div className=\"PostUser\">\n          <h3 className=\"PostUser-name\">\n            {avatar(user, { className: 'PostUser-avatar' })} {username(user)}\n          </h3>\n        </div>\n      );\n    }\n\n    return (\n      <div className=\"PostUser\">\n        <h3 className=\"PostUser-name\">\n          <Link href={app.route.user(user)}>\n            {avatar(user, { className: 'PostUser-avatar' })}\n            {userOnline(user)}\n            {username(user)}\n          </Link>\n        </h3>\n        <ul className=\"PostUser-badges badges\">{listItems(user.badges().toArray())}</ul>\n\n        {!post.isHidden() && this.attrs.cardVisible && (\n          <UserCard user={user} className=\"UserCard--popover\" controlsButtonClassName=\"Button Button--icon Button--flat\" />\n        )}\n      </div>\n    );\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    let timeout;\n\n    this.$()\n      .on('mouseover', '.PostUser-name a, .UserCard', () => {\n        clearTimeout(timeout);\n        timeout = setTimeout(this.showCard.bind(this), 500);\n      })\n      .on('mouseout', '.PostUser-name a, .UserCard', () => {\n        clearTimeout(timeout);\n        timeout = setTimeout(this.hideCard.bind(this), 250);\n      });\n  }\n\n  /**\n   * Show the user card.\n   */\n  showCard() {\n    this.attrs.oncardshow();\n\n    setTimeout(() => this.$('.UserCard').addClass('in'));\n  }\n\n  /**\n   * Hide the user card.\n   */\n  hideCard() {\n    this.$('.UserCard')\n      .removeClass('in')\n      .one('transitionend webkitTransitionEnd oTransitionEnd', () => {\n        this.attrs.oncardhide();\n      });\n  }\n}\n","import dayjs from 'dayjs';\nimport type Mithril from 'mithril';\n\n/**\n * The `fullTime` helper displays a formatted time string wrapped in a <time>\n * tag.\n */\nexport default function fullTime(time: Date): Mithril.Vnode {\n  const d = dayjs(time);\n\n  const datetime = d.format();\n  const full = d.format('LLLL');\n\n  return (\n    <time pubdate datetime={datetime}>\n      {full}\n    </time>\n  );\n}\n","import Component, { ComponentAttrs } from '../Component';\nimport type Mithril from 'mithril';\nimport ItemList from '../utils/ItemList';\n\nexport interface IIPAddressAttrs extends ComponentAttrs {\n  ip: string | undefined | null;\n}\n\n/**\n * A component to wrap an IP address for display.\n * Designed to be customizable for different use cases.\n *\n * @example\n * <IPAddress ip=\"127.0.0.1\" />\n * @example\n * <IPAddress ip={post.data.attributes.ipAddress} />\n */\nexport default class IPAddress<CustomAttrs extends IIPAddressAttrs = IIPAddressAttrs> extends Component<CustomAttrs> {\n  ip!: string;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.ip = this.attrs.ip || '';\n  }\n\n  view() {\n    return <span className=\"IPAddress\">{this.viewItems().toArray()}</span>;\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('ip', <span>{this.ip}</span>, 100);\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport humanTime from '../../common/helpers/humanTime';\nimport fullTime from '../../common/helpers/fullTime';\nimport ItemList from '../../common/utils/ItemList';\nimport IPAddress from '../../common/components/IPAddress';\n\n/**\n * The `PostMeta` component displays the time of a post, and when clicked, shows\n * a dropdown containing more information about the post (number, full time,\n * permalink).\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class PostMeta extends Component {\n  view() {\n    return <div className=\"Dropdown PostMeta\">{this.viewItems().toArray()}</div>;\n  }\n\n  /**\n   * Get the permalink for the given post.\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @returns {string}\n   */\n  getPermalink(post) {\n    return app.forum.attribute('baseOrigin') + app.route.post(post);\n  }\n\n  /**\n   * When the dropdown menu is shown, select the contents of the permalink\n   * input so that the user can quickly copy the URL.\n   * @param {Event} e\n   */\n  selectPermalink(e) {\n    setTimeout(() => $(this.element).parent().find('.PostMeta-permalink').select());\n\n    e.redraw = false;\n  }\n\n  /**\n   * @returns {ItemList}\n   */\n  viewItems() {\n    const items = new ItemList();\n    const post = this.attrs.post;\n    const time = post.createdAt();\n\n    items.add(\n      'time',\n      <a className=\"Dropdown-toggle\" onclick={(e) => this.selectPermalink(e)} data-toggle=\"dropdown\">\n        {humanTime(time)}\n      </a>,\n      100\n    );\n\n    items.add('meta-dropdown', <div className=\"Dropdown-menu dropdown-menu\">{this.metaItems().toArray()}</div>, 90);\n\n    return items;\n  }\n\n  /**\n   * @returns {ItemList}\n   */\n  metaItems() {\n    const items = new ItemList();\n    const post = this.attrs.post;\n    const touch = 'ontouchstart' in document.documentElement;\n    const permalink = this.getPermalink(post);\n    const time = post.createdAt();\n\n    items.add(\n      'post-number',\n      <span className=\"PostMeta-number\">{app.translator.trans('core.forum.post.number_tooltip', { number: post.number() })} </span>,\n      100\n    );\n\n    items.add('post-time', <span className=\"PostMeta-time\">{fullTime(time)}</span>, 90);\n\n    items.add(\n      'post-ip',\n      <span className=\"PostMeta-ip\">\n        <IPAddress ip={post.data.attributes.ipAddress} />\n      </span>,\n      80\n    );\n\n    items.add(\n      'permalink',\n      touch ? (\n        <a className=\"Button PostMeta-permalink\" href={permalink}>\n          {permalink}\n        </a>\n      ) : (\n        <input className=\"FormControl PostMeta-permalink\" value={permalink} onclick={(e) => e.stopPropagation()} />\n      ),\n      0\n    );\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport humanTime from '../../common/utils/humanTime';\nimport Tooltip from '../../common/components/Tooltip';\n\n/**\n * The `PostEdited` component displays information about when and by whom a post\n * was edited.\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class PostEdited extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n  }\n\n  view() {\n    const post = this.attrs.post;\n    const editedUser = post.editedUser();\n    const editedInfo = app.translator.trans('core.forum.post.edited_tooltip', { user: editedUser, ago: humanTime(post.editedAt()) });\n\n    return (\n      <Tooltip text={editedInfo}>\n        <span className=\"PostEdited\">{app.translator.trans('core.forum.post.edited_text')}</span>\n      </Tooltip>\n    );\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n  }\n}\n","import app from '../../forum/app';\nimport Post from './Post';\nimport classList from '../../common/utils/classList';\nimport PostUser from './PostUser';\nimport PostMeta from './PostMeta';\nimport PostEdited from './PostEdited';\nimport EditPostComposer from './EditPostComposer';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\nimport Button from '../../common/components/Button';\nimport ComposerPostPreview from './ComposerPostPreview';\n\n/**\n * The `CommentPost` component displays a standard `comment`-typed post. This\n * includes a number of item lists (controls, header, and footer) surrounding\n * the post's HTML content.\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class CommentPost extends Post {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * If the post has been hidden, then this flag determines whether or not its\n     * content has been expanded.\n     *\n     * @type {Boolean}\n     */\n    this.revealContent = false;\n\n    /**\n     * Whether or not the user hover card inside of PostUser is visible.\n     * The property must be managed in CommentPost to be able to use it in the subtree check\n     *\n     * @type {Boolean}\n     */\n    this.cardVisible = false;\n\n    this.subtree.check(\n      () => this.cardVisible,\n      () => this.isEditing(),\n      () => this.revealContent\n    );\n  }\n\n  content() {\n    return super.content().concat(this.contentItems().toArray());\n  }\n\n  contentItems() {\n    const items = new ItemList();\n\n    items.add(\n      'header',\n      <header className=\"Post-header\">\n        <ul>{listItems(this.headerItems().toArray())}</ul>\n      </header>,\n      100\n    );\n\n    items.add('body', <div className=\"Post-body\">{this.bodyItems().toArray()}</div>, 90);\n\n    return items;\n  }\n\n  bodyItems() {\n    const items = new ItemList();\n\n    items.add(\n      'content',\n      this.isEditing() ? <ComposerPostPreview className=\"Post-preview\" composer={app.composer} /> : m.trust(this.attrs.post.contentHtml()),\n      100\n    );\n\n    return items;\n  }\n\n  refreshContent() {\n    const contentHtml = this.isEditing() ? '' : this.attrs.post.contentHtml();\n\n    // If the post content has changed since the last render, we'll run through\n    // all of the <script> tags in the content and evaluate them. This is\n    // necessary because TextFormatter outputs them for e.g. syntax highlighting.\n    if (this.contentHtml !== contentHtml) {\n      this.$('.Post-body script').each(function () {\n        const script = document.createElement('script');\n        script.textContent = this.textContent;\n        Array.from(this.attributes).forEach((attr) => script.setAttribute(attr.name, attr.value));\n        this.parentNode.replaceChild(script, this);\n      });\n    }\n\n    this.contentHtml = contentHtml;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.refreshContent();\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    this.refreshContent();\n  }\n\n  isEditing() {\n    return app.composer.bodyMatches(EditPostComposer, { post: this.attrs.post });\n  }\n\n  elementAttrs() {\n    const post = this.attrs.post;\n    const attrs = super.elementAttrs();\n\n    attrs.className = classList(attrs.className, 'CommentPost', {\n      'Post--renderFailed': post.renderFailed(),\n      'Post--hidden': post.isHidden(),\n      'Post--edited': post.isEdited(),\n      revealContent: this.revealContent,\n      editing: this.isEditing(),\n    });\n\n    if (this.isEditing()) attrs['aria-busy'] = 'true';\n\n    return attrs;\n  }\n\n  /**\n   * Toggle the visibility of a hidden post's content.\n   */\n  toggleContent() {\n    this.revealContent = !this.revealContent;\n  }\n\n  /**\n   * Build an item list for the post's header.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  headerItems() {\n    const items = new ItemList();\n    const post = this.attrs.post;\n\n    items.add(\n      'user',\n      <PostUser\n        post={post}\n        cardVisible={this.cardVisible}\n        oncardshow={() => {\n          this.cardVisible = true;\n          m.redraw();\n        }}\n        oncardhide={() => {\n          this.cardVisible = false;\n          m.redraw();\n        }}\n      />,\n      100\n    );\n    items.add('meta', <PostMeta post={post} />);\n\n    if (post.isEdited() && !post.isHidden()) {\n      items.add('edited', <PostEdited post={post} />);\n    }\n\n    // If the post is hidden, add a button that allows toggling the visibility\n    // of the post's content.\n    if (post.isHidden()) {\n      items.add(\n        'toggle',\n        <Button className=\"Button Button--default Button--more\" icon=\"fas fa-ellipsis-h\" onclick={this.toggleContent.bind(this)} />\n      );\n    }\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Post from './Post';\nimport { ucfirst } from '../../common/utils/string';\nimport usernameHelper from '../../common/helpers/username';\nimport icon from '../../common/helpers/icon';\nimport Link from '../../common/components/Link';\nimport humanTime from '../../common/helpers/humanTime';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `EventPost` component displays a post which indicating a discussion\n * event, like a discussion being renamed or stickied. Subclasses must implement\n * the `icon` and `description` methods.\n *\n * ### Attrs\n *\n * - All of the attrs for `Post`\n *\n * @abstract\n */\nexport default class EventPost extends Post {\n  elementAttrs() {\n    const attrs = super.elementAttrs();\n\n    attrs.className = classList(attrs.className, 'EventPost', ucfirst(this.attrs.post.contentType()) + 'Post');\n\n    return attrs;\n  }\n\n  content() {\n    const user = this.attrs.post.user();\n    const username = usernameHelper(user);\n    const data = Object.assign(this.descriptionData(), {\n      user,\n      username: user ? (\n        <Link className=\"EventPost-user\" href={app.route.user(user)}>\n          {username}\n        </Link>\n      ) : (\n        username\n      ),\n      time: humanTime(this.attrs.post.createdAt()),\n    });\n\n    return super\n      .content()\n      .concat([icon(this.icon(), { className: 'EventPost-icon' }), <div className=\"EventPost-info\">{this.description(data)}</div>]);\n  }\n\n  /**\n   * Get the name of the event icon.\n   *\n   * @return {string}\n   */\n  icon() {\n    return '';\n  }\n\n  /**\n   * Get the description text for the event.\n   *\n   * @param {Record<string, unknown>} data\n   * @return {import('mithril').Children} The description to render in the DOM\n   */\n  description(data) {\n    return app.translator.trans(this.descriptionKey(), data);\n  }\n\n  /**\n   * Get the translation key for the description of the event.\n   *\n   * @return {string}\n   */\n  descriptionKey() {\n    return '';\n  }\n\n  /**\n   * Get the translation data for the description of the event.\n   *\n   * @return {Record<string, unknown>}\n   */\n  descriptionData() {\n    return {};\n  }\n}\n","import app from '../../forum/app';\nimport EventPost from './EventPost';\nimport extractText from '../../common/utils/extractText';\nimport Tooltip from '../../common/components/Tooltip';\n\n/**\n * The `DiscussionRenamedPost` component displays a discussion event post\n * indicating that the discussion has been renamed.\n *\n * ### Attrs\n *\n * - All of the attrs for EventPost\n */\nexport default class DiscussionRenamedPost extends EventPost {\n  icon() {\n    return 'fas fa-pencil-alt';\n  }\n\n  description(data) {\n    const renamed = app.translator.trans('core.forum.post_stream.discussion_renamed_text', data);\n\n    return <span>{renamed}</span>;\n  }\n\n  descriptionData() {\n    const post = this.attrs.post;\n    const oldTitle = post.content()[0];\n    const newTitle = post.content()[1];\n\n    return {\n      new: (\n        <Tooltip text={extractText(app.translator.trans('core.forum.post_stream.discussion_renamed_old_tooltip', { old: oldTitle }))}>\n          <strong className=\"DiscussionRenamedPost-new\">{newTitle}</strong>\n        </Tooltip>\n      ),\n    };\n  }\n}\n","import app from '../app';\nimport Component from '../../common/Component';\nimport Button from '../../common/components/Button';\nimport type Mithril from 'mithril';\nimport ItemList from '../../common/utils/ItemList';\n\nexport interface IWelcomeHeroAttrs {}\n\nconst LOCAL_STORAGE_KEY = 'welcomeHidden';\n\n/**\n * The `WelcomeHero` component displays a hero that welcomes the user to the\n * forum.\n */\nexport default class WelcomeHero extends Component<IWelcomeHeroAttrs> {\n  /**\n   * @deprecated Extend the `isHidden` method instead.\n   */\n  hidden: boolean = false;\n\n  oninit(vnode: Mithril.Vnode<IWelcomeHeroAttrs, this>) {\n    super.oninit(vnode);\n  }\n\n  view(vnode: Mithril.Vnode<IWelcomeHeroAttrs, this>) {\n    if (this.isHidden()) return null;\n\n    return (\n      <header className=\"Hero WelcomeHero\">\n        <div className=\"container\">{this.viewItems().toArray()}</div>\n      </header>\n    );\n  }\n\n  /**\n   * Hide the welcome hero.\n   */\n  hide() {\n    localStorage.setItem(LOCAL_STORAGE_KEY, 'true');\n  }\n\n  /**\n   * Determines whether the welcome hero should be hidden.\n   *\n   * @returns if the welcome hero is hidden.\n   */\n  isHidden(): boolean {\n    if (!app.forum.attribute<string>('welcomeTitle')?.trim()) return true;\n    if (localStorage.getItem(LOCAL_STORAGE_KEY)) return true;\n    if (this.hidden) return true;\n\n    return false;\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    const slideUp = () => {\n      this.$().slideUp(this.hide.bind(this));\n    };\n\n    items.add(\n      'dismiss-button',\n      <Button\n        icon=\"fas fa-times\"\n        onclick={slideUp}\n        className=\"Hero-close Button Button--icon Button--link\"\n        aria-label={app.translator.trans('core.forum.welcome_hero.hide')}\n      />,\n      100\n    );\n\n    items.add('content', <div className=\"containerNarrow\">{this.contentItems().toArray()}</div>, 80);\n\n    return items;\n  }\n\n  contentItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('title', <h1 className=\"Hero-title\">{app.forum.attribute('welcomeTitle')}</h1>, 100);\n\n    items.add('subtitle', <div className=\"Hero-subtitle\">{m.trust(app.forum.attribute('welcomeMessage'))}</div>);\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport ComposerBody from './ComposerBody';\nimport extractText from '../../common/utils/extractText';\nimport Stream from '../../common/utils/Stream';\n\n/**\n * The `DiscussionComposer` component displays the composer content for starting\n * a new discussion. It adds a text field as a header control so the user can\n * enter the title of their discussion. It also overrides the `submit` and\n * `willExit` actions to account for the title.\n *\n * ### Attrs\n *\n * - All of the attrs for ComposerBody\n * - `titlePlaceholder`\n */\nexport default class DiscussionComposer extends ComposerBody {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.placeholder = attrs.placeholder || extractText(app.translator.trans('core.forum.composer_discussion.body_placeholder'));\n    attrs.submitLabel = attrs.submitLabel || app.translator.trans('core.forum.composer_discussion.submit_button');\n    attrs.confirmExit = attrs.confirmExit || extractText(app.translator.trans('core.forum.composer_discussion.discard_confirmation'));\n    attrs.titlePlaceholder = attrs.titlePlaceholder || extractText(app.translator.trans('core.forum.composer_discussion.title_placeholder'));\n    attrs.className = 'ComposerBody--discussion';\n  }\n\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.composer.fields.title = this.composer.fields.title || Stream('');\n\n    /**\n     * The value of the title input.\n     *\n     * @type {Function}\n     */\n    this.title = this.composer.fields.title;\n  }\n\n  headerItems() {\n    const items = super.headerItems();\n\n    items.add('title', <h3>{app.translator.trans('core.forum.composer_discussion.title')}</h3>, 100);\n\n    items.add(\n      'discussionTitle',\n      <h3>\n        <input\n          className=\"FormControl\"\n          bidi={this.title}\n          placeholder={this.attrs.titlePlaceholder}\n          disabled={!!this.attrs.disabled}\n          onkeydown={this.onkeydown.bind(this)}\n        />\n      </h3>\n    );\n\n    return items;\n  }\n\n  /**\n   * Handle the title input's keydown event. When the return key is pressed,\n   * move the focus to the start of the text editor.\n   *\n   * @param {KeyboardEvent} e\n   */\n  onkeydown(e) {\n    if (e.which === 13) {\n      // Return\n      e.preventDefault();\n      this.composer.editor.moveCursorTo(0);\n    }\n\n    e.redraw = false;\n  }\n\n  hasChanges() {\n    return this.title() || this.composer.fields.content();\n  }\n\n  /**\n   * Get the data to submit to the server when the discussion is saved.\n   *\n   * @return {Record<string, unknown>}\n   */\n  data() {\n    return {\n      title: this.title(),\n      content: this.composer.fields.content(),\n    };\n  }\n\n  onsubmit() {\n    this.loading = true;\n\n    const data = this.data();\n\n    app.store\n      .createRecord('discussions')\n      .save(data)\n      .then((discussion) => {\n        this.composer.hide();\n        app.discussions.refresh();\n        m.route.set(app.route.discussion(discussion));\n      }, this.loaded.bind(this));\n  }\n}\n","import app from '../../forum/app';\nimport Page, { IPageAttrs } from '../../common/components/Page';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\nimport DiscussionList from './DiscussionList';\nimport WelcomeHero from './WelcomeHero';\nimport DiscussionComposer from './DiscussionComposer';\nimport LogInModal from './LogInModal';\nimport DiscussionPage from './DiscussionPage';\nimport Dropdown from '../../common/components/Dropdown';\nimport Button from '../../common/components/Button';\nimport LinkButton from '../../common/components/LinkButton';\nimport SelectDropdown from '../../common/components/SelectDropdown';\nimport extractText from '../../common/utils/extractText';\nimport type Mithril from 'mithril';\nimport type Discussion from '../../common/models/Discussion';\n\nexport interface IIndexPageAttrs extends IPageAttrs {}\n\n/**\n * The `IndexPage` component displays the index page, including the welcome\n * hero, the sidebar, and the discussion list.\n */\nexport default class IndexPage<CustomAttrs extends IIndexPageAttrs = IIndexPageAttrs, CustomState = {}> extends Page<CustomAttrs, CustomState> {\n  static providesInitialSearch = true;\n  lastDiscussion?: Discussion;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    // If the user is returning from a discussion page, then take note of which\n    // discussion they have just visited. After the view is rendered, we will\n    // scroll down so that this discussion is in view.\n    if (app.previous.matches(DiscussionPage)) {\n      this.lastDiscussion = app.previous.get('discussion');\n    }\n\n    // If the user is coming from the discussion list, then they have either\n    // just switched one of the parameters (filter, sort, search) or they\n    // probably want to refresh the results. We will clear the discussion list\n    // cache so that results are reloaded.\n    if (app.previous.matches(IndexPage)) {\n      app.discussions.clear();\n    }\n\n    app.discussions.refreshParams(app.search.params(), (m.route.param('page') && Number(m.route.param('page'))) || 1);\n\n    app.history.push('index', extractText(app.translator.trans('core.forum.header.back_to_index_tooltip')));\n\n    this.bodyClass = 'App--index';\n    this.scrollTopOnCreate = false;\n  }\n\n  view() {\n    return (\n      <div className=\"IndexPage\">\n        {this.hero()}\n        <div className=\"container\">\n          <div className=\"sideNavContainer\">\n            <nav className=\"IndexPage-nav sideNav\">\n              <ul>{listItems(this.sidebarItems().toArray())}</ul>\n            </nav>\n            <div className=\"IndexPage-results sideNavOffset\">{this.contentItems().toArray()}</div>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  contentItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('toolbar', <div className=\"IndexPage-toolbar\">{this.toolbarItems().toArray()}</div>, 100);\n    items.add('discussionList', <DiscussionList state={app.discussions} />, 90);\n\n    return items;\n  }\n\n  toolbarItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('view', <ul className=\"IndexPage-toolbar-view\">{listItems(this.viewItems().toArray())}</ul>, 100);\n    items.add('action', <ul className=\"IndexPage-toolbar-action\">{listItems(this.actionItems().toArray())}</ul>, 90);\n\n    return items;\n  }\n\n  setTitle() {\n    app.setTitle(extractText(app.translator.trans('core.forum.index.meta_title_text')));\n    app.setTitleCount(0);\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    this.setTitle();\n\n    // Work out the difference between the height of this hero and that of the\n    // previous hero. Maintain the same scroll position relative to the bottom\n    // of the hero so that the sidebar doesn't jump around.\n    const oldHeroHeight = app.cache.heroHeight as number;\n    const heroHeight = (app.cache.heroHeight = this.$('.Hero').outerHeight() || 0);\n    const scrollTop = app.cache.scrollTop as number;\n\n    $('#app').css('min-height', ($(window).height() || 0) + heroHeight);\n\n    // Let browser handle scrolling on page reload.\n    if (app.previous.type == null) return;\n\n    // Only retain scroll position if we're coming from a discussion page.\n    // Otherwise, we've just changed the filter, so we should go to the top of the page.\n    if (this.lastDiscussion) {\n      $(window).scrollTop(scrollTop - oldHeroHeight + heroHeight);\n    } else {\n      $(window).scrollTop(0);\n    }\n\n    // If we've just returned from a discussion page, then the constructor will\n    // have set the `lastDiscussion` property. If this is the case, we want to\n    // scroll down to that discussion so that it's in view.\n    if (this.lastDiscussion) {\n      const $discussion = this.$(`li[data-id=\"${this.lastDiscussion.id()}\"] .DiscussionListItem`);\n\n      if ($discussion.length) {\n        const indexTop = $('#header').outerHeight() || 0;\n        const indexBottom = $(window).height() || 0;\n        const discussionOffset = $discussion.offset();\n        const discussionTop = (discussionOffset && discussionOffset.top) || 0;\n        const discussionBottom = discussionTop + ($discussion.outerHeight() || 0);\n\n        if (discussionTop < scrollTop + indexTop || discussionBottom > scrollTop + indexBottom) {\n          $(window).scrollTop(discussionTop - indexTop);\n        }\n      }\n    }\n  }\n\n  onbeforeremove(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onbeforeremove(vnode);\n\n    // Save the scroll position so we can restore it when we return to the\n    // discussion list.\n    app.cache.scrollTop = $(window).scrollTop();\n  }\n\n  onremove(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onremove(vnode);\n\n    $('#app').css('min-height', '');\n  }\n\n  /**\n   * Get the component to display as the hero.\n   */\n  hero() {\n    return <WelcomeHero />;\n  }\n\n  /**\n   * Build an item list for the sidebar of the index page. By default this is a\n   * \"New Discussion\" button, and then a DropdownSelect component containing a\n   * list of navigation items.\n   */\n  sidebarItems() {\n    const items = new ItemList<Mithril.Children>();\n    const canStartDiscussion = app.forum.attribute('canStartDiscussion') || !app.session.user;\n\n    items.add(\n      'newDiscussion',\n      <Button\n        icon=\"fas fa-edit\"\n        className=\"Button Button--primary IndexPage-newDiscussion\"\n        itemClassName=\"App-primaryControl\"\n        onclick={() => {\n          // If the user is not logged in, the promise rejects, and a login modal shows up.\n          // Since that's already handled, we dont need to show an error message in the console.\n          return this.newDiscussionAction().catch(() => {});\n        }}\n        disabled={!canStartDiscussion}\n      >\n        {app.translator.trans(`core.forum.index.${canStartDiscussion ? 'start_discussion_button' : 'cannot_start_discussion_button'}`)}\n      </Button>\n    );\n\n    items.add(\n      'nav',\n      <SelectDropdown\n        buttonClassName=\"Button\"\n        className=\"App-titleControl\"\n        accessibleToggleLabel={app.translator.trans('core.forum.index.toggle_sidenav_dropdown_accessible_label')}\n      >\n        {this.navItems().toArray()}\n      </SelectDropdown>\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the navigation in the sidebar of the index page. By\n   * default this is just the 'All Discussions' link.\n   */\n  navItems() {\n    const items = new ItemList<Mithril.Children>();\n    const params = app.search.stickyParams();\n\n    items.add(\n      'allDiscussions',\n      <LinkButton href={app.route('index', params)} icon=\"far fa-comments\">\n        {app.translator.trans('core.forum.index.all_discussions_link')}\n      </LinkButton>,\n      100\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the part of the toolbar which is concerned with how\n   * the results are displayed. By default this is just a select box to change\n   * the way discussions are sorted.\n   */\n  viewItems() {\n    const items = new ItemList<Mithril.Children>();\n    const sortMap = app.discussions.sortMap();\n\n    const sortOptions = Object.keys(sortMap).reduce((acc: any, sortId) => {\n      acc[sortId] = app.translator.trans(`core.forum.index_sort.${sortId}_button`);\n      return acc;\n    }, {});\n\n    items.add(\n      'sort',\n      <Dropdown\n        buttonClassName=\"Button\"\n        label={sortOptions[app.search.params().sort] || Object.keys(sortMap).map((key) => sortOptions[key])[0]}\n        accessibleToggleLabel={app.translator.trans('core.forum.index_sort.toggle_dropdown_accessible_label')}\n      >\n        {Object.keys(sortOptions).map((value) => {\n          const label = sortOptions[value];\n          const active = (app.search.params().sort || Object.keys(sortMap)[0]) === value;\n\n          return (\n            <Button icon={active ? 'fas fa-check' : true} onclick={app.search.changeSort.bind(app.search, value)} active={active}>\n              {label}\n            </Button>\n          );\n        })}\n      </Dropdown>\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the part of the toolbar which is about taking action\n   * on the results. By default this is just a \"mark all as read\" button.\n   */\n  actionItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'refresh',\n      <Button\n        title={app.translator.trans('core.forum.index.refresh_tooltip')}\n        icon=\"fas fa-sync\"\n        className=\"Button Button--icon\"\n        onclick={() => {\n          app.discussions.refresh();\n          if (app.session.user) {\n            app.store.find('users', app.session.user.id()!);\n            m.redraw();\n          }\n        }}\n      />\n    );\n\n    if (app.session.user) {\n      items.add(\n        'markAllAsRead',\n        <Button\n          title={app.translator.trans('core.forum.index.mark_all_as_read_tooltip')}\n          icon=\"fas fa-check\"\n          className=\"Button Button--icon\"\n          onclick={this.markAllAsRead.bind(this)}\n        />\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Open the composer for a new discussion or prompt the user to login.\n   */\n  newDiscussionAction(): Promise<unknown> {\n    return new Promise((resolve, reject) => {\n      if (app.session.user) {\n        app.composer.load(DiscussionComposer, { user: app.session.user });\n        app.composer.show();\n\n        return resolve(app.composer);\n      } else {\n        app.modal.show(LogInModal);\n\n        return reject();\n      }\n    });\n  }\n\n  /**\n   * Mark all discussions as read.\n   */\n  markAllAsRead() {\n    const confirmation = confirm(extractText(app.translator.trans('core.forum.index.mark_all_as_read_confirmation')));\n\n    if (confirmation) {\n      app.session.user?.save({ markedAllAsReadAt: new Date() });\n    }\n  }\n}\n","import app from '../../forum/app';\nimport UserPage, { IUserPageAttrs } from './UserPage';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport Placeholder from '../../common/components/Placeholder';\nimport CommentPost from './CommentPost';\nimport type Post from '../../common/models/Post';\nimport type Mithril from 'mithril';\nimport type User from '../../common/models/User';\n\n/**\n * The `PostsUserPage` component shows a user's activity feed inside of their\n * profile.\n */\nexport default class PostsUserPage extends UserPage {\n  /**\n   * Whether or not the activity feed is currently loading.\n   */\n  loading: boolean = true;\n\n  /**\n   * Whether or not there are any more activity items that can be loaded.\n   */\n  moreResults: boolean = false;\n\n  /**\n   * The Post models in the feed.\n   */\n  posts: Post[] = [];\n\n  /**\n   * The number of activity items to load per request.\n   */\n  loadLimit: number = 20;\n\n  oninit(vnode: Mithril.Vnode<IUserPageAttrs, this>) {\n    super.oninit(vnode);\n\n    this.loadUser(m.route.param('username'));\n  }\n\n  content() {\n    if (this.posts.length === 0 && !this.loading) {\n      return (\n        <div className=\"PostsUserPage\">\n          <Placeholder text={app.translator.trans('core.forum.user.posts_empty_text')} />\n        </div>\n      );\n    }\n\n    let footer;\n\n    if (this.loading) {\n      footer = <LoadingIndicator />;\n    } else if (this.moreResults) {\n      footer = (\n        <div className=\"PostsUserPage-loadMore\">\n          <Button className=\"Button\" onclick={this.loadMore.bind(this)}>\n            {app.translator.trans('core.forum.user.posts_load_more_button')}\n          </Button>\n        </div>\n      );\n    }\n\n    return (\n      <div className=\"PostsUserPage\">\n        <ul className=\"PostsUserPage-list\">\n          {this.posts.map((post) => (\n            <li>\n              <div className=\"PostsUserPage-discussion\">\n                {app.translator.trans('core.forum.user.in_discussion_text', {\n                  discussion: <Link href={app.route.post(post)}>{this.discussionTitle(post)}</Link>,\n                })}\n              </div>\n\n              <CommentPost post={post} />\n            </li>\n          ))}\n        </ul>\n        <div className=\"PostsUserPage-loadMore\">{footer}</div>\n      </div>\n    );\n  }\n\n  /**\n   * Initialize the component with a user, and trigger the loading of their\n   * activity feed.\n   */\n  show(user: User): void {\n    super.show(user);\n\n    this.refresh();\n  }\n\n  /**\n   * Clear and reload the user's activity feed.\n   */\n  refresh() {\n    this.loading = true;\n    this.posts = [];\n\n    m.redraw();\n\n    this.loadResults().then(this.parseResults.bind(this));\n  }\n\n  /**\n   * Load a new page of the user's activity feed.\n   *\n   * @protected\n   */\n  loadResults(offset = 0) {\n    return app.store.find<Post[]>('posts', {\n      filter: {\n        author: this.user!.username(),\n        type: 'comment',\n      },\n      page: { offset, limit: this.loadLimit },\n      sort: '-createdAt',\n    });\n  }\n\n  /**\n   * Load the next page of results.\n   */\n  loadMore() {\n    this.loading = true;\n    this.loadResults(this.posts.length).then(this.parseResults.bind(this));\n  }\n\n  /**\n   * Parse results and append them to the activity feed.\n   */\n  parseResults(results: Post[]): Post[] {\n    this.loading = false;\n\n    this.posts.push(...results);\n\n    this.moreResults = results.length >= this.loadLimit;\n    m.redraw();\n\n    return results;\n  }\n\n  discussionTitle(post: Post): string {\n    return post.discussion().title();\n  }\n}\n","import app from '../../common/app';\nimport Model from '../Model';\nimport { ApiQueryParamsPlural, ApiResponsePlural } from '../Store';\n\nexport interface Page<TModel> {\n  number: number;\n  items: TModel[];\n\n  hasPrev?: boolean;\n  hasNext?: boolean;\n}\n\nexport interface PaginationLocation {\n  page: number;\n  startIndex?: number;\n  endIndex?: number;\n}\n\nexport interface PaginatedListParams {\n  [key: string]: any;\n}\n\nexport interface PaginatedListRequestParams extends Omit<ApiQueryParamsPlural, 'include'> {\n  include?: string | string[];\n}\n\nexport default abstract class PaginatedListState<T extends Model, P extends PaginatedListParams = PaginatedListParams> {\n  protected location!: PaginationLocation;\n  protected pageSize: number;\n\n  protected pages: Page<T>[] = [];\n  protected params: P = {} as P;\n\n  protected initialLoading: boolean = false;\n  protected loadingPrev: boolean = false;\n  protected loadingNext: boolean = false;\n\n  protected constructor(params: P = {} as P, page: number = 1, pageSize: number = 20) {\n    this.params = params;\n\n    this.location = { page };\n    this.pageSize = pageSize;\n  }\n\n  abstract get type(): string;\n\n  public clear(): void {\n    this.pages = [];\n\n    m.redraw();\n  }\n\n  public loadPrev(): Promise<void> {\n    if (this.loadingPrev || this.getLocation().page === 1) return Promise.resolve();\n\n    this.loadingPrev = true;\n\n    const page: number = this.getPrevPageNumber();\n\n    return this.loadPage(page)\n      .then(this.parseResults.bind(this, page))\n      .finally(() => (this.loadingPrev = false));\n  }\n\n  public loadNext(): Promise<void> {\n    if (this.loadingNext) return Promise.resolve();\n\n    this.loadingNext = true;\n\n    const page: number = this.getNextPageNumber();\n\n    return this.loadPage(page)\n      .then(this.parseResults.bind(this, page))\n      .finally(() => (this.loadingNext = false));\n  }\n\n  protected parseResults(pg: number, results: ApiResponsePlural<T>): void {\n    const pageNum = Number(pg);\n\n    const links = results.payload?.links;\n    const page = {\n      number: pageNum,\n      items: results,\n      hasNext: !!links?.next,\n      hasPrev: !!links?.prev,\n    };\n\n    if (this.isEmpty() || pageNum > this.getNextPageNumber() - 1) {\n      this.pages.push(page);\n    } else {\n      this.pages.unshift(page);\n    }\n\n    this.location = { page: pageNum };\n\n    m.redraw();\n  }\n\n  /**\n   * Load a new page of results.\n   */\n  protected loadPage(page = 1): Promise<ApiResponsePlural<T>> {\n    const reqParams = this.requestParams();\n\n    const include = Array.isArray(reqParams.include) ? reqParams.include.join(',') : reqParams.include;\n\n    const params: ApiQueryParamsPlural = {\n      ...reqParams,\n      page: {\n        ...reqParams.page,\n        offset: this.pageSize * (page - 1),\n      },\n      include,\n    };\n\n    return app.store.find<T[]>(this.type, params);\n  }\n\n  /**\n   * Get the parameters that should be passed in the API request.\n   * Do not include page offset unless subclass overrides loadPage.\n   *\n   * @abstract\n   * @see loadPage\n   */\n  protected requestParams(): PaginatedListRequestParams {\n    return this.params;\n  }\n\n  /**\n   * Update the `this.params` object, calling `refresh` if they have changed.\n   * Use `requestParams` for converting `this.params` into API parameters\n   *\n   * @param newParams\n   * @param page\n   * @see requestParams\n   */\n  public refreshParams(newParams: P, page: number): Promise<void> {\n    if (this.isEmpty() || this.paramsChanged(newParams)) {\n      this.params = newParams;\n\n      return this.refresh(page);\n    }\n\n    return Promise.resolve();\n  }\n\n  public refresh(page: number = 1): Promise<void> {\n    this.initialLoading = true;\n    this.loadingPrev = false;\n    this.loadingNext = false;\n\n    this.clear();\n\n    this.location = { page };\n\n    return this.loadPage()\n      .then((results) => {\n        this.pages = [];\n        this.parseResults(this.location.page, results);\n      })\n      .finally(() => (this.initialLoading = false));\n  }\n\n  public getPages(): Page<T>[] {\n    return this.pages;\n  }\n  public getLocation(): PaginationLocation {\n    return this.location;\n  }\n\n  public isLoading(): boolean {\n    return this.initialLoading || this.loadingNext || this.loadingPrev;\n  }\n  public isInitialLoading(): boolean {\n    return this.initialLoading;\n  }\n  public isLoadingPrev(): boolean {\n    return this.loadingPrev;\n  }\n  public isLoadingNext(): boolean {\n    return this.loadingNext;\n  }\n\n  /**\n   * Returns true when the number of items across all loaded pages is not 0.\n   *\n   * @see isEmpty\n   */\n  public hasItems(): boolean {\n    return !!this.getAllItems().length;\n  }\n\n  /**\n   * Returns true when there aren't any items *and* the state has already done its initial loading.\n   * If you want to know whether there are items regardless of load state, use `hasItems()` instead\n   *\n   * @see hasItems\n   */\n  public isEmpty(): boolean {\n    return !this.isInitialLoading() && !this.hasItems();\n  }\n\n  public hasPrev(): boolean {\n    return !!this.pages[0]?.hasPrev;\n  }\n  public hasNext(): boolean {\n    return !!this.pages[this.pages.length - 1]?.hasNext;\n  }\n\n  /**\n   * Stored state parameters.\n   */\n  public getParams(): P {\n    return this.params;\n  }\n\n  protected getNextPageNumber(): number {\n    const pg = this.pages[this.pages.length - 1]?.number;\n\n    if (pg && !isNaN(pg)) {\n      return pg + 1;\n    } else {\n      return this.location.page;\n    }\n  }\n  protected getPrevPageNumber(): number {\n    const pg = this.pages[0]?.number;\n\n    if (pg && !isNaN(pg)) {\n      // If the calculated page number is less than 1,\n      // return 1 as the prev page (first possible page number)\n      return Math.max(pg - 1, 1);\n    } else {\n      return this.location.page;\n    }\n  }\n\n  protected paramsChanged(newParams: P): boolean {\n    return Object.keys(newParams).some((key) => this.getParams()[key] !== newParams[key]);\n  }\n\n  protected getAllItems(): T[] {\n    return this.getPages()\n      .map((pg) => pg.items)\n      .flat();\n  }\n}\n","export default class EventEmitter {\n  protected events: any = {};\n\n  public constructor() {\n    this.events = {};\n  }\n\n  public on(event: string, listener: Function): EventEmitter {\n    if (!this.events[event]) {\n      this.events[event] = [];\n    }\n\n    this.events[event].push(listener);\n\n    return this;\n  }\n\n  public emit(event: string, ...args: any[]): void {\n    if (this.events[event]) {\n      this.events[event].forEach((listener: Function) => listener(...args));\n    }\n  }\n}\n","import app from '../../forum/app';\nimport PaginatedListState, { Page, PaginatedListParams, PaginatedListRequestParams } from '../../common/states/PaginatedListState';\nimport Discussion from '../../common/models/Discussion';\nimport { ApiResponsePlural } from '../../common/Store';\nimport EventEmitter from '../../common/utils/EventEmitter';\n\nexport interface DiscussionListParams extends PaginatedListParams {\n  sort?: string;\n}\n\nconst globalEventEmitter = new EventEmitter();\n\nexport default class DiscussionListState<P extends DiscussionListParams = DiscussionListParams> extends PaginatedListState<Discussion, P> {\n  protected extraDiscussions: Discussion[] = [];\n  protected eventEmitter: EventEmitter;\n\n  constructor(params: P, page: number = 1) {\n    super(params, page, 20);\n\n    this.eventEmitter = globalEventEmitter.on('discussion.deleted', this.deleteDiscussion.bind(this));\n  }\n\n  get type(): string {\n    return 'discussions';\n  }\n\n  requestParams(): PaginatedListRequestParams {\n    const params = {\n      include: ['user', 'lastPostedUser'],\n      filter: this.params.filter || {},\n      sort: this.sortMap()[this.params.sort ?? ''],\n    };\n\n    if (this.params.q) {\n      params.filter.q = this.params.q;\n      params.include.push('mostRelevantPost', 'mostRelevantPost.user');\n    }\n\n    return params;\n  }\n\n  protected loadPage(page: number = 1): Promise<ApiResponsePlural<Discussion>> {\n    const preloadedDiscussions = app.preloadedApiDocument<Discussion[]>();\n\n    if (preloadedDiscussions) {\n      this.initialLoading = false;\n\n      return Promise.resolve(preloadedDiscussions);\n    }\n\n    return super.loadPage(page);\n  }\n\n  clear(): void {\n    super.clear();\n\n    this.extraDiscussions = [];\n  }\n\n  /**\n   * Get a map of sort keys (which appear in the URL, and are used for\n   * translation) to the API sort value that they represent.\n   */\n  sortMap() {\n    const map: any = {};\n\n    if (this.params.q) {\n      map.relevance = '';\n    }\n    map.latest = '-lastPostedAt';\n    map.top = '-commentCount';\n    map.newest = '-createdAt';\n    map.oldest = 'createdAt';\n\n    return map;\n  }\n\n  /**\n   * In the last request, has the user searched for a discussion?\n   */\n  isSearchResults(): boolean {\n    return !!this.params.q;\n  }\n\n  removeDiscussion(discussion: Discussion): void {\n    this.eventEmitter.emit('discussion.deleted', discussion);\n  }\n\n  deleteDiscussion(discussion: Discussion): void {\n    for (const page of this.pages) {\n      const index = page.items.indexOf(discussion);\n\n      if (index !== -1) {\n        page.items.splice(index, 1);\n        break;\n      }\n    }\n\n    const index = this.extraDiscussions.indexOf(discussion);\n\n    if (index !== -1) {\n      this.extraDiscussions.splice(index);\n    }\n\n    m.redraw();\n  }\n\n  /**\n   * Add a discussion to the top of the list.\n   */\n  addDiscussion(discussion: Discussion): void {\n    this.removeDiscussion(discussion);\n    this.extraDiscussions.unshift(discussion);\n\n    m.redraw();\n  }\n\n  protected getAllItems(): Discussion[] {\n    return this.extraDiscussions.concat(super.getAllItems());\n  }\n\n  public getPages(): Page<Discussion>[] {\n    const pages = super.getPages();\n\n    if (this.extraDiscussions.length) {\n      return [\n        {\n          number: -1,\n          items: this.extraDiscussions,\n        },\n        ...pages,\n      ];\n    }\n\n    return pages;\n  }\n}\n","import UserPage, { IUserPageAttrs } from './UserPage';\nimport DiscussionList from './DiscussionList';\nimport DiscussionListState from '../states/DiscussionListState';\nimport type Mithril from 'mithril';\nimport type User from '../../common/models/User';\n\n/**\n * The `DiscussionsUserPage` component shows a discussion list inside of a user\n * page.\n */\nexport default class DiscussionsUserPage extends UserPage<IUserPageAttrs, DiscussionListState> {\n  oninit(vnode: Mithril.Vnode<IUserPageAttrs, this>) {\n    super.oninit(vnode);\n\n    this.loadUser(m.route.param('username'));\n  }\n\n  show(user: User): void {\n    super.show(user);\n\n    this.state = new DiscussionListState({\n      filter: { author: user.username() },\n      sort: 'newest',\n    });\n\n    this.state.refresh();\n  }\n\n  content() {\n    return (\n      <div className=\"DiscussionsUserPage\">\n        <DiscussionList state={this.state} />\n      </div>\n    );\n  }\n}\n","/**\n * An event handler factory that makes it simpler to implement data binding\n * for component event listeners.\n *\n * The handler created by this factory passes the DOM element's attribute\n * identified by the first argument to the callback (usually a bidirectional\n * Mithril stream: https://mithril.js.org/stream.html#bidirectional-bindings).\n *\n * Replaces m.withAttr for Mithril 2.0.\n * @see https://mithril.js.org/archive/v0.2.5/mithril.withAttr.html\n */\nexport default (key: string, cb: Function) =>\n  function (this: Element) {\n    cb(this.getAttribute(key) || (this as any)[key]);\n  };\n","import Component, { ComponentAttrs } from '../Component';\nimport LoadingIndicator from './LoadingIndicator';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport withAttr from '../utils/withAttr';\nimport type Mithril from 'mithril';\n\nexport interface ICheckboxAttrs extends ComponentAttrs {\n  state?: boolean;\n  loading?: boolean;\n  disabled?: boolean;\n  onchange: (checked: boolean, component: Checkbox<this>) => void;\n}\n\n/**\n * The `Checkbox` component defines a checkbox input.\n *\n * ### Attrs\n *\n * - `state` Whether or not the checkbox is checked.\n * - `className` The class name for the root element.\n * - `disabled` Whether or not the checkbox is disabled.\n * - `loading` Whether or not the checkbox is loading.\n * - `onchange` A callback to run when the checkbox is checked/unchecked.\n * - `children` A text label to display next to the checkbox.\n */\nexport default class Checkbox<CustomAttrs extends ICheckboxAttrs = ICheckboxAttrs> extends Component<CustomAttrs> {\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    const className = classList([\n      'Checkbox',\n      this.attrs.state ? 'on' : 'off',\n      this.attrs.className,\n      this.attrs.loading && 'loading',\n      this.attrs.disabled && 'disabled',\n    ]);\n\n    return (\n      <label className={className}>\n        <input type=\"checkbox\" checked={this.attrs.state} disabled={this.attrs.disabled} onchange={withAttr('checked', this.onchange.bind(this))} />\n        <div className=\"Checkbox-display\" aria-hidden=\"true\">\n          {this.getDisplay()}\n        </div>\n        {vnode.children}\n      </label>\n    );\n  }\n\n  /**\n   * Get the template for the checkbox's display (tick/cross icon).\n   */\n  protected getDisplay(): Mithril.Children {\n    return this.attrs.loading ? <LoadingIndicator display=\"unset\" size=\"small\" /> : icon(this.attrs.state ? 'fas fa-check' : 'fas fa-times');\n  }\n\n  /**\n   * Run a callback when the state of the checkbox is changed.\n   */\n  protected onchange(checked: boolean): void {\n    if (this.attrs.onchange) this.attrs.onchange(checked, this);\n  }\n}\n","import classList from '../utils/classList';\nimport Checkbox, { ICheckboxAttrs } from './Checkbox';\n\n/**\n * The `Switch` component is a `Checkbox`, but with a switch display instead of\n * a tick/cross one.\n */\nexport default class Switch extends Checkbox {\n  static initAttrs(attrs: ICheckboxAttrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = classList(attrs.className, 'Checkbox--switch');\n  }\n\n  getDisplay() {\n    return !!this.attrs.loading && super.getDisplay();\n  }\n}\n","import Component from '../Component';\nimport listItems from '../helpers/listItems';\n\n/**\n * The `FieldSet` component defines a collection of fields, displayed in a list\n * underneath a title. Accepted properties are:\n *\n * - `className` The class name for the fieldset.\n * - `label` The title of this group of fields.\n *\n * The children should be an array of items to show in the fieldset.\n */\nexport default class FieldSet extends Component {\n  view(vnode) {\n    return (\n      <fieldset className={this.attrs.className}>\n        <legend>{this.attrs.label}</legend>\n        <ul>{listItems(vnode.children)}</ul>\n      </fieldset>\n    );\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport Checkbox from '../../common/components/Checkbox';\nimport icon from '../../common/helpers/icon';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `NotificationGrid` component displays a table of notification types and\n * methods, allowing the user to toggle each combination.\n *\n * ### Attrs\n *\n * - `user`\n */\nexport default class NotificationGrid extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * Information about the available notification methods.\n     *\n     * @type {({ name: string, icon: string, label: import('mithril').Children })[]}\n     */\n    this.methods = this.notificationMethods().toArray();\n\n    /**\n     * A map of which notification checkboxes are loading.\n     *\n     * @type {Record<string, boolean>}\n     */\n    this.loading = {};\n\n    /**\n     * Information about the available notification types.\n     *\n     * @type {({ name: string, icon: string, label: import('mithril').Children })[]}\n     */\n    this.types = this.notificationTypes().toArray();\n  }\n\n  view() {\n    const preferences = this.attrs.user.preferences();\n\n    return (\n      <table className=\"NotificationGrid\">\n        <thead>\n          <tr>\n            <td />\n            {this.methods.map((method) => (\n              <th className=\"NotificationGrid-groupToggle\" onclick={this.toggleMethod.bind(this, method.name)}>\n                {icon(method.icon)} {method.label}\n              </th>\n            ))}\n          </tr>\n        </thead>\n\n        <tbody>\n          {this.types.map((type) => (\n            <tr>\n              <td className=\"NotificationGrid-groupToggle\" onclick={this.toggleType.bind(this, type.name)}>\n                {icon(type.icon)} {type.label}\n              </td>\n              {this.methods.map((method) => {\n                const key = this.preferenceKey(type.name, method.name);\n\n                return (\n                  <td className=\"NotificationGrid-checkbox\">\n                    <Checkbox\n                      state={!!preferences[key]}\n                      loading={this.loading[key]}\n                      disabled={!(key in preferences)}\n                      onchange={this.toggle.bind(this, [key])}\n                    >\n                      <span className=\"sr-only\">\n                        {app.translator.trans('core.forum.settings.notification_checkbox_a11y_label_template', {\n                          description: type.label,\n                          method: method.label,\n                        })}\n                      </span>\n                    </Checkbox>\n                  </td>\n                );\n              })}\n            </tr>\n          ))}\n        </tbody>\n      </table>\n    );\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.$('thead .NotificationGrid-groupToggle').bind('mouseenter mouseleave', function (e) {\n      const i = parseInt($(this).index(), 10) + 1;\n      $(this)\n        .parents('table')\n        .find('td:nth-child(' + i + ')')\n        .toggleClass('highlighted', e.type === 'mouseenter');\n    });\n\n    this.$('tbody .NotificationGrid-groupToggle').bind('mouseenter mouseleave', function (e) {\n      $(this)\n        .parent()\n        .find('td')\n        .toggleClass('highlighted', e.type === 'mouseenter');\n    });\n  }\n\n  /**\n   * Toggle the state of the given preferences, based on the value of the first\n   * one.\n   *\n   * @param {string[]} keys\n   */\n  toggle(keys) {\n    const user = this.attrs.user;\n    const preferences = user.preferences();\n    const enabled = !preferences[keys[0]];\n\n    keys.forEach((key) => {\n      this.loading[key] = true;\n      preferences[key] = enabled;\n    });\n\n    m.redraw();\n\n    user.save({ preferences }).then(() => {\n      keys.forEach((key) => (this.loading[key] = false));\n\n      m.redraw();\n    });\n  }\n\n  /**\n   * Toggle all notification types for the given method.\n   *\n   * @param {string} method\n   */\n  toggleMethod(method) {\n    const keys = this.types.map((type) => this.preferenceKey(type.name, method)).filter((key) => key in this.attrs.user.preferences());\n\n    this.toggle(keys);\n  }\n\n  /**\n   * Toggle all notification methods for the given type.\n   *\n   * @param {string} type\n   */\n  toggleType(type) {\n    const keys = this.methods.map((method) => this.preferenceKey(type, method.name)).filter((key) => key in this.attrs.user.preferences());\n\n    this.toggle(keys);\n  }\n\n  /**\n   * Get the name of the preference key for the given notification type-method\n   * combination.\n   *\n   * @param {string} type\n   * @param {string} method\n   * @return {string}\n   */\n  preferenceKey(type, method) {\n    return 'notify_' + type + '_' + method;\n  }\n\n  /**\n   * Build an item list for the notification methods to display in the grid.\n   *\n   * Each notification method is an object which has the following properties:\n   *\n   * - `name` The name of the notification method.\n   * - `icon` The icon to display in the column header.\n   * - `label` The label to display in the column header.\n   *\n   * @return {ItemList<{ name: string, icon: string, label: import('mithril').Children }>}\n   */\n  notificationMethods() {\n    const items = new ItemList();\n\n    items.add('alert', {\n      name: 'alert',\n      icon: 'fas fa-bell',\n      label: app.translator.trans('core.forum.settings.notify_by_web_heading'),\n    });\n\n    items.add('email', {\n      name: 'email',\n      icon: 'far fa-envelope',\n      label: app.translator.trans('core.forum.settings.notify_by_email_heading'),\n    });\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the notification types to display in the grid.\n   *\n   * Each notification type is an object which has the following properties:\n   *\n   * - `name` The name of the notification type.\n   * - `icon` The icon to display in the notification grid row.\n   * - `label` The label to display in the notification grid row.\n   *\n   * @return {ItemList<{ name: string, icon: string, label: import('mithril').Children}>}\n   */\n  notificationTypes() {\n    const items = new ItemList();\n\n    items.add('discussionRenamed', {\n      name: 'discussionRenamed',\n      icon: 'fas fa-pencil-alt',\n      label: app.translator.trans('core.forum.settings.notify_discussion_renamed_label'),\n    });\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport Mithril from 'mithril';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `ChangePasswordModal` component shows a modal dialog which allows the\n * user to send themself a password reset email.\n */\nexport default class ChangePasswordModal<CustomAttrs extends IInternalModalAttrs = IInternalModalAttrs> extends Modal<CustomAttrs> {\n  className() {\n    return 'ChangePasswordModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.change_password.title');\n  }\n\n  content() {\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">{this.fields().toArray()}</div>\n      </div>\n    );\n  }\n\n  fields() {\n    const fields = new ItemList<Mithril.Children>();\n\n    fields.add('help', <p className=\"helpText\">{app.translator.trans('core.forum.change_password.text')}</p>);\n\n    fields.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.forum.change_password.send_button')}\n        </Button>\n      </div>\n    );\n\n    return fields;\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    app\n      .request({\n        method: 'POST',\n        url: app.forum.attribute('apiUrl') + '/forgot',\n        body: this.requestBody(),\n      })\n      .then(this.hide.bind(this), this.loaded.bind(this));\n  }\n\n  requestBody() {\n    return { email: app.session.user!.email() };\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport Stream from '../../common/utils/Stream';\nimport type Mithril from 'mithril';\nimport RequestError from '../../common/utils/RequestError';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `ChangeEmailModal` component shows a modal dialog which allows the user\n * to change their email address.\n */\nexport default class ChangeEmailModal<CustomAttrs extends IInternalModalAttrs = IInternalModalAttrs> extends Modal<CustomAttrs> {\n  /**\n   * The value of the email input.\n   */\n  email!: Stream<string>;\n\n  /**\n   * The value of the password input.\n   */\n  password!: Stream<string>;\n\n  /**\n   * Whether or not the email has been changed successfully.\n   */\n  success: boolean = false;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.email = Stream(app.session.user!.email() || '');\n    this.password = Stream('');\n  }\n\n  className() {\n    return 'ChangeEmailModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.change_email.title');\n  }\n\n  content() {\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">{this.fields().toArray()}</div>\n      </div>\n    );\n  }\n\n  fields(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.success) {\n      items.add(\n        'help',\n        <p className=\"helpText\">\n          {app.translator.trans('core.forum.change_email.confirmation_message', {\n            email: <strong>{this.email()}</strong>,\n          })}\n        </p>\n      );\n\n      items.add(\n        'dismiss',\n        <div className=\"Form-group\">\n          <Button className=\"Button Button--primary Button--block\" onclick={this.hide.bind(this)}>\n            {app.translator.trans('core.forum.change_email.dismiss_button')}\n          </Button>\n        </div>\n      );\n    } else {\n      items.add(\n        'email',\n        <div className=\"Form-group\">\n          <input\n            type=\"email\"\n            name=\"email\"\n            className=\"FormControl\"\n            placeholder={app.session.user!.email()}\n            bidi={this.email}\n            disabled={this.loading}\n          />\n        </div>\n      );\n\n      items.add(\n        'password',\n        <div className=\"Form-group\">\n          <input\n            type=\"password\"\n            name=\"password\"\n            className=\"FormControl\"\n            autocomplete=\"current-password\"\n            placeholder={app.translator.trans('core.forum.change_email.confirm_password_placeholder')}\n            bidi={this.password}\n            disabled={this.loading}\n          />\n        </div>\n      );\n\n      items.add(\n        'submit',\n        <div className=\"Form-group\">\n          <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n            {app.translator.trans('core.forum.change_email.submit_button')}\n          </Button>\n        </div>\n      );\n    }\n\n    return items;\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    // If the user hasn't actually entered a different email address, we don't\n    // need to do anything. Woot!\n    if (this.email() === app.session.user!.email()) {\n      this.hide();\n      return;\n    }\n\n    this.loading = true;\n    this.alertAttrs = null;\n\n    app.session\n      .user!.save(this.requestAttributes(), {\n        errorHandler: this.onerror.bind(this),\n        meta: { password: this.password() },\n      })\n      .then(() => {\n        this.success = true;\n      })\n      .catch(() => {})\n      .then(this.loaded.bind(this));\n  }\n\n  requestAttributes() {\n    return { email: this.email() };\n  }\n\n  onerror(error: RequestError) {\n    if (error.status === 401 && error.alert) {\n      error.alert.content = app.translator.trans('core.forum.change_email.incorrect_password_message');\n    }\n\n    super.onerror(error);\n  }\n}\n","import app from '../../forum/app';\nimport UserPage, { IUserPageAttrs } from './UserPage';\nimport ItemList from '../../common/utils/ItemList';\nimport Switch from '../../common/components/Switch';\nimport Button from '../../common/components/Button';\nimport FieldSet from '../../common/components/FieldSet';\nimport NotificationGrid from './NotificationGrid';\nimport ChangePasswordModal from './ChangePasswordModal';\nimport ChangeEmailModal from './ChangeEmailModal';\nimport listItems from '../../common/helpers/listItems';\nimport extractText from '../../common/utils/extractText';\nimport type Mithril from 'mithril';\n\n/**\n * The `SettingsPage` component displays the user's settings control panel, in\n * the context of their user profile.\n */\nexport default class SettingsPage<CustomAttrs extends IUserPageAttrs = IUserPageAttrs> extends UserPage<CustomAttrs> {\n  discloseOnlineLoading?: boolean;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.show(app.session.user!);\n\n    app.setTitle(extractText(app.translator.trans('core.forum.settings.title')));\n  }\n\n  content() {\n    return (\n      <div className=\"SettingsPage\">\n        <ul>{listItems(this.settingsItems().toArray())}</ul>\n      </div>\n    );\n  }\n\n  /**\n   * Build an item list for the user's settings controls.\n   */\n  settingsItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    ['account', 'notifications', 'privacy'].forEach((section, index) => {\n      const sectionItems = `${section}Items` as 'accountItems' | 'notificationsItems' | 'privacyItems';\n\n      items.add(\n        section,\n        <FieldSet className={`Settings-${section}`} label={app.translator.trans(`core.forum.settings.${section}_heading`)}>\n          {this[sectionItems]().toArray()}\n        </FieldSet>,\n        100 - index * 10\n      );\n    });\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's account settings.\n   */\n  accountItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'changePassword',\n      <Button className=\"Button\" onclick={() => app.modal.show(ChangePasswordModal)}>\n        {app.translator.trans('core.forum.settings.change_password_button')}\n      </Button>,\n      100\n    );\n\n    items.add(\n      'changeEmail',\n      <Button className=\"Button\" onclick={() => app.modal.show(ChangeEmailModal)}>\n        {app.translator.trans('core.forum.settings.change_email_button')}\n      </Button>,\n      90\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's notification settings.\n   */\n  notificationsItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('notificationGrid', <NotificationGrid user={this.user} />, 100);\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's privacy settings.\n   */\n  privacyItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'discloseOnline',\n      <Switch\n        state={this.user!.preferences()?.discloseOnline}\n        onchange={(value: boolean) => {\n          this.discloseOnlineLoading = true;\n\n          this.user!.savePreferences({ discloseOnline: value }).then(() => {\n            this.discloseOnlineLoading = false;\n            m.redraw();\n          });\n        }}\n        loading={this.discloseOnlineLoading}\n      >\n        {app.translator.trans('core.forum.settings.privacy_disclose_online_label')}\n      </Switch>,\n      100\n    );\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Page, { IPageAttrs } from '../../common/components/Page';\nimport NotificationList from './NotificationList';\nimport type Mithril from 'mithril';\nimport extractText from '../../common/utils/extractText';\n\n/**\n * The `NotificationsPage` component shows the notifications list. It is only\n * used on mobile devices where the notifications dropdown is within the drawer.\n */\nexport default class NotificationsPage<CustomAttrs extends IPageAttrs = IPageAttrs> extends Page<CustomAttrs> {\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    app.history.push('notifications', extractText(app.translator.trans('core.forum.notifications.title')));\n\n    app.notifications.load();\n\n    this.bodyClass = 'App--notifications';\n  }\n\n  view() {\n    return (\n      <div className=\"NotificationsPage\">\n        <NotificationList state={app.notifications}></NotificationList>\n      </div>\n    );\n  }\n}\n","import type Mithril from 'mithril';\nimport type { RouteResolver } from '../Application';\nimport type { default as Component, ComponentAttrs } from '../Component';\n\n/**\n * Generates a route resolver for a given component.\n *\n * In addition to regular route resolver functionality:\n * - It provide the current route name as an attr\n * - It sets a key on the component so a rerender will be triggered on route change.\n */\nexport default class DefaultResolver<\n  Attrs extends ComponentAttrs,\n  Comp extends Component<Attrs & { routeName: string }>,\n  RouteArgs extends Record<string, unknown> = {}\n> implements RouteResolver<Attrs, Comp, RouteArgs>\n{\n  component: new () => Comp;\n  routeName: string;\n\n  constructor(component: new () => Comp, routeName: string) {\n    this.component = component;\n    this.routeName = routeName;\n  }\n\n  /**\n   * When a route change results in a changed key, a full page\n   * rerender occurs. This method can be overriden in subclasses\n   * to prevent rerenders on some route changes.\n   */\n  makeKey(): string {\n    return this.routeName + JSON.stringify(m.route.param());\n  }\n\n  makeAttrs(vnode: Mithril.Vnode<Attrs, Comp>): Attrs & { routeName: string } {\n    return {\n      ...vnode.attrs,\n      routeName: this.routeName,\n    };\n  }\n\n  onmatch(args: RouteArgs, requestedPath: string, route: string): { new (): Comp } {\n    return this.component;\n  }\n\n  render(vnode: Mithril.Vnode<Attrs, Comp>): Mithril.Children {\n    return [{ ...vnode, attrs: this.makeAttrs(vnode), key: this.makeKey() }];\n  }\n}\n","import type Mithril from 'mithril';\n\nimport app from '../../forum/app';\nimport DefaultResolver from '../../common/resolvers/DefaultResolver';\nimport DiscussionPage, { IDiscussionPageAttrs } from '../components/DiscussionPage';\n\n/**\n * A custom route resolver for DiscussionPage that generates the same key to all posts\n * on the same discussion. It triggers a scroll when going from one post to another\n * in the same discussion.\n */\nexport default class DiscussionPageResolver<\n  Attrs extends IDiscussionPageAttrs = IDiscussionPageAttrs,\n  RouteArgs extends Record<string, unknown> = {}\n> extends DefaultResolver<Attrs, DiscussionPage<Attrs>, RouteArgs> {\n  static scrollToPostNumber: number | null = null;\n\n  /**\n   * Remove optional parts of a discussion's slug to keep the substring\n   * that bijectively maps to a discussion object. By default this just\n   * extracts the numerical ID from the slug. If a custom discussion\n   * slugging driver is used, this may need to be overriden.\n   * @param slug\n   */\n  canonicalizeDiscussionSlug(slug: string | undefined) {\n    if (!slug) return;\n    return slug.split('-')[0];\n  }\n\n  /**\n   * @inheritdoc\n   */\n  makeKey() {\n    const params = { ...m.route.param() };\n    if ('near' in params) {\n      delete params.near;\n    }\n    params.id = this.canonicalizeDiscussionSlug(params.id);\n    return this.routeName.replace('.near', '') + JSON.stringify(params);\n  }\n\n  onmatch(args: Attrs & RouteArgs, requestedPath: string, route: string) {\n    if (app.current.matches(DiscussionPage) && this.canonicalizeDiscussionSlug(args.id) === this.canonicalizeDiscussionSlug(m.route.param('id'))) {\n      // By default, the first post number of any discussion is 1\n      DiscussionPageResolver.scrollToPostNumber = args.near || 1;\n    }\n\n    return super.onmatch(args, requestedPath, route);\n  }\n\n  render(vnode: Mithril.Vnode<Attrs, DiscussionPage<Attrs>>) {\n    if (DiscussionPageResolver.scrollToPostNumber !== null) {\n      const number = DiscussionPageResolver.scrollToPostNumber;\n      // Scroll after a timeout to avoid clashes with the render.\n      setTimeout(() => app.current.get('stream').goToNumber(number));\n      DiscussionPageResolver.scrollToPostNumber = null;\n    }\n\n    return super.render(vnode);\n  }\n}\n","import Component, { ComponentAttrs } from '../Component';\nimport type Mithril from 'mithril';\nimport app from '../app';\n\nexport interface ILabelValueAttrs extends ComponentAttrs {\n  label: Mithril.Children;\n  value: Mithril.Children;\n}\n\n/**\n * A generic component for displaying a label and value inline.\n * Created to avoid reinventing the wheel.\n *\n * `label: value`\n */\nexport default class LabelValue<CustomAttrs extends ILabelValueAttrs = ILabelValueAttrs> extends Component<CustomAttrs> {\n  view(vnode: Mithril.Vnode<CustomAttrs, this>): Mithril.Children {\n    return (\n      <div className=\"LabelValue\">\n        <div className=\"LabelValue-label\">\n          {app.translator.trans('core.lib.data_segment.label', {\n            label: this.attrs.label,\n          })}\n        </div>\n        <div className=\"LabelValue-value\">{this.attrs.value}</div>\n      </div>\n    );\n  }\n}\n","import app from '../app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport icon from '../../common/helpers/icon';\nimport Button from '../../common/components/Button';\nimport humanTime from '../../common/helpers/humanTime';\nimport ItemList from '../../common/utils/ItemList';\nimport LabelValue from '../../common/components/LabelValue';\nimport extractText from '../../common/utils/extractText';\nimport classList from '../../common/utils/classList';\nimport Tooltip from '../../common/components/Tooltip';\nimport type Mithril from 'mithril';\nimport type AccessToken from '../../common/models/AccessToken';\nimport { NestedStringArray } from '@askvortsov/rich-icu-message-formatter';\nimport IPAddress from '../../common/components/IPAddress';\n\nexport interface IAccessTokensListAttrs extends ComponentAttrs {\n  tokens: AccessToken[];\n  type: 'session' | 'developer_token';\n  hideTokens?: boolean;\n  icon?: string;\n  ondelete?: (token: AccessToken) => void;\n}\n\nexport default class AccessTokensList<CustomAttrs extends IAccessTokensListAttrs = IAccessTokensListAttrs> extends Component<CustomAttrs> {\n  protected loading: Record<string, boolean | undefined> = {};\n  protected showingTokens: Record<string, boolean | undefined> = {};\n\n  view(vnode: Mithril.Vnode<CustomAttrs, this>): Mithril.Children {\n    return (\n      <div className=\"AccessTokensList\">\n        {this.attrs.tokens.length ? (\n          this.attrs.tokens.map(this.tokenView.bind(this))\n        ) : (\n          <div className=\"AccessTokensList--empty\">{app.translator.trans('core.forum.security.empty_text')}</div>\n        )}\n      </div>\n    );\n  }\n\n  tokenView(token: AccessToken): Mithril.Children {\n    return (\n      <div\n        className={classList('AccessTokensList-item', {\n          'AccessTokensList-item--active': token.isCurrent(),\n        })}\n        key={token.id()!}\n      >\n        {this.tokenViewItems(token).toArray()}\n      </div>\n    );\n  }\n\n  tokenViewItems(token: AccessToken): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('icon', <div className=\"AccessTokensList-item-icon\">{icon(this.attrs.icon || 'fas fa-key')}</div>, 50);\n\n    items.add('info', <div className=\"AccessTokensList-item-info\">{this.tokenInfoItems(token).toArray()}</div>, 40);\n\n    items.add('actions', <div className=\"AccessTokensList-item-actions\">{this.tokenActionItems(token).toArray()}</div>, 30);\n\n    return items;\n  }\n\n  tokenInfoItems(token: AccessToken) {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.attrs.type === 'session') {\n      items.add(\n        'title',\n        <div className=\"AccessTokensList-item-title\">\n          <span className=\"AccessTokensList-item-title-main\">{token.device()}</span>\n          {token.isCurrent() && [\n            ' — ',\n            <span className=\"AccessTokensList-item-title-sub\">{app.translator.trans('core.forum.security.current_active_session')}</span>,\n          ]}\n        </div>\n      );\n    } else {\n      items.add(\n        'title',\n        <div className=\"AccessTokensList-item-title\">\n          <span className=\"AccessTokensList-item-title-main\">{this.generateTokenTitle(token)}</span>\n        </div>\n      );\n    }\n\n    items.add(\n      'createdAt',\n      <div className=\"AccessTokensList-item-createdAt\">\n        <LabelValue label={app.translator.trans('core.forum.security.created')} value={humanTime(token.createdAt())} />\n      </div>\n    );\n\n    items.add(\n      'lastActivityAt',\n      <div className=\"AccessTokensList-item-lastActivityAt\">\n        <LabelValue\n          label={app.translator.trans('core.forum.security.last_activity')}\n          value={\n            token.lastActivityAt() ? (\n              <>\n                {humanTime(token.lastActivityAt())}\n                {token.lastIpAddress() && (\n                  <span>\n                    {' '}\n                    — <IPAddress ip={token.lastIpAddress()} />\n                  </span>\n                )}\n                {this.attrs.type === 'developer_token' && token.device() && (\n                  <>\n                    {' '}\n                    — <span className=\"AccessTokensList-item-title-sub\">{token.device()}</span>\n                  </>\n                )}\n              </>\n            ) : (\n              app.translator.trans('core.forum.security.never')\n            )\n          }\n        />\n      </div>\n    );\n\n    return items;\n  }\n\n  tokenActionItems(token: AccessToken) {\n    const items = new ItemList<Mithril.Children>();\n\n    const deleteKey = {\n      session: 'terminate_session',\n      developer_token: 'revoke_access_token',\n    }[this.attrs.type];\n\n    if (this.attrs.type === 'developer_token') {\n      const isHidden = !this.showingTokens[token.id()!];\n      const displayKey = isHidden ? 'show_access_token' : 'hide_access_token';\n\n      items.add(\n        'toggleDisplay',\n        <Button\n          className=\"Button Button--inverted\"\n          icon={isHidden ? 'fas fa-eye' : 'fas fa-eye-slash'}\n          onclick={() => {\n            this.showingTokens[token.id()!] = isHidden;\n            m.redraw();\n          }}\n        >\n          {app.translator.trans(`core.forum.security.${displayKey}`)}\n        </Button>\n      );\n    }\n\n    let revokeButton = (\n      <Button className=\"Button Button--danger\" disabled={token.isCurrent()} loading={!!this.loading[token.id()!]} onclick={() => this.revoke(token)}>\n        {app.translator.trans(`core.forum.security.${deleteKey}`)}\n      </Button>\n    );\n\n    if (token.isCurrent()) {\n      revokeButton = (\n        <Tooltip text={app.translator.trans('core.forum.security.cannot_terminate_current_session')}>\n          <div tabindex=\"0\">{revokeButton}</div>\n        </Tooltip>\n      );\n    }\n\n    items.add('revoke', revokeButton);\n\n    return items;\n  }\n\n  async revoke(token: AccessToken) {\n    if (!confirm(extractText(app.translator.trans('core.forum.security.revoke_access_token_confirmation')))) return;\n\n    this.loading[token.id()!] = true;\n\n    await token.delete();\n\n    this.loading[token.id()!] = false;\n    this.attrs.ondelete?.(token);\n\n    const key = this.attrs.type === 'session' ? 'session_terminated' : 'token_revoked';\n\n    app.alerts.show({ type: 'success' }, app.translator.trans(`core.forum.security.${key}`, { count: 1 }));\n    m.redraw();\n  }\n\n  generateTokenTitle(token: AccessToken): NestedStringArray {\n    const name = token.title() || app.translator.trans('core.forum.security.token_title_placeholder');\n    const value = this.tokenValueDisplay(token);\n\n    return app.translator.trans('core.forum.security.token_item_title', { title: name, token: value });\n  }\n\n  tokenValueDisplay(token: AccessToken): Mithril.Children {\n    const obfuscatedName = Array(12).fill('*').join('');\n    const value = this.showingTokens[token.id()!] ? token.token() : obfuscatedName;\n\n    return <code className=\"AccessTokensList-item-token\">{value}</code>;\n  }\n}\n","import app from '../app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport Stream from '../../common/utils/Stream';\nimport type AccessToken from '../../common/models/AccessToken';\nimport type { SaveAttributes } from '../../common/Model';\nimport type Mithril from 'mithril';\n\nexport interface INewAccessTokenModalAttrs extends IInternalModalAttrs {\n  onsuccess: (token: AccessToken) => void;\n}\n\nexport default class NewAccessTokenModal<CustomAttrs extends INewAccessTokenModalAttrs = INewAccessTokenModalAttrs> extends Modal<CustomAttrs> {\n  protected titleInput = Stream('');\n\n  className(): string {\n    return 'Modal--small NewAccessTokenModal';\n  }\n\n  title(): Mithril.Children {\n    return app.translator.trans('core.forum.security.new_access_token_modal.title');\n  }\n\n  content(): Mithril.Children {\n    const titleLabel = app.translator.trans('core.forum.security.new_access_token_modal.title_placeholder');\n\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">\n          <div className=\"Form-group\">\n            <input type=\"text\" className=\"FormControl\" bidi={this.titleInput} placeholder={titleLabel} aria-label={titleLabel} />\n          </div>\n          <div className=\"Form-group\">\n            <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n              {app.translator.trans('core.forum.security.new_access_token_modal.submit_button')}\n            </Button>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  submitData(): SaveAttributes {\n    return {\n      title: this.titleInput(),\n    };\n  }\n\n  onsubmit(e: SubmitEvent) {\n    super.onsubmit(e);\n    e.preventDefault();\n\n    this.loading = true;\n\n    app.store\n      .createRecord<AccessToken>('access-tokens')\n      .save(this.submitData())\n      .then((token) => {\n        this.attrs.onsuccess(token);\n        app.modal.close();\n      })\n      .finally(this.loaded.bind(this));\n  }\n}\n","import AccessToken from '../../common/models/AccessToken';\n\nexport default class UserSecurityPageState {\n  protected tokens: AccessToken[] | null = null;\n  public loadingTerminateSessions: boolean = false;\n  public loadingGlobalLogout: boolean = false;\n\n  public hasLoadedTokens(): boolean {\n    return this.tokens !== null;\n  }\n\n  public getTokens(): AccessToken[] | null {\n    return this.tokens;\n  }\n\n  public setTokens(tokens: AccessToken[]): void {\n    this.tokens = tokens;\n  }\n\n  public pushToken(token: AccessToken): void {\n    this.tokens?.push(token);\n  }\n\n  public removeToken(token: AccessToken): void {\n    this.tokens = this.tokens!.filter((t) => t !== token);\n  }\n\n  public getSessionTokens(): AccessToken[] {\n    return this.tokens?.filter((token) => token.isSessionToken()).sort((a, b) => (b.isCurrent() ? 1 : -1)) || [];\n  }\n\n  public getDeveloperTokens(): AccessToken[] | null {\n    return this.tokens?.filter((token) => !token.isSessionToken()) || null;\n  }\n\n  /**\n   * Look up session tokens other than the current one.\n   */\n  public getOtherSessionTokens(): AccessToken[] {\n    return this.tokens?.filter((token) => token.isSessionToken() && !token.isCurrent()) || [];\n  }\n\n  public hasOtherActiveSessions(): boolean {\n    return (this.getOtherSessionTokens() || []).length > 0;\n  }\n\n  public removeOtherSessionTokens() {\n    this.tokens = this.tokens!.filter((token) => !token.isSessionToken() || token.isCurrent());\n  }\n}\n","import app from '../../forum/app';\nimport UserPage, { IUserPageAttrs } from './UserPage';\nimport ItemList from '../../common/utils/ItemList';\nimport FieldSet from '../../common/components/FieldSet';\nimport listItems from '../../common/helpers/listItems';\nimport extractText from '../../common/utils/extractText';\nimport AccessTokensList from './AccessTokensList';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport Button from '../../common/components/Button';\nimport NewAccessTokenModal from './NewAccessTokenModal';\nimport { camelCaseToSnakeCase } from '../../common/utils/string';\nimport type AccessToken from '../../common/models/AccessToken';\nimport type Mithril from 'mithril';\nimport Tooltip from '../../common/components/Tooltip';\nimport UserSecurityPageState from '../states/UserSecurityPageState';\n\n/**\n * The `UserSecurityPage` component displays the user's security control panel, in\n * the context of their user profile.\n */\nexport default class UserSecurityPage<CustomAttrs extends IUserPageAttrs = IUserPageAttrs> extends UserPage<CustomAttrs, UserSecurityPageState> {\n  state = new UserSecurityPageState();\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    const routeUsername = m.route.param('username');\n\n    if (routeUsername !== app.session.user?.slug() && !app.forum.attribute<boolean>('canModerateAccessTokens')) {\n      m.route.set('/');\n    }\n\n    this.loadUser(routeUsername);\n\n    app.setTitle(extractText(app.translator.trans('core.forum.security.title')));\n\n    this.loadTokens();\n  }\n\n  content() {\n    return (\n      <div className=\"UserSecurityPage\">\n        <ul>{listItems(this.settingsItems().toArray())}</ul>\n      </div>\n    );\n  }\n\n  /**\n   * Build an item list for the user's settings controls.\n   */\n  settingsItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    if (\n      app.forum.attribute('canCreateAccessToken') ||\n      app.forum.attribute('canModerateAccessTokens') ||\n      (this.state.hasLoadedTokens() && this.state.getDeveloperTokens()?.length)\n    ) {\n      items.add(\n        'developerTokens',\n        <FieldSet className=\"UserSecurityPage-developerTokens\" label={app.translator.trans(`core.forum.security.developer_tokens_heading`)}>\n          {this.developerTokensItems().toArray()}\n        </FieldSet>\n      );\n    } else if (!this.state.hasLoadedTokens()) {\n      items.add('developerTokens', <LoadingIndicator />);\n    }\n\n    items.add(\n      'sessions',\n      <FieldSet className=\"UserSecurityPage-sessions\" label={app.translator.trans(`core.forum.security.sessions_heading`)}>\n        {this.sessionsItems().toArray()}\n      </FieldSet>\n    );\n\n    if (this.user!.id() === app.session.user!.id()) {\n      items.add(\n        'globalLogout',\n        <FieldSet className=\"UserSecurityPage-globalLogout\" label={app.translator.trans('core.forum.security.global_logout.heading')}>\n          <span className=\"helpText\">{app.translator.trans('core.forum.security.global_logout.help_text')}</span>\n          <Button\n            className=\"Button\"\n            icon=\"fas fa-sign-out-alt\"\n            onclick={this.globalLogout.bind(this)}\n            loading={this.state.loadingGlobalLogout}\n            disabled={this.state.loadingTerminateSessions}\n          >\n            {app.translator.trans('core.forum.security.global_logout.log_out_button')}\n          </Button>\n        </FieldSet>\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's access accessToken settings.\n   */\n  developerTokensItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'accessTokenList',\n      !this.state.hasLoadedTokens() ? (\n        <LoadingIndicator />\n      ) : (\n        <AccessTokensList\n          type=\"developer_token\"\n          ondelete={(token: AccessToken) => {\n            this.state.removeToken(token);\n            m.redraw();\n          }}\n          tokens={this.state.getDeveloperTokens()}\n          icon=\"fas fa-key\"\n          hideTokens={false}\n        />\n      )\n    );\n\n    if (this.user!.id() === app.session.user!.id()) {\n      items.add(\n        'newAccessToken',\n        <Button\n          className=\"Button\"\n          disabled={!app.forum.attribute<boolean>('canCreateAccessToken')}\n          onclick={() =>\n            app.modal.show(NewAccessTokenModal, {\n              onsuccess: (token: AccessToken) => {\n                this.state.pushToken(token);\n                m.redraw();\n              },\n            })\n          }\n        >\n          {app.translator.trans('core.forum.security.new_access_token_button')}\n        </Button>\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's access accessToken settings.\n   */\n  sessionsItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'sessionsList',\n      !this.state.hasLoadedTokens() ? (\n        <LoadingIndicator />\n      ) : (\n        <AccessTokensList\n          type=\"session\"\n          ondelete={(token: AccessToken) => {\n            this.state.removeToken(token);\n            m.redraw();\n          }}\n          tokens={this.state.getSessionTokens()}\n          icon=\"fas fa-laptop\"\n          hideTokens={true}\n        />\n      )\n    );\n\n    if (this.user!.id() === app.session.user!.id()) {\n      const isDisabled = !this.state.hasOtherActiveSessions();\n\n      let terminateAllOthersButton = (\n        <Button\n          className=\"Button\"\n          onclick={this.terminateAllOtherSessions.bind(this)}\n          loading={this.state.loadingTerminateSessions}\n          disabled={this.state.loadingGlobalLogout || isDisabled}\n        >\n          {app.translator.trans('core.forum.security.terminate_all_other_sessions')}\n        </Button>\n      );\n\n      if (isDisabled) {\n        terminateAllOthersButton = (\n          <Tooltip text={app.translator.trans('core.forum.security.cannot_terminate_current_session')}>\n            <span tabindex=\"0\">{terminateAllOthersButton}</span>\n          </Tooltip>\n        );\n      }\n\n      items.add('terminateAllOtherSessions', terminateAllOthersButton);\n    }\n\n    return items;\n  }\n\n  loadTokens() {\n    return app.store\n      .find<AccessToken[]>('access-tokens', {\n        filter: { user: this.user!.id()! },\n      })\n      .then((tokens) => {\n        this.state.setTokens(tokens);\n        m.redraw();\n      });\n  }\n\n  terminateAllOtherSessions() {\n    if (!confirm(extractText(app.translator.trans('core.forum.security.terminate_all_other_sessions_confirmation')))) return;\n\n    this.state.loadingTerminateSessions = true;\n\n    return app\n      .request({\n        method: 'DELETE',\n        url: app.forum.attribute('apiUrl') + '/sessions',\n      })\n      .then(() => {\n        // Count terminated sessions first.\n        const count = this.state.getOtherSessionTokens().length;\n\n        this.state.removeOtherSessionTokens();\n\n        app.alerts.show({ type: 'success' }, app.translator.trans('core.forum.security.session_terminated', { count }));\n      })\n      .catch(() => {\n        app.alerts.show({ type: 'error' }, app.translator.trans('core.forum.security.session_termination_failed'));\n      })\n      .finally(() => {\n        this.state.loadingTerminateSessions = false;\n        m.redraw();\n      });\n  }\n\n  globalLogout() {\n    this.state.loadingGlobalLogout = true;\n\n    return app\n      .request({\n        method: 'POST',\n        url: app.forum.attribute<string>('baseUrl') + '/global-logout',\n      })\n      .then(() => window.location.reload())\n      .finally(() => {\n        this.state.loadingGlobalLogout = false;\n        m.redraw();\n      });\n  }\n}\n","import ForumApplication from './ForumApplication';\nimport IndexPage from './components/IndexPage';\nimport DiscussionPage from './components/DiscussionPage';\nimport PostsUserPage from './components/PostsUserPage';\nimport DiscussionsUserPage from './components/DiscussionsUserPage';\nimport SettingsPage from './components/SettingsPage';\nimport NotificationsPage from './components/NotificationsPage';\nimport DiscussionPageResolver from './resolvers/DiscussionPageResolver';\nimport Discussion from '../common/models/Discussion';\nimport type Post from '../common/models/Post';\nimport type User from '../common/models/User';\nimport UserSecurityPage from './components/UserSecurityPage';\n\n/**\n * Helper functions to generate URLs to form pages.\n */\nexport interface ForumRoutes {\n  discussion: (discussion: Discussion, near?: number) => string;\n  post: (post: Post) => string;\n  user: (user: User) => string;\n}\n\n/**\n * The `routes` initializer defines the forum app's routes.\n */\nexport default function (app: ForumApplication) {\n  app.routes = {\n    index: { path: '/all', component: IndexPage },\n\n    discussion: { path: '/d/:id', component: DiscussionPage, resolverClass: DiscussionPageResolver },\n    'discussion.near': { path: '/d/:id/:near', component: DiscussionPage, resolverClass: DiscussionPageResolver },\n\n    user: { path: '/u/:username', component: PostsUserPage },\n    'user.posts': { path: '/u/:username', component: PostsUserPage },\n    'user.discussions': { path: '/u/:username/discussions', component: DiscussionsUserPage },\n\n    settings: { path: '/settings', component: SettingsPage },\n    'user.security': { path: '/u/:username/security', component: UserSecurityPage },\n    notifications: { path: '/notifications', component: NotificationsPage },\n  };\n}\n\nexport function makeRouteHelpers(app: ForumApplication) {\n  return {\n    /**\n     * Generate a URL to a discussion.\n     */\n    discussion: (discussion: Discussion, near?: number) => {\n      return app.route(near && near !== 1 ? 'discussion.near' : 'discussion', {\n        id: discussion.slug(),\n        near: near && near !== 1 ? near : undefined,\n      });\n    },\n\n    /**\n     * Generate a URL to a post.\n     */\n    post: (post: Post) => {\n      return app.route.discussion(post.discussion(), post.number());\n    },\n\n    /**\n     * Generate a URL to a user.\n     */\n    user: (user: User) => {\n      return app.route('user', {\n        username: user.slug(),\n      });\n    },\n  };\n}\n","import Alert from '../../common/components/Alert';\nimport Button from '../../common/components/Button';\nimport icon from '../../common/helpers/icon';\nimport Component from '../../common/Component';\n\n/**\n * Shows an alert if the user has not yet confirmed their email address.\n *\n * @param {import('../ForumApplication').default} app\n */\nexport default function alertEmailConfirmation(app) {\n  const user = app.session.user;\n\n  if (!user || user.isEmailConfirmed()) return;\n\n  class ResendButton extends Component {\n    oninit(vnode) {\n      super.oninit(vnode);\n\n      this.loading = false;\n      this.sent = false;\n    }\n\n    view() {\n      return (\n        <Button className=\"Button Button--link\" onclick={this.onclick.bind(this)} loading={this.loading} disabled={this.sent}>\n          {this.sent\n            ? [icon('fas fa-check'), ' ', app.translator.trans('core.forum.user_email_confirmation.sent_message')]\n            : app.translator.trans('core.forum.user_email_confirmation.resend_button')}\n        </Button>\n      );\n    }\n\n    onclick() {\n      this.loading = true;\n      m.redraw();\n\n      app\n        .request({\n          method: 'POST',\n          url: app.forum.attribute('apiUrl') + '/users/' + user.id() + '/send-confirmation',\n        })\n        .then(() => {\n          this.loading = false;\n          this.sent = true;\n          m.redraw();\n        })\n        .catch(() => {\n          this.loading = false;\n          m.redraw();\n        });\n    }\n  }\n\n  class ContainedAlert extends Alert {\n    view(vnode) {\n      const vdom = super.view(vnode);\n      return { ...vdom, children: [<div className=\"container\">{vdom.children}</div>] };\n    }\n  }\n\n  m.mount($('<div className=\"App-notices\"/>').insertBefore('#content')[0], {\n    view: () => (\n      <ContainedAlert dismissible={false} controls={[<ResendButton />]} className=\"Alert--emailConfirmation\">\n        {app.translator.trans('core.forum.user_email_confirmation.alert_message', { email: <strong>{user.email()}</strong> })}\n      </ContainedAlert>\n    ),\n  });\n}\n","const candidateSelectors = [\n  'input',\n  'select',\n  'textarea',\n  'a[href]',\n  'button',\n  '[tabindex]:not(slot)',\n  'audio[controls]',\n  'video[controls]',\n  '[contenteditable]:not([contenteditable=\"false\"])',\n  'details>summary:first-of-type',\n  'details',\n];\nconst candidateSelector = /* #__PURE__ */ candidateSelectors.join(',');\n\nconst NoElement = typeof Element === 'undefined';\n\nconst matches = NoElement\n  ? function () {}\n  : Element.prototype.matches ||\n    Element.prototype.msMatchesSelector ||\n    Element.prototype.webkitMatchesSelector;\n\nconst getRootNode =\n  !NoElement && Element.prototype.getRootNode\n    ? (element) => element.getRootNode()\n    : (element) => element.ownerDocument;\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nconst getCandidates = function (el, includeContainer, filter) {\n  let candidates = Array.prototype.slice.apply(\n    el.querySelectorAll(candidateSelector)\n  );\n  if (includeContainer && matches.call(el, candidateSelector)) {\n    candidates.unshift(el);\n  }\n  candidates = candidates.filter(filter);\n  return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidatesScope\n * @property {Element} scope contains inner candidates\n * @property {Element[]} candidates\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n *  if a function, implies shadow support is enabled and either returns the shadow root of an element\n *  or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidatesScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.<Element|CandidatesScope>}\n */\nconst getCandidatesIteratively = function (\n  elements,\n  includeContainer,\n  options\n) {\n  const candidates = [];\n  const elementsToCheck = Array.from(elements);\n  while (elementsToCheck.length) {\n    const element = elementsToCheck.shift();\n    if (element.tagName === 'SLOT') {\n      // add shadow dom slot scope (slot itself cannot be focusable)\n      const assigned = element.assignedElements();\n      const content = assigned.length ? assigned : element.children;\n      const nestedCandidates = getCandidatesIteratively(content, true, options);\n      if (options.flatten) {\n        candidates.push(...nestedCandidates);\n      } else {\n        candidates.push({\n          scope: element,\n          candidates: nestedCandidates,\n        });\n      }\n    } else {\n      // check candidate element\n      const validCandidate = matches.call(element, candidateSelector);\n      if (\n        validCandidate &&\n        options.filter(element) &&\n        (includeContainer || !elements.includes(element))\n      ) {\n        candidates.push(element);\n      }\n\n      // iterate over shadow content if possible\n      const shadowRoot =\n        element.shadowRoot ||\n        // check for an undisclosed shadow\n        (typeof options.getShadowRoot === 'function' &&\n          options.getShadowRoot(element));\n\n      const validShadowRoot =\n        !options.shadowRootFilter || options.shadowRootFilter(element);\n\n      if (shadowRoot && validShadowRoot) {\n        // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n        //  shadow exists, so look at light dom children as fallback BUT create a scope for any\n        //  child candidates found because they're likely slotted elements (elements that are\n        //  children of the web component element (which has the shadow), in the light dom, but\n        //  slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n        //  _after_ we return from this recursive call\n        const nestedCandidates = getCandidatesIteratively(\n          shadowRoot === true ? element.children : shadowRoot.children,\n          true,\n          options\n        );\n\n        if (options.flatten) {\n          candidates.push(...nestedCandidates);\n        } else {\n          candidates.push({\n            scope: element,\n            candidates: nestedCandidates,\n          });\n        }\n      } else {\n        // there's not shadow so just dig into the element's (light dom) children\n        //  __without__ giving the element special scope treatment\n        elementsToCheck.unshift(...element.children);\n      }\n    }\n  }\n  return candidates;\n};\n\nconst getTabindex = function (node, isScope) {\n  if (node.tabIndex < 0) {\n    // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n    // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n    // yet they are still part of the regular tab order; in FF, they get a default\n    // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n    // order, consider their tab index to be 0.\n    // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n    // so if they don't have a tabindex attribute specifically set, assume it's 0.\n    //\n    // isScope is positive for custom element with shadow root or slot that by default\n    // have tabIndex -1, but need to be sorted by document order in order for their\n    // content to be inserted in the correct position\n    if (\n      (isScope ||\n        /^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) ||\n        node.isContentEditable) &&\n      isNaN(parseInt(node.getAttribute('tabindex'), 10))\n    ) {\n      return 0;\n    }\n  }\n\n  return node.tabIndex;\n};\n\nconst sortOrderedTabbables = function (a, b) {\n  return a.tabIndex === b.tabIndex\n    ? a.documentOrder - b.documentOrder\n    : a.tabIndex - b.tabIndex;\n};\n\nconst isInput = function (node) {\n  return node.tagName === 'INPUT';\n};\n\nconst isHiddenInput = function (node) {\n  return isInput(node) && node.type === 'hidden';\n};\n\nconst isDetailsWithSummary = function (node) {\n  const r =\n    node.tagName === 'DETAILS' &&\n    Array.prototype.slice\n      .apply(node.children)\n      .some((child) => child.tagName === 'SUMMARY');\n  return r;\n};\n\nconst getCheckedRadio = function (nodes, form) {\n  for (let i = 0; i < nodes.length; i++) {\n    if (nodes[i].checked && nodes[i].form === form) {\n      return nodes[i];\n    }\n  }\n};\n\nconst isTabbableRadio = function (node) {\n  if (!node.name) {\n    return true;\n  }\n  const radioScope = node.form || getRootNode(node);\n  const queryRadios = function (name) {\n    return radioScope.querySelectorAll(\n      'input[type=\"radio\"][name=\"' + name + '\"]'\n    );\n  };\n\n  let radioSet;\n  if (\n    typeof window !== 'undefined' &&\n    typeof window.CSS !== 'undefined' &&\n    typeof window.CSS.escape === 'function'\n  ) {\n    radioSet = queryRadios(window.CSS.escape(node.name));\n  } else {\n    try {\n      radioSet = queryRadios(node.name);\n    } catch (err) {\n      // eslint-disable-next-line no-console\n      console.error(\n        'Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s',\n        err.message\n      );\n      return false;\n    }\n  }\n\n  const checked = getCheckedRadio(radioSet, node.form);\n  return !checked || checked === node;\n};\n\nconst isRadio = function (node) {\n  return isInput(node) && node.type === 'radio';\n};\n\nconst isNonTabbableRadio = function (node) {\n  return isRadio(node) && !isTabbableRadio(node);\n};\n\nconst isZeroArea = function (node) {\n  const { width, height } = node.getBoundingClientRect();\n  return width === 0 && height === 0;\n};\nconst isHidden = function (node, { displayCheck, getShadowRoot }) {\n  // NOTE: visibility will be `undefined` if node is detached from the document\n  //  (see notes about this further down), which means we will consider it visible\n  //  (this is legacy behavior from a very long way back)\n  // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n  //  _visibility_ check, not a _display_ check\n  if (getComputedStyle(node).visibility === 'hidden') {\n    return true;\n  }\n\n  const isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n  const nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n  if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n    return true;\n  }\n\n  // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n  //  (but NOT _the_ document; see second 'If' comment below for more).\n  // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n  //  is attached, and the one we need to check if it's in the document or not (because the\n  //  shadow, and all nodes it contains, is never considered in the document since shadows\n  //  behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n  //  is hidden, or is not in the document itself but is detached, it will affect the shadow's\n  //  visibility, including all the nodes it contains). The host could be any normal node,\n  //  or a custom element (i.e. web component). Either way, that's the one that is considered\n  //  part of the document, not the shadow root, nor any of its children (i.e. the node being\n  //  tested).\n  // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n  //  document (per the docs) and while it's a Document-type object, that document does not\n  //  appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n  //  to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n  //  using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n  //  node is actually detached.\n  const nodeRootHost = getRootNode(node).host;\n  const nodeIsAttached =\n    nodeRootHost?.ownerDocument.contains(nodeRootHost) ||\n    node.ownerDocument.contains(node);\n\n  if (!displayCheck || displayCheck === 'full') {\n    if (typeof getShadowRoot === 'function') {\n      // figure out if we should consider the node to be in an undisclosed shadow and use the\n      //  'non-zero-area' fallback\n      const originalNode = node;\n      while (node) {\n        const parentElement = node.parentElement;\n        const rootNode = getRootNode(node);\n        if (\n          parentElement &&\n          !parentElement.shadowRoot &&\n          getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n        ) {\n          // node has an undisclosed shadow which means we can only treat it as a black box, so we\n          //  fall back to a non-zero-area test\n          return isZeroArea(node);\n        } else if (node.assignedSlot) {\n          // iterate up slot\n          node = node.assignedSlot;\n        } else if (!parentElement && rootNode !== node.ownerDocument) {\n          // cross shadow boundary\n          node = rootNode.host;\n        } else {\n          // iterate up normal dom\n          node = parentElement;\n        }\n      }\n\n      node = originalNode;\n    }\n    // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n    //  (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n    //  it might be a falsy value, which means shadow DOM support is disabled\n\n    // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n    //  now we can just test to see if it would normally be visible or not, provided it's\n    //  attached to the main document.\n    // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n    //  `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n    if (nodeIsAttached) {\n      // this works wherever the node is: if there's at least one client rect, it's\n      //  somehow displayed; it also covers the CSS 'display: contents' case where the\n      //  node itself is hidden in place of its contents; and there's no need to search\n      //  up the hierarchy either\n      return !node.getClientRects().length;\n    }\n\n    // Else, the node isn't attached to the document, which means the `getClientRects()`\n    //  API will __always__ return zero rects (this can happen, for example, if React\n    //  is used to render nodes onto a detached tree, as confirmed in this thread:\n    //  https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n    //\n    // It also means that even window.getComputedStyle(node).display will return `undefined`\n    //  because styles are only computed for nodes that are in the document.\n    //\n    // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n    //  somehow. Though it was never stated officially, anyone who has ever used tabbable\n    //  APIs on nodes in detached containers has actually implicitly used tabbable in what\n    //  was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n    //  considering __everything__ to be visible because of the innability to determine styles.\n  } else if (displayCheck === 'non-zero-area') {\n    // NOTE: Even though this tests that the node's client rect is non-zero to determine\n    //  whether it's displayed, and that a detached node will __always__ have a zero-area\n    //  client rect, we don't special-case for whether the node is attached or not. In\n    //  this mode, we do want to consider nodes that have a zero area to be hidden at all\n    //  times, and that includes attached or not.\n    return isZeroArea(node);\n  }\n\n  // visible, as far as we can tell, or per current `displayCheck` mode\n  return false;\n};\n\n// form fields (nested) inside a disabled fieldset are not focusable/tabbable\n//  unless they are in the _first_ <legend> element of the top-most disabled\n//  fieldset\nconst isDisabledFromFieldset = function (node) {\n  if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n    let parentNode = node.parentElement;\n    // check if `node` is contained in a disabled <fieldset>\n    while (parentNode) {\n      if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n        // look for the first <legend> among the children of the disabled <fieldset>\n        for (let i = 0; i < parentNode.children.length; i++) {\n          const child = parentNode.children.item(i);\n          // when the first <legend> (in document order) is found\n          if (child.tagName === 'LEGEND') {\n            // if its parent <fieldset> is not nested in another disabled <fieldset>,\n            // return whether `node` is a descendant of its first <legend>\n            return matches.call(parentNode, 'fieldset[disabled] *')\n              ? true\n              : !child.contains(node);\n          }\n        }\n        // the disabled <fieldset> containing `node` has no <legend>\n        return true;\n      }\n      parentNode = parentNode.parentElement;\n    }\n  }\n\n  // else, node's tabbable/focusable state should not be affected by a fieldset's\n  //  enabled/disabled state\n  return false;\n};\n\nconst isNodeMatchingSelectorFocusable = function (options, node) {\n  if (\n    node.disabled ||\n    isHiddenInput(node) ||\n    isHidden(node, options) ||\n    // For a details element with a summary, the summary element gets the focus\n    isDetailsWithSummary(node) ||\n    isDisabledFromFieldset(node)\n  ) {\n    return false;\n  }\n  return true;\n};\n\nconst isNodeMatchingSelectorTabbable = function (options, node) {\n  if (\n    isNonTabbableRadio(node) ||\n    getTabindex(node) < 0 ||\n    !isNodeMatchingSelectorFocusable(options, node)\n  ) {\n    return false;\n  }\n  return true;\n};\n\nconst isValidShadowRootTabbable = function (shadowHostNode) {\n  const tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n  if (isNaN(tabIndex) || tabIndex >= 0) {\n    return true;\n  }\n  // If a custom element has an explicit negative tabindex,\n  // browsers will not allow tab targeting said element's children.\n  return false;\n};\n\n/**\n * @param {Array.<Element|CandidatesScope>} candidates\n * @returns Element[]\n */\nconst sortByOrder = function (candidates) {\n  const regularTabbables = [];\n  const orderedTabbables = [];\n  candidates.forEach(function (item, i) {\n    const isScope = !!item.scope;\n    const element = isScope ? item.scope : item;\n    const candidateTabindex = getTabindex(element, isScope);\n    const elements = isScope ? sortByOrder(item.candidates) : element;\n    if (candidateTabindex === 0) {\n      isScope\n        ? regularTabbables.push(...elements)\n        : regularTabbables.push(element);\n    } else {\n      orderedTabbables.push({\n        documentOrder: i,\n        tabIndex: candidateTabindex,\n        item: item,\n        isScope: isScope,\n        content: elements,\n      });\n    }\n  });\n\n  return orderedTabbables\n    .sort(sortOrderedTabbables)\n    .reduce((acc, sortable) => {\n      sortable.isScope\n        ? acc.push(...sortable.content)\n        : acc.push(sortable.content);\n      return acc;\n    }, [])\n    .concat(regularTabbables);\n};\n\nconst tabbable = function (el, options) {\n  options = options || {};\n\n  let candidates;\n  if (options.getShadowRoot) {\n    candidates = getCandidatesIteratively([el], options.includeContainer, {\n      filter: isNodeMatchingSelectorTabbable.bind(null, options),\n      flatten: false,\n      getShadowRoot: options.getShadowRoot,\n      shadowRootFilter: isValidShadowRootTabbable,\n    });\n  } else {\n    candidates = getCandidates(\n      el,\n      options.includeContainer,\n      isNodeMatchingSelectorTabbable.bind(null, options)\n    );\n  }\n  return sortByOrder(candidates);\n};\n\nconst focusable = function (el, options) {\n  options = options || {};\n\n  let candidates;\n  if (options.getShadowRoot) {\n    candidates = getCandidatesIteratively([el], options.includeContainer, {\n      filter: isNodeMatchingSelectorFocusable.bind(null, options),\n      flatten: true,\n      getShadowRoot: options.getShadowRoot,\n    });\n  } else {\n    candidates = getCandidates(\n      el,\n      options.includeContainer,\n      isNodeMatchingSelectorFocusable.bind(null, options)\n    );\n  }\n\n  return candidates;\n};\n\nconst isTabbable = function (node, options) {\n  options = options || {};\n  if (!node) {\n    throw new Error('No node provided');\n  }\n  if (matches.call(node, candidateSelector) === false) {\n    return false;\n  }\n  return isNodeMatchingSelectorTabbable(options, node);\n};\n\nconst focusableCandidateSelector = /* #__PURE__ */ candidateSelectors\n  .concat('iframe')\n  .join(',');\n\nconst isFocusable = function (node, options) {\n  options = options || {};\n  if (!node) {\n    throw new Error('No node provided');\n  }\n  if (matches.call(node, focusableCandidateSelector) === false) {\n    return false;\n  }\n  return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { tabbable, focusable, isTabbable, isFocusable };\n","import { tabbable, focusable, isFocusable, isTabbable } from 'tabbable';\n\nconst activeFocusTraps = (function () {\n  const trapQueue = [];\n  return {\n    activateTrap(trap) {\n      if (trapQueue.length > 0) {\n        const activeTrap = trapQueue[trapQueue.length - 1];\n        if (activeTrap !== trap) {\n          activeTrap.pause();\n        }\n      }\n\n      const trapIndex = trapQueue.indexOf(trap);\n      if (trapIndex === -1) {\n        trapQueue.push(trap);\n      } else {\n        // move this existing trap to the front of the queue\n        trapQueue.splice(trapIndex, 1);\n        trapQueue.push(trap);\n      }\n    },\n\n    deactivateTrap(trap) {\n      const trapIndex = trapQueue.indexOf(trap);\n      if (trapIndex !== -1) {\n        trapQueue.splice(trapIndex, 1);\n      }\n\n      if (trapQueue.length > 0) {\n        trapQueue[trapQueue.length - 1].unpause();\n      }\n    },\n  };\n})();\n\nconst isSelectableInput = function (node) {\n  return (\n    node.tagName &&\n    node.tagName.toLowerCase() === 'input' &&\n    typeof node.select === 'function'\n  );\n};\n\nconst isEscapeEvent = function (e) {\n  return e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27;\n};\n\nconst isTabEvent = function (e) {\n  return e.key === 'Tab' || e.keyCode === 9;\n};\n\nconst delay = function (fn) {\n  return setTimeout(fn, 0);\n};\n\n// Array.find/findIndex() are not supported on IE; this replicates enough\n//  of Array.findIndex() for our needs\nconst findIndex = function (arr, fn) {\n  let idx = -1;\n\n  arr.every(function (value, i) {\n    if (fn(value)) {\n      idx = i;\n      return false; // break\n    }\n\n    return true; // next\n  });\n\n  return idx;\n};\n\n/**\n * Get an option's value when it could be a plain value, or a handler that provides\n *  the value.\n * @param {*} value Option's value to check.\n * @param {...*} [params] Any parameters to pass to the handler, if `value` is a function.\n * @returns {*} The `value`, or the handler's returned value.\n */\nconst valueOrHandler = function (value, ...params) {\n  return typeof value === 'function' ? value(...params) : value;\n};\n\nconst getActualTarget = function (event) {\n  // NOTE: If the trap is _inside_ a shadow DOM, event.target will always be the\n  //  shadow host. However, event.target.composedPath() will be an array of\n  //  nodes \"clicked\" from inner-most (the actual element inside the shadow) to\n  //  outer-most (the host HTML document). If we have access to composedPath(),\n  //  then use its first element; otherwise, fall back to event.target (and\n  //  this only works for an _open_ shadow DOM; otherwise,\n  //  composedPath()[0] === event.target always).\n  return event.target.shadowRoot && typeof event.composedPath === 'function'\n    ? event.composedPath()[0]\n    : event.target;\n};\n\nconst createFocusTrap = function (elements, userOptions) {\n  // SSR: a live trap shouldn't be created in this type of environment so this\n  //  should be safe code to execute if the `document` option isn't specified\n  const doc = userOptions?.document || document;\n\n  const config = {\n    returnFocusOnDeactivate: true,\n    escapeDeactivates: true,\n    delayInitialFocus: true,\n    ...userOptions,\n  };\n\n  const state = {\n    // containers given to createFocusTrap()\n    // @type {Array<HTMLElement>}\n    containers: [],\n\n    // list of objects identifying tabbable nodes in `containers` in the trap\n    // NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap\n    //  is active, but the trap should never get to a state where there isn't at least one group\n    //  with at least one tabbable node in it (that would lead to an error condition that would\n    //  result in an error being thrown)\n    // @type {Array<{\n    //   container: HTMLElement,\n    //   tabbableNodes: Array<HTMLElement>, // empty if none\n    //   focusableNodes: Array<HTMLElement>, // empty if none\n    //   firstTabbableNode: HTMLElement|null,\n    //   lastTabbableNode: HTMLElement|null,\n    //   nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined\n    // }>}\n    containerGroups: [], // same order/length as `containers` list\n\n    // references to objects in `containerGroups`, but only those that actually have\n    //  tabbable nodes in them\n    // NOTE: same order as `containers` and `containerGroups`, but __not necessarily__\n    //  the same length\n    tabbableGroups: [],\n\n    nodeFocusedBeforeActivation: null,\n    mostRecentlyFocusedNode: null,\n    active: false,\n    paused: false,\n\n    // timer ID for when delayInitialFocus is true and initial focus in this trap\n    //  has been delayed during activation\n    delayInitialFocusTimer: undefined,\n  };\n\n  let trap; // eslint-disable-line prefer-const -- some private functions reference it, and its methods reference private functions, so we must declare here and define later\n\n  /**\n   * Gets a configuration option value.\n   * @param {Object|undefined} configOverrideOptions If true, and option is defined in this set,\n   *  value will be taken from this object. Otherwise, value will be taken from base configuration.\n   * @param {string} optionName Name of the option whose value is sought.\n   * @param {string|undefined} [configOptionName] Name of option to use __instead of__ `optionName`\n   *  IIF `configOverrideOptions` is not defined. Otherwise, `optionName` is used.\n   */\n  const getOption = (configOverrideOptions, optionName, configOptionName) => {\n    return configOverrideOptions &&\n      configOverrideOptions[optionName] !== undefined\n      ? configOverrideOptions[optionName]\n      : config[configOptionName || optionName];\n  };\n\n  /**\n   * Finds the index of the container that contains the element.\n   * @param {HTMLElement} element\n   * @returns {number} Index of the container in either `state.containers` or\n   *  `state.containerGroups` (the order/length of these lists are the same); -1\n   *  if the element isn't found.\n   */\n  const findContainerIndex = function (element) {\n    // NOTE: search `containerGroups` because it's possible a group contains no tabbable\n    //  nodes, but still contains focusable nodes (e.g. if they all have `tabindex=-1`)\n    //  and we still need to find the element in there\n    return state.containerGroups.findIndex(\n      ({ container, tabbableNodes }) =>\n        container.contains(element) ||\n        // fall back to explicit tabbable search which will take into consideration any\n        //  web components if the `tabbableOptions.getShadowRoot` option was used for\n        //  the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't\n        //  look inside web components even if open)\n        tabbableNodes.find((node) => node === element)\n    );\n  };\n\n  /**\n   * Gets the node for the given option, which is expected to be an option that\n   *  can be either a DOM node, a string that is a selector to get a node, `false`\n   *  (if a node is explicitly NOT given), or a function that returns any of these\n   *  values.\n   * @param {string} optionName\n   * @returns {undefined | false | HTMLElement | SVGElement} Returns\n   *  `undefined` if the option is not specified; `false` if the option\n   *  resolved to `false` (node explicitly not given); otherwise, the resolved\n   *  DOM node.\n   * @throws {Error} If the option is set, not `false`, and is not, or does not\n   *  resolve to a node.\n   */\n  const getNodeForOption = function (optionName, ...params) {\n    let optionValue = config[optionName];\n\n    if (typeof optionValue === 'function') {\n      optionValue = optionValue(...params);\n    }\n\n    if (optionValue === true) {\n      optionValue = undefined; // use default value\n    }\n\n    if (!optionValue) {\n      if (optionValue === undefined || optionValue === false) {\n        return optionValue;\n      }\n      // else, empty string (invalid), null (invalid), 0 (invalid)\n\n      throw new Error(\n        `\\`${optionName}\\` was specified but was not a node, or did not return a node`\n      );\n    }\n\n    let node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point\n\n    if (typeof optionValue === 'string') {\n      node = doc.querySelector(optionValue); // resolve to node, or null if fails\n      if (!node) {\n        throw new Error(\n          `\\`${optionName}\\` as selector refers to no known node`\n        );\n      }\n    }\n\n    return node;\n  };\n\n  const getInitialFocusNode = function () {\n    let node = getNodeForOption('initialFocus');\n\n    // false explicitly indicates we want no initialFocus at all\n    if (node === false) {\n      return false;\n    }\n\n    if (node === undefined) {\n      // option not specified: use fallback options\n      if (findContainerIndex(doc.activeElement) >= 0) {\n        node = doc.activeElement;\n      } else {\n        const firstTabbableGroup = state.tabbableGroups[0];\n        const firstTabbableNode =\n          firstTabbableGroup && firstTabbableGroup.firstTabbableNode;\n\n        // NOTE: `fallbackFocus` option function cannot return `false` (not supported)\n        node = firstTabbableNode || getNodeForOption('fallbackFocus');\n      }\n    }\n\n    if (!node) {\n      throw new Error(\n        'Your focus-trap needs to have at least one focusable element'\n      );\n    }\n\n    return node;\n  };\n\n  const updateTabbableNodes = function () {\n    state.containerGroups = state.containers.map((container) => {\n      const tabbableNodes = tabbable(container, config.tabbableOptions);\n\n      // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes\n      //  are a superset of tabbable nodes\n      const focusableNodes = focusable(container, config.tabbableOptions);\n\n      return {\n        container,\n        tabbableNodes,\n        focusableNodes,\n        firstTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[0] : null,\n        lastTabbableNode:\n          tabbableNodes.length > 0\n            ? tabbableNodes[tabbableNodes.length - 1]\n            : null,\n\n        /**\n         * Finds the __tabbable__ node that follows the given node in the specified direction,\n         *  in this container, if any.\n         * @param {HTMLElement} node\n         * @param {boolean} [forward] True if going in forward tab order; false if going\n         *  in reverse.\n         * @returns {HTMLElement|undefined} The next tabbable node, if any.\n         */\n        nextTabbableNode(node, forward = true) {\n          // NOTE: If tabindex is positive (in order to manipulate the tab order separate\n          //  from the DOM order), this __will not work__ because the list of focusableNodes,\n          //  while it contains tabbable nodes, does not sort its nodes in any order other\n          //  than DOM order, because it can't: Where would you place focusable (but not\n          //  tabbable) nodes in that order? They have no order, because they aren't tabbale...\n          // Support for positive tabindex is already broken and hard to manage (possibly\n          //  not supportable, TBD), so this isn't going to make things worse than they\n          //  already are, and at least makes things better for the majority of cases where\n          //  tabindex is either 0/unset or negative.\n          // FYI, positive tabindex issue: https://github.com/focus-trap/focus-trap/issues/375\n          const nodeIdx = focusableNodes.findIndex((n) => n === node);\n          if (nodeIdx < 0) {\n            return undefined;\n          }\n\n          if (forward) {\n            return focusableNodes\n              .slice(nodeIdx + 1)\n              .find((n) => isTabbable(n, config.tabbableOptions));\n          }\n\n          return focusableNodes\n            .slice(0, nodeIdx)\n            .reverse()\n            .find((n) => isTabbable(n, config.tabbableOptions));\n        },\n      };\n    });\n\n    state.tabbableGroups = state.containerGroups.filter(\n      (group) => group.tabbableNodes.length > 0\n    );\n\n    // throw if no groups have tabbable nodes and we don't have a fallback focus node either\n    if (\n      state.tabbableGroups.length <= 0 &&\n      !getNodeForOption('fallbackFocus') // returning false not supported for this option\n    ) {\n      throw new Error(\n        'Your focus-trap must have at least one container with at least one tabbable node in it at all times'\n      );\n    }\n  };\n\n  const tryFocus = function (node) {\n    if (node === false) {\n      return;\n    }\n\n    if (node === doc.activeElement) {\n      return;\n    }\n\n    if (!node || !node.focus) {\n      tryFocus(getInitialFocusNode());\n      return;\n    }\n\n    node.focus({ preventScroll: !!config.preventScroll });\n    state.mostRecentlyFocusedNode = node;\n\n    if (isSelectableInput(node)) {\n      node.select();\n    }\n  };\n\n  const getReturnFocusNode = function (previousActiveElement) {\n    const node = getNodeForOption('setReturnFocus', previousActiveElement);\n    return node ? node : node === false ? false : previousActiveElement;\n  };\n\n  // This needs to be done on mousedown and touchstart instead of click\n  // so that it precedes the focus event.\n  const checkPointerDown = function (e) {\n    const target = getActualTarget(e);\n\n    if (findContainerIndex(target) >= 0) {\n      // allow the click since it ocurred inside the trap\n      return;\n    }\n\n    if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n      // immediately deactivate the trap\n      trap.deactivate({\n        // if, on deactivation, we should return focus to the node originally-focused\n        //  when the trap was activated (or the configured `setReturnFocus` node),\n        //  then assume it's also OK to return focus to the outside node that was\n        //  just clicked, causing deactivation, as long as that node is focusable;\n        //  if it isn't focusable, then return focus to the original node focused\n        //  on activation (or the configured `setReturnFocus` node)\n        // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,\n        //  which will result in the outside click setting focus to the node\n        //  that was clicked, whether it's focusable or not; by setting\n        //  `returnFocus: true`, we'll attempt to re-focus the node originally-focused\n        //  on activation (or the configured `setReturnFocus` node)\n        returnFocus:\n          config.returnFocusOnDeactivate &&\n          !isFocusable(target, config.tabbableOptions),\n      });\n      return;\n    }\n\n    // This is needed for mobile devices.\n    // (If we'll only let `click` events through,\n    // then on mobile they will be blocked anyways if `touchstart` is blocked.)\n    if (valueOrHandler(config.allowOutsideClick, e)) {\n      // allow the click outside the trap to take place\n      return;\n    }\n\n    // otherwise, prevent the click\n    e.preventDefault();\n  };\n\n  // In case focus escapes the trap for some strange reason, pull it back in.\n  const checkFocusIn = function (e) {\n    const target = getActualTarget(e);\n    const targetContained = findContainerIndex(target) >= 0;\n\n    // In Firefox when you Tab out of an iframe the Document is briefly focused.\n    if (targetContained || target instanceof Document) {\n      if (targetContained) {\n        state.mostRecentlyFocusedNode = target;\n      }\n    } else {\n      // escaped! pull it back in to where it just left\n      e.stopImmediatePropagation();\n      tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());\n    }\n  };\n\n  // Hijack Tab events on the first and last focusable nodes of the trap,\n  // in order to prevent focus from escaping. If it escapes for even a\n  // moment it can end up scrolling the page and causing confusion so we\n  // kind of need to capture the action at the keydown phase.\n  const checkTab = function (e) {\n    const target = getActualTarget(e);\n    updateTabbableNodes();\n\n    let destinationNode = null;\n\n    if (state.tabbableGroups.length > 0) {\n      // make sure the target is actually contained in a group\n      // NOTE: the target may also be the container itself if it's focusable\n      //  with tabIndex='-1' and was given initial focus\n      const containerIndex = findContainerIndex(target);\n      const containerGroup =\n        containerIndex >= 0 ? state.containerGroups[containerIndex] : undefined;\n\n      if (containerIndex < 0) {\n        // target not found in any group: quite possible focus has escaped the trap,\n        //  so bring it back in to...\n        if (e.shiftKey) {\n          // ...the last node in the last group\n          destinationNode =\n            state.tabbableGroups[state.tabbableGroups.length - 1]\n              .lastTabbableNode;\n        } else {\n          // ...the first node in the first group\n          destinationNode = state.tabbableGroups[0].firstTabbableNode;\n        }\n      } else if (e.shiftKey) {\n        // REVERSE\n\n        // is the target the first tabbable node in a group?\n        let startOfGroupIndex = findIndex(\n          state.tabbableGroups,\n          ({ firstTabbableNode }) => target === firstTabbableNode\n        );\n\n        if (\n          startOfGroupIndex < 0 &&\n          (containerGroup.container === target ||\n            (isFocusable(target, config.tabbableOptions) &&\n              !isTabbable(target, config.tabbableOptions) &&\n              !containerGroup.nextTabbableNode(target, false)))\n        ) {\n          // an exception case where the target is either the container itself, or\n          //  a non-tabbable node that was given focus (i.e. tabindex is negative\n          //  and user clicked on it or node was programmatically given focus)\n          //  and is not followed by any other tabbable node, in which\n          //  case, we should handle shift+tab as if focus were on the container's\n          //  first tabbable node, and go to the last tabbable node of the LAST group\n          startOfGroupIndex = containerIndex;\n        }\n\n        if (startOfGroupIndex >= 0) {\n          // YES: then shift+tab should go to the last tabbable node in the\n          //  previous group (and wrap around to the last tabbable node of\n          //  the LAST group if it's the first tabbable node of the FIRST group)\n          const destinationGroupIndex =\n            startOfGroupIndex === 0\n              ? state.tabbableGroups.length - 1\n              : startOfGroupIndex - 1;\n\n          const destinationGroup = state.tabbableGroups[destinationGroupIndex];\n          destinationNode = destinationGroup.lastTabbableNode;\n        }\n      } else {\n        // FORWARD\n\n        // is the target the last tabbable node in a group?\n        let lastOfGroupIndex = findIndex(\n          state.tabbableGroups,\n          ({ lastTabbableNode }) => target === lastTabbableNode\n        );\n\n        if (\n          lastOfGroupIndex < 0 &&\n          (containerGroup.container === target ||\n            (isFocusable(target, config.tabbableOptions) &&\n              !isTabbable(target, config.tabbableOptions) &&\n              !containerGroup.nextTabbableNode(target)))\n        ) {\n          // an exception case where the target is the container itself, or\n          //  a non-tabbable node that was given focus (i.e. tabindex is negative\n          //  and user clicked on it or node was programmatically given focus)\n          //  and is not followed by any other tabbable node, in which\n          //  case, we should handle tab as if focus were on the container's\n          //  last tabbable node, and go to the first tabbable node of the FIRST group\n          lastOfGroupIndex = containerIndex;\n        }\n\n        if (lastOfGroupIndex >= 0) {\n          // YES: then tab should go to the first tabbable node in the next\n          //  group (and wrap around to the first tabbable node of the FIRST\n          //  group if it's the last tabbable node of the LAST group)\n          const destinationGroupIndex =\n            lastOfGroupIndex === state.tabbableGroups.length - 1\n              ? 0\n              : lastOfGroupIndex + 1;\n\n          const destinationGroup = state.tabbableGroups[destinationGroupIndex];\n          destinationNode = destinationGroup.firstTabbableNode;\n        }\n      }\n    } else {\n      // NOTE: the fallbackFocus option does not support returning false to opt-out\n      destinationNode = getNodeForOption('fallbackFocus');\n    }\n\n    if (destinationNode) {\n      e.preventDefault();\n      tryFocus(destinationNode);\n    }\n    // else, let the browser take care of [shift+]tab and move the focus\n  };\n\n  const checkKey = function (e) {\n    if (\n      isEscapeEvent(e) &&\n      valueOrHandler(config.escapeDeactivates, e) !== false\n    ) {\n      e.preventDefault();\n      trap.deactivate();\n      return;\n    }\n\n    if (isTabEvent(e)) {\n      checkTab(e);\n      return;\n    }\n  };\n\n  const checkClick = function (e) {\n    const target = getActualTarget(e);\n\n    if (findContainerIndex(target) >= 0) {\n      return;\n    }\n\n    if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n      return;\n    }\n\n    if (valueOrHandler(config.allowOutsideClick, e)) {\n      return;\n    }\n\n    e.preventDefault();\n    e.stopImmediatePropagation();\n  };\n\n  //\n  // EVENT LISTENERS\n  //\n\n  const addListeners = function () {\n    if (!state.active) {\n      return;\n    }\n\n    // There can be only one listening focus trap at a time\n    activeFocusTraps.activateTrap(trap);\n\n    // Delay ensures that the focused element doesn't capture the event\n    // that caused the focus trap activation.\n    state.delayInitialFocusTimer = config.delayInitialFocus\n      ? delay(function () {\n          tryFocus(getInitialFocusNode());\n        })\n      : tryFocus(getInitialFocusNode());\n\n    doc.addEventListener('focusin', checkFocusIn, true);\n    doc.addEventListener('mousedown', checkPointerDown, {\n      capture: true,\n      passive: false,\n    });\n    doc.addEventListener('touchstart', checkPointerDown, {\n      capture: true,\n      passive: false,\n    });\n    doc.addEventListener('click', checkClick, {\n      capture: true,\n      passive: false,\n    });\n    doc.addEventListener('keydown', checkKey, {\n      capture: true,\n      passive: false,\n    });\n\n    return trap;\n  };\n\n  const removeListeners = function () {\n    if (!state.active) {\n      return;\n    }\n\n    doc.removeEventListener('focusin', checkFocusIn, true);\n    doc.removeEventListener('mousedown', checkPointerDown, true);\n    doc.removeEventListener('touchstart', checkPointerDown, true);\n    doc.removeEventListener('click', checkClick, true);\n    doc.removeEventListener('keydown', checkKey, true);\n\n    return trap;\n  };\n\n  //\n  // TRAP DEFINITION\n  //\n\n  trap = {\n    get active() {\n      return state.active;\n    },\n\n    get paused() {\n      return state.paused;\n    },\n\n    activate(activateOptions) {\n      if (state.active) {\n        return this;\n      }\n\n      const onActivate = getOption(activateOptions, 'onActivate');\n      const onPostActivate = getOption(activateOptions, 'onPostActivate');\n      const checkCanFocusTrap = getOption(activateOptions, 'checkCanFocusTrap');\n\n      if (!checkCanFocusTrap) {\n        updateTabbableNodes();\n      }\n\n      state.active = true;\n      state.paused = false;\n      state.nodeFocusedBeforeActivation = doc.activeElement;\n\n      if (onActivate) {\n        onActivate();\n      }\n\n      const finishActivation = () => {\n        if (checkCanFocusTrap) {\n          updateTabbableNodes();\n        }\n        addListeners();\n        if (onPostActivate) {\n          onPostActivate();\n        }\n      };\n\n      if (checkCanFocusTrap) {\n        checkCanFocusTrap(state.containers.concat()).then(\n          finishActivation,\n          finishActivation\n        );\n        return this;\n      }\n\n      finishActivation();\n      return this;\n    },\n\n    deactivate(deactivateOptions) {\n      if (!state.active) {\n        return this;\n      }\n\n      const options = {\n        onDeactivate: config.onDeactivate,\n        onPostDeactivate: config.onPostDeactivate,\n        checkCanReturnFocus: config.checkCanReturnFocus,\n        ...deactivateOptions,\n      };\n\n      clearTimeout(state.delayInitialFocusTimer); // noop if undefined\n      state.delayInitialFocusTimer = undefined;\n\n      removeListeners();\n      state.active = false;\n      state.paused = false;\n\n      activeFocusTraps.deactivateTrap(trap);\n\n      const onDeactivate = getOption(options, 'onDeactivate');\n      const onPostDeactivate = getOption(options, 'onPostDeactivate');\n      const checkCanReturnFocus = getOption(options, 'checkCanReturnFocus');\n      const returnFocus = getOption(\n        options,\n        'returnFocus',\n        'returnFocusOnDeactivate'\n      );\n\n      if (onDeactivate) {\n        onDeactivate();\n      }\n\n      const finishDeactivation = () => {\n        delay(() => {\n          if (returnFocus) {\n            tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));\n          }\n          if (onPostDeactivate) {\n            onPostDeactivate();\n          }\n        });\n      };\n\n      if (returnFocus && checkCanReturnFocus) {\n        checkCanReturnFocus(\n          getReturnFocusNode(state.nodeFocusedBeforeActivation)\n        ).then(finishDeactivation, finishDeactivation);\n        return this;\n      }\n\n      finishDeactivation();\n      return this;\n    },\n\n    pause() {\n      if (state.paused || !state.active) {\n        return this;\n      }\n\n      state.paused = true;\n      removeListeners();\n\n      return this;\n    },\n\n    unpause() {\n      if (!state.paused || !state.active) {\n        return this;\n      }\n\n      state.paused = false;\n      updateTabbableNodes();\n      addListeners();\n\n      return this;\n    },\n\n    updateContainerElements(containerElements) {\n      const elementsAsArray = [].concat(containerElements).filter(Boolean);\n\n      state.containers = elementsAsArray.map((element) =>\n        typeof element === 'string' ? doc.querySelector(element) : element\n      );\n\n      if (state.active) {\n        updateTabbableNodes();\n      }\n\n      return this;\n    },\n  };\n\n  // initialize container elements\n  trap.updateContainerElements(elements);\n\n  return trap;\n};\n\nexport { createFocusTrap };\n","import { createFocusTrap as _createFocusTrap } from 'focus-trap';\n\n/**\n * Creates a focus trap for the given element with the given options.\n * \n * This function applies some default options that are different to the library.\n * Your own options still override these custom defaults:\n * \n * ```json\n * {\n     escapeDeactivates: false,\n * }\n * ```\n * \n * @param element The element to be the focus trap, or a selector that will be used to find the element.\n * \n * @see https://github.com/focus-trap/focus-trap#readme - Library documentation\n */\nfunction createFocusTrap(...args: Parameters<typeof _createFocusTrap>): ReturnType<typeof _createFocusTrap> {\n  args[1] = {\n    escapeDeactivates: false,\n    ...args[1],\n  };\n\n  return _createFocusTrap(...args);\n}\n\nexport * from 'focus-trap';\nexport { createFocusTrap };\n","function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n// Older browsers don't support event options, feature detect it.\n\n// Adopted and modified solution from Bohdan Didukh (2017)\n// https://stackoverflow.com/questions/41594997/ios-10-safari-prevent-scrolling-behind-a-fixed-overlay-and-maintain-scroll-posi\n\nvar hasPassiveEvents = false;\nif (typeof window !== 'undefined') {\n  var passiveTestOptions = {\n    get passive() {\n      hasPassiveEvents = true;\n      return undefined;\n    }\n  };\n  window.addEventListener('testPassive', null, passiveTestOptions);\n  window.removeEventListener('testPassive', null, passiveTestOptions);\n}\n\nvar isIosDevice = typeof window !== 'undefined' && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === 'MacIntel' && window.navigator.maxTouchPoints > 1);\n\n\nvar locks = [];\nvar documentListenerAdded = false;\nvar initialClientY = -1;\nvar previousBodyOverflowSetting = void 0;\nvar previousBodyPosition = void 0;\nvar previousBodyPaddingRight = void 0;\n\n// returns true if `el` should be allowed to receive touchmove events.\nvar allowTouchMove = function allowTouchMove(el) {\n  return locks.some(function (lock) {\n    if (lock.options.allowTouchMove && lock.options.allowTouchMove(el)) {\n      return true;\n    }\n\n    return false;\n  });\n};\n\nvar preventDefault = function preventDefault(rawEvent) {\n  var e = rawEvent || window.event;\n\n  // For the case whereby consumers adds a touchmove event listener to document.\n  // Recall that we do document.addEventListener('touchmove', preventDefault, { passive: false })\n  // in disableBodyScroll - so if we provide this opportunity to allowTouchMove, then\n  // the touchmove event on document will break.\n  if (allowTouchMove(e.target)) {\n    return true;\n  }\n\n  // Do not prevent if the event has more than one touch (usually meaning this is a multi touch gesture like pinch to zoom).\n  if (e.touches.length > 1) return true;\n\n  if (e.preventDefault) e.preventDefault();\n\n  return false;\n};\n\nvar setOverflowHidden = function setOverflowHidden(options) {\n  // If previousBodyPaddingRight is already set, don't set it again.\n  if (previousBodyPaddingRight === undefined) {\n    var _reserveScrollBarGap = !!options && options.reserveScrollBarGap === true;\n    var scrollBarGap = window.innerWidth - document.documentElement.clientWidth;\n\n    if (_reserveScrollBarGap && scrollBarGap > 0) {\n      var computedBodyPaddingRight = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'), 10);\n      previousBodyPaddingRight = document.body.style.paddingRight;\n      document.body.style.paddingRight = computedBodyPaddingRight + scrollBarGap + 'px';\n    }\n  }\n\n  // If previousBodyOverflowSetting is already set, don't set it again.\n  if (previousBodyOverflowSetting === undefined) {\n    previousBodyOverflowSetting = document.body.style.overflow;\n    document.body.style.overflow = 'hidden';\n  }\n};\n\nvar restoreOverflowSetting = function restoreOverflowSetting() {\n  if (previousBodyPaddingRight !== undefined) {\n    document.body.style.paddingRight = previousBodyPaddingRight;\n\n    // Restore previousBodyPaddingRight to undefined so setOverflowHidden knows it\n    // can be set again.\n    previousBodyPaddingRight = undefined;\n  }\n\n  if (previousBodyOverflowSetting !== undefined) {\n    document.body.style.overflow = previousBodyOverflowSetting;\n\n    // Restore previousBodyOverflowSetting to undefined\n    // so setOverflowHidden knows it can be set again.\n    previousBodyOverflowSetting = undefined;\n  }\n};\n\nvar setPositionFixed = function setPositionFixed() {\n  return window.requestAnimationFrame(function () {\n    // If previousBodyPosition is already set, don't set it again.\n    if (previousBodyPosition === undefined) {\n      previousBodyPosition = {\n        position: document.body.style.position,\n        top: document.body.style.top,\n        left: document.body.style.left\n      };\n\n      // Update the dom inside an animation frame \n      var _window = window,\n          scrollY = _window.scrollY,\n          scrollX = _window.scrollX,\n          innerHeight = _window.innerHeight;\n\n      document.body.style.position = 'fixed';\n      document.body.style.top = -scrollY;\n      document.body.style.left = -scrollX;\n\n      setTimeout(function () {\n        return window.requestAnimationFrame(function () {\n          // Attempt to check if the bottom bar appeared due to the position change\n          var bottomBarHeight = innerHeight - window.innerHeight;\n          if (bottomBarHeight && scrollY >= innerHeight) {\n            // Move the content further up so that the bottom bar doesn't hide it\n            document.body.style.top = -(scrollY + bottomBarHeight);\n          }\n        });\n      }, 300);\n    }\n  });\n};\n\nvar restorePositionSetting = function restorePositionSetting() {\n  if (previousBodyPosition !== undefined) {\n    // Convert the position from \"px\" to Int\n    var y = -parseInt(document.body.style.top, 10);\n    var x = -parseInt(document.body.style.left, 10);\n\n    // Restore styles\n    document.body.style.position = previousBodyPosition.position;\n    document.body.style.top = previousBodyPosition.top;\n    document.body.style.left = previousBodyPosition.left;\n\n    // Restore scroll\n    window.scrollTo(x, y);\n\n    previousBodyPosition = undefined;\n  }\n};\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#Problems_and_solutions\nvar isTargetElementTotallyScrolled = function isTargetElementTotallyScrolled(targetElement) {\n  return targetElement ? targetElement.scrollHeight - targetElement.scrollTop <= targetElement.clientHeight : false;\n};\n\nvar handleScroll = function handleScroll(event, targetElement) {\n  var clientY = event.targetTouches[0].clientY - initialClientY;\n\n  if (allowTouchMove(event.target)) {\n    return false;\n  }\n\n  if (targetElement && targetElement.scrollTop === 0 && clientY > 0) {\n    // element is at the top of its scroll.\n    return preventDefault(event);\n  }\n\n  if (isTargetElementTotallyScrolled(targetElement) && clientY < 0) {\n    // element is at the bottom of its scroll.\n    return preventDefault(event);\n  }\n\n  event.stopPropagation();\n  return true;\n};\n\nexport var disableBodyScroll = function disableBodyScroll(targetElement, options) {\n  // targetElement must be provided\n  if (!targetElement) {\n    // eslint-disable-next-line no-console\n    console.error('disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.');\n    return;\n  }\n\n  // disableBodyScroll must not have been called on this targetElement before\n  if (locks.some(function (lock) {\n    return lock.targetElement === targetElement;\n  })) {\n    return;\n  }\n\n  var lock = {\n    targetElement: targetElement,\n    options: options || {}\n  };\n\n  locks = [].concat(_toConsumableArray(locks), [lock]);\n\n  if (isIosDevice) {\n    setPositionFixed();\n  } else {\n    setOverflowHidden(options);\n  }\n\n  if (isIosDevice) {\n    targetElement.ontouchstart = function (event) {\n      if (event.targetTouches.length === 1) {\n        // detect single touch.\n        initialClientY = event.targetTouches[0].clientY;\n      }\n    };\n    targetElement.ontouchmove = function (event) {\n      if (event.targetTouches.length === 1) {\n        // detect single touch.\n        handleScroll(event, targetElement);\n      }\n    };\n\n    if (!documentListenerAdded) {\n      document.addEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);\n      documentListenerAdded = true;\n    }\n  }\n};\n\nexport var clearAllBodyScrollLocks = function clearAllBodyScrollLocks() {\n  if (isIosDevice) {\n    // Clear all locks ontouchstart/ontouchmove handlers, and the references.\n    locks.forEach(function (lock) {\n      lock.targetElement.ontouchstart = null;\n      lock.targetElement.ontouchmove = null;\n    });\n\n    if (documentListenerAdded) {\n      document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);\n      documentListenerAdded = false;\n    }\n\n    // Reset initial clientY.\n    initialClientY = -1;\n  }\n\n  if (isIosDevice) {\n    restorePositionSetting();\n  } else {\n    restoreOverflowSetting();\n  }\n\n  locks = [];\n};\n\nexport var enableBodyScroll = function enableBodyScroll(targetElement) {\n  if (!targetElement) {\n    // eslint-disable-next-line no-console\n    console.error('enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.');\n    return;\n  }\n\n  locks = locks.filter(function (lock) {\n    return lock.targetElement !== targetElement;\n  });\n\n  if (isIosDevice) {\n    targetElement.ontouchstart = null;\n    targetElement.ontouchmove = null;\n\n    if (documentListenerAdded && locks.length === 0) {\n      document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);\n      documentListenerAdded = false;\n    }\n  }\n\n  if (isIosDevice) {\n    restorePositionSetting();\n  } else {\n    restoreOverflowSetting();\n  }\n};\n\n","/* \n * Copyright 2019, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {parseCases} from './utilities.js';\n\nlet pluralFormatter;\n\nlet keyCounter = 0;\n\n// All the special keywords that can be used in `plural` blocks for the various branches\nconst ONE   = 'one';\nconst OTHER = 'other';\n\n/**\n * @private\n * @param {String} caseBody\n * @param {Number} value\n * @return {Object} {caseBody: string, numberValues: object}\n */\nfunction replaceNumberSign(caseBody, value) {\n\tlet i = 0;\n\tlet output = '';\n\tlet numBraces = 0;\n\tconst numberValues = {};\n\n\twhile (i < caseBody.length) {\n\t\tif (caseBody[i] === '#' && !numBraces) {\n\t\t\tlet keyParam = `__hashToken${keyCounter++}`;\n\t\t\toutput += `{${keyParam}, number}`;\n\t\t\tnumberValues[keyParam] = value;\n\t\t}\n\t\telse {\n\t\t\toutput += caseBody[i];\n\t\t}\n\n\t\tif (caseBody[i] === '{') {\n\t\t\tnumBraces++;\n\t\t}\n\t\telse if (caseBody[i] === '}') {\n\t\t\tnumBraces--;\n\t\t}\n\n\t\ti++;\n\t}\n\n\treturn {\n\t\tcaseBody: output,\n\t\tnumberValues\n\t};\n}\n\n/**\n * Handler for `plural` statements within ICU message syntax strings.  Returns\n * a formatted string for the branch that closely matches the current value.\n * \n * See https://formatjs.io/docs/core-concepts/icu-syntax#plural-format for more\n * details on how the `plural` statement works.\n * \n * @param {String} value\n * @param {String} matches\n * @param {String} locale\n * @param {String} values\n * @param {Function} format\n * @return {String}\n */\nexport default function pluralTypeHandler(value, matches = '', locale, values, format) {\n\tconst { args, cases } = parseCases(matches);\n\n\tlet intValue = parseInt(value);\n\n\targs.forEach((arg) => {\n\t\tif (arg.startsWith('offset:')) {\n\t\t\tintValue -= parseInt(arg.slice('offset:'.length));\n\t\t}\n\t});\n\n\tconst keywordPossibilities = [];\n\n\tif ('PluralRules' in Intl) {\n\t\t// Effectively memoize because instantiation of `Int.*` objects is expensive.\n\t\tif (pluralFormatter === undefined || pluralFormatter.resolvedOptions().locale !== locale) {\n\t\t\tpluralFormatter = new Intl.PluralRules(locale);\n\t\t}\n\n\t\tconst pluralKeyword = pluralFormatter.select(intValue);\n\n\t\t// Other is always added last with least priority, so we don't want to add it here.\n\t\tif (pluralKeyword !== OTHER) {\n\t\t\tkeywordPossibilities.push(pluralKeyword);\n\t\t}\n\t}\n\tif (intValue === 1) {\n\t\tkeywordPossibilities.push(ONE);\n\t}\n\tkeywordPossibilities.push(`=${intValue}`, OTHER);\n\n\tfor (let i = 0; i < keywordPossibilities.length; i++) {\n\t\tconst keyword = keywordPossibilities[i];\n\t\tif (keyword in cases) {\n\t\t\tconst { caseBody, numberValues } = replaceNumberSign(cases[keyword], intValue);\n\t\t\treturn format(caseBody, {\n\t\t\t\t...values,\n\t\t\t\t...numberValues\n\t\t\t});\n\t\t}\n\t}\n\n\treturn value;\n}\n","import Component from '../Component';\n\nimport { createFocusTrap, FocusTrap } from '../utils/focusTrap';\n\nimport { disableBodyScroll, clearAllBodyScrollLocks } from 'body-scroll-lock';\n\nimport type ModalManagerState from '../states/ModalManagerState';\nimport type Mithril from 'mithril';\n\ninterface IModalManagerAttrs {\n  state: ModalManagerState;\n}\n\n/**\n * The `ModalManager` component manages one or more modal dialogs. Stacking modals\n * is supported. Multiple dialogs can be shown at once; loading a new component\n * into the ModalManager will overwrite the previous one.\n */\nexport default class ModalManager extends Component<IModalManagerAttrs> {\n  // Current focus trap\n  protected focusTrap: FocusTrap | undefined;\n\n  // Keep track of the last set focus trap\n  protected lastSetFocusTrap: number | undefined;\n\n  // Keep track if there's an modal closing\n  protected modalClosing: boolean = false;\n\n  protected keyUpListener: null | ((e: KeyboardEvent) => void) = null;\n\n  view(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): Mithril.Children {\n    return (\n      <>\n        {this.attrs.state.modalList.map((modal, i) => {\n          const Tag = modal?.componentClass;\n\n          return (\n            <div\n              key={modal.key}\n              className=\"ModalManager modal\"\n              data-modal-key={modal.key}\n              data-modal-number={i}\n              role=\"dialog\"\n              aria-modal=\"true\"\n              style={{ '--modal-number': i }}\n              aria-hidden={this.attrs.state.modal !== modal && 'true'}\n            >\n              {!!Tag && [\n                <Tag\n                  key={modal.key}\n                  {...modal.attrs}\n                  animateShow={this.animateShow.bind(this)}\n                  animateHide={this.animateHide.bind(this)}\n                  state={this.attrs.state}\n                />,\n                /* This backdrop is invisible and used for outside clicks to close the modal. */\n                <div key={modal.key} className=\"ModalManager-invisibleBackdrop\" onclick={this.handlePossibleBackdropClick.bind(this)} />,\n              ]}\n            </div>\n          );\n        })}\n\n        {this.attrs.state.backdropShown && (\n          <div\n            className=\"Modal-backdrop backdrop\"\n            ontransitionend={this.onBackdropTransitionEnd.bind(this)}\n            data-showing={!!this.attrs.state.modalList.length}\n            style={{ '--modal-count': this.attrs.state.modalList.length }}\n          />\n        )}\n      </>\n    );\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): void {\n    super.oncreate(vnode);\n\n    this.keyUpListener = this.handleEscPress.bind(this);\n    document.body.addEventListener('keyup', this.keyUpListener);\n  }\n\n  onbeforeremove(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): void {\n    super.onbeforeremove(vnode);\n\n    this.keyUpListener && document.body.removeEventListener('keyup', this.keyUpListener);\n    this.keyUpListener = null;\n  }\n\n  onupdate(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): void {\n    super.onupdate(vnode);\n\n    requestAnimationFrame(() => {\n      try {\n        // Main content should gain or lose `aria-hidden` when modals are shown/removed\n        // See: http://web-accessibility.carnegiemuseums.org/code/dialogs/\n\n        if (!this.attrs.state.isModalOpen()) {\n          document.getElementById('app')?.setAttribute('aria-hidden', 'false');\n          this.focusTrap!.deactivate?.();\n          clearAllBodyScrollLocks();\n\n          return;\n        }\n\n        document.getElementById('app')?.setAttribute('aria-hidden', 'true');\n\n        // Get current dialog key\n        const dialogKey = this.attrs.state.modal!.key;\n\n        // Deactivate focus trap if there's a new dialog/closed\n        if (this.focusTrap && this.lastSetFocusTrap !== dialogKey) {\n          this.focusTrap!.deactivate?.();\n\n          clearAllBodyScrollLocks();\n        }\n\n        // Activate focus trap if there's a new dialog which is not trapped yet\n        if (this.activeDialogElement && this.lastSetFocusTrap !== dialogKey) {\n          this.focusTrap = createFocusTrap(this.activeDialogElement as HTMLElement, { allowOutsideClick: true });\n          this.focusTrap!.activate?.();\n\n          disableBodyScroll(this.activeDialogManagerElement!, { reserveScrollBarGap: true });\n        }\n\n        // Update key of current opened modal\n        this.lastSetFocusTrap = dialogKey;\n      } catch {\n        // We can expect errors to occur here due to the nature of mithril rendering\n      }\n    });\n  }\n\n  /**\n   * Get current active dialog\n   */\n  private get activeDialogElement(): HTMLElement {\n    return document.body.querySelector(`.ModalManager[data-modal-key=\"${this.attrs.state.modal?.key}\"] .Modal`) as HTMLElement;\n  }\n\n  /**\n   * Get current active dialog\n   */\n  private get activeDialogManagerElement(): HTMLElement {\n    return document.body.querySelector(`.ModalManager[data-modal-key=\"${this.attrs.state.modal?.key}\"]`) as HTMLElement;\n  }\n\n  animateShow(readyCallback: () => void = () => {}): void {\n    if (!this.attrs.state.modal) return;\n\n    this.activeDialogElement.addEventListener(\n      'transitionend',\n      () => {\n        readyCallback();\n      },\n      { once: true }\n    );\n\n    requestAnimationFrame(() => {\n      this.activeDialogElement.classList.add('in');\n    });\n  }\n\n  animateHide(closedCallback: () => void = () => {}): void {\n    if (this.modalClosing) return;\n    this.modalClosing = true;\n\n    const afterModalClosedCallback = () => {\n      this.modalClosing = false;\n\n      // Close the dialog\n      this.attrs.state.close();\n\n      closedCallback();\n    };\n\n    this.activeDialogElement.addEventListener('transitionend', afterModalClosedCallback, { once: true });\n\n    this.activeDialogElement.classList.remove('in');\n    this.activeDialogElement.classList.add('out');\n  }\n\n  protected handleEscPress(e: KeyboardEvent): void {\n    if (!this.attrs.state.modal) return;\n\n    const dismissibleState = this.attrs.state.modal.componentClass.dismissibleOptions;\n\n    // Close the dialog if the escape key was pressed\n    // Check if closing via escape key is enabled\n    if (e.key === 'Escape' && dismissibleState.viaEscKey) {\n      e.preventDefault();\n\n      this.animateHide();\n    }\n  }\n\n  protected handlePossibleBackdropClick(e: MouseEvent): void {\n    if (!this.attrs.state.modal || !this.attrs.state.modal.componentClass.dismissibleOptions.viaBackdropClick) return;\n\n    this.animateHide();\n  }\n\n  protected onBackdropTransitionEnd(e: TransitionEvent) {\n    if (e.propertyName === 'opacity') {\n      const backdrop = e.currentTarget as HTMLDivElement;\n\n      if (backdrop.getAttribute('data-showing') === null) {\n        // Backdrop is fading out\n        this.attrs.state.backdropShown = false;\n        m.redraw();\n      }\n    }\n  }\n}\n","import Component, { ComponentAttrs } from '../Component';\nimport AlertManagerState from '../states/AlertManagerState';\nimport type Mithril from 'mithril';\n\nexport interface IAlertManagerAttrs extends ComponentAttrs {\n  state: AlertManagerState;\n}\n\n/**\n * The `AlertManager` component provides an area in which `Alert` components can\n * be shown and dismissed.\n */\nexport default class AlertManager<CustomAttrs extends IAlertManagerAttrs = IAlertManagerAttrs> extends Component<CustomAttrs, AlertManagerState> {\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.state = this.attrs.state;\n  }\n\n  view() {\n    const activeAlerts = this.state.getActiveAlerts();\n\n    return (\n      <div className=\"AlertManager\">\n        {Object.keys(activeAlerts)\n          .map(Number)\n          .map((key) => {\n            const alert = activeAlerts[key];\n            const urgent = alert.attrs.type === 'error';\n\n            return (\n              <div className=\"AlertManager-alert\" role=\"alert\" aria-live={urgent ? 'assertive' : 'polite'}>\n                <alert.componentClass {...alert.attrs} ondismiss={this.state.dismiss.bind(this.state, key)}>\n                  {alert.children}\n                </alert.componentClass>\n              </div>\n            );\n          })}\n      </div>\n    );\n  }\n}\n","import type RequestError from '../utils/RequestError';\nimport Modal, { IInternalModalAttrs } from './Modal';\n\nexport interface IRequestErrorModalAttrs extends IInternalModalAttrs {\n  error: RequestError;\n  formattedError: string[];\n}\n\nexport default class RequestErrorModal<CustomAttrs extends IRequestErrorModalAttrs = IRequestErrorModalAttrs> extends Modal<CustomAttrs> {\n  className() {\n    return 'RequestErrorModal Modal--large';\n  }\n\n  title() {\n    return !!this.attrs.error.xhr && `${this.attrs.error.xhr.status} ${this.attrs.error.xhr.statusText}`;\n  }\n\n  content() {\n    const { error, formattedError } = this.attrs;\n\n    let responseText;\n\n    // If the error is already formatted, just add line endings;\n    // else try to parse it as JSON and stringify it with indentation\n    if (formattedError.length) {\n      responseText = formattedError.join('\\n\\n');\n    } else if (error.response) {\n      responseText = JSON.stringify(error.response, null, 2);\n    } else {\n      responseText = error.responseText;\n    }\n\n    return (\n      <div className=\"Modal-body\">\n        <pre>\n          {this.attrs.error.options.method} {this.attrs.error.options.url}\n          <br />\n          <br />\n          {responseText}\n        </pre>\n      </div>\n    );\n  }\n}\n","/* \n * Copyright 2017, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Flattens an array of arrays of infinite depth into a single-dimension array.\n * \n * > This is now natively in JavaScript as the `flat` method on an Array\n * > instance.  [Check MDN for which browsers have access to this feature](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat).\n * > If you can't use `flat`, then this method will do the job 🙂\n * \n * @param {Array} array\n * @return {Array} Flattened array.\n */\nexport function flatten(array) {\n\n\treturn array.reduce((accumulator, value) => {\n\t\treturn accumulator.concat(Array.isArray(value) ? flatten(value) : value);\n\t}, []);\n}\n\n/**\n * Creates an array of numbers from the starting value (inclusive) to the end\n * (exclusive), with an optional step (the gap between values).\n * \n * @param {Number} start\n *   The value to start at, the first item in the returned array.\n * @param {Number} end\n *   The value to end with, the last item in the returned array.\n * @param {Number} [step=1]\n *   The increment/gap between values, defaults to 1.\n * @return {Array} An array encompassing the given range.\n */\nexport function range(start, end, step = 1) {\n\n\treturn Array.apply(0, Array(Math.ceil((end - start) / step))).map((empty, index) => index * step + start);\n}\n\n/**\n * Remove and return the first item from `array` that matches the predicate\n * function.\n * \n * @param {Array} array\n * @param {Function} predicate\n *   Invoked with the array item.\n * @return {Object} The matching item, or `null` if no match was found.\n */\nexport function remove(array, predicate) {\n\n\treturn array.find((item, index) => {\n\t\tif (predicate(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\treturn item;\n\t\t}\n\t});\n}\n","/**\n * A higher-order function to apply [memoization](https://en.wikipedia.org/wiki/Memoization).\n * \n * If memoizing a recursive function, then memoize and define the function at\n * the same time so you can make a call to the memoized function, eg:\n * \n * ```javascript\n * const myFunction = memoize(() => myFunction());\n * ```\n * \n * @param {Function} func\n * @return {Function} \n */\nexport function memoize(func) {\n\tconst cache = {};\n\treturn function(...args) {\n\t\tlet key = args.length ? args\n\t\t\t.map(arg =>\n\t\t\t\targ === null ? 'null' :\n\t\t\t\targ === undefined ? 'undefined' :\n\t\t\t\ttypeof arg === 'function' ? arg.toString() :\n\t\t\t\targ instanceof Date ? arg.toISOString() :\n\t\t\t\tJSON.stringify(arg)\n\t\t\t)\n\t\t\t.join('|') :\n\t\t\t'_(no-args)_';\n\t\tif (Object.prototype.hasOwnProperty.call(cache, key)) {\n\t\t\treturn cache[key];\n\t\t}\n\t\tlet result = func(...args);\n\t\tcache[key] = result;\n\t\treturn result;\n\t};\n}\n","/* \n * Copyright 2019, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Most branch-based type handlers are based around \"cases\".\n * For example, `select` and `plural` compare compare a value\n * to \"case keys\" to choose a subtranslation.\n * \n * This util splits \"matches\" portions provided to the aforementioned\n * handlers into case strings, and extracts any prepended arguments\n * (for example, `plural` supports an `offset:n` argument used for\n * populating the magic `#` variable).\n * \n * @param {String} string\n * @return {Object} The `cases` key points to a map of all cases.\n *                  The `arguments` key points to a list of prepended arguments.\n */\nexport function parseCases(string) {\n\tconst isWhitespace = ch => /\\s/.test(ch);\n\n\tconst args = [];\n\tconst cases = {};\n\n\tlet currTermStart = 0;\n\tlet latestTerm = null;\n\tlet inTerm = false;\n\n\tlet i = 0;\n\twhile (i < string.length) {\n\t\t// Term ended\n\t\tif (inTerm && (isWhitespace(string[i]) || string[i] === '{')) {\n\t\t\tinTerm = false;\n\t\t\tlatestTerm = string.slice(currTermStart, i);\n\n\t\t\t// We want to process the opening char again so the case will be properly registered.\n\t\t\tif (string[i] === '{') {\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\n\t\t// New term\n\t\telse if (!inTerm && !isWhitespace(string[i])) {\n\t\t\tconst caseBody = string[i] === '{';\n\n\t\t\t// If there's a previous term, we can either handle a whole\n\t\t\t// case, or add that as an argument.\n\t\t\tif (latestTerm && caseBody) {\n\t\t\t\tconst branchEndIndex = findClosingBracket(string, i);\n\n\t\t\t\tif (branchEndIndex === -1) {\n\t\t\t\t\tthrow new Error(`Unbalanced curly braces in string: \"${string}\"`);\n\t\t\t\t}\n\n\t\t\t\tcases[latestTerm] = string.slice(i + 1, branchEndIndex);  // Don't include the braces\n\n\t\t\t\ti = branchEndIndex; // Will be moved up where needed at end of loop.\n\t\t\t\tlatestTerm = null;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (latestTerm) {\n\t\t\t\t\targs.push(latestTerm);\n\t\t\t\t\tlatestTerm = null;\n\t\t\t\t}\n\n\t\t\t\tinTerm = true;\n\t\t\t\tcurrTermStart = i;\n\t\t\t}\n\t\t}\n\t\ti++;\n\t}\n\n\tif (inTerm) {\n\t\tlatestTerm = string.slice(currTermStart);\n\t}\n\n\tif (latestTerm) {\n\t\targs.push(latestTerm);\n\t}\n\n\treturn {\n\t\targs,\n\t\tcases\n\t};\n}\n\n/**\n * Finds the index of the matching closing curly bracket, including through\n * strings that could have nested brackets.\n * \n * @param {String} string\n * @param {Number} fromIndex\n * @return {Number} The index of the matching closing bracket, or -1 if no\n *   closing bracket could be found.\n */\nexport function findClosingBracket(string, fromIndex) {\n\tlet depth = 0;\n\tfor (let i = fromIndex + 1; i < string.length; i++) {\n\t\tlet char = string.charAt(i);\n\t\tif (char === '}') {\n\t\t\tif (depth === 0) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t\tdepth--;\n\t\t}\n\t\telse if (char === '{') {\n\t\t\tdepth++;\n\t\t}\n\t}\n\treturn -1;\n}\n\n/**\n * Split a `{key, type, format}` block into those 3 parts, taking into account\n * nested message syntax that can exist in the `format` part.\n * \n * @param {String} block\n * @return {Array}\n *   An array with `key`, `type`, and `format` items in that order, if present\n *   in the formatted argument block.\n */\nexport function splitFormattedArgument(block) {\n\treturn split(block.slice(1, -1), ',', 3);\n}\n\n/**\n * Like `String.prototype.split()` but where the limit parameter causes the\n * remainder of the string to be grouped together in a final entry.\n * \n * @private\n * @param {String} string\n * @param {String} separator\n * @param {Number} limit\n * @param {Array} [accumulator=[]]\n * @return {Array}\n */\nfunction split(string, separator, limit, accumulator = []) {\n\tif (!string) {\n\t\treturn accumulator;\n\t}\n\tif (limit === 1) {\n\t\taccumulator.push(string);\n\t\treturn accumulator;\n\t}\n\tlet indexOfDelimiter = string.indexOf(separator);\n\tif (indexOfDelimiter === -1) {\n\t\taccumulator.push(string);\n\t\treturn accumulator;\n\t}\n\tlet head = string.substring(0, indexOfDelimiter).trim();\n\tlet tail = string.substring(indexOfDelimiter + separator.length + 1).trim();\n\taccumulator.push(head);\n\treturn split(tail, separator, limit - 1, accumulator);\n}\n","/* \n * Copyright 2019, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {parseCases} from './utilities.js';\n\nconst OTHER = 'other';\n\n/**\n * Handler for `select` statements within ICU message syntax strings.  Returns\n * a formatted string for the branch that closely matches the current value.\n * \n * See https://formatjs.io/docs/core-concepts/icu-syntax#select-format for more\n * details on how the `select` statement works.\n * \n * @param {String} value\n * @param {String} matches\n * @param {String} locale\n * @param {String} values\n * @param {Function} format\n * @return {String}\n */\nexport default function selectTypeHandler(value, matches = '', locale, values, format) {\n\tconst { cases } = parseCases(matches);\n\n\tif (value in cases) {\n\t\treturn format(cases[value], values);\n\t}\n\telse if (OTHER in cases) {\n\t\treturn format(cases[OTHER], values);\n\t}\n\n\treturn value;\n}\n","import { unEscapeHtml } from './utilities';\n\nexport default function defaultRichHandler(tag, values, contents) {\n\treturn `<${tag}>${unEscapeHtml(contents)}</${tag}>`;\n}\n","import { MessageFormatter } from '@ultraq/icu-message-formatter';\nimport { flatten } from '@ultraq/array-utils';\n\nimport defaultRichHandler from './defaultRichHandler';\nimport { replaceRichTags, sanitizeValues } from './utilities';\n\nexport default class RichMessageFormatter extends MessageFormatter {\n\tconstructor(locale, typeHandlers = {}, richHandler = null) {\n\t\tsuper(locale, typeHandlers);\n\t\tthis.richHandler = richHandler ? richHandler : defaultRichHandler;\n\t}\n\n\trich(message, values = {}) {\n\t\tconst cleanedValues = sanitizeValues(values);\n\n\t\tconst formatted = flatten(this.process(message, cleanedValues));\n\n\t\t// TODO\n\t\t// Should be a symbol but isn't because of conversion issues.\n\t\t// We use a random string instead. \n\t\tlet sym = Math.random().toString(36) + Math.random().toString(36) + Math.random().toString(36);\n\t\tconst fakeValues = Object.fromEntries(Object.entries(values).map(([key, _value]) => [key, sym]));\n\t\tconst formattedFake = flatten(this.process(message, fakeValues));\n\t\tconst replaceFake = replaceRichTags(formattedFake, fakeValues, () => sym);\n\t\tconst originalTemplateSegmentIndices = replaceFake.map((v, i) => v === sym ? null: i).filter(i => i !== null);\n\n\t\treturn replaceRichTags(formatted, cleanedValues, this.richHandler, originalTemplateSegmentIndices);\n\t}\n}\n","/* \n * Copyright 2019, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {findClosingBracket, splitFormattedArgument} from './utilities.js';\n\nimport {flatten} from '@ultraq/array-utils';\nimport {memoize} from '@ultraq/function-utils';\n\n/**\n * The main class for formatting messages.\n * \n * @author Emanuel Rabina\n */\nexport default class MessageFormatter {\n\n\t/**\n\t * Creates a new formatter that can work using any of the custom type handlers\n\t * you register.\n\t * \n\t * @param {String} locale\n\t * @param {Object} [typeHandlers={}]\n\t *   Optional object where the keys are the names of the types to register,\n\t *   their values being the functions that will return a nicely formatted\n\t *   string for the data and locale they are given.\n\t */\n\tconstructor(locale, typeHandlers = {}) {\n\n\t\tthis.locale = locale;\n\t\tthis.typeHandlers = typeHandlers;\n\t}\n\n\t/**\n\t * Formats an ICU message syntax string using `values` for placeholder data\n\t * and any currently-registered type handlers.\n\t * \n\t * @param {String} message\n\t * @param {Object} [values={}]\n\t * @return {String}\n\t */\n\tformat = memoize((message, values = {}) => {\n\n\t\treturn flatten(this.process(message, values)).join('');\n\t})\n\n\t/**\n\t * Process an ICU message syntax string using `values` for placeholder data\n\t * and any currently-registered type handlers.  The result of this method is\n\t * an array of the component parts after they have been processed in turn by\n\t * their own type handlers.  This raw output is useful for other renderers,\n\t * eg: React where components can be used instead of being forced to return\n\t * raw strings.\n\t * \n\t * This method is used by {@link MessageFormatter#format} where it acts as a\n\t * string renderer.\n\t * \n\t * @param {String} message\n\t * @param {Object} [values={}]\n\t * @return {Array}\n\t */\n\tprocess(message, values = {}) {\n\n\t\tif (!message) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet blockStartIndex = message.indexOf('{');\n\t\tif (blockStartIndex !== -1) {\n\t\t\tlet blockEndIndex = findClosingBracket(message, blockStartIndex);\n\t\t\tif (blockEndIndex !== -1) {\n\t\t\t\tlet block = message.substring(blockStartIndex, blockEndIndex + 1);\n\t\t\t\tif (block) {\n\t\t\t\t\tlet result = [];\n\t\t\t\t\tlet head = message.substring(0, blockStartIndex);\n\t\t\t\t\tif (head) {\n\t\t\t\t\t\tresult.push(head);\n\t\t\t\t\t}\n\t\t\t\t\tlet [key, type, format] = splitFormattedArgument(block);\n\t\t\t\t\tlet body = values[key];\n\t\t\t\t\tif (body === null || body === undefined) {\n\t\t\t\t\t\tbody = '';\n\t\t\t\t\t}\n\t\t\t\t\tlet typeHandler = type && this.typeHandlers[type];\n\t\t\t\t\tresult.push(typeHandler ?\n\t\t\t\t\t\ttypeHandler(body, format, this.locale, values, this.process.bind(this)) :\n\t\t\t\t\t\tbody);\n\t\t\t\t\tlet tail = message.substring(blockEndIndex + 1);\n\t\t\t\t\tif (tail) {\n\t\t\t\t\t\tresult.push(this.process(tail, values));\n\t\t\t\t\t}\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new Error(`Unbalanced curly braces in string: \"${message}\"`);\n\t\t\t}\n\t\t}\n\t\treturn [message];\n\t}\n}\n","import { unEscapeHtml } from './utilities';\n\nexport default function mithrilRichHandler(tag, values, contents) {\n\tconst vnode = values[tag] || m(tag);\n\tlet children = unEscapeHtml(m.fragment(contents).children);\n\treturn { ...vnode, children };\n}\n","import { RichMessageFormatter, mithrilRichHandler } from '@askvortsov/rich-icu-message-formatter';\nimport { pluralTypeHandler, selectTypeHandler } from '@ultraq/icu-message-formatter';\nimport username from './helpers/username';\nimport User from './models/User';\nimport extract from './utils/extract';\n\ntype Translations = Record<string, string>;\ntype TranslatorParameters = Record<string, unknown>;\n\nexport default class Translator {\n  /**\n   * A map of translation keys to their translated values.\n   */\n  translations: Translations = {};\n\n  /**\n   * The underlying ICU MessageFormatter util.\n   */\n  protected formatter = new RichMessageFormatter(null, this.formatterTypeHandlers(), mithrilRichHandler);\n\n  /**\n   * Sets the formatter's locale to the provided value.\n   */\n  setLocale(locale: string) {\n    this.formatter.locale = locale;\n  }\n\n  /**\n   * Returns the formatter's current locale.\n   */\n  getLocale() {\n    return this.formatter.locale;\n  }\n\n  addTranslations(translations: Translations) {\n    Object.assign(this.translations, translations);\n  }\n\n  /**\n   * An extensible entrypoint for extenders to register type handlers for translations.\n   */\n  protected formatterTypeHandlers() {\n    return {\n      plural: pluralTypeHandler,\n      select: selectTypeHandler,\n    };\n  }\n\n  /**\n   * A temporary system to preprocess parameters.\n   * Should not be used by extensions.\n   * TODO: An extender will be added in v1.x.\n   *\n   * @internal\n   */\n  protected preprocessParameters(parameters: TranslatorParameters) {\n    // If we've been given a user model as one of the input parameters, then\n    // we'll extract the username and use that for the translation. In the\n    // future there should be a hook here to inspect the user and change the\n    // translation key. This will allow a gender property to determine which\n    // translation key is used.\n\n    if ('user' in parameters) {\n      const user = extract(parameters, 'user') as User;\n\n      if (!parameters.username) parameters.username = username(user);\n    }\n\n    return parameters;\n  }\n\n  trans(id: string, parameters: TranslatorParameters = {}) {\n    const translation = this.translations[id];\n\n    if (translation) {\n      parameters = this.preprocessParameters(parameters);\n      return this.formatter.rich(translation, parameters);\n    }\n\n    return id;\n  }\n}\n","import app from '../common/app';\nimport { FlarumRequestOptions } from './Application';\nimport { fireDeprecationWarning } from './helpers/fireDebugWarning';\nimport Model, { ModelData, SavedModelData } from './Model';\n\nexport interface MetaInformation {\n  [key: string]: any;\n}\n\nexport interface ApiQueryParamsSingle {\n  fields?: string[];\n  include?: string;\n  bySlug?: boolean;\n  meta?: MetaInformation;\n}\n\nexport interface ApiQueryParamsPlural {\n  fields?: string[];\n  include?: string;\n  filter?:\n    | {\n        q: string;\n      }\n    | Record<string, string>;\n  page?: {\n    near?: number;\n    offset?: number;\n    number?: number;\n    limit?: number;\n    size?: number;\n  };\n  sort?: string;\n  meta?: MetaInformation;\n}\n\nexport type ApiQueryParams = ApiQueryParamsPlural | ApiQueryParamsSingle;\n\nexport interface ApiPayloadSingle {\n  data: SavedModelData;\n  included?: SavedModelData[];\n  meta?: MetaInformation;\n}\n\nexport interface ApiPayloadPlural {\n  data: SavedModelData[];\n  included?: SavedModelData[];\n  links?: {\n    first: string;\n    next?: string;\n    prev?: string;\n  };\n  meta?: MetaInformation;\n}\n\nexport type ApiPayload = ApiPayloadSingle | ApiPayloadPlural;\n\nexport type ApiResponseSingle<M extends Model> = M & { payload: ApiPayloadSingle };\nexport type ApiResponsePlural<M extends Model> = M[] & { payload: ApiPayloadPlural };\nexport type ApiResponse<M extends Model> = ApiResponseSingle<M> | ApiResponsePlural<M>;\n\ninterface ApiQueryRequestOptions<ResponseType> extends Omit<FlarumRequestOptions<ResponseType>, 'url'> {}\n\ninterface StoreData {\n  [type: string]: Partial<Record<string, Model>>;\n}\n\nexport function payloadIsPlural(payload: ApiPayload): payload is ApiPayloadPlural {\n  return Array.isArray((payload as ApiPayloadPlural).data);\n}\n\n/**\n * The `Store` class defines a local data store, and provides methods to\n * retrieve data from the API.\n */\nexport default class Store {\n  /**\n   * The local data store. A tree of resource types to IDs, such that\n   * accessing data[type][id] will return the model for that type/ID.\n   */\n  protected data: StoreData = {};\n\n  /**\n   * The model registry. A map of resource types to the model class that\n   * should be used to represent resources of that type.\n   */\n  models: Record<string, { new (): Model }>;\n\n  constructor(models: Record<string, { new (): Model }>) {\n    this.models = models;\n  }\n\n  /**\n   * Push resources contained within an API payload into the store.\n   *\n   * @return The model(s) representing the resource(s) contained\n   *     within the 'data' key of the payload.\n   */\n  pushPayload<M extends Model>(payload: ApiPayloadSingle): ApiResponseSingle<M>;\n  pushPayload<Ms extends Model[]>(payload: ApiPayloadPlural): ApiResponsePlural<Ms[number]>;\n  pushPayload<M extends Model | Model[]>(payload: ApiPayload): ApiResponse<FlatArray<M, 1>> {\n    if (payload.included) payload.included.map(this.pushObject.bind(this));\n\n    const models = payload.data instanceof Array ? payload.data.map((o) => this.pushObject(o, false)) : this.pushObject(payload.data, false);\n    const result = models as ApiResponse<FlatArray<M, 1>>;\n\n    // Attach the original payload to the model that we give back. This is\n    // useful to consumers as it allows them to access meta information\n    // associated with their request.\n    result.payload = payload;\n\n    return result;\n  }\n\n  /**\n   * Create a model to represent a resource object (or update an existing one),\n   * and push it into the store.\n   *\n   * @param data The resource object\n   * @return The model, or null if no model class has been\n   *     registered for this resource type.\n   */\n  pushObject<M extends Model>(data: SavedModelData): M | null;\n  pushObject<M extends Model>(data: SavedModelData, allowUnregistered: false): M;\n  pushObject<M extends Model>(data: SavedModelData, allowUnregistered = true): M | null {\n    if (!this.models[data.type]) {\n      if (!allowUnregistered) {\n        setTimeout(() =>\n          fireDeprecationWarning(`Pushing object of type \\`${data.type}\\` not allowed, as type not yet registered in the store.`, '3206')\n        );\n      }\n\n      return null;\n    }\n\n    const type = (this.data[data.type] = this.data[data.type] || {});\n\n    // Necessary for TS to narrow correctly.\n    const curr = type[data.id] as M;\n    const instance = curr ? curr.pushData(data) : this.createRecord<M>(data.type, data);\n\n    type[data.id] = instance;\n    instance.exists = true;\n\n    return instance;\n  }\n\n  /**\n   * Make a request to the API to find record(s) of a specific type.\n   */\n  async find<M extends Model>(type: string, params?: ApiQueryParamsSingle): Promise<ApiResponseSingle<M>>;\n  async find<Ms extends Model[]>(type: string, params?: ApiQueryParamsPlural): Promise<ApiResponsePlural<Ms[number]>>;\n  async find<M extends Model>(\n    type: string,\n    id: string,\n    params?: ApiQueryParamsSingle,\n    options?: ApiQueryRequestOptions<ApiPayloadSingle>\n  ): Promise<ApiResponseSingle<M>>;\n  async find<Ms extends Model[]>(\n    type: string,\n    ids: string[],\n    params?: ApiQueryParamsPlural,\n    options?: ApiQueryRequestOptions<ApiPayloadPlural>\n  ): Promise<ApiResponsePlural<Ms[number]>>;\n  async find<M extends Model | Model[]>(\n    type: string,\n    idOrParams: undefined | string | string[] | ApiQueryParams,\n    query: ApiQueryParams = {},\n    options: ApiQueryRequestOptions<M extends Array<infer _T> ? ApiPayloadPlural : ApiPayloadSingle> = {}\n  ): Promise<ApiResponse<FlatArray<M, 1>>> {\n    let params = query;\n    let url = app.forum.attribute('apiUrl') + '/' + type;\n\n    if (idOrParams instanceof Array) {\n      url += '?filter[id]=' + idOrParams.join(',');\n    } else if (typeof idOrParams === 'object') {\n      params = idOrParams;\n    } else if (idOrParams) {\n      url += '/' + idOrParams;\n    }\n\n    return app\n      .request<M extends Array<infer _T> ? ApiPayloadPlural : ApiPayloadSingle>({\n        method: 'GET',\n        url,\n        params,\n        ...options,\n      })\n      .then((payload) => {\n        if (payloadIsPlural(payload)) {\n          return this.pushPayload<FlatArray<M, 1>[]>(payload);\n        } else {\n          return this.pushPayload<FlatArray<M, 1>>(payload);\n        }\n      });\n  }\n\n  /**\n   * Get a record from the store by ID.\n   */\n  getById<M extends Model>(type: string, id: string): M | undefined {\n    return this.data?.[type]?.[id] as M;\n  }\n\n  /**\n   * Get a record from the store by the value of a model attribute.\n   *\n   * @param type The resource type.\n   * @param key The name of the method on the model.\n   * @param value The value of the model attribute.\n   */\n  getBy<M extends Model, T = unknown>(type: string, key: keyof M, value: T): M | undefined {\n    // @ts-expect-error No way to do this safely, unfortunately.\n    return this.all(type).filter((model) => model[key]() === value)[0] as M;\n  }\n\n  /**\n   * Get all loaded records of a specific type.\n   */\n  all<M extends Model>(type: string): M[] {\n    const records = this.data[type];\n\n    return records ? (Object.values(records) as M[]) : [];\n  }\n\n  /**\n   * Remove the given model from the store.\n   */\n  remove(model: Model): void {\n    delete this.data[model.data.type as string][model.id() as string];\n  }\n\n  /**\n   * Create a new record of the given type.\n   *\n   * @param type The resource type\n   * @param data Any data to initialize the model with\n   */\n  createRecord<M extends Model>(type: string, data: ModelData = {}): M {\n    data.type = data.type || type;\n\n    // @ts-expect-error this will complain about initializing abstract models,\n    // but we can safely assume that all models registered with the store are\n    // not abstract.\n    return new this.models[type](data, this);\n  }\n}\n","import app from '../common/app';\nimport User from './models/User';\nimport { FlarumRequestOptions } from './Application';\n\nexport type LoginParams = {\n  /**\n   * The username/email\n   */\n  identification: string;\n  password: string;\n  remember: boolean;\n};\n\n/**\n * The `Session` class defines the current user session. It stores a reference\n * to the current authenticated user, and provides methods to log in/out.\n */\nexport default class Session {\n  /**\n   * The current authenticated user.\n   */\n  user: User | null;\n\n  /**\n   * The CSRF token.\n   */\n  csrfToken: string;\n\n  constructor(user: User | null, csrfToken: string) {\n    this.user = user;\n    this.csrfToken = csrfToken;\n  }\n\n  /**\n   * Attempt to log in a user.\n   */\n  login(body: LoginParams, options: Omit<FlarumRequestOptions<any>, 'url' | 'body' | 'method'> = {}) {\n    return app.request({\n      method: 'POST',\n      url: `${app.forum.attribute('baseUrl')}/login`,\n      body,\n      ...options,\n    });\n  }\n\n  /**\n   * Log the user out.\n   */\n  logout() {\n    window.location.href = `${app.forum.attribute('baseUrl')}/logout?token=${this.csrfToken}`;\n  }\n}\n","import { createFocusTrap } from './focusTrap';\n\n/**\n * The `Drawer` class controls the page's drawer. The drawer is the area the\n * slides out from the left on mobile devices; it contains the header and the\n * footer.\n */\nexport default class Drawer {\n  /**\n   * @type {import('./focusTrap').FocusTrap}\n   */\n  focusTrap;\n\n  /**\n   * @type {HTMLDivElement}\n   */\n  appElement;\n\n  constructor() {\n    // Set up an event handler so that whenever the content area is tapped,\n    // the drawer will close.\n    document.getElementById('content').addEventListener('click', (e) => {\n      if (this.isOpen()) {\n        e.preventDefault();\n        this.hide();\n      }\n    });\n\n    this.appElement = document.getElementById('app');\n    // Despite the `focus-trap` documentation, both `clickOutsideDeactivates`\n    // and `allowOutsideClick` are necessary so that inputs in modals triggered\n    // from the drawer's nav components can be interacted with.\n    this.focusTrap = createFocusTrap('#drawer', { allowOutsideClick: true, clickOutsideDeactivates: true });\n    this.drawerAvailableMediaQuery = window.matchMedia(\n      `(max-width: ${getComputedStyle(document.documentElement).getPropertyValue('--screen-phone-max')})`\n    );\n  }\n\n  /**\n   * Handler for the `resize` event on `window`.\n   *\n   * This is used to close the drawer when the viewport is widened past the `phone` size.\n   * At this point, the drawer turns into the standard header that we see on desktop, but\n   * the drawer is still registered as 'open' internally.\n   *\n   * This causes issues with the focus trap, resulting in focus becoming trapped within\n   * the header on desktop viewports.\n   *\n   * @internal\n   */\n  resizeHandler = ((e) => {\n    if (!e.matches && this.isOpen()) {\n      // Drawer is open but we've made window bigger, so hide it.\n      this.hide();\n    }\n  }).bind(this);\n\n  /**\n   * @internal\n   * @type {MediaQueryList}\n   */\n  drawerAvailableMediaQuery;\n\n  /**\n   * Check whether or not the drawer is currently open.\n   *\n   * @return {boolean}\n   */\n  isOpen() {\n    return this.appElement.classList.contains('drawerOpen');\n  }\n\n  /**\n   * Hide the drawer.\n   */\n  hide() {\n    /**\n     * As part of hiding the drawer, this function also ensures that the drawer\n     * correctly animates out, while ensuring it is not part of the navigation\n     * tree while off-screen.\n     *\n     * More info: https://github.com/flarum/core/pull/2666#discussion_r595381014\n     */\n\n    this.focusTrap.deactivate();\n    this.drawerAvailableMediaQuery.removeListener(this.resizeHandler);\n\n    if (!this.isOpen()) return;\n\n    const $drawer = $('#drawer');\n\n    // Used to prevent `visibility: hidden` from breaking the exit animation\n    $drawer.css('visibility', 'visible').one('transitionend', () => $drawer.css('visibility', ''));\n\n    this.appElement.classList.remove('drawerOpen');\n\n    this.$backdrop?.remove?.();\n  }\n\n  /**\n   * Show the drawer.\n   */\n  show() {\n    this.appElement.classList.add('drawerOpen');\n\n    this.drawerAvailableMediaQuery.addListener(this.resizeHandler);\n\n    this.$backdrop = $('<div/>').addClass('drawer-backdrop fade').appendTo('body').on('click', this.hide.bind(this));\n\n    requestAnimationFrame(() => {\n      this.$backdrop.addClass('in');\n\n      this.focusTrap.activate();\n    });\n  }\n}\n","import type { FlarumGenericRoute, RouteResolver } from '../Application';\nimport type Component from '../Component';\nimport DefaultResolver from '../resolvers/DefaultResolver';\n\n/**\n * The `mapRoutes` utility converts a map of named application routes into a\n * format that can be understood by Mithril, and wraps them in route resolvers\n * to provide each route with the current route name.\n *\n * @see https://mithril.js.org/route.html#signature\n */\nexport default function mapRoutes(routes: Record<string, FlarumGenericRoute>, basePath: string = '') {\n  const map: Record<\n    string,\n    RouteResolver<Record<string, unknown>, Component<{ routeName: string; [key: string]: unknown }>, Record<string, unknown>>\n  > = {};\n\n  for (const routeName in routes) {\n    const route = routes[routeName];\n\n    if ('resolver' in route) {\n      map[basePath + route.path] = route.resolver;\n    } else if ('component' in route) {\n      const resolverClass = 'resolverClass' in route ? route.resolverClass! : DefaultResolver;\n      map[basePath + route.path] = new resolverClass(route.component, routeName);\n    } else {\n      throw new Error(`Either a resolver or a component must be provided for the route [${routeName}]`);\n    }\n  }\n\n  return map;\n}\n","import type Mithril from 'mithril';\nimport type { AlertAttrs } from '../components/Alert';\n\nexport type InternalFlarumRequestOptions<ResponseType> = Mithril.RequestOptions<ResponseType> & {\n  url: string;\n};\n\nexport default class RequestError<ResponseType = string> {\n  status: number;\n  options: InternalFlarumRequestOptions<ResponseType>;\n  xhr: XMLHttpRequest;\n\n  responseText: string | null;\n  response: {\n    [key: string]: unknown;\n    errors?: {\n      detail?: string;\n      code?: string;\n      [key: string]: unknown;\n    }[];\n  } | null;\n\n  alert: AlertAttrs | null;\n\n  constructor(status: number, responseText: string | null, options: InternalFlarumRequestOptions<ResponseType>, xhr: XMLHttpRequest) {\n    this.status = status;\n    this.responseText = responseText;\n    this.options = options;\n    this.xhr = xhr;\n\n    try {\n      this.response = JSON.parse(responseText ?? 'null');\n    } catch (e) {\n      this.response = null;\n    }\n\n    this.alert = null;\n  }\n}\n","import humanTime from './humanTime';\n\nfunction updateHumanTimes() {\n  $('[data-humantime]').each(function () {\n    const $this = $(this);\n    const ago = humanTime($this.attr('datetime'));\n\n    $this.html(ago);\n  });\n}\n\n/**\n * The `liveHumanTimes` initializer sets up a loop every 1 second to update\n * timestamps rendered with the `humanTime` helper.\n */\nexport default function liveHumanTimes() {\n  setInterval(updateHumanTimes, 10000);\n}\n","/**\n * Extend an object's method by running its output through a mutating callback\n * every time it is called.\n *\n * The callback accepts the method's return value and should perform any\n * mutations directly on this value. For this reason, this function will not be\n * effective on methods which return scalar values (numbers, strings, booleans).\n *\n * Care should be taken to extend the correct object – in most cases, a class'\n * prototype will be the desired target of extension, not the class itself.\n *\n * @example <caption>Example usage of extending one method.</caption>\n * extend(Discussion.prototype, 'badges', function(badges) {\n *   // do something with `badges`\n * });\n *\n * @example <caption>Example usage of extending multiple methods.</caption>\n * extend(IndexPage.prototype, ['oncreate', 'onupdate'], function(vnode) {\n *   // something that needs to be run on creation and update\n * });\n *\n * @param object The object that owns the method\n * @param methods The name or names of the method(s) to extend\n * @param callback A callback which mutates the method's output\n */\nexport function extend<T extends Record<string, any>, K extends KeyOfType<T, Function>>(\n  object: T,\n  methods: K | K[],\n  callback: (this: T, val: ReturnType<T[K]>, ...args: Parameters<T[K]>) => void\n) {\n  const allMethods = Array.isArray(methods) ? methods : [methods];\n\n  allMethods.forEach((method: K) => {\n    const original: Function | undefined = object[method];\n\n    object[method] = function (this: T, ...args: Parameters<T[K]>) {\n      const value = original ? original.apply(this, args) : undefined;\n\n      callback.apply(this, [value, ...args]);\n\n      return value;\n    } as T[K];\n\n    Object.assign(object[method], original);\n  });\n}\n\n/**\n * Override an object's method by replacing it with a new function, so that the\n * new function will be run every time the object's method is called.\n *\n * The replacement function accepts the original method as its first argument,\n * which is like a call to `super`. Any arguments passed to the original method\n * are also passed to the replacement.\n *\n * Care should be taken to extend the correct object – in most cases, a class'\n * prototype will be the desired target of extension, not the class itself.\n *\n * @example <caption>Example usage of overriding one method.</caption>\n * override(Discussion.prototype, 'badges', function(original) {\n *   const badges = original();\n *   // do something with badges\n *   return badges;\n * });\n *\n * @example <caption>Example usage of overriding multiple methods.</caption>\n * extend(Discussion.prototype, ['oncreate', 'onupdate'], function(original, vnode) {\n *   // something that needs to be run on creation and update\n * });\n *\n * @param object The object that owns the method\n * @param methods The name or names of the method(s) to override\n * @param newMethod The method to replace it with\n */\nexport function override<T extends Record<any, any>, K extends KeyOfType<T, Function>>(\n  object: T,\n  methods: K | K[],\n  newMethod: (this: T, orig: T[K], ...args: Parameters<T[K]>) => void\n) {\n  const allMethods = Array.isArray(methods) ? methods : [methods];\n\n  allMethods.forEach((method) => {\n    const original: Function = object[method];\n\n    object[method] = function (this: T, ...args: Parameters<T[K]>) {\n      return newMethod.apply(this, [original.bind(this), ...args]);\n    } as T[K];\n\n    Object.assign(object[method], original);\n  });\n}\n","import Model from '../Model';\n\nexport default class Forum extends Model {\n  apiEndpoint() {\n    return '/';\n  }\n}\n","type RGB = { r: number; g: number; b: number };\n\nfunction hsvToRgb(h: number, s: number, v: number): RGB {\n  let r!: number;\n  let g!: number;\n  let b!: number;\n\n  const i = Math.floor(h * 6);\n  const f = h * 6 - i;\n  const p = v * (1 - s);\n  const q = v * (1 - f * s);\n  const t = v * (1 - (1 - f) * s);\n\n  switch (i % 6) {\n    case 0:\n      r = v;\n      g = t;\n      b = p;\n      break;\n    case 1:\n      r = q;\n      g = v;\n      b = p;\n      break;\n    case 2:\n      r = p;\n      g = v;\n      b = t;\n      break;\n    case 3:\n      r = p;\n      g = q;\n      b = v;\n      break;\n    case 4:\n      r = t;\n      g = p;\n      b = v;\n      break;\n    case 5:\n      r = v;\n      g = p;\n      b = q;\n      break;\n  }\n\n  return {\n    r: Math.floor(r * 255),\n    g: Math.floor(g * 255),\n    b: Math.floor(b * 255),\n  };\n}\n\n/**\n * Convert the given string to a unique color.\n */\nexport default function stringToColor(string: string): string {\n  let num = 0;\n\n  // Convert the username into a number based on the ASCII value of each\n  // character.\n  for (let i = 0; i < string.length; i++) {\n    num += string.charCodeAt(i);\n  }\n\n  // Construct a color using the remainder of that number divided by 360, and\n  // some predefined saturation and value values.\n  const hue = num % 360;\n  const rgb = hsvToRgb(hue / 360, 0.3, 0.9);\n\n  return '' + rgb.r.toString(16) + rgb.g.toString(16) + rgb.b.toString(16);\n}\n","import ColorThief, { Color } from 'color-thief-browser';\n\nimport Model from '../Model';\nimport stringToColor from '../utils/stringToColor';\nimport ItemList from '../utils/ItemList';\nimport computed from '../utils/computed';\nimport GroupBadge from '../components/GroupBadge';\nimport Mithril from 'mithril';\nimport Group from './Group';\n\nexport default class User extends Model {\n  username() {\n    return Model.attribute<string>('username').call(this);\n  }\n  slug() {\n    return Model.attribute<string>('slug').call(this);\n  }\n  displayName() {\n    return Model.attribute<string>('displayName').call(this);\n  }\n\n  email() {\n    return Model.attribute<string | undefined>('email').call(this);\n  }\n  isEmailConfirmed() {\n    return Model.attribute<boolean | undefined>('isEmailConfirmed').call(this);\n  }\n\n  password() {\n    return Model.attribute<string | undefined>('password').call(this);\n  }\n\n  avatarUrl() {\n    return Model.attribute<string | null>('avatarUrl').call(this);\n  }\n\n  preferences() {\n    return Model.attribute<Record<string, any> | null | undefined>('preferences').call(this);\n  }\n\n  groups() {\n    return Model.hasMany<Group>('groups').call(this);\n  }\n\n  isAdmin() {\n    return Model.attribute<boolean | undefined>('isAdmin').call(this);\n  }\n\n  joinTime() {\n    return Model.attribute('joinTime', Model.transformDate).call(this);\n  }\n\n  lastSeenAt() {\n    return Model.attribute('lastSeenAt', Model.transformDate).call(this);\n  }\n\n  markedAllAsReadAt() {\n    return Model.attribute('markedAllAsReadAt', Model.transformDate).call(this);\n  }\n\n  unreadNotificationCount() {\n    return Model.attribute<number | undefined>('unreadNotificationCount').call(this);\n  }\n  newNotificationCount() {\n    return Model.attribute<number | undefined>('newNotificationCount').call(this);\n  }\n\n  discussionCount() {\n    return Model.attribute<number | undefined>('discussionCount').call(this);\n  }\n  commentCount() {\n    return Model.attribute<number | undefined>('commentCount').call(this);\n  }\n\n  canEdit() {\n    return Model.attribute<boolean | undefined>('canEdit').call(this);\n  }\n  canEditCredentials() {\n    return Model.attribute<boolean | undefined>('canEditCredentials').call(this);\n  }\n  canEditGroups() {\n    return Model.attribute<boolean | undefined>('canEditGroups').call(this);\n  }\n  canDelete() {\n    return Model.attribute<boolean | undefined>('canDelete').call(this);\n  }\n\n  color() {\n    return computed<string, User>('displayName', 'avatarUrl', 'avatarColor', (displayName, avatarUrl, avatarColor) => {\n      // If we've already calculated and cached the dominant color of the user's\n      // avatar, then we can return that in RGB format. If we haven't, we'll want\n      // to calculate it. Unless the user doesn't have an avatar, in which case\n      // we generate a color from their display name.\n      if (avatarColor) {\n        return `rgb(${(avatarColor as Color).join(', ')})`;\n      } else if (avatarUrl) {\n        this.calculateAvatarColor();\n        return '';\n      }\n\n      return '#' + stringToColor(displayName as string);\n    }).call(this);\n  }\n\n  protected avatarColor: Color | null = null;\n\n  /**\n   * Check whether or not the user has been seen in the last 5 minutes.\n   */\n  isOnline(): boolean {\n    return dayjs().subtract(5, 'minutes').isBefore(this.lastSeenAt());\n  }\n\n  /**\n   * Get the Badge components that apply to this user.\n   */\n  badges(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n    const groups = this.groups();\n\n    if (groups) {\n      groups.forEach((group) => {\n        items.add(`group${group?.id()}`, <GroupBadge group={group} />);\n      });\n    }\n\n    return items;\n  }\n\n  /**\n   * Calculate the dominant color of the user's avatar. The dominant color will\n   * be set to the `avatarColor` property once it has been calculated.\n   */\n  protected calculateAvatarColor() {\n    const image = new Image();\n    const user = this;\n\n    image.addEventListener('load', function (this: HTMLImageElement) {\n      try {\n        const colorThief = new ColorThief();\n        user.avatarColor = colorThief.getColor(this);\n      } catch (e) {\n        // Completely white avatars throw errors due to a glitch in color thief\n        // See https://github.com/lokesh/color-thief/issues/40\n        if (e instanceof TypeError) {\n          user.avatarColor = [255, 255, 255];\n        } else {\n          throw e;\n        }\n      }\n      user.freshness = new Date();\n      m.redraw();\n    });\n    image.crossOrigin = 'anonymous';\n    image.src = this.avatarUrl() ?? '';\n  }\n\n  /**\n   * Update the user's preferences.\n   */\n  savePreferences(newPreferences: Record<string, unknown>): Promise<this> {\n    const preferences = this.preferences();\n\n    Object.assign(preferences ?? {}, newPreferences);\n\n    return this.save({ preferences });\n  }\n}\n","import Model from '../Model';\nimport computed from '../utils/computed';\nimport { getPlainContent } from '../utils/string';\nimport Discussion from './Discussion';\nimport User from './User';\n\nexport default class Post extends Model {\n  number() {\n    return Model.attribute<number>('number').call(this);\n  }\n  discussion() {\n    return Model.hasOne<Discussion>('discussion').call(this) as Discussion;\n  }\n\n  createdAt() {\n    return Model.attribute<Date, string>('createdAt', Model.transformDate).call(this);\n  }\n  user() {\n    return Model.hasOne<User>('user').call(this);\n  }\n\n  contentType() {\n    return Model.attribute<string | null>('contentType').call(this);\n  }\n  content() {\n    return Model.attribute<string | null | undefined>('content').call(this);\n  }\n  contentHtml() {\n    return Model.attribute<string | null | undefined>('contentHtml').call(this);\n  }\n  renderFailed() {\n    return Model.attribute<boolean | undefined>('renderFailed').call(this);\n  }\n  contentPlain() {\n    return computed<string | null | undefined>('contentHtml', (content) => {\n      if (typeof content === 'string') {\n        return getPlainContent(content);\n      }\n\n      return content as null | undefined;\n    }).call(this);\n  }\n\n  editedAt() {\n    return Model.attribute('editedAt', Model.transformDate).call(this);\n  }\n  editedUser() {\n    return Model.hasOne<User | null>('editedUser').call(this);\n  }\n  isEdited() {\n    return computed<boolean>('editedAt', (editedAt) => !!editedAt).call(this);\n  }\n\n  hiddenAt() {\n    return Model.attribute('hiddenAt', Model.transformDate).call(this);\n  }\n  hiddenUser() {\n    return Model.hasOne<User | null>('hiddenUser').call(this);\n  }\n  isHidden() {\n    return computed<boolean>('hiddenAt', (hiddenAt) => !!hiddenAt).call(this);\n  }\n\n  canEdit() {\n    return Model.attribute<boolean | undefined>('canEdit').call(this);\n  }\n  canHide() {\n    return Model.attribute<boolean | undefined>('canHide').call(this);\n  }\n  canDelete() {\n    return Model.attribute<boolean | undefined>('canDelete').call(this);\n  }\n}\n","import Model from '../Model';\nimport User from './User';\n\nexport default class Notification extends Model {\n  contentType() {\n    return Model.attribute<string>('contentType').call(this);\n  }\n  content<T = unknown>() {\n    return Model.attribute<T>('content').call(this);\n  }\n  createdAt() {\n    return Model.attribute<Date, string>('createdAt', Model.transformDate).call(this);\n  }\n\n  isRead() {\n    return Model.attribute<boolean>('isRead').call(this);\n  }\n\n  user() {\n    return Model.hasOne<User>('user').call(this);\n  }\n  fromUser() {\n    return Model.hasOne<User | null>('fromUser').call(this);\n  }\n  subject() {\n    return Model.hasOne<Model | null>('subject').call(this);\n  }\n}\n","import type Component from '../Component';\nimport Modal, { IDismissibleOptions } from '../components/Modal';\n\n/**\n * Ideally, `show` would take a higher-kinded generic, ala:\n *  `show<Attrs, C>(componentClass: C<Attrs>, attrs: Attrs): void`\n * Unfortunately, TypeScript does not support this:\n * https://github.com/Microsoft/TypeScript/issues/1213\n * Therefore, we have to use this ugly, messy workaround.\n */\ntype UnsafeModalClass = ComponentClass<any, Modal> & { get dismissibleOptions(): IDismissibleOptions; component: typeof Component.component };\n\ntype ModalItem = {\n  componentClass: UnsafeModalClass;\n  attrs?: Record<string, unknown>;\n  key: number;\n};\n\n/**\n * Class used to manage modal state.\n *\n * Accessible on the `app` object via `app.modal` property.\n */\nexport default class ModalManagerState {\n  /**\n   * @internal\n   */\n  modal: ModalItem | null = null;\n\n  /**\n   * @internal\n   */\n  modalList: ModalItem[] = [];\n\n  /**\n   * @internal\n   */\n  backdropShown: boolean = false;\n\n  /**\n   * Used to force re-initialization of modals if a modal\n   * is replaced by another of the same type.\n   */\n  private key = 0;\n\n  /**\n   * Shows a modal dialog.\n   *\n   * If `stackModal` is `true`, the modal will be shown on top of the current modal.\n   *\n   * If a value for `stackModal` is not provided, opening a new modal will close\n   * any others currently being shown for backwards compatibility.\n   *\n   * @example <caption>Show a modal</caption>\n   * app.modal.show(MyCoolModal, { attr: 'value' });\n   *\n   * @example <caption>Show a modal from a lifecycle method (`oncreate`, `view`, etc.)</caption>\n   * // This \"hack\" is needed due to quirks with nested redraws in Mithril.\n   * setTimeout(() => app.modal.show(MyCoolModal, { attr: 'value' }), 0);\n   *\n   * @example <caption>Stacking modals</caption>\n   * app.modal.show(MyCoolStackedModal, { attr: 'value' }, true);\n   */\n  show(componentClass: UnsafeModalClass, attrs: Record<string, unknown> = {}, stackModal: boolean = false): void {\n    if (!(componentClass.prototype instanceof Modal)) {\n      // This is duplicated so that if the error is caught, an error message still shows up in the debug console.\n      const invalidModalWarning = 'The ModalManager can only show Modals.';\n      console.error(invalidModalWarning);\n      throw new Error(invalidModalWarning);\n    }\n\n    this.backdropShown = true;\n    m.redraw.sync();\n\n    // We use requestAnimationFrame here, since we need to wait for the backdrop to be added\n    // to the DOM before actually adding the modal to the modal list.\n    //\n    // This is because we use RAF inside the ModalManager onupdate lifecycle hook, and if we\n    // skip this RAF call, the hook will attempt to add a focus trap as well as lock scroll\n    // onto the newly added modal before it's in the DOM, creating an extra scrollbar.\n    requestAnimationFrame(() => {\n      // Set current modal\n      this.modal = { componentClass, attrs, key: this.key++ };\n\n      // We want to stack this modal\n      if (stackModal) {\n        // Remember previously opened modal and add new modal to the modal list\n        this.modalList.push(this.modal);\n      } else {\n        // Override last modals\n        this.modalList = [this.modal];\n      }\n\n      m.redraw();\n    });\n  }\n\n  /**\n   * Closes the topmost currently open dialog, if one is open.\n   */\n  close(): void {\n    if (!this.modal) return;\n\n    // If there are two modals, remove the most recent one\n    if (this.modalList.length > 1) {\n      // Remove last modal from list\n      this.modalList.pop();\n\n      // Open last modal from list\n      this.modal = this.modalList[this.modalList.length - 1];\n    } else {\n      // Reset state\n      this.modal = null;\n      this.modalList = [];\n    }\n\n    m.redraw();\n  }\n\n  /**\n   * Checks if a modal is currently open.\n   *\n   * @return `true` if a modal dialog is currently open, otherwise `false`.\n   */\n  isModalOpen(): boolean {\n    return !!this.modal;\n  }\n}\n","import type Mithril from 'mithril';\nimport Alert, { AlertAttrs } from '../components/Alert';\n\n/**\n * Returned by `AlertManagerState.show`. Used to dismiss alerts.\n */\nexport type AlertIdentifier = number;\n\nexport type AlertArray = { [id: AlertIdentifier]: AlertState };\n\nexport interface AlertState {\n  componentClass: typeof Alert;\n  attrs: AlertAttrs;\n  children: Mithril.Children;\n}\n\nexport default class AlertManagerState {\n  protected activeAlerts: AlertArray = {};\n  protected alertId: AlertIdentifier = 0;\n\n  getActiveAlerts() {\n    return this.activeAlerts;\n  }\n\n  /**\n   * Show an Alert in the alerts area.\n   *\n   * @return The alert's ID, which can be used to dismiss the alert.\n   */\n  show(children: Mithril.Children): AlertIdentifier;\n  show(attrs: AlertAttrs, children: Mithril.Children): AlertIdentifier;\n  show(componentClass: typeof Alert, attrs: AlertAttrs, children: Mithril.Children): AlertIdentifier;\n\n  show(arg1: any, arg2?: any, arg3?: any) {\n    // Assigns variables as per the above signatures\n    let componentClass = Alert;\n    let attrs: AlertAttrs = {};\n    let children: Mithril.Children;\n\n    if (arguments.length == 1) {\n      children = arg1 as Mithril.Children;\n    } else if (arguments.length == 2) {\n      attrs = arg1 as AlertAttrs;\n      children = arg2 as Mithril.Children;\n    } else if (arguments.length == 3) {\n      componentClass = arg1 as typeof Alert;\n      attrs = arg2 as AlertAttrs;\n      children = arg3;\n    }\n\n    this.activeAlerts[++this.alertId] = { children, attrs, componentClass };\n    m.redraw();\n\n    return this.alertId;\n  }\n\n  /**\n   * Dismiss an alert.\n   */\n  dismiss(key: AlertIdentifier | null): void {\n    if (!key || !(key in this.activeAlerts)) return;\n\n    delete this.activeAlerts[key];\n    m.redraw();\n  }\n\n  /**\n   * Clear all alerts.\n   */\n  clear(): void {\n    this.activeAlerts = {};\n    m.redraw();\n  }\n}\n","import app from '../app';\n\n/**\n * Fire a Flarum error which is shown in the JS console for everyone and in an alert for the admin.\n *\n * @param userTitle: a user friendly title of the error, should be localized.\n * @param consoleTitle: an error title that goes in the console, doesn't have to be localized.\n * @param error: the error.\n */\nexport default function fireApplicationError(userTitle: string, consoleTitle: string, error: any) {\n  console.group(`%c${consoleTitle}`, 'background-color: #d83e3e; color: #ffffff; font-weight: bold;');\n  console.error(error);\n  console.groupEnd();\n\n  if (app.session?.user?.isAdmin()) {\n    app.alerts.show({ type: 'error' }, `${userTitle}`);\n  }\n}\n","import Model from '../Model';\n\nexport default class AccessToken extends Model {\n  token() {\n    return Model.attribute<string | undefined>('token').call(this);\n  }\n  userId() {\n    return Model.attribute<string>('userId').call(this);\n  }\n  title() {\n    return Model.attribute<string | null>('title').call(this);\n  }\n  type() {\n    return Model.attribute<string>('type').call(this);\n  }\n  createdAt() {\n    return Model.attribute<Date, string>('createdAt', Model.transformDate).call(this);\n  }\n  lastActivityAt() {\n    return Model.attribute<Date, string>('lastActivityAt', Model.transformDate).call(this);\n  }\n  lastIpAddress() {\n    return Model.attribute<string>('lastIpAddress').call(this);\n  }\n  device() {\n    return Model.attribute<string>('device').call(this);\n  }\n  isCurrent() {\n    return Model.attribute<boolean>('isCurrent').call(this);\n  }\n  isSessionToken() {\n    return Model.attribute<boolean>('isSessionToken').call(this);\n  }\n}\n","import app from '../common/app';\n\nimport ItemList from './utils/ItemList';\nimport Button from './components/Button';\nimport ModalManager from './components/ModalManager';\nimport AlertManager from './components/AlertManager';\nimport RequestErrorModal from './components/RequestErrorModal';\nimport Translator from './Translator';\nimport Store, { ApiPayload, ApiResponse, ApiResponsePlural, ApiResponseSingle, payloadIsPlural } from './Store';\nimport Session from './Session';\nimport extract from './utils/extract';\nimport extractText from './utils/extractText';\nimport Drawer from './utils/Drawer';\nimport mapRoutes from './utils/mapRoutes';\nimport RequestError, { InternalFlarumRequestOptions } from './utils/RequestError';\nimport ScrollListener from './utils/ScrollListener';\nimport liveHumanTimes from './utils/liveHumanTimes';\n// @ts-expect-error We need to explicitly use the prefix to distinguish between the extend folder.\nimport { extend } from './extend.ts';\n\nimport Forum from './models/Forum';\nimport User from './models/User';\nimport Discussion from './models/Discussion';\nimport Post from './models/Post';\nimport Group from './models/Group';\nimport Notification from './models/Notification';\nimport PageState from './states/PageState';\nimport ModalManagerState from './states/ModalManagerState';\nimport AlertManagerState from './states/AlertManagerState';\n\nimport type DefaultResolver from './resolvers/DefaultResolver';\nimport type Mithril from 'mithril';\nimport type Component from './Component';\nimport type { ComponentAttrs } from './Component';\nimport Model, { SavedModelData } from './Model';\nimport fireApplicationError from './helpers/fireApplicationError';\nimport IHistory from './IHistory';\nimport IExtender from './extenders/IExtender';\nimport AccessToken from './models/AccessToken';\n\nexport type FlarumScreens = 'phone' | 'tablet' | 'desktop' | 'desktop-hd';\n\nexport type FlarumGenericRoute = RouteItem<any, any, any>;\n\nexport interface FlarumRequestOptions<ResponseType> extends Omit<Mithril.RequestOptions<ResponseType>, 'extract'> {\n  errorHandler?: (error: RequestError) => void;\n  url: string;\n  // TODO: [Flarum 2.0] Remove deprecated option\n  /**\n   * Manipulate the response text before it is parsed into JSON.\n   *\n   * @deprecated Please use `modifyText` instead.\n   */\n  extract?: (responseText: string) => string;\n  /**\n   * Manipulate the response text before it is parsed into JSON.\n   *\n   * This overrides any `extract` method provided.\n   */\n  modifyText?: (responseText: string) => string;\n}\n\n/**\n * A valid route definition.\n */\nexport type RouteItem<\n  Attrs extends ComponentAttrs,\n  Comp extends Component<Attrs & { routeName: string }>,\n  RouteArgs extends Record<string, unknown> = {}\n> = {\n  /**\n   * The path for your route.\n   *\n   * This might be a specific URL path (e.g.,`/myPage`), or it might\n   * contain a variable used by a resolver (e.g., `/myPage/:id`).\n   *\n   * @see https://docs.flarum.org/extend/frontend-pages.html#route-resolvers-advanced\n   */\n  path: `/${string}`;\n} & (\n  | {\n      /**\n       * The component to render when this route matches.\n       */\n      component: new () => Comp;\n      /**\n       * A custom resolver class.\n       *\n       * This should be the class itself, and **not** an instance of the\n       * class.\n       */\n      resolverClass?: new (component: new () => Comp, routeName: string) => DefaultResolver<Attrs, Comp, RouteArgs>;\n    }\n  | {\n      /**\n       * An instance of a route resolver.\n       */\n      resolver: RouteResolver<Attrs, Comp, RouteArgs>;\n    }\n);\n\nexport interface RouteResolver<\n  Attrs extends ComponentAttrs,\n  Comp extends Component<Attrs & { routeName: string }>,\n  RouteArgs extends Record<string, unknown> = {}\n> {\n  /**\n   * A method which selects which component to render based on\n   * conditional logic.\n   *\n   * Returns the component class, and **not** a Vnode or JSX\n   * expression.\n   *\n   * @see https://mithril.js.org/route.html#routeresolveronmatch\n   */\n  onmatch(this: this, args: RouteArgs, requestedPath: string, route: string): { new (): Comp };\n  /**\n   * A function which renders the provided component.\n   *\n   * If not specified, the route will default to rendering the\n   * component on its own, inside of a fragment.\n   *\n   * Returns a Mithril Vnode or other children.\n   *\n   * @see https://mithril.js.org/route.html#routeresolverrender\n   */\n  render?(this: this, vnode: Mithril.Vnode<Attrs, Comp>): Mithril.Children;\n}\n\nexport interface ApplicationData {\n  apiDocument: ApiPayload | null;\n  locale: string;\n  locales: Record<string, string>;\n  resources: SavedModelData[];\n  session: { userId: number; csrfToken: string };\n  [key: string]: unknown;\n}\n\n/**\n * The `App` class provides a container for an application, as well as various\n * utilities for the rest of the app to use.\n */\nexport default class Application {\n  /**\n   * The forum model for this application.\n   */\n  forum!: Forum;\n\n  /**\n   * A map of routes, keyed by a unique route name. Each route is an object\n   * containing the following properties:\n   *\n   * - `path` The path that the route is accessed at.\n   * - `component` The Mithril component to render when this route is active.\n   *\n   * @example\n   * app.routes.discussion = { path: '/d/:id', component: DiscussionPage };\n   */\n  routes: Record<string, FlarumGenericRoute> = {};\n\n  /**\n   * An ordered list of initializers to bootstrap the application.\n   */\n  initializers: ItemList<(app: this) => void> = new ItemList();\n\n  /**\n   * The app's session.\n   *\n   * Stores info about the current user.\n   */\n  session!: Session;\n\n  /**\n   * The app's translator.\n   */\n  translator: Translator = new Translator();\n\n  /**\n   * The app's data store.\n   */\n  store: Store = new Store({\n    'access-tokens': AccessToken,\n    forums: Forum,\n    users: User,\n    discussions: Discussion,\n    posts: Post,\n    groups: Group,\n    notifications: Notification,\n  });\n\n  /**\n   * A local cache that can be used to store data at the application level, so\n   * that is persists between different routes.\n   */\n  cache: Record<string, unknown> = {};\n\n  /**\n   * Whether or not the app has been booted.\n   */\n  booted: boolean = false;\n\n  /**\n   * The page the app is currently on.\n   *\n   * This object holds information about the type of page we are currently\n   * visiting, and sometimes additional arbitrary page state that may be\n   * relevant to lower-level components.\n   */\n  current: PageState = new PageState(null);\n\n  /**\n   * The page the app was on before the current page.\n   *\n   * Once the application navigates to another page, the object previously\n   * assigned to this.current will be moved to this.previous, while this.current\n   * is re-initialized.\n   */\n  previous: PageState = new PageState(null);\n\n  /**\n   * An object that manages modal state.\n   */\n  modal: ModalManagerState = new ModalManagerState();\n\n  /**\n   * An object that manages the state of active alerts.\n   */\n  alerts: AlertManagerState = new AlertManagerState();\n\n  /**\n   * An object that manages the state of the navigation drawer.\n   */\n  drawer!: Drawer;\n\n  history: IHistory | null = null;\n  pane: any = null;\n\n  data!: ApplicationData;\n\n  refs: Record<string, string> = {\n    fontawesome: 'https://fontawesome.com/v5/search?o=r&m=free',\n  };\n\n  private _title: string = '';\n  private _titleCount: number = 0;\n\n  private set title(val: string) {\n    this._title = val;\n  }\n\n  get title() {\n    return this._title;\n  }\n\n  private set titleCount(val: number) {\n    this._titleCount = val;\n  }\n\n  get titleCount() {\n    return this._titleCount;\n  }\n\n  /**\n   * The key for an Alert that was shown as a result of an AJAX request error.\n   * If present, it will be dismissed on the next successful request.\n   */\n  private requestErrorAlert: number | null = null;\n\n  initialRoute!: string;\n\n  public load(payload: Application['data']) {\n    this.data = payload;\n    this.translator.setLocale(payload.locale);\n  }\n\n  public boot() {\n    const caughtInitializationErrors: CallableFunction[] = [];\n\n    this.initializers.toArray().forEach((initializer) => {\n      try {\n        initializer(this);\n      } catch (e) {\n        const extension = initializer.itemName.includes('/')\n          ? initializer.itemName.replace(/(\\/flarum-ext-)|(\\/flarum-)/g, '-')\n          : initializer.itemName;\n\n        caughtInitializationErrors.push(() =>\n          fireApplicationError(\n            extractText(app.translator.trans('core.lib.error.extension_initialiation_failed_message', { extension })),\n            `${extension} failed to initialize`,\n            e\n          )\n        );\n      }\n    });\n\n    this.store.pushPayload({ data: this.data.resources });\n\n    this.forum = this.store.getById('forums', '1')!;\n\n    this.session = new Session(this.store.getById<User>('users', String(this.data.session.userId)) ?? null, this.data.session.csrfToken);\n\n    this.mount();\n\n    this.initialRoute = window.location.href;\n\n    caughtInitializationErrors.forEach((handler) => handler());\n  }\n\n  public bootExtensions(extensions: Record<string, { extend?: IExtender[] }>) {\n    Object.keys(extensions).forEach((name) => {\n      const extension = extensions[name];\n\n      // If an extension doesn't define extenders, there's nothing more to do here.\n      if (!extension.extend) return;\n\n      const extenders = extension.extend.flat(Infinity);\n\n      for (const extender of extenders) {\n        extender.extend(this, { name, exports: extension });\n      }\n    });\n  }\n\n  protected mount(basePath: string = '') {\n    // An object with a callable view property is used in order to pass arguments to the component; see https://mithril.js.org/mount.html\n    m.mount(document.getElementById('modal')!, { view: () => <ModalManager state={this.modal} /> });\n    m.mount(document.getElementById('alerts')!, { view: () => <AlertManager state={this.alerts} /> });\n\n    this.drawer = new Drawer();\n\n    m.route(document.getElementById('content')!, basePath + '/', mapRoutes(this.routes, basePath));\n\n    const appEl = document.getElementById('app')!;\n    const appHeaderEl = document.querySelector('.App-header')!;\n\n    // Add a class to the body which indicates that the page has been scrolled\n    // down. When this happens, we'll add classes to the header and app body\n    // which will set the navbar's position to fixed. We don't want to always\n    // have it fixed, as that could overlap with custom headers.\n    const scrollListener = new ScrollListener((top: number) => {\n      const offset = appEl.getBoundingClientRect().top + document.body.scrollTop;\n\n      appEl.classList.toggle('affix', top >= offset);\n      appEl.classList.toggle('scrolled', top > offset);\n\n      appHeaderEl.classList.toggle('navbar-fixed-top', top >= offset);\n    });\n\n    scrollListener.start();\n    scrollListener.update();\n\n    document.body.classList.add('ontouchstart' in window ? 'touch' : 'no-touch');\n\n    liveHumanTimes();\n  }\n\n  /**\n   * Get the API response document that has been preloaded into the application.\n   */\n  preloadedApiDocument<M extends Model>(): ApiResponseSingle<M> | null;\n  preloadedApiDocument<Ms extends Model[]>(): ApiResponsePlural<Ms[number]> | null;\n  preloadedApiDocument<M extends Model | Model[]>(): ApiResponse<FlatArray<M, 1>> | null {\n    // If the URL has changed, the preloaded Api document is invalid.\n    if (this.data.apiDocument && window.location.href === this.initialRoute) {\n      const results = payloadIsPlural(this.data.apiDocument)\n        ? this.store.pushPayload<FlatArray<M, 1>[]>(this.data.apiDocument)\n        : this.store.pushPayload<FlatArray<M, 1>>(this.data.apiDocument);\n\n      this.data.apiDocument = null;\n\n      return results;\n    }\n\n    return null;\n  }\n\n  /**\n   * Determine the current screen mode, based on our media queries.\n   */\n  screen(): FlarumScreens {\n    const styles = getComputedStyle(document.documentElement);\n    return styles.getPropertyValue('--flarum-screen') as ReturnType<Application['screen']>;\n  }\n\n  /**\n   * Set the `<title>` of the page.\n   *\n   * @param title New page title\n   */\n  setTitle(title: string): void {\n    this.title = title;\n    this.updateTitle();\n  }\n\n  /**\n   * Set a number to display in the `<title>` of the page.\n   *\n   * @param count Number to display in title\n   */\n  setTitleCount(count: number): void {\n    this.titleCount = count;\n    this.updateTitle();\n  }\n\n  updateTitle(): void {\n    const count = this.titleCount ? `(${this.titleCount}) ` : '';\n    const onHomepage = m.route.get() === this.forum.attribute('basePath') + '/';\n\n    const params = {\n      pageTitle: this.title,\n      forumName: this.forum.attribute('title'),\n      // Until we add page numbers to the frontend, this is constant at 1\n      // so that the page number portion doesn't show up in the URL.\n      pageNumber: 1,\n    };\n\n    let title =\n      onHomepage || !this.title\n        ? extractText(app.translator.trans('core.lib.meta_titles.without_page_title', params))\n        : extractText(app.translator.trans('core.lib.meta_titles.with_page_title', params));\n\n    title = count + title;\n\n    // We pass the title through a DOMParser to allow HTML entities\n    // to be rendered correctly, while still preventing XSS attacks\n    // from user input by using a script-disabled environment.\n    // https://github.com/flarum/framework/issues/3514\n    // https://github.com/flarum/framework/pull/3684\n    // This is only a temporary solution for 1.x,\n    // and the actual source of the issue will be fixed in 2.x\n    // Actual source of the issue: https://github.com/flarum/framework/issues/3685\n    const parser = new DOMParser();\n    document.title = parser.parseFromString(title, 'text/html').body.innerText;\n  }\n\n  protected transformRequestOptions<ResponseType>(flarumOptions: FlarumRequestOptions<ResponseType>): InternalFlarumRequestOptions<ResponseType> {\n    const { background, deserialize, extract, modifyText, ...tmpOptions } = { ...flarumOptions };\n\n    // Unless specified otherwise, requests should run asynchronously in the\n    // background, so that they don't prevent redraws from occurring.\n    const defaultBackground = true;\n\n    // When we deserialize JSON data, if for some reason the server has provided\n    // a dud response, we don't want the application to crash. We'll show an\n    // error message to the user instead.\n\n    const defaultDeserialize = (response: string) => response as ResponseType;\n\n    // When extracting the data from the response, we can check the server\n    // response code and show an error message to the user if something's gone\n    // awry.\n    const originalExtract = modifyText || extract;\n\n    const options: InternalFlarumRequestOptions<ResponseType> = {\n      background: background ?? defaultBackground,\n      deserialize: deserialize ?? defaultDeserialize,\n      ...tmpOptions,\n    };\n\n    extend(options, 'config', (_: undefined, xhr: XMLHttpRequest) => {\n      xhr.setRequestHeader('X-CSRF-Token', this.session.csrfToken!);\n    });\n\n    // If the method is something like PATCH or DELETE, which not all servers\n    // and clients support, then we'll send it as a POST request with the\n    // intended method specified in the X-HTTP-Method-Override header.\n    if (options.method && !['GET', 'POST'].includes(options.method)) {\n      const method = options.method;\n\n      extend(options, 'config', (_: undefined, xhr: XMLHttpRequest) => {\n        xhr.setRequestHeader('X-HTTP-Method-Override', method);\n      });\n\n      options.method = 'POST';\n    }\n\n    options.extract = (xhr: XMLHttpRequest) => {\n      let responseText;\n\n      if (originalExtract) {\n        responseText = originalExtract(xhr.responseText);\n      } else {\n        responseText = xhr.responseText;\n      }\n\n      const status = xhr.status;\n\n      if (status < 200 || status > 299) {\n        throw new RequestError<ResponseType>(status, `${responseText}`, options, xhr);\n      }\n\n      if (xhr.getResponseHeader) {\n        const csrfToken = xhr.getResponseHeader('X-CSRF-Token');\n        if (csrfToken) app.session.csrfToken = csrfToken;\n      }\n\n      try {\n        if (responseText === '') {\n          return null;\n        }\n\n        return JSON.parse(responseText);\n      } catch (e) {\n        throw new RequestError<ResponseType>(500, `${responseText}`, options, xhr);\n      }\n    };\n\n    return options;\n  }\n\n  /**\n   * Make an AJAX request, handling any low-level errors that may occur.\n   *\n   * @see https://mithril.js.org/request.html\n   */\n  request<ResponseType>(originalOptions: FlarumRequestOptions<ResponseType>): Promise<ResponseType> {\n    const options = this.transformRequestOptions(originalOptions);\n\n    if (this.requestErrorAlert) this.alerts.dismiss(this.requestErrorAlert);\n\n    return m.request(options).catch((e) => this.requestErrorCatch(e, originalOptions.errorHandler));\n  }\n\n  /**\n   * By default, show an error alert, and log the error to the console.\n   */\n  protected requestErrorCatch<ResponseType>(error: RequestError, customErrorHandler: FlarumRequestOptions<ResponseType>['errorHandler']) {\n    // the details property is decoded to transform escaped characters such as '\\n'\n    const formattedErrors = error.response?.errors?.map((e) => decodeURI(e.detail ?? '')) ?? [];\n\n    let content;\n    switch (error.status) {\n      case 422:\n        content = formattedErrors\n          .map((detail) => [detail, <br />])\n          .flat()\n          .slice(0, -1);\n        break;\n\n      case 401:\n      case 403:\n        content = app.translator.trans('core.lib.error.permission_denied_message');\n        break;\n\n      case 404:\n      case 410:\n        content = app.translator.trans('core.lib.error.not_found_message');\n        break;\n\n      case 413:\n        content = app.translator.trans('core.lib.error.payload_too_large_message');\n        break;\n\n      case 429:\n        content = app.translator.trans('core.lib.error.rate_limit_exceeded_message');\n        break;\n\n      default:\n        if (this.requestWasCrossOrigin(error)) {\n          content = app.translator.trans('core.lib.error.generic_cross_origin_message');\n        } else {\n          content = app.translator.trans('core.lib.error.generic_message');\n        }\n    }\n\n    const isDebug: boolean = app.forum.attribute('debug');\n\n    error.alert = {\n      type: 'error',\n      content,\n      controls: isDebug && [\n        <Button className=\"Button Button--link\" onclick={this.showDebug.bind(this, error, formattedErrors)}>\n          {app.translator.trans('core.lib.debug_button')}\n        </Button>,\n      ],\n    };\n\n    if (customErrorHandler) {\n      customErrorHandler(error);\n    } else {\n      this.requestErrorDefaultHandler(error, isDebug, formattedErrors);\n    }\n\n    return Promise.reject(error);\n  }\n\n  /**\n   * Used to modify the error message shown on the page to help troubleshooting.\n   * While not certain, a failing cross-origin request likely indicates a missing redirect to Flarum canonical URL.\n   * Because XHR errors do not expose CORS information, we can only compare the requested URL origin to the page origin.\n   *\n   * @param error\n   * @protected\n   */\n  protected requestWasCrossOrigin(error: RequestError): boolean {\n    return new URL(error.options.url, document.baseURI).origin !== window.location.origin;\n  }\n\n  protected requestErrorDefaultHandler(e: unknown, isDebug: boolean, formattedErrors: string[]): void {\n    if (e instanceof RequestError) {\n      if (isDebug && e.xhr) {\n        const { method, url } = e.options;\n        const { status = '' } = e.xhr;\n\n        console.group(`${method} ${url} ${status}`);\n\n        if (formattedErrors.length) {\n          console.error(...formattedErrors);\n        } else {\n          console.error(e);\n        }\n\n        console.groupEnd();\n      }\n\n      if (e.alert) {\n        this.requestErrorAlert = this.alerts.show(e.alert, e.alert.content);\n      }\n    } else {\n      throw e;\n    }\n  }\n\n  private showDebug(error: RequestError, formattedError: string[]) {\n    if (this.requestErrorAlert !== null) this.alerts.dismiss(this.requestErrorAlert);\n\n    this.modal.show(RequestErrorModal, { error, formattedError });\n  }\n\n  /**\n   * Construct a URL to the route with the given name.\n   */\n  route(name: string, params: Record<string, unknown> = {}): string {\n    const route = this.routes[name];\n\n    if (!route) throw new Error(`Route '${name}' does not exist`);\n\n    const url = route.path.replace(/:([^\\/]+)/g, (m, key) => `${extract(params, key)}`);\n\n    // Remove falsy values in params to avoid having urls like '/?sort&q'\n    for (const key in params) {\n      if (params.hasOwnProperty(key) && !params[key]) delete params[key];\n    }\n\n    const queryString = m.buildQueryString(params as any);\n    const prefix = m.route.prefix === '' ? this.forum.attribute('basePath') : '';\n\n    return prefix + url + (queryString ? '?' + queryString : '');\n  }\n}\n","import app from '../../common/app';\nimport Component from '../Component';\nimport Button from './Button';\nimport LinkButton from './LinkButton';\nimport type Mithril from 'mithril';\nimport classList from '../utils/classList';\n\n/**\n * The `Navigation` component displays a set of navigation buttons. Typically\n * this is just a back button which pops the app's History. If the user is on\n * the root page and there is no history to pop, then in some instances it may\n * show a button that toggles the app's drawer.\n *\n * If the app has a pane, it will also include a 'pin' button which toggles the\n * pinned state of the pane.\n *\n * Accepts the following attrs:\n *\n * - `className` The name of a class to set on the root element.\n * - `drawer` Whether or not to show a button to toggle the app's drawer if\n *   there is no more history to pop.\n */\nexport default class Navigation extends Component {\n  view() {\n    const { history, pane } = app;\n\n    return (\n      <div\n        className={classList('Navigation ButtonGroup', this.attrs.className)}\n        onmouseenter={pane && pane.show.bind(pane)}\n        onmouseleave={pane && pane.onmouseleave.bind(pane)}\n      >\n        {history?.canGoBack() ? [this.getBackButton(), this.getPaneButton()] : this.getDrawerButton()}\n      </div>\n    );\n  }\n\n  /**\n   * Get the back button.\n   */\n  protected getBackButton(): Mithril.Children {\n    const { history } = app;\n    const previous = history?.getPrevious();\n\n    return (\n      <LinkButton\n        className=\"Button Navigation-back Button--icon\"\n        href={history?.backUrl()}\n        icon=\"fas fa-chevron-left\"\n        aria-label={previous?.title}\n        onclick={(e: MouseEvent) => {\n          if (e.shiftKey || e.ctrlKey || e.metaKey || e.which === 2) return;\n          e.preventDefault();\n          history?.back();\n        }}\n      />\n    );\n  }\n\n  /**\n   * Get the pane pinned toggle button.\n   */\n  protected getPaneButton(): Mithril.Children {\n    const { pane } = app;\n\n    if (!pane || !pane.active) return null;\n\n    return (\n      <Button\n        className={classList('Button Button--icon Navigation-pin', { active: pane.pinned })}\n        onclick={pane.togglePinned.bind(pane)}\n        icon=\"fas fa-thumbtack\"\n      />\n    );\n  }\n\n  /**\n   * Get the drawer toggle button.\n   */\n  protected getDrawerButton(): Mithril.Children {\n    if (!this.attrs.drawer) return null;\n\n    const { drawer } = app;\n    const user = app.session.user;\n\n    return (\n      <Button\n        className={classList('Button Button--icon Navigation-drawer', { new: user?.newNotificationCount() })}\n        onclick={(e: MouseEvent) => {\n          e.stopPropagation();\n          drawer.show();\n        }}\n        icon=\"fas fa-bars\"\n        aria-label={app.translator.trans('core.lib.nav.drawer_button')}\n      />\n    );\n  }\n}\n","import app from '../../forum/app';\nimport PaginatedListState from '../../common/states/PaginatedListState';\nimport Notification from '../../common/models/Notification';\n\nexport default class NotificationListState extends PaginatedListState<Notification> {\n  constructor() {\n    super({}, 1, 20);\n  }\n\n  get type(): string {\n    return 'notifications';\n  }\n\n  /**\n   * Load the next page of notification results.\n   */\n  load(): Promise<void> {\n    if (app.session.user?.newNotificationCount()) {\n      this.pages = [];\n      this.location = { page: 1 };\n    }\n\n    if (this.pages.length > 0) {\n      return Promise.resolve();\n    }\n\n    app.session.user?.pushAttributes({ newNotificationCount: 0 });\n\n    return super.loadNext();\n  }\n\n  /**\n   * Mark all of the notifications as read.\n   */\n  markAllAsRead() {\n    if (this.pages.length === 0) return;\n\n    app.session.user?.pushAttributes({ unreadNotificationCount: 0 });\n\n    this.pages.forEach((page) => {\n      page.items.forEach((notification) => notification.pushAttributes({ isRead: true }));\n    });\n\n    return app.request({\n      url: app.forum.attribute('apiUrl') + '/notifications/read',\n      method: 'POST',\n    });\n  }\n\n  /**\n   * Delete all of the notifications for this user.\n   */\n  deleteAll() {\n    if (this.pages.length === 0) return;\n\n    app.session.user?.pushAttributes({ unreadNotificationCount: 0 });\n\n    this.pages = [];\n\n    return app.request({\n      url: app.forum.attribute('apiUrl') + '/notifications',\n      method: 'DELETE',\n    });\n  }\n}\n","export default class SearchState {\n  protected cachedSearches: Set<string>;\n  protected value: string = '';\n\n  constructor(cachedSearches: string[] = []) {\n    this.cachedSearches = new Set(cachedSearches);\n  }\n\n  /**\n   * If we are displaying the full results of a search (not just a preview),\n   * this value should return the query that prompted that search.\n   *\n   * In this generic class, full page searching is not supported.\n   * This method should be implemented by subclasses that do support it.\n   *\n   * @see Search\n   */\n  getInitialSearch(): string {\n    return '';\n  }\n\n  getValue(): string {\n    return this.value;\n  }\n\n  setValue(value: string) {\n    this.value = value;\n  }\n\n  /**\n   * Clear the search value.\n   */\n  clear() {\n    this.setValue('');\n  }\n\n  /**\n   * Mark that we have already searched for this query so that we don't\n   * have to ping the endpoint again.\n   */\n  cache(query: string) {\n    this.cachedSearches.add(query);\n  }\n\n  /**\n   * Check if this query has been searched before.\n   */\n  isCached(query: string): boolean {\n    return this.cachedSearches.has(query);\n  }\n}\n","import app from '../../forum/app';\nimport setRouteWithForcedRefresh from '../../common/utils/setRouteWithForcedRefresh';\nimport SearchState from './SearchState';\n\ntype SearchParams = Record<string, string>;\n\nexport default class GlobalSearchState extends SearchState {\n  private initialValueSet = false;\n\n  constructor(cachedSearches = []) {\n    super(cachedSearches);\n  }\n\n  getValue(): string {\n    // If we are on a search results page, we should initialize the value\n    // from the current search, if one is present.\n    // We can't do this in the constructor, as this class is instantiated\n    // before pages are rendered, and we need app.current.\n    if (!this.initialValueSet && this.currPageProvidesSearch()) {\n      this.intializeValue();\n    }\n\n    return super.getValue();\n  }\n\n  protected intializeValue() {\n    this.setValue(this.getInitialSearch());\n    this.initialValueSet = true;\n  }\n\n  protected currPageProvidesSearch(): boolean {\n    return app.current.type && app.current.type.providesInitialSearch;\n  }\n\n  /**\n   * @inheritdoc\n   */\n  getInitialSearch(): string {\n    return this.currPageProvidesSearch() ? this.params().q : '';\n  }\n\n  /**\n   * Clear the search input and the current controller's active search.\n   */\n  clear() {\n    super.clear();\n\n    if (this.getInitialSearch()) {\n      this.clearInitialSearch();\n    } else {\n      m.redraw();\n    }\n  }\n\n  /**\n   * Redirect to the index page without a search filter. This is called when the\n   * 'x' is clicked in the search box in the header.\n   */\n  protected clearInitialSearch() {\n    const { q, ...params } = this.params();\n\n    setRouteWithForcedRefresh(app.route(app.current.get('routeName'), params));\n  }\n\n  /**\n   * Get URL parameters that stick between filter changes.\n   *\n   * This can be used to generate a link that clears filters.\n   */\n  stickyParams(): SearchParams {\n    return {\n      sort: m.route.param('sort'),\n      q: m.route.param('q'),\n    };\n  }\n\n  /**\n   * Get parameters to be used in the current page.\n   */\n  params(): SearchParams {\n    const params = this.stickyParams();\n\n    params.filter = m.route.param('filter');\n\n    return params;\n  }\n\n  /**\n   * Redirect to the index page using the given sort parameter.\n   */\n  changeSort(sort: string) {\n    const params = this.params();\n\n    if (sort === Object.keys(app.discussions.sortMap())[0]) {\n      delete params.sort;\n    } else {\n      params.sort = sort;\n    }\n\n    setRouteWithForcedRefresh(app.route(app.current.get('routeName'), params));\n  }\n}\n","/**\n * @see https://stackoverflow.com/a/31732310\n */\nexport default function isSafariMobile(): boolean {\n  return (\n    'ontouchstart' in window &&\n    navigator.vendor != null &&\n    navigator.vendor.includes('Apple') &&\n    navigator.userAgent != null &&\n    !navigator.userAgent.includes('CriOS') &&\n    !navigator.userAgent.includes('FxiOS')\n  );\n}\n","import app from './app';\n\nimport History from './utils/History';\nimport Pane from './utils/Pane';\nimport DiscussionPage from './components/DiscussionPage';\nimport SignUpModal from './components/SignUpModal';\nimport HeaderPrimary from './components/HeaderPrimary';\nimport HeaderSecondary from './components/HeaderSecondary';\nimport Composer from './components/Composer';\nimport DiscussionRenamedNotification from './components/DiscussionRenamedNotification';\nimport CommentPost from './components/CommentPost';\nimport DiscussionRenamedPost from './components/DiscussionRenamedPost';\nimport routes, { ForumRoutes, makeRouteHelpers } from './routes';\nimport alertEmailConfirmation from './utils/alertEmailConfirmation';\nimport Application, { ApplicationData } from '../common/Application';\nimport Navigation from '../common/components/Navigation';\nimport NotificationListState from './states/NotificationListState';\nimport GlobalSearchState from './states/GlobalSearchState';\nimport DiscussionListState from './states/DiscussionListState';\nimport ComposerState from './states/ComposerState';\nimport isSafariMobile from './utils/isSafariMobile';\n\nimport type Notification from './components/Notification';\nimport type Post from './components/Post';\nimport type Discussion from '../common/models/Discussion';\nimport type NotificationModel from '../common/models/Notification';\nimport type PostModel from '../common/models/Post';\nimport extractText from '../common/utils/extractText';\n\nexport interface ForumApplicationData extends ApplicationData {}\n\nexport default class ForumApplication extends Application {\n  /**\n   * A map of notification types to their components.\n   */\n  notificationComponents: Record<string, ComponentClass<{ notification: NotificationModel }, Notification<{ notification: NotificationModel }>>> = {\n    discussionRenamed: DiscussionRenamedNotification,\n  };\n\n  /**\n   * A map of post types to their components.\n   */\n  postComponents: Record<string, ComponentClass<{ post: PostModel }, Post<{ post: PostModel }>>> = {\n    comment: CommentPost,\n    discussionRenamed: DiscussionRenamedPost,\n  };\n\n  /**\n   * An object which controls the state of the page's side pane.\n   */\n  pane: Pane | null = null;\n\n  /**\n   * The app's history stack, which keeps track of which routes the user visits\n   * so that they can easily navigate back to the previous route.\n   */\n  history: History = new History();\n\n  /**\n   * An object which controls the state of the user's notifications.\n   */\n  notifications: NotificationListState = new NotificationListState();\n\n  /**\n   * An object which stores previously searched queries and provides convenient\n   * tools for retrieving and managing search values.\n   */\n  search: GlobalSearchState = new GlobalSearchState();\n\n  /**\n   * An object which controls the state of the composer.\n   */\n  composer: ComposerState = new ComposerState();\n\n  /**\n   * An object which controls the state of the cached discussion list, which\n   * is used in the index page and the slideout pane.\n   */\n  discussions: DiscussionListState = new DiscussionListState({});\n\n  route: typeof Application.prototype.route & ForumRoutes;\n\n  data!: ForumApplicationData;\n\n  constructor() {\n    super();\n\n    routes(this);\n\n    this.route = Object.assign((Object.getPrototypeOf(Object.getPrototypeOf(this)) as Application).route.bind(this), makeRouteHelpers(this));\n  }\n\n  /**\n   * @inheritdoc\n   */\n  mount() {\n    // Get the configured default route and update that route's path to be '/'.\n    // Push the homepage as the first route, so that the user will always be\n    // able to click on the 'back' button to go home, regardless of which page\n    // they started on.\n    const defaultRoute = this.forum.attribute('defaultRoute');\n    let defaultAction = 'index';\n\n    for (const i in this.routes) {\n      if (this.routes[i].path === defaultRoute) defaultAction = i;\n    }\n\n    this.routes[defaultAction].path = '/';\n    this.history.push(defaultAction, extractText(this.translator.trans('core.forum.header.back_to_index_tooltip')), '/');\n\n    this.pane = new Pane(document.getElementById('app'));\n\n    m.route.prefix = '';\n    super.mount(this.forum.attribute('basePath'));\n\n    // We mount navigation and header components after the page, so components\n    // like the back button can access the updated state when rendering.\n    m.mount(document.getElementById('app-navigation')!, { view: () => <Navigation className=\"App-backControl\" drawer /> });\n    m.mount(document.getElementById('header-navigation')!, Navigation);\n    m.mount(document.getElementById('header-primary')!, HeaderPrimary);\n    m.mount(document.getElementById('header-secondary')!, HeaderSecondary);\n    m.mount(document.getElementById('composer')!, { view: () => <Composer state={this.composer} /> });\n\n    alertEmailConfirmation(this);\n\n    // Route the home link back home when clicked. We do not want it to register\n    // if the user is opening it in a new tab, however.\n    document.getElementById('home-link')!.addEventListener('click', (e) => {\n      if (e.ctrlKey || e.metaKey || e.button === 1) return;\n      e.preventDefault();\n      app.history.home();\n\n      // Reload the current user so that their unread notification count is refreshed.\n      const userId = app.session.user?.id();\n      if (userId) {\n        app.store.find('users', userId);\n        m.redraw();\n      }\n    });\n\n    if (isSafariMobile()) {\n      $(() => {\n        $('.App').addClass('mobile-safari');\n      });\n    }\n  }\n\n  /**\n   * Check whether or not the user is currently viewing a discussion.\n   */\n  public viewingDiscussion(discussion: Discussion): boolean {\n    return this.current.matches(DiscussionPage, { discussion });\n  }\n\n  /**\n   * Callback for when an external authenticator (social login) action has\n   * completed.\n   *\n   * If the payload indicates that the user has been logged in, then the page\n   * will be reloaded. Otherwise, a SignUpModal will be opened, prefilled\n   * with the provided details.\n   */\n  public authenticationComplete(payload: Record<string, unknown>): void {\n    if (payload.loggedIn) {\n      window.location.reload();\n    } else {\n      this.modal.show(SignUpModal, payload);\n    }\n  }\n}\n","import Forum from './ForumApplication';\n\nconst app = new Forum();\n\n// @ts-expect-error We need to do this for backwards compatibility purposes.\nwindow.app = app;\n\nexport default app;\n","import IExtender, { IExtensionModule } from './IExtender';\nimport Application from '../Application';\nimport ActualModel from '../Model';\n\nexport default class Model implements IExtender {\n  private readonly model: { new (): ActualModel };\n  private callbacks: Array<() => void> = [];\n\n  public constructor(model: { new (): ActualModel }) {\n    this.model = model;\n  }\n\n  public attribute<T, O = unknown>(name: string, transform: ((attr: O) => T) | null = null): Model {\n    this.callbacks.push(() => {\n      this.model.prototype[name] = transform ? ActualModel.attribute<T, O>(name, transform) : ActualModel.attribute<T>(name);\n    });\n\n    return this;\n  }\n\n  public hasOne<M extends ActualModel>(name: string): Model {\n    this.callbacks.push(() => {\n      this.model.prototype[name] = ActualModel.hasOne<M>(name);\n    });\n\n    return this;\n  }\n\n  public hasMany<M extends ActualModel>(name: string): Model {\n    this.callbacks.push(() => {\n      this.model.prototype[name] = ActualModel.hasMany<M>(name);\n    });\n\n    return this;\n  }\n\n  extend(app: Application, extension: IExtensionModule): void {\n    for (const callback of this.callbacks) {\n      callback.call(this);\n    }\n  }\n}\n","import IExtender, { IExtensionModule } from './IExtender';\nimport Application from '../Application';\nimport ForumApplication from '../../forum/ForumApplication';\n\nexport default class PostTypes implements IExtender {\n  private postComponents: Record<string, any> = {};\n\n  /**\n   * Register a new post component type.\n   * Usually used for event posts.\n   *\n   * @param name The name of the post type.\n   * @param component The component class to render the post.\n   */\n  add(name: string, component: any): PostTypes {\n    this.postComponents[name] = component;\n\n    return this;\n  }\n\n  extend(app: Application, extension: IExtensionModule): void {\n    Object.assign((app as unknown as ForumApplication).postComponents, this.postComponents);\n  }\n}\n","import Application, { FlarumGenericRoute } from '../Application';\nimport IExtender, { IExtensionModule } from './IExtender';\n\ntype HelperRoute = (...args: any) => string;\n\nexport default class Routes implements IExtender {\n  private routes: Record<string, FlarumGenericRoute> = {};\n  private helpers: Record<string, HelperRoute> = {};\n\n  /**\n   * Add a mithril route to the application.\n   *\n   * @param name The name of the route.\n   * @param path The path of the route.\n   * @param component must extend `Page` component.\n   */\n  add(name: string, path: `/${string}`, component: any): Routes {\n    this.routes[name] = { path, component };\n\n    return this;\n  }\n\n  helper(name: string, callback: HelperRoute): Routes {\n    this.helpers[name] = callback;\n\n    return this;\n  }\n\n  extend(app: Application, extension: IExtensionModule) {\n    Object.assign(app.routes, this.routes);\n    Object.assign(app.route, this.helpers);\n  }\n}\n","import Application from '../Application';\nimport IExtender, { IExtensionModule } from './IExtender';\nimport Model from '../Model';\n\nexport default class Store implements IExtender {\n  private readonly models: { [type: string]: { new (): Model } } = {};\n\n  public add(type: string, model: { new (): Model }): Store {\n    this.models[type] = model;\n\n    return this;\n  }\n\n  extend(app: Application, extension: IExtensionModule): void {\n    for (const type in this.models) {\n      if (app.store.models[type]) {\n        throw new Error(`The model type \"${type}\" has already been registered with the class \"${app.store.models[type].name}\".`);\n      }\n\n      app.store.models[type] = this.models[type];\n    }\n  }\n}\n","import Model from './Model';\nimport PostTypes from './PostTypes';\nimport Routes from './Routes';\nimport Store from './Store';\n\nexport default {\n  Model,\n  PostTypes,\n  Routes,\n  Store,\n};\n","import { fireDeprecationWarning } from '../helpers/fireDebugWarning';\n\nconst deprecatedNotice = 'The `evented` util is deprecated and no longer supported.';\nconst deprecationIssueId = '2547';\n\n/**\n * The `evented` mixin provides methods allowing an object to trigger events,\n * running externally registered event handlers.\n *\n * @deprecated v1.2, to be removed in v2.0\n */\nexport default {\n  /**\n   * Arrays of registered event handlers, grouped by the event name.\n   *\n   * @type {Record<string, unknown>}\n   * @protected\n   *\n   * @deprecated\n   */\n  handlers: null,\n\n  /**\n   * Get all of the registered handlers for an event.\n   *\n   * @param {string} event The name of the event.\n   * @return {Function[]}\n   * @protected\n   *\n   * @deprecated\n   */\n  getHandlers(event) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    this.handlers = this.handlers || {};\n\n    this.handlers[event] = this.handlers[event] || [];\n\n    return this.handlers[event];\n  },\n\n  /**\n   * Trigger an event.\n   *\n   * @param {string} event The name of the event.\n   * @param {any[]} args Arguments to pass to event handlers.\n   *\n   * @deprecated\n   */\n  trigger(event, ...args) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    this.getHandlers(event).forEach((handler) => handler.apply(this, args));\n  },\n\n  /**\n   * Register an event handler.\n   *\n   * @param {string} event The name of the event.\n   * @param {Function} handler The function to handle the event.\n   *\n   * @deprecated\n   */\n  on(event, handler) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    this.getHandlers(event).push(handler);\n  },\n\n  /**\n   * Register an event handler so that it will run only once, and then\n   * unregister itself.\n   *\n   * @param {string} event The name of the event.\n   * @param {Function} handler The function to handle the event.\n   *\n   * @deprecated\n   */\n  one(event, handler) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    const wrapper = function () {\n      handler.apply(this, arguments);\n\n      this.off(event, wrapper);\n    };\n\n    this.getHandlers(event).push(wrapper);\n  },\n\n  /**\n   * Unregister an event handler.\n   *\n   * @param {string} event The name of the event.\n   * @param {Function} handler The function that handles the event.\n   *\n   * @deprecated\n   */\n  off(event, handler) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    const handlers = this.getHandlers(event);\n    const index = handlers.indexOf(handler);\n\n    if (index !== -1) {\n      handlers.splice(index, 1);\n    }\n  },\n};\n","/*\n * Original Copyright GitHub, Inc. Licensed under the MIT License.\n * See license text at https://github.com/github/markdown-toolbar-element/blob/master/LICENSE.\n */\n\nimport insertText, { SelectionRange } from './insertText';\n\ninterface StyleArgs {\n  prefix: string;\n  suffix: string;\n  blockPrefix: string;\n  blockSuffix: string;\n  multiline: boolean;\n  replaceNext: string;\n  prefixSpace: boolean;\n  scanFor: string;\n  surroundWithNewlines: boolean;\n  orderedList: boolean;\n  unorderedList: boolean;\n  trimFirst: boolean;\n}\n\nconst defaults: StyleArgs = {\n  prefix: '',\n  suffix: '',\n  blockPrefix: '',\n  blockSuffix: '',\n  multiline: false,\n  replaceNext: '',\n  prefixSpace: false,\n  scanFor: '',\n  surroundWithNewlines: false,\n  orderedList: false,\n  unorderedList: false,\n  trimFirst: false,\n};\n\nexport default function styleSelectedText(textarea: HTMLTextAreaElement, styleArgs: StyleArgs) {\n  // Next 2 lines are added\n  textarea.focus();\n  styleArgs = Object.assign({}, defaults, styleArgs);\n  // Prev 2 lines are added\n  const text = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n\n  let result;\n  if (styleArgs.orderedList || styleArgs.unorderedList) {\n    result = listStyle(textarea, styleArgs);\n  } else if (styleArgs.multiline && isMultipleLines(text)) {\n    result = multilineStyle(textarea, styleArgs);\n  } else {\n    result = blockStyle(textarea, styleArgs);\n  }\n\n  insertText(textarea, result);\n}\n\nfunction isMultipleLines(string: string): boolean {\n  return string.trim().split('\\n').length > 1;\n}\n\nfunction repeat(string: string, n: number): string {\n  return Array(n + 1).join(string);\n}\n\nfunction wordSelectionStart(text: string, i: number): number {\n  let index = i;\n  while (text[index] && text[index - 1] != null && !text[index - 1].match(/\\s/)) {\n    index--;\n  }\n  return index;\n}\n\nfunction wordSelectionEnd(text: string, i: number, multiline: boolean): number {\n  let index = i;\n  const breakpoint = multiline ? /\\n/ : /\\s/;\n  while (text[index] && !text[index].match(breakpoint)) {\n    index++;\n  }\n  return index;\n}\n\nfunction expandSelectionToLine(textarea: HTMLTextAreaElement) {\n  const lines = textarea.value.split('\\n');\n  let counter = 0;\n  for (let index = 0; index < lines.length; index++) {\n    const lineLength = lines[index].length + 1;\n    if (textarea.selectionStart >= counter && textarea.selectionStart < counter + lineLength) {\n      textarea.selectionStart = counter;\n    }\n    if (textarea.selectionEnd >= counter && textarea.selectionEnd < counter + lineLength) {\n      textarea.selectionEnd = counter + lineLength - 1;\n    }\n    counter += lineLength;\n  }\n}\n\nfunction expandSelectedText(textarea: HTMLTextAreaElement, prefixToUse: string, suffixToUse: string, multiline = false): string {\n  if (textarea.selectionStart === textarea.selectionEnd) {\n    textarea.selectionStart = wordSelectionStart(textarea.value, textarea.selectionStart);\n    textarea.selectionEnd = wordSelectionEnd(textarea.value, textarea.selectionEnd, multiline);\n  } else {\n    const expandedSelectionStart = textarea.selectionStart - prefixToUse.length;\n    const expandedSelectionEnd = textarea.selectionEnd + suffixToUse.length;\n    const beginsWithPrefix = textarea.value.slice(expandedSelectionStart, textarea.selectionStart) === prefixToUse;\n    const endsWithSuffix = textarea.value.slice(textarea.selectionEnd, expandedSelectionEnd) === suffixToUse;\n    if (beginsWithPrefix && endsWithSuffix) {\n      textarea.selectionStart = expandedSelectionStart;\n      textarea.selectionEnd = expandedSelectionEnd;\n    }\n  }\n  return textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n}\n\ninterface Newlines {\n  newlinesToAppend: string;\n  newlinesToPrepend: string;\n}\n\nfunction newlinesToSurroundSelectedText(textarea: HTMLTextAreaElement): Newlines {\n  const beforeSelection = textarea.value.slice(0, textarea.selectionStart);\n  const afterSelection = textarea.value.slice(textarea.selectionEnd);\n\n  const breaksBefore = beforeSelection.match(/\\n*$/);\n  const breaksAfter = afterSelection.match(/^\\n*/);\n  const newlinesBeforeSelection = breaksBefore ? breaksBefore[0].length : 0;\n  const newlinesAfterSelection = breaksAfter ? breaksAfter[0].length : 0;\n\n  let newlinesToAppend;\n  let newlinesToPrepend;\n\n  if (beforeSelection.match(/\\S/) && newlinesBeforeSelection < 2) {\n    newlinesToAppend = repeat('\\n', 2 - newlinesBeforeSelection);\n  }\n\n  if (afterSelection.match(/\\S/) && newlinesAfterSelection < 2) {\n    newlinesToPrepend = repeat('\\n', 2 - newlinesAfterSelection);\n  }\n\n  if (newlinesToAppend == null) {\n    newlinesToAppend = '';\n  }\n\n  if (newlinesToPrepend == null) {\n    newlinesToPrepend = '';\n  }\n\n  return { newlinesToAppend, newlinesToPrepend };\n}\n\nfunction blockStyle(textarea: HTMLTextAreaElement, arg: StyleArgs): SelectionRange {\n  let newlinesToAppend;\n  let newlinesToPrepend;\n\n  const { prefix, suffix, blockPrefix, blockSuffix, replaceNext, prefixSpace, scanFor, surroundWithNewlines } = arg;\n  const originalSelectionStart = textarea.selectionStart;\n  const originalSelectionEnd = textarea.selectionEnd;\n\n  let selectedText = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n  let prefixToUse = isMultipleLines(selectedText) && blockPrefix.length > 0 ? `${blockPrefix}\\n` : prefix;\n  // CHANGED\n  let suffixToUse = isMultipleLines(selectedText) && blockSuffix.length > 0 ? `\\n${blockSuffix}` : prefixToUse === prefix ? suffix : '';\n  // END CHANGED\n\n  if (prefixSpace) {\n    const beforeSelection = textarea.value[textarea.selectionStart - 1];\n    if (textarea.selectionStart !== 0 && beforeSelection != null && !beforeSelection.match(/\\s/)) {\n      prefixToUse = ` ${prefixToUse}`;\n    }\n  }\n  selectedText = expandSelectedText(textarea, prefixToUse, suffixToUse, arg.multiline);\n  let selectionStart = textarea.selectionStart;\n  let selectionEnd = textarea.selectionEnd;\n  const hasReplaceNext = replaceNext.length > 0 && suffixToUse.indexOf(replaceNext) > -1 && selectedText.length > 0;\n  if (surroundWithNewlines) {\n    const ref = newlinesToSurroundSelectedText(textarea);\n    newlinesToAppend = ref.newlinesToAppend;\n    newlinesToPrepend = ref.newlinesToPrepend;\n    prefixToUse = newlinesToAppend + prefix;\n    suffixToUse += newlinesToPrepend;\n  }\n\n  if (selectedText.startsWith(prefixToUse) && selectedText.endsWith(suffixToUse)) {\n    const replacementText = selectedText.slice(prefixToUse.length, selectedText.length - suffixToUse.length);\n    if (originalSelectionStart === originalSelectionEnd) {\n      let position = originalSelectionStart - prefixToUse.length;\n      position = Math.max(position, selectionStart);\n      position = Math.min(position, selectionStart + replacementText.length);\n      selectionStart = selectionEnd = position;\n    } else {\n      selectionEnd = selectionStart + replacementText.length;\n    }\n    return { text: replacementText, selectionStart, selectionEnd };\n  } else if (!hasReplaceNext) {\n    let replacementText = prefixToUse + selectedText + suffixToUse;\n    selectionStart = originalSelectionStart + prefixToUse.length;\n    selectionEnd = originalSelectionEnd + prefixToUse.length;\n    const whitespaceEdges = selectedText.match(/^\\s*|\\s*$/g);\n    if (arg.trimFirst && whitespaceEdges) {\n      const leadingWhitespace = whitespaceEdges[0] || '';\n      const trailingWhitespace = whitespaceEdges[1] || '';\n      replacementText = leadingWhitespace + prefixToUse + selectedText.trim() + suffixToUse + trailingWhitespace;\n      selectionStart += leadingWhitespace.length;\n      selectionEnd -= trailingWhitespace.length;\n    }\n    return { text: replacementText, selectionStart, selectionEnd };\n  } else if (scanFor.length > 0 && selectedText.match(scanFor)) {\n    suffixToUse = suffixToUse.replace(replaceNext, selectedText);\n    const replacementText = prefixToUse + suffixToUse;\n    selectionStart = selectionEnd = selectionStart + prefixToUse.length;\n    return { text: replacementText, selectionStart, selectionEnd };\n  } else {\n    const replacementText = prefixToUse + selectedText + suffixToUse;\n    selectionStart = selectionStart + prefixToUse.length + selectedText.length + suffixToUse.indexOf(replaceNext);\n    selectionEnd = selectionStart + replaceNext.length;\n    return { text: replacementText, selectionStart, selectionEnd };\n  }\n}\n\nfunction multilineStyle(textarea: HTMLTextAreaElement, arg: StyleArgs) {\n  const { prefix, suffix, blockPrefix, blockSuffix, surroundWithNewlines } = arg;\n  let text = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n  let selectionStart = textarea.selectionStart;\n  let selectionEnd = textarea.selectionEnd;\n  const lines = text.split('\\n');\n  // CHANGED\n  let prefixToUse = blockPrefix.length > 0 ? blockPrefix : prefix;\n  let suffixToUse = blockSuffix.length > 0 ? blockSuffix : prefixToUse == prefix ? suffix : '';\n  const undoStyle = lines.every((line) => line.startsWith(prefixToUse) && line.endsWith(suffixToUse));\n  // END CHANGED\n\n  if (undoStyle) {\n    text = lines.map((line) => line.slice(prefixToUse.length, line.length - suffixToUse.length)).join('\\n');\n    selectionEnd = selectionStart + text.length;\n  } else {\n    // CHANGED\n    text = lines.map((line) => prefixToUse + line + suffixToUse).join('\\n');\n    if (surroundWithNewlines || suffixToUse === '') {\n      // END CHANGED\n      const { newlinesToAppend, newlinesToPrepend } = newlinesToSurroundSelectedText(textarea);\n      selectionStart += newlinesToAppend.length;\n      selectionEnd = selectionStart + text.length;\n      text = newlinesToAppend + text + newlinesToPrepend;\n    }\n  }\n\n  return { text, selectionStart, selectionEnd };\n}\n\ninterface UndoResult {\n  text: string;\n  processed: boolean;\n}\nfunction undoOrderedListStyle(text: string): UndoResult {\n  const lines = text.split('\\n');\n  const orderedListRegex = /^\\d+\\.\\s+/;\n  const shouldUndoOrderedList = lines.every((line) => orderedListRegex.test(line));\n  let result = lines;\n  if (shouldUndoOrderedList) {\n    result = lines.map((line) => line.replace(orderedListRegex, ''));\n  }\n\n  return {\n    text: result.join('\\n'),\n    processed: shouldUndoOrderedList,\n  };\n}\n\nfunction undoUnorderedListStyle(text: string): UndoResult {\n  const lines = text.split('\\n');\n  const unorderedListPrefix = '- ';\n  const shouldUndoUnorderedList = lines.every((line) => line.startsWith(unorderedListPrefix));\n  let result = lines;\n  if (shouldUndoUnorderedList) {\n    result = lines.map((line) => line.slice(unorderedListPrefix.length, line.length));\n  }\n\n  return {\n    text: result.join('\\n'),\n    processed: shouldUndoUnorderedList,\n  };\n}\n\nfunction makePrefix(index: number, unorderedList: boolean): string {\n  if (unorderedList) {\n    return '- ';\n  } else {\n    return `${index + 1}. `;\n  }\n}\n\nfunction clearExistingListStyle(style: StyleArgs, selectedText: string): [UndoResult, UndoResult, string] {\n  let undoResultOpositeList: UndoResult;\n  let undoResult: UndoResult;\n  let pristineText;\n  if (style.orderedList) {\n    undoResult = undoOrderedListStyle(selectedText);\n    undoResultOpositeList = undoUnorderedListStyle(undoResult.text);\n    pristineText = undoResultOpositeList.text;\n  } else {\n    undoResult = undoUnorderedListStyle(selectedText);\n    undoResultOpositeList = undoOrderedListStyle(undoResult.text);\n    pristineText = undoResultOpositeList.text;\n  }\n  return [undoResult, undoResultOpositeList, pristineText];\n}\n\nfunction listStyle(textarea: HTMLTextAreaElement, style: StyleArgs): SelectionRange {\n  const noInitialSelection = textarea.selectionStart === textarea.selectionEnd;\n  let selectionStart = textarea.selectionStart;\n  let selectionEnd = textarea.selectionEnd;\n\n  // Select whole line\n  expandSelectionToLine(textarea);\n\n  const selectedText = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n\n  // If the user intent was to do an undo, we will stop after this.\n  // Otherwise, we will still undo to other list type to prevent list stacking\n  const [undoResult, undoResultOpositeList, pristineText] = clearExistingListStyle(style, selectedText);\n\n  const prefixedLines = pristineText.split('\\n').map((value, index) => {\n    return `${makePrefix(index, style.unorderedList)}${value}`;\n  });\n\n  const totalPrefixLength = prefixedLines.reduce((previousValue, _currentValue, currentIndex) => {\n    return previousValue + makePrefix(currentIndex, style.unorderedList).length;\n  }, 0);\n\n  const totalPrefixLengthOpositeList = prefixedLines.reduce((previousValue, _currentValue, currentIndex) => {\n    return previousValue + makePrefix(currentIndex, !style.unorderedList).length;\n  }, 0);\n\n  if (undoResult.processed) {\n    if (noInitialSelection) {\n      selectionStart = Math.max(selectionStart - makePrefix(0, style.unorderedList).length, 0);\n      selectionEnd = selectionStart;\n    } else {\n      selectionStart = textarea.selectionStart;\n      selectionEnd = textarea.selectionEnd - totalPrefixLength;\n    }\n    return { text: pristineText, selectionStart, selectionEnd };\n  }\n\n  const { newlinesToAppend, newlinesToPrepend } = newlinesToSurroundSelectedText(textarea);\n  const text = newlinesToAppend + prefixedLines.join('\\n') + newlinesToPrepend;\n\n  if (noInitialSelection) {\n    selectionStart = Math.max(selectionStart + makePrefix(0, style.unorderedList).length + newlinesToAppend.length, 0);\n    selectionEnd = selectionStart;\n  } else {\n    if (undoResultOpositeList.processed) {\n      selectionStart = Math.max(textarea.selectionStart + newlinesToAppend.length, 0);\n      selectionEnd = textarea.selectionEnd + newlinesToAppend.length + totalPrefixLength - totalPrefixLengthOpositeList;\n    } else {\n      selectionStart = Math.max(textarea.selectionStart + newlinesToAppend.length, 0);\n      selectionEnd = textarea.selectionEnd + newlinesToAppend.length + totalPrefixLength;\n    }\n  }\n\n  return { text, selectionStart, selectionEnd };\n}\n","export default function proxifyCompat(compat: Record<string, unknown>, namespace: string) {\n  // regex to replace common/ and NAMESPACE/ for core & core extensions\n  // and remove .js, .ts and .tsx extensions\n  // e.g. admin/utils/extract --> utils/extract\n  // e.g. tags/common/utils/sortTags --> tags/utils/sortTags\n  const regex = new RegExp(String.raw`(\\w+\\/)?(${namespace}|common)\\/`);\n  const fileExt = /(\\.js|\\.tsx?)$/;\n\n  return new Proxy(compat, {\n    get: (obj, prop: string) => obj[prop] || obj[prop.replace(regex, '$1').replace(fileExt, '')],\n  });\n}\n","export default function _taggedTemplateLiteralLoose(strings, raw) {\n  if (!raw) {\n    raw = strings.slice(0);\n  }\n  strings.raw = raw;\n  return strings;\n}","import Component from '../Component';\nimport icon from '../helpers/icon';\nimport withAttr from '../utils/withAttr';\nimport classList from '../utils/classList';\n\n/**\n * The `Select` component displays a <select> input, surrounded with some extra\n * elements for styling. It accepts the following attrs:\n *\n * - `options` A map of option values to labels.\n * - `onchange` A callback to run when the selected value is changed.\n * - `value` The value of the selected option.\n * - `disabled` Disabled state for the input.\n * - `wrapperAttrs` A map of attrs to be passed to the DOM element wrapping the `<select>`\n *\n * Other attributes are passed directly to the `<select>` element rendered to the DOM.\n */\nexport default class Select extends Component {\n  view() {\n    const {\n      options,\n      onchange,\n      value,\n      disabled,\n      className,\n      class: _class,\n\n      // Destructure the `wrapperAttrs` object to extract the `className` for passing to `classList()`\n      // `= {}` prevents errors when `wrapperAttrs` is undefined\n      wrapperAttrs: { className: wrapperClassName, class: wrapperClass, ...wrapperAttrs } = {},\n\n      ...domAttrs\n    } = this.attrs;\n\n    return (\n      <span className={classList('Select', wrapperClassName, wrapperClass)} {...wrapperAttrs}>\n        <select\n          className={classList('Select-input FormControl', className, _class)}\n          onchange={onchange ? withAttr('value', onchange.bind(this)) : undefined}\n          value={value}\n          disabled={disabled}\n          {...domAttrs}\n        >\n          {Object.keys(options).map((key) => (\n            <option value={key}>{options[key]}</option>\n          ))}\n        </select>\n        {icon('fas fa-sort', { className: 'Select-caret' })}\n      </span>\n    );\n  }\n}\n","import type Mithril from 'mithril';\n\nimport Component, { ComponentAttrs } from '../Component';\nimport classList from '../utils/classList';\nimport icon from '../helpers/icon';\n\nexport default class ColorPreviewInput extends Component {\n  view(vnode: Mithril.Vnode<ComponentAttrs, this>) {\n    const { className, id, ...attrs } = this.attrs;\n\n    attrs.type ||= 'text';\n\n    // If the input is a 3 digit hex code, convert it to 6 digits.\n    if (attrs.value.length === 4) {\n      attrs.value = attrs.value.replace(/#([a-f0-9])([a-f0-9])([a-f0-9])/, '#$1$1$2$2$3$3');\n    }\n\n    return (\n      <div className=\"ColorInput\">\n        <input className={classList('FormControl', className)} id={id} {...attrs} />\n\n        <span className=\"ColorInput-icon\" role=\"presentation\">\n          {icon('fas fa-exclamation-circle')}\n        </span>\n\n        <input className=\"ColorInput-preview\" {...attrs} type=\"color\" />\n      </div>\n    );\n  }\n}\n","import extractText from '../utils/extractText';\nimport Button from './Button';\nimport Tooltip from './Tooltip';\n\n/**\n * The `TextEditorButton` component displays a button suitable for the text\n * editor toolbar.\n *\n * Automatically creates tooltips using the Tooltip component and provided text.\n *\n * ## Attrs\n * - `title` - Tooltip for the button\n */\nexport default class TextEditorButton extends Button {\n  view(vnode) {\n    const originalView = super.view(vnode);\n\n    return <Tooltip text={this.attrs.tooltipText || extractText(vnode.children)}>{originalView}</Tooltip>;\n  }\n\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = attrs.className || 'Button Button--icon Button--link';\n    attrs.tooltipText = attrs.title;\n  }\n}\n","import * as extend from './extend';\nimport extenders from './extenders';\nimport Session from './Session';\nimport Store from './Store';\nimport BasicEditorDriver from './utils/BasicEditorDriver';\nimport bidi from './utils/bidi';\nimport evented from './utils/evented';\nimport EventEmitter from './utils/EventEmitter';\nimport KeyboardNavigatable from './utils/KeyboardNavigatable';\nimport liveHumanTimes from './utils/liveHumanTimes';\nimport ItemList from './utils/ItemList';\nimport mixin from './utils/mixin';\nimport humanTime from './utils/humanTime';\nimport computed from './utils/computed';\nimport insertText from './utils/insertText';\nimport styleSelectedText from './utils/styleSelectedText';\nimport Drawer from './utils/Drawer';\nimport * as EditorDriverInterface from './utils/EditorDriverInterface';\nimport anchorScroll from './utils/anchorScroll';\nimport RequestError from './utils/RequestError';\nimport abbreviateNumber from './utils/abbreviateNumber';\nimport escapeRegExp from './utils/escapeRegExp';\nimport * as string from './utils/string';\nimport * as ThrottleDebounce from './utils/throttleDebounce';\nimport Stream from './utils/Stream';\nimport SubtreeRetainer from './utils/SubtreeRetainer';\nimport setRouteWithForcedRefresh from './utils/setRouteWithForcedRefresh';\nimport extract from './utils/extract';\nimport ScrollListener from './utils/ScrollListener';\nimport stringToColor from './utils/stringToColor';\nimport subclassOf from './utils/subclassOf';\nimport patchMithril from './utils/patchMithril';\nimport proxifyCompat from './utils/proxifyCompat';\nimport classList from './utils/classList';\nimport extractText from './utils/extractText';\nimport formatNumber from './utils/formatNumber';\nimport mapRoutes from './utils/mapRoutes';\nimport withAttr from './utils/withAttr';\nimport * as FocusTrap from './utils/focusTrap';\nimport isDark from './utils/isDark';\nimport AccessToken from './models/AccessToken';\nimport Notification from './models/Notification';\nimport User from './models/User';\nimport Post from './models/Post';\nimport Discussion from './models/Discussion';\nimport Group from './models/Group';\nimport Forum from './models/Forum';\nimport Component from './Component';\nimport Translator from './Translator';\nimport AlertManager from './components/AlertManager';\nimport Page from './components/Page';\nimport Switch from './components/Switch';\nimport Badge from './components/Badge';\nimport LoadingIndicator from './components/LoadingIndicator';\nimport Placeholder from './components/Placeholder';\nimport Separator from './components/Separator';\nimport Dropdown from './components/Dropdown';\nimport SplitDropdown from './components/SplitDropdown';\nimport RequestErrorModal from './components/RequestErrorModal';\nimport FieldSet from './components/FieldSet';\nimport Select from './components/Select';\nimport Navigation from './components/Navigation';\nimport Alert from './components/Alert';\nimport Link from './components/Link';\nimport LinkButton from './components/LinkButton';\nimport Checkbox from './components/Checkbox';\nimport ColorPreviewInput from './components/ColorPreviewInput';\nimport ConfirmDocumentUnload from './components/ConfirmDocumentUnload';\nimport SelectDropdown from './components/SelectDropdown';\nimport ModalManager from './components/ModalManager';\nimport Button from './components/Button';\nimport Modal from './components/Modal';\nimport GroupBadge from './components/GroupBadge';\nimport TextEditor from './components/TextEditor';\nimport TextEditorButton from './components/TextEditorButton';\nimport EditUserModal from './components/EditUserModal';\nimport Tooltip from './components/Tooltip';\nimport Model from './Model';\nimport Application from './Application';\nimport fullTime from './helpers/fullTime';\nimport avatar from './helpers/avatar';\nimport fireApplicationError from './helpers/fireApplicationError';\nimport * as fireDebugWarning from './helpers/fireDebugWarning';\nimport icon from './helpers/icon';\nimport humanTimeHelper from './helpers/humanTime';\nimport punctuateSeries from './helpers/punctuateSeries';\nimport highlight from './helpers/highlight';\nimport username from './helpers/username';\nimport userOnline from './helpers/userOnline';\nimport listItems from './helpers/listItems';\nimport textContrastClass from './helpers/textContrastClass';\nimport Fragment from './Fragment';\nimport DefaultResolver from './resolvers/DefaultResolver';\nimport PaginatedListState from './states/PaginatedListState';\nimport isObject from './utils/isObject';\nimport AlertManagerState from './states/AlertManagerState';\nimport ModalManagerState from './states/ModalManagerState';\nimport PageState from './states/PageState';\nimport LabelValue from './components/LabelValue';\nimport IPAddress from './components/IPAddress';\n\nexport default {\n  extenders,\n  extend: extend,\n  Session: Session,\n  Store: Store,\n  'utils/BasicEditorDriver': BasicEditorDriver,\n  'utils/bidi': bidi,\n  'utils/evented': evented,\n  'utils/EventEmitter': EventEmitter,\n  'utils/KeyboardNavigatable': KeyboardNavigatable,\n  'utils/liveHumanTimes': liveHumanTimes,\n  'utils/ItemList': ItemList,\n  'utils/mixin': mixin,\n  'utils/humanTime': humanTime,\n  'utils/computed': computed,\n  'utils/insertText': insertText,\n  'utils/styleSelectedText': styleSelectedText,\n  'utils/Drawer': Drawer,\n  'utils/EditorDriverInterface': EditorDriverInterface,\n  'utils/anchorScroll': anchorScroll,\n  'utils/RequestError': RequestError,\n  'utils/abbreviateNumber': abbreviateNumber,\n  'utils/string': string,\n  'utils/SubtreeRetainer': SubtreeRetainer,\n  'utils/escapeRegExp': escapeRegExp,\n  'utils/extract': extract,\n  'utils/ScrollListener': ScrollListener,\n  'utils/stringToColor': stringToColor,\n  'utils/Stream': Stream,\n  'utils/subclassOf': subclassOf,\n  'utils/setRouteWithForcedRefresh': setRouteWithForcedRefresh,\n  'utils/patchMithril': patchMithril,\n  'utils/proxifyCompat': proxifyCompat,\n  'utils/classList': classList,\n  'utils/extractText': extractText,\n  'utils/formatNumber': formatNumber,\n  'utils/mapRoutes': mapRoutes,\n  'utils/withAttr': withAttr,\n  'utils/throttleDebounce': ThrottleDebounce,\n  'utils/isObject': isObject,\n  'utils/focusTrap': FocusTrap,\n  'utils/isDark': isDark,\n  'models/AccessToken': AccessToken,\n  'models/Notification': Notification,\n  'models/User': User,\n  'models/Post': Post,\n  'models/Discussion': Discussion,\n  'models/Group': Group,\n  'models/Forum': Forum,\n  Component: Component,\n  Fragment: Fragment,\n  Translator: Translator,\n  'components/AlertManager': AlertManager,\n  'components/Page': Page,\n  'components/Switch': Switch,\n  'components/Badge': Badge,\n  'components/LoadingIndicator': LoadingIndicator,\n  'components/Placeholder': Placeholder,\n  'components/Separator': Separator,\n  'components/Dropdown': Dropdown,\n  'components/SplitDropdown': SplitDropdown,\n  'components/RequestErrorModal': RequestErrorModal,\n  'components/FieldSet': FieldSet,\n  'components/Select': Select,\n  'components/Navigation': Navigation,\n  'components/Alert': Alert,\n  'components/Link': Link,\n  'components/LinkButton': LinkButton,\n  'components/Checkbox': Checkbox,\n  'components/ColorPreviewInput': ColorPreviewInput,\n  'components/ConfirmDocumentUnload': ConfirmDocumentUnload,\n  'components/SelectDropdown': SelectDropdown,\n  'components/ModalManager': ModalManager,\n  'components/Button': Button,\n  'components/Modal': Modal,\n  'components/GroupBadge': GroupBadge,\n  'components/TextEditor': TextEditor,\n  'components/TextEditorButton': TextEditorButton,\n  'components/Tooltip': Tooltip,\n  'components/EditUserModal': EditUserModal,\n  'components/LabelValue': LabelValue,\n  'components/IPAddress': IPAddress,\n  Model: Model,\n  Application: Application,\n  'helpers/fullTime': fullTime,\n  'helpers/avatar': avatar,\n  'helpers/fireApplicationError': fireApplicationError,\n  'helpers/fireDebugWarning': fireDebugWarning,\n  'helpers/icon': icon,\n  'helpers/humanTime': humanTimeHelper,\n  'helpers/punctuateSeries': punctuateSeries,\n  'helpers/highlight': highlight,\n  'helpers/username': username,\n  'helpers/userOnline': userOnline,\n  'helpers/listItems': listItems,\n  'helpers/textContrastClass': textContrastClass,\n  'resolvers/DefaultResolver': DefaultResolver,\n  'states/PaginatedListState': PaginatedListState,\n  'states/AlertManagerState': AlertManagerState,\n  'states/ModalManagerState': ModalManagerState,\n  'states/PageState': PageState,\n};\n","/**\n * The `mixin` utility assigns the properties of a set of 'mixin' objects to\n * the prototype of a parent object.\n *\n * @example\n * class MyClass extends mixin(ExistingClass, evented, etc) {}\n *\n * @param {object} Parent The class to extend the new class from.\n * @param {Record<string, any>[]} mixins The objects to mix in.\n * @return {object} A new class that extends Parent and contains the mixins.\n */\nexport default function mixin(Parent, ...mixins) {\n  class Mixed extends Parent {}\n\n  mixins.forEach((object) => {\n    Object.assign(Mixed.prototype, object);\n  });\n\n  return Mixed;\n}\n","import type Mithril from 'mithril';\n\n/**\n * The `Fragment` class represents a chunk of DOM that is rendered once with Mithril and then takes\n * over control of its own DOM and lifecycle.\n *\n * This is very similar to the `Component` wrapper class, but is used for more fine-grained control over\n * the rendering and display of some significant chunks of the DOM. In contrast to components, fragments\n * do not offer Mithril's lifecycle hooks.\n *\n * Use this when you want to enjoy the benefits of JSX / VDOM for initial rendering, combined with\n * small helper methods that then make updates to that DOM directly, instead of fully redrawing\n * everything through Mithril.\n *\n * This should only be used when necessary, and only with `m.render`. If you are unsure whether you need\n * this or `Component, you probably need `Component`.\n */\nexport default abstract class Fragment {\n  /**\n   * The root DOM element for the fragment.\n   */\n  protected element!: Element;\n\n  /**\n   * Returns a jQuery object for this fragment's element. If you pass in a\n   * selector string, this method will return a jQuery object, using the current\n   * element as its buffer.\n   *\n   * For example, calling `fragment.$('li')` will return a jQuery object\n   * containing all of the `li` elements inside the DOM element of this\n   * fragment.\n   *\n   * @param [selector] a jQuery-compatible selector string\n   * @returns the jQuery object for the DOM node\n   * @final\n   */\n  public $(selector?: string): JQuery {\n    const $element = $(this.element) as JQuery<HTMLElement>;\n\n    return selector ? $element.find(selector) : $element;\n  }\n\n  /**\n   * Get the renderable virtual DOM that represents the fragment's view.\n   *\n   * This should NOT be overridden by subclasses. Subclasses wishing to define\n   * their virtual DOM should override Fragment#view instead.\n   *\n   * @example\n   * const fragment = new MyFragment();\n   * m.render(document.body, fragment.render());\n   *\n   * @final\n   */\n  public render(): Mithril.Vnode<Mithril.Attributes, this> {\n    const vdom = this.view();\n\n    vdom.attrs = vdom.attrs || {};\n\n    const originalOnCreate = vdom.attrs.oncreate;\n\n    vdom.attrs.oncreate = (vnode) => {\n      this.element = vnode.dom;\n      if (originalOnCreate) originalOnCreate.apply(this, [vnode]);\n    };\n\n    return vdom;\n  }\n\n  /**\n   * Creates a view out of virtual elements.\n   */\n  abstract view(): Mithril.Vnode<Mithril.Attributes, this>;\n}\n","import app from '../../common/app';\n\n/**\n * The `punctuateSeries` helper formats a list of strings (e.g. names) to read\n * fluently in the application's locale.\n *\n * ```js\n * punctuateSeries(['Toby', 'Franz', 'Dominion']) // Toby, Franz, and Dominion\n * ```\n *\n * @param {import('mithril').Children[]} items\n * @return {import('mithril').Children}')}\n */\nexport default function punctuateSeries(items) {\n  if (items.length === 2) {\n    return app.translator.trans('core.lib.series.two_text', {\n      first: items[0],\n      second: items[1],\n    });\n  } else if (items.length >= 3) {\n    // If there are three or more items, we will join all but the first and\n    // last items with the equivalent of a comma, and then we will feed that\n    // into the translator along with the first and last item.\n    const second = items\n      .slice(1, items.length - 1)\n      .reduce((list, item) => list.concat([item, app.translator.trans('core.lib.series.glue_text')]), [])\n      .slice(0, -1);\n\n    return app.translator.trans('core.lib.series.three_text', {\n      first: items[0],\n      second,\n      third: items[items.length - 1],\n    });\n  }\n\n  return items;\n}\n","import app from '../../forum/app';\nimport Button from '../../common/components/Button';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `LogInButton` component displays a social login button which will open\n * a popup window containing the specified path.\n *\n * ### Attrs\n *\n * - `path`\n */\nexport default class LogInButton extends Button {\n  static initAttrs(attrs) {\n    attrs.className = classList(attrs.className, 'LogInButton');\n\n    attrs.onclick = function () {\n      const width = 580;\n      const height = 400;\n      const $window = $(window);\n\n      window.open(\n        app.forum.attribute('baseUrl') + attrs.path,\n        'logInPopup',\n        `width=${width},` +\n          `height=${height},` +\n          `top=${$window.height() / 2 - height / 2},` +\n          `left=${$window.width() / 2 - width / 2},` +\n          'status=no,scrollbars=yes,resizable=no'\n      );\n    };\n\n    super.initAttrs(attrs);\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport Link from '../../common/components/Link';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport highlight from '../../common/helpers/highlight';\n\n/**\n * The `PostPreview` component shows a link to a post containing the avatar and\n * username of the author, and a short excerpt of the post's content.\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class PostPreview extends Component {\n  view() {\n    const post = this.attrs.post;\n    const user = post.user();\n\n    return (\n      <Link className=\"PostPreview\" href={app.route.post(post)} onclick={this.attrs.onclick}>\n        <span className=\"PostPreview-content\">\n          {avatar(user)}\n          {username(user)} <span className=\"PostPreview-excerpt\">{this.excerpt()}</span>\n        </span>\n      </Link>\n    );\n  }\n\n  /**\n   * @returns {string|undefined|null}\n   */\n  content() {\n    return this.attrs.post.contentType() === 'comment' && this.attrs.post.contentPlain();\n  }\n\n  /**\n   * @returns {string}\n   */\n  excerpt() {\n    return this.content() ? highlight(this.content(), this.attrs.highlight, 300) : '';\n  }\n}\n","import compat from '../common/compat';\n\nimport PostControls from './utils/PostControls';\nimport KeyboardNavigatable from '../common/utils/KeyboardNavigatable';\nimport slidable from './utils/slidable';\nimport History from './utils/History';\nimport DiscussionControls from './utils/DiscussionControls';\nimport alertEmailConfirmation from './utils/alertEmailConfirmation';\nimport UserControls from './utils/UserControls';\nimport Pane from './utils/Pane';\nimport ComposerState from './states/ComposerState';\nimport DiscussionListState from './states/DiscussionListState';\nimport GlobalSearchState from './states/GlobalSearchState';\nimport NotificationListState from './states/NotificationListState';\nimport PostStreamState from './states/PostStreamState';\nimport SearchState from './states/SearchState';\nimport UserSecurityPageState from './states/UserSecurityPageState';\nimport AffixedSidebar from './components/AffixedSidebar';\nimport DiscussionPage from './components/DiscussionPage';\nimport DiscussionListPane from './components/DiscussionListPane';\nimport LogInModal from './components/LogInModal';\nimport NewAccessTokenModal from './components/NewAccessTokenModal';\nimport ComposerBody from './components/ComposerBody';\nimport ForgotPasswordModal from './components/ForgotPasswordModal';\nimport Notification from './components/Notification';\nimport LogInButton from './components/LogInButton';\nimport DiscussionsUserPage from './components/DiscussionsUserPage';\nimport Composer from './components/Composer';\nimport SessionDropdown from './components/SessionDropdown';\nimport HeaderPrimary from './components/HeaderPrimary';\nimport PostEdited from './components/PostEdited';\nimport PostStream from './components/PostStream';\nimport ChangePasswordModal from './components/ChangePasswordModal';\nimport IndexPage from './components/IndexPage';\nimport DiscussionRenamedNotification from './components/DiscussionRenamedNotification';\nimport DiscussionsSearchSource from './components/DiscussionsSearchSource';\nimport HeaderSecondary from './components/HeaderSecondary';\nimport ComposerButton from './components/ComposerButton';\nimport DiscussionList from './components/DiscussionList';\nimport ReplyPlaceholder from './components/ReplyPlaceholder';\nimport AvatarEditor from './components/AvatarEditor';\nimport Post from './components/Post';\nimport SettingsPage from './components/SettingsPage';\nimport TerminalPost from './components/TerminalPost';\nimport ChangeEmailModal from './components/ChangeEmailModal';\nimport NotificationsDropdown from './components/NotificationsDropdown';\nimport UserPage from './components/UserPage';\nimport PostUser from './components/PostUser';\nimport UserCard from './components/UserCard';\nimport UsersSearchSource from './components/UsersSearchSource';\nimport UserSecurityPage from './components/UserSecurityPage';\nimport NotificationGrid from './components/NotificationGrid';\nimport PostPreview from './components/PostPreview';\nimport EventPost from './components/EventPost';\nimport DiscussionHero from './components/DiscussionHero';\nimport PostMeta from './components/PostMeta';\nimport DiscussionRenamedPost from './components/DiscussionRenamedPost';\nimport DiscussionComposer from './components/DiscussionComposer';\nimport LogInButtons from './components/LogInButtons';\nimport NotificationList from './components/NotificationList';\nimport WelcomeHero from './components/WelcomeHero';\nimport SignUpModal from './components/SignUpModal';\nimport CommentPost from './components/CommentPost';\nimport ComposerPostPreview from './components/ComposerPostPreview';\nimport ReplyComposer from './components/ReplyComposer';\nimport NotificationsPage from './components/NotificationsPage';\nimport PostStreamScrubber from './components/PostStreamScrubber';\nimport EditPostComposer from './components/EditPostComposer';\nimport RenameDiscussionModal from './components/RenameDiscussionModal';\nimport Search from './components/Search';\nimport DiscussionListItem from './components/DiscussionListItem';\nimport LoadingPost from './components/LoadingPost';\nimport PostsUserPage from './components/PostsUserPage';\nimport DiscussionPageResolver from './resolvers/DiscussionPageResolver';\nimport BasicEditorDriver from '../common/utils/BasicEditorDriver';\nimport routes from './routes';\nimport ForumApplication from './ForumApplication';\nimport isSafariMobile from './utils/isSafariMobile';\nimport AccessTokensList from './components/AccessTokensList';\nimport DiscussionsSearchItem from './components/DiscussionsSearchItem';\n\nexport default Object.assign(compat, {\n  'utils/PostControls': PostControls,\n  // @deprecated import from 'flarum/common/utils/KeyboardNavigatable' instead\n  'utils/KeyboardNavigatable': KeyboardNavigatable,\n  'utils/slidable': slidable,\n  'utils/History': History,\n  'utils/DiscussionControls': DiscussionControls,\n  'utils/alertEmailConfirmation': alertEmailConfirmation,\n  'utils/UserControls': UserControls,\n  'utils/Pane': Pane,\n  'utils/BasicEditorDriver': BasicEditorDriver,\n  'utils/isSafariMobile': isSafariMobile,\n  'states/ComposerState': ComposerState,\n  'states/DiscussionListState': DiscussionListState,\n  'states/GlobalSearchState': GlobalSearchState,\n  'states/NotificationListState': NotificationListState,\n  'states/PostStreamState': PostStreamState,\n  'states/SearchState': SearchState,\n  'states/UserSecurityPageState': UserSecurityPageState,\n  'components/AffixedSidebar': AffixedSidebar,\n  'components/DiscussionPage': DiscussionPage,\n  'components/DiscussionListPane': DiscussionListPane,\n  'components/LogInModal': LogInModal,\n  'components/NewAccessTokenModal': NewAccessTokenModal,\n  'components/ComposerBody': ComposerBody,\n  'components/ForgotPasswordModal': ForgotPasswordModal,\n  'components/Notification': Notification,\n  'components/LogInButton': LogInButton,\n  'components/DiscussionsUserPage': DiscussionsUserPage,\n  'components/Composer': Composer,\n  'components/SessionDropdown': SessionDropdown,\n  'components/HeaderPrimary': HeaderPrimary,\n  'components/PostEdited': PostEdited,\n  'components/PostStream': PostStream,\n  'components/ChangePasswordModal': ChangePasswordModal,\n  'components/IndexPage': IndexPage,\n  'components/DiscussionRenamedNotification': DiscussionRenamedNotification,\n  'components/DiscussionsSearchSource': DiscussionsSearchSource,\n  'components/DiscussionsSearchItem': DiscussionsSearchItem,\n  'components/HeaderSecondary': HeaderSecondary,\n  'components/ComposerButton': ComposerButton,\n  'components/DiscussionList': DiscussionList,\n  'components/ReplyPlaceholder': ReplyPlaceholder,\n  'components/AvatarEditor': AvatarEditor,\n  'components/Post': Post,\n  'components/SettingsPage': SettingsPage,\n  'components/TerminalPost': TerminalPost,\n  'components/ChangeEmailModal': ChangeEmailModal,\n  'components/NotificationsDropdown': NotificationsDropdown,\n  'components/UserPage': UserPage,\n  'components/PostUser': PostUser,\n  'components/UserCard': UserCard,\n  'components/UsersSearchSource': UsersSearchSource,\n  'components/UserSecurityPage': UserSecurityPage,\n  'components/NotificationGrid': NotificationGrid,\n  'components/PostPreview': PostPreview,\n  'components/EventPost': EventPost,\n  'components/DiscussionHero': DiscussionHero,\n  'components/PostMeta': PostMeta,\n  'components/DiscussionRenamedPost': DiscussionRenamedPost,\n  'components/DiscussionComposer': DiscussionComposer,\n  'components/LogInButtons': LogInButtons,\n  'components/NotificationList': NotificationList,\n  'components/WelcomeHero': WelcomeHero,\n  'components/SignUpModal': SignUpModal,\n  'components/CommentPost': CommentPost,\n  'components/ComposerPostPreview': ComposerPostPreview,\n  'components/ReplyComposer': ReplyComposer,\n  'components/NotificationsPage': NotificationsPage,\n  'components/PostStreamScrubber': PostStreamScrubber,\n  'components/EditPostComposer': EditPostComposer,\n  'components/RenameDiscussionModal': RenameDiscussionModal,\n  'components/Search': Search,\n  'components/DiscussionListItem': DiscussionListItem,\n  'components/LoadingPost': LoadingPost,\n  'components/PostsUserPage': PostsUserPage,\n  'components/AccessTokensList': AccessTokensList,\n  'resolvers/DiscussionPageResolver': DiscussionPageResolver,\n  routes: routes,\n  ForumApplication: ForumApplication,\n});\n","// Expose punycode and ColorThief to the window browser object\nimport 'expose-loader?exposes=punycode!punycode';\nimport 'expose-loader?exposes=ColorThief!color-thief-browser';\n\nimport app from './app';\n\nexport { app };\n\n// Export compat API\nimport compatObj from './compat';\nimport proxifyCompat from '../common/utils/proxifyCompat';\n\n// @ts-ignore\ncompatObj.app = app;\n\nexport const compat = proxifyCompat(compatObj, 'forum');\n"],"names":["Array","prototype","flat","depth","reduce","call","this","acc","val","concat","isArray","$","Affix","element","options","extend","DEFAULTS","target","document","find","$target","on","proxy","checkPosition","checkPositionWithEventLoop","$element","affixed","unpin","pinnedOffset","Plugin","option","each","$this","data","VERSION","RESET","offset","window","getState","scrollHeight","height","offsetTop","offsetBottom","scrollTop","position","targetHeight","top","initializing","colliderTop","getPinnedOffset","removeClass","addClass","setTimeout","is","bottom","Math","max","body","affix","css","affixType","e","Event","trigger","isDefaultPrevented","replace","old","fn","Constructor","noConflict","$spy","jQuery","toggle","Dropdown","getParent","selector","attr","test","$parent","length","parent","clearMenus","which","remove","relatedTarget","hasClass","type","tagName","contains","isActive","documentElement","closest","createElement","insertAfter","toggleClass","keydown","preventDefault","stopPropagation","$items","index","eq","dropdown","DISALLOWED_ATTRIBUTES","uriAttrs","SAFE_URL_PATTERN","DATA_URL_PATTERN","allowedAttribute","allowedAttributeList","attrName","nodeName","toLowerCase","inArray","Boolean","nodeValue","match","regExp","filter","value","RegExp","i","l","sanitizeHtml","unsafeHtml","whiteList","sanitizeFn","implementation","createHTMLDocument","createdDocument","innerHTML","whitelistKeys","map","el","elements","len","elName","attributeList","attributes","whitelistedAttributes","j","len2","removeAttribute","parentNode","removeChild","Tooltip","enabled","timeout","hoverState","inState","init","TRANSITION_DURATION","animation","placement","template","title","delay","html","container","viewport","padding","sanitize","a","area","b","br","col","code","div","em","hr","h1","h2","h3","h4","h5","h6","img","li","ol","p","pre","s","small","span","sub","sup","strong","u","ul","getOptions","$viewport","isFunction","click","hover","focus","constructor","Error","triggers","split","eventIn","eventOut","enter","leave","_options","fixTitle","getDefaults","dataAttributes","dataAttr","hasOwnProperty","show","hide","getDelegateOptions","defaults","key","obj","self","currentTarget","tip","clearTimeout","isInStateTrue","hasContent","inDom","ownerDocument","that","$tip","tipId","getUID","setContent","autoToken","autoPlace","detach","left","display","appendTo","pos","getPosition","actualWidth","offsetWidth","actualHeight","offsetHeight","orgPlacement","viewportDim","right","width","calculatedOffset","getCalculatedOffset","applyPlacement","complete","prevHoverState","support","transition","one","emulateTransitionEnd","marginTop","parseInt","marginLeft","isNaN","setOffset","using","props","round","delta","getViewportAdjustedDelta","isVertical","arrowDelta","arrowOffsetPosition","replaceArrow","dimension","arrow","getTitle","text","callback","removeAttr","$e","isBody","elRect","getBoundingClientRect","isSvg","SVGElement","elOffset","scroll","outerDims","viewportPadding","viewportDimensions","topEdgeOffset","bottomEdgeOffset","leftEdgeOffset","rightEdgeOffset","o","prefix","random","getElementById","$arrow","enable","disable","toggleEnabled","destroy","off","removeData","tooltip","duration","called","$el","end","transEndEventNames","WebkitTransition","MozTransition","OTransition","name","undefined","style","transitionEnd","event","special","bsTransitionEnd","bindType","delegateType","handle","handleObj","handler","apply","arguments","CanvasImage","canvas","context","getContext","appendChild","drawImage","clear","clearRect","update","putImageData","getPixelCount","getImageData","removeCanvas","ColorThief","getColor","getPalette","c","d","f","g","k","m","n","push","MMCQ","quantize","palette","pv","slice","naturalOrder","sum","sort","peek","pop","size","debug","h","r1","r2","g1","g2","b1","b2","histo","vboxes","vbox","count","volume","forEach","copy","min","_volume","_count_set","_count","avg","_avg","gval","bval","color","nearest","sqrt","pow","forcebw","module","exports","r","y","M","weekdays","months","ordinal","t","String","join","v","z","utcOffset","abs","floor","date","year","month","clone","add","ceil","w","D","ms","Q","_","S","args","O","locale","$L","utc","$u","x","$x","$offset","parse","$d","Date","NaN","substring","UTC","$y","getFullYear","$M","getMonth","$D","getDate","$W","getDay","$H","getHours","$m","getMinutes","$s","getSeconds","$ms","getMilliseconds","$utils","isValid","toString","isSame","startOf","endOf","isAfter","isBefore","$g","set","unix","valueOf","getTime","toDate","$locale","weekStart","$set","daysInMonth","get","Number","subtract","format","invalidDate","meridiem","YY","YYYY","MM","MMM","monthsShort","MMMM","DD","dd","weekdaysMin","ddd","weekdaysShort","dddd","H","HH","hh","A","mm","ss","SSS","Z","getTimezoneOffset","diff","toJSON","toISOString","toUTCString","T","$i","isDayjs","en","Ls","LTS","LT","L","LL","LLL","LLLL","formats","toUpperCase","future","past","yy","fromToBase","relativeTime","thresholds","rounding","to","from","toNow","fromNow","globalThis","Function","global","keyHandler","keys","origHandler","hotkeys","filterInputAcceptingElements","textInputTypes","filterContentEditable","filterTextInputs","textAcceptingInputTypes","specialKeys","character","fromCharCode","modif","possible","specialKey","metaKey","ctrlKey","indexOf","shiftNums","version","factory","noGlobal","arr","getProto","Object","getPrototypeOf","array","class2type","hasOwn","fnToString","ObjectFunctionString","nodeType","item","isWindow","preservedScriptAttributes","src","nonce","noModule","DOMEval","node","doc","script","getAttribute","setAttribute","head","toType","isArrayLike","jquery","toArray","num","pushStack","elems","ret","merge","prevObject","elem","first","last","even","grep","_elem","odd","splice","copyIsArray","deep","isPlainObject","expando","isReady","error","msg","noop","proto","Ctor","isEmptyObject","globalEval","makeArray","results","second","invert","matches","callbackExpect","arg","guid","Symbol","iterator","_i","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","pushNative","list","booleans","whitespace","identifier","pseudos","rwhitespace","rtrim","rcomma","rcombinators","rdescend","rpseudo","ridentifier","matchExpr","rhtml","rinputs","rheader","rnative","rquickExpr","rsibling","runescape","funescape","escape","nonHex","high","rcssescape","fcssescape","ch","asCodePoint","charCodeAt","unloadHandler","inDisabledFieldset","addCombinator","disabled","dir","next","childNodes","els","seed","nid","groups","newSelector","newContext","exec","id","getElementsByTagName","getElementsByClassName","qsa","testContext","scope","toSelector","querySelectorAll","qsaError","cache","cacheLength","shift","markFunction","assert","addHandle","attrs","attrHandle","siblingCheck","cur","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createDisabledPseudo","isDisabled","createPositionalPseudo","argument","matchIndexes","namespace","namespaceURI","hasCompare","subWindow","defaultView","addEventListener","attachEvent","className","createComment","getById","getElementsByName","attrId","getAttributeNode","tag","tmp","input","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","specified","sel","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","selectors","createPseudo","relative","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","_argument","simple","forward","ofType","_context","xml","uniqueCache","outerCache","nodeIndex","start","useCache","lastChild","uniqueID","pseudo","setFilters","idx","matched","matcher","unmatched","lang","elemLang","hash","location","activeElement","hasFocus","href","tabIndex","checked","selected","selectedIndex","_matchIndexes","radio","checkbox","file","password","image","submit","reset","tokens","combinator","base","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","contexts","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","filters","parseOnly","soFar","preFilters","cached","setMatchers","elementMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","matcherFromGroupMatchers","token","compiled","_name","defaultValue","unique","isXMLDoc","escapeSelector","until","truncate","siblings","rneedsContext","needsContext","rsingleTag","winnow","qualifier","not","rootjQuery","root","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","prev","sibling","has","targets","prevAll","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","content","reverse","rnothtmlwhite","Identity","Thrower","ex","adoptValue","resolve","reject","noValue","method","promise","fail","then","Callbacks","object","flag","createOptions","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","empty","lock","fireWith","Deferred","func","tuples","state","always","deferred","pipe","fns","newDefer","tuple","returned","progress","notify","onFulfilled","onRejected","onProgress","maxDepth","mightThrow","TypeError","notifyWith","resolveWith","process","exceptionHook","stackTrace","rejectWith","getStackHook","stateString","when","singleValue","remaining","resolveContexts","resolveValues","primary","updateFunc","rerrorNames","stack","console","warn","message","readyException","readyList","completed","removeEventListener","readyWait","wait","readyState","doScroll","access","chainable","emptyGet","raw","bulk","_key","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","camelCase","string","acceptData","owner","Data","uid","defineProperty","configurable","prop","hasData","dataPriv","dataUser","rbrace","rmultiDash","JSON","getData","_data","_removeData","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","defer","pnum","source","rcssNum","cssExpand","isAttached","composed","getRootNode","isHiddenWithinTree","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","defaultDisplayMap","getDefaultDisplay","showHide","values","rcheckableType","rtagName","rscriptType","createDocumentFragment","checkClone","cloneNode","noCloneChecked","wrapMap","thead","tr","td","_default","getAll","setGlobalEval","refElements","tbody","tfoot","colgroup","caption","th","optgroup","buildFragment","scripts","selection","ignored","wrap","attached","fragment","nodes","htmlPrefilter","createTextNode","rtypenamespace","returnTrue","returnFalse","expectSync","err","safeActiveElement","types","origFn","leverageNative","notAsync","saved","isTrigger","stopImmediatePropagation","handleObjIn","eventHandle","events","handlers","namespaces","origType","elemData","create","triggered","dispatch","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","isImmediatePropagationStopped","rnamespace","postDispatch","matchedHandlers","matchedSelectors","button","addProp","hook","enumerable","originalEvent","writable","load","noBubble","beforeunload","returnValue","defaultPrevented","timeStamp","now","isSimulated","altKey","bubbles","cancelable","changedTouches","detail","eventPhase","pageX","pageY","shiftKey","view","charCode","keyCode","buttons","clientX","clientY","offsetX","offsetY","pointerId","pointerType","screenX","screenY","targetTouches","toElement","touches","blur","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","udataOld","udataCur","fixInput","domManip","collection","hasScripts","iNoClone","valueIsFunction","_evalUrl","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","append","prepend","insertBefore","before","after","replaceWith","replaceChild","prependTo","replaceAll","original","insert","rnumnonpx","rcustomProp","getStyles","opener","getComputedStyle","swap","rboxStyle","rtrimCSS","curCSS","computed","minWidth","maxWidth","isCustomProp","getPropertyValue","pixelBoxStyles","addGetHookIf","conditionFn","hookFn","computeStyleTests","cssText","divStyle","pixelPositionVal","reliableMarginLeftVal","roundPixelMeasures","pixelBoxStylesVal","boxSizingReliableVal","scrollboxSizeVal","measure","parseFloat","reliableTrDimensionsVal","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","table","trChild","trStyle","borderTopWidth","borderBottomWidth","cssPrefixes","emptyStyle","vendorProps","finalPropName","cssProps","capName","vendorPropName","rdisplayswap","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","boxModelAdjustment","box","isBorderBox","styles","computedVal","extra","getWidthOrHeight","valueIsBorderBox","offsetProp","getClientRects","Tween","easing","cssHooks","opacity","origName","setProperty","isFinite","scrollboxSizeBuggy","margin","border","suffix","expand","expanded","parts","propHooks","run","percent","eased","step","fx","scrollLeft","linear","swing","cos","PI","fxNow","inProgress","rfxtypes","rrun","schedule","hidden","requestAnimationFrame","interval","tick","createFxNow","genFx","includeWidth","createTween","Animation","tweeners","properties","stopped","prefilters","currentTime","startTime","tweens","opts","specialEasing","originalProperties","originalOptions","gotoEnd","propFilter","bind","timer","anim","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","overflow","overflowX","overflowY","prefilter","speed","opt","speeds","fadeTo","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","slow","fast","time","checkOn","optSelected","radioValue","boolHook","nType","attrHooks","bool","attrNames","getter","lowercaseName","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","tabindex","classNames","curValue","finalValue","stateVal","isValidValue","rreturn","valHooks","optionSet","focusin","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","parentWindow","simulate","triggerHandler","attaches","rquery","parseXML","parserErrorElem","DOMParser","parseFromString","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","traditional","param","valueOrFunction","encodeURIComponent","serialize","serializeArray","r20","rhash","rantiCache","rheaders","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","active","lastModified","etag","url","isLocal","protocol","processData","async","contentType","accepts","json","responseFields","converters","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","urlAnchor","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","overrideMimeType","mimeType","status","abort","statusText","finalText","crossDomain","host","ifModified","headers","beforeSend","success","send","nativeStatusText","responses","isSuccess","response","modified","ct","finalDataType","firstDataType","ajaxHandleResponses","conv2","current","conv","dataFilter","ajaxConvert","getJSON","getScript","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","visible","xhr","XMLHttpRequest","xhrSuccessStatus","xhrSupported","cors","errorCallback","open","username","xhrFields","onload","onerror","onabort","ontimeout","onreadystatechange","responseType","responseText","binary","scriptAttrs","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","keepScripts","parsed","params","animated","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","rect","win","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","defaultExtra","funcName","unbind","delegate","undelegate","fnOver","fnOut","holdReady","hold","parseJSON","isNumeric","trim","_jQuery","_$","Vnode","require","render","subscriptions","rendering","pending","sync","redraw","mount","component","Promise","buildPathname","parsePathname","compileTemplate","assign","sentinel","$window","mountRedraw","fireAsync","setPath","path","history","replaceState","route","pushState","currentPath","lastUpdate","currentResolver","SKIP","defaultRoute","routes","onremove","SyntaxError","callAsync","setImmediate","scheduled","defaultData","some","ReferenceError","resolveRoute","search","pathname","decodeURIComponent","loop","payload","matchedRoute","localComp","comp","onmatch","onbeforeupdate","oncreate","vnode","Link","onclick","oninit","onupdate","onbeforeremove","child","handleEvent","hyperscript","trust","request","parseQueryString","buildQueryString","PromisePolyfill","queryIndex","hashIndex","queryEnd","pathEnd","query","resolved","variadic","newQueryIndex","newHashIndex","newQueryEnd","newPathEnd","querystring","templateData","templateKeys","regexp","executor","resolvers","rejectors","resolveCurrent","rejectCurrent","instance","_instance","shouldAbsorb","execute","retry","executeOnce","runs","onRejection","resolveNext","rejectNext","reason","all","total","consume","race","destructure","charAt","entries","counters","entry","levels","cursor","level","nextLevel","isNumber","desc","getOwnPropertyDescriptor","hyperscriptVnode","normalizeChildren","selectorParser","selectorCache","isEmpty","compileSelector","classes","attrValue","execSelector","newAttrs","currentRedraw","$doc","nameSpace","svg","math","getNameSpace","xmlns","checkState","callHook","createNodes","vnodes","ns","createNode","initLifecycle","dom","insertNode","createText","createHTML","domSize","createFragment","createElementNS","setAttr","setAttrs","maybeSetContentEditable","normalized","setLateSelectAttrs","$$reentrantLock$$","normalize","initComponent","createComponent","possibleParents","updateNodes","removeNodes","isOldKeyed","isKeyed","oldStart","oe","ve","topSibling","oldEnd","updateNode","getNextSibling","moveNodes","lisIndices","originalNextSibling","vnodesLength","oldIndices","getKeyMap","oldIndex","il","lisTemp","makeLisIndices","commonLength","removeNode","oldTag","force","shouldNotUpdate","updateLifecycle","updateText","removeHTML","updateHTML","updateFragment","updateAttrs","updateElement","updateComponent","frag","moveChildToFrag","contenteditable","contentEditable","stateResult","attrsResult","mask","reallyRemove","isLifecycleMethod","isFormAttribute","updateEvent","setAttributeNS","updateStyle","hasPropertyKey","nsLastIndex","uppercaseRegex","capital","normalizeKey","removeProperty","EventDict","ev","prevRedraw","oncompletion","callbackCount","PromiseProxy","makeRequest","background","hasHeader","__proto__","replacedAbort","assumeJSON","FormData","extract","aborted","user","deserialize","withCredentials","config","stringify","callbackKey","Stream","lift","streams","scan","origin","stream","combine","scanMerge","changed","warnedHalt","dependentStreams","dependentFns","_changing","_state","createEnd","_parents","_unregisterChild","_map","ignoreInitial","s1","s2","childIndex","every","mappers","endStream","mapper","log","maxInt","regexPunycode","regexNonASCII","regexSeparators","errors","stringFromCharCode","RangeError","mapDomain","encoded","ucs2decode","output","counter","ucs2encode","fromCodePoint","digitToBasic","digit","adapt","numPoints","firstTime","baseMinusTMin","decode","codePoint","inputLength","bias","basic","lastIndexOf","oldi","baseMinusT","out","encode","basicLength","handledCPCount","handledCPCountPlusOne","q","qMinusT","toUnicode","toASCII","isBrowser","isFirefox","mozInnerScreenX","getCaretCoordinates","querySelector","currentStyle","isInput","whiteSpace","wordWrap","lineHeight","coordinates","offsetLeft","backgroundColor","___EXPOSE_LOADER_IMPORT___","___EXPOSE_LOADER_GLOBAL_THIS___","arr2","__esModule","_defineProperties","descriptor","protoProps","staticProps","_getPrototypeOf","setPrototypeOf","subClass","superClass","_s","_e","_arr","_n","_d","_typeof","assertThisInitialized","_regeneratorRuntime","Op","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","Context","makeInvokeMethod","tryCatch","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","NativeIteratorPrototype","Gp","defineIteratorMethods","_invoke","AsyncIterator","PromiseImpl","invoke","record","__await","unwrapped","previousPromise","callInvokeWithMethodAndArg","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","info","resultName","nextLoc","pushTryEntry","locs","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","iterable","iteratorMethod","doneResult","displayName","isGeneratorFunction","genFun","ctor","mark","awrap","iter","skipTempReset","rootRecord","rval","exception","loc","caught","hasCatch","hasFinally","finallyEntry","thrown","delegateYield","_setPrototypeOf","arrayWithHoles","iterableToArrayLimit","unsupportedIterableToArray","nonIterableRest","arrayLikeToArray","minLen","runtime","regeneratorRuntime","accidentalStrictMode","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","definition","bidi","multi","onchange","selectedOptions","oninput","ctrl","patchMithril","defaultMithril","modifiedMithril","Proxy","Reflect","app","dayjs","localizedFormat","tooltipGen","_assertThisInitialized","_inheritsLoose","_extends","setRouteWithForcedRefresh","newOptions","caller","includes","History","getCurrent","getPrevious","secondTop","canGoBack","back","home","backUrl","Pane","pinnedKey","pinned","localStorage","getItem","showing","hideTimeout","onmouseleave","togglePinned","setItem","Component","componentAttrs","initAttrs","subclassOf","B","PageState","Page","bodyClass","scrollTopOnCreate","useBrowserScrollRestoration","previous","routeName","drawer","modal","close","scrollRestoration","_createClass","isObject","Item","priority","ItemList","_items","getPriority","setPriority","otherList","keepPrimitives","createItemContentProxy","toObject","itemName","property","receiver","Separator","isListItem","isVnode","isSeparator","listItems","rawItems","customTag","items","prevItem","newItems","Tag","itemClassName","classList","DiscussionHero","discussion","badges","_objectWithoutPropertiesLoose","excluded","sourceKeys","SluggingMode","external","avatar","loading","hasTitle","avatarUrl","alt","slug","mode","ALPHANUMERIC","UTF8","getPlainContent","removeSelectors","innerText","ucfirst","substr","camelCaseToSnakeCase","str","generateRandomString","Uint8Array","crypto","getRandomValues","dec","padStart","highlight","phrase","highlighted","icon","fontClass","extractText","vdom","humanTime","translator","trans","abbreviateNumber","number","toFixed","buttonClassName","menuClassName","label","caretIcon","accessibleToggleLabel","renderItems","lazyDraw","getButton","getMenu","onshow","$menu","isRight","windowSrollTop","windowHeight","windowScrollLeft","windowWidth","onhide","getButtonContent","datetime","full","ago","humanTimeUtil","pubdate","TerminalPost","lastPost","replyCount","SubtreeRetainer","callbacks","needsRebuild","invalidate","LoadingIndicator","containerClassName","completeClassName","completeContainerClassName","role","containerAttrs","ConfirmDocumentUnload","boundHandler","fireDebugWarning","forum","attribute","fireDeprecationWarning","githubId","removedFrom","repo","Button","ariaLabel","iconName","_class","buttonAttrs","hasIcon","canInsertText","insertText","textarea","selectionStart","selectionEnd","originalSelectionStart","execCommand","endsWith","dispatchEvent","CustomEvent","setSelectionRange","BasicEditorDriver","build","placeholder","callInputListeners","inputListeners","listener","onkeyup","keyHandlers","onsubmit","moveCursorTo","getSelectionRange","getLastNChars","insertAtCursor","insertAt","insertBetween","cursorPos","replaceBeforeCursor","relCoords","childDomNode","oldText","oldVisibility","shouldRecreateTooltip","shouldChangeTooltipVisibility","tooltipVisible","showOnFocus","ignoreTitleWarning","realText","getRealText","checkDomNodeChanged","recreateTooltip","createTooltip","updateVisibility","domNode","isSameNode","TextEditor","controlItems","toolbarItems","composer","editor","buildEditor","newDisabled","buildEditorParams","submitLabel","preview","ComposerBody","confirmExit","preventClosingWhen","hasChanges","fields","originalContent","headerItems","jumpToPreview","loaded","minimizeComposerIfFullScreen","ReplyComposer","relationships","save","post","goToNumber","alert","viewButton","controls","Alert","dismissible","ondismiss","dismissControl","iconHelper","Modal","alertAttrs","missingMethods","animateShow","onready","dismissibleOptions","viaCloseButton","animateHide","pointer","isDismissible","isDismissibleViaCloseButton","viaEscKey","isDismissibleViaEscKey","viaBackdropClick","isDismissibleViaBackdropClick","ForgotPasswordModal","email","emailLabel","requestParams","errorHandler","LogInButtons","SignUpModal","footer","isProvided","field","provided","usernameLabel","passwordLabel","autocomplete","logIn","identification","LogInModal","submitData","reload","authData","remember","identificationLabel","forgotPassword","signUp","loginParams","RenameDiscussionModal","currentTitle","newTitle","section","userControls","DiscussionPage","canReply","replyAction","moderationControls","canRename","renameAction","destructiveControls","isHidden","canHide","restoreAction","canDelete","deleteAction","hideAction","goToLast","forceRefresh","pushData","hiddenAt","hiddenUser","confirm","slidable","$underneathLeft","$underneathRight","startX","startY","couldBeSliding","isSliding","animatePos","newPos","newX","newY","$underneath","side","activate","specialChars","escapeRegExp","DiscussionListItem","subtree","highlightRegExp","freshness","elementAttrs","Slidable","viewItems","DiscussionControls","controlsView","slidableUnderneathView","contentView","isUnread","markAsRead","isRead","unread","read","contentItems","authorAvatarView","badgesView","mainView","replyCountItem","createdAt","jumpTo","getJumpTo","mainItems","infoItems","mostRelevantPost","lastPostNumber","lastReadPostNumber","slidableInstance","showFirstPost","showRepliesCount","firstPost","excerpt","contentPlain","unreadCount","Placeholder","DiscussionList","getParams","isLoading","isInitialLoading","isLoadingNext","hasNext","loadNext","pageSize","isSearchResults","getPages","pg","pageNum","itemNum","hotEdge","DiscussionListPane","hasItems","enoughSpace","$list","pane","$discussion","listTop","listBottom","outerHeight","discussionTop","discussionBottom","ScrollListener","ticking","passive","LoadingPost","ComposerPostPreview","surround","updatePreview","isVisible","s9e","TextFormatter","updateInterval","setInterval","clearInterval","ReplyPlaceholder","anchorPreview","anchorToBottom","PostStream","scrollListener","onscroll","lastTime","viewingEnd","posts","postIds","postFadeIn","visibleStart","PostComponent","dt","period","postStreamElement","afterFirstPostItems","visibleEnd","endItems","pagesLoading","triggerScroll","calculatePositionTimeout","needsScroll","targetPost","scrollToNumber","animateScroll","scrollToIndex","reply","paused","updateScrubber","loadPostsIfNeeded","calculatePosition","getMarginTop","viewportHeight","viewportTop","$item","loadPrevious","indexFromViewPort","visibleTop","visiblePost","description","startNumber","endNumber","onPositionChange","headerId","scrollToItem","flashItem","$container","itemTop","itemBottom","scrollBottom","updateScrubberHeight","forceUpdateScrubber","loadPromise","itemOffset","$placeholder","formatNumber","Intl","NumberFormat","PostStreamScrubber","updateScrubberValues","fromScroll","forceHeightChange","viewing","formattedCount","unreadPercent","styleUnread","newStyle","oldStyle","goToFirst","firstPostLabel","unreadLabel","lastPostLabel","onresize","resize","dragging","mouseStart","indexStart","onmousedown","onmousemove","onmouseup","percentPerPost","$scrubber","sanitizeIndex","heights","adjustingHeight","animationPromises","part","$part","scrubber","scrollbar","deltaIndex","newIndex","intIndex","goToIndex","$scrollbar","offsetPercent","offsetIndex","minPercentVisible","percentPerVisiblePost","SplitDropdown","getFirstChild","noTrailing","debounceMode","timeoutID","cancelled","lastExec","clearExistingTimeout","wrapper","arguments_","elapsed","cancel","atBegin","throttle","anchorScroll","relativeScroll","PostStreamState","includedPosts","loadPageTimeouts","_loadNext","_loadPrevious","loadRange","noAnimation","resultPromise","loadNearNumber","loadNearIndex","page","near","loadCount","twoPagesAway","loadPage","backwards","loadIds","canEdit","newPosts","pageContent","loadingItems","sidebar","sidebarItems","hero","mainContent","positionChanged","preloadedDiscussion","bySlug","included","discussionId","rawNearParam","nearParam","HeaderPrimary","LinkButton","SessionDropdown","SelectDropdown","activeChild","defaultLabel","Model","store","exists","getIdentifier","relationship","pushAttributes","model","oldData","copyData","meta","apiEndpoint","pushPayload","rawRelationship","transform","hasOne","relationshipData","hasMany","transformDate","computedValue","compute","dependentValues","recompute","isDark","hexcolor","hexnumbers","textContrastClass","Keys","Badge","iconChild","badgeAttrs","badgeNode","Discussion","lastPostedAt","lastPostedUser","commentCount","lastReadAt","session","removePost","markedAllAsReadAt","link","NotificationList","markAllAsRead","deleteAll","discussions","notification","subject","notifications","group","NotificationComponent","$notifications","$scrollParent","inPanel","boundScrollHandler","scrollHandler","scrollParent","atBottom","clientHeight","NotificationsDropdown","newNotifications","getNewCount","getUnreadCount","menuClick","goToRoute","KeyboardNavigatable","Map","whenCallback","onUp","ArrowUp","onDown","ArrowDown","onSelect","ignoreTabPress","Tab","Enter","onTab","onCancel","Escape","onRemove","Backspace","KeyboardEvent","HTMLInputElement","bindTo","navigate","keyCallback","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","DiscussionsSearchItem","discussionTitle","mostRelevantPostContent","DiscussionsSearchSource","queryString","setQueryString","limit","include","queryMutators","UsersSearchResults","localeCompare","Search","searchState","sources","loadingSources","navigator","searchTimeout","updateMaxHeightHandler","currentSearch","getInitialSearch","sourceItems","searchLabel","shouldShowResults","getValue","shouldShowClearButton","focused","setValue","onfocus","onblur","updateMaxHeight","maxHeight","innerHeight","setIndex","getCurrentNumericIndex","selectableItems","$input","selectResult","isCached","MIN_SEARCH_LEN","selectedUrl","UsersSearchSource","$dropdown","fixedIndex","dropdownScroll","dropdownTop","dropdownBottom","HeaderSecondary","locales","cookie","ComposerButton","ComposerState","Position","HIDDEN","componentClass","preventExit","onExit","NORMAL","FULLSCREEN","minimize","MINIMIZED","fullScreen","exitFullScreen","bodyMatches","isFullScreen","composingReplyTo","minimumHeight","maximumHeight","computedHeight","Composer","prevPosition","normal","minimized","showIfMinimized","configHandle","updateHeight","animatePositionChange","initializeHeight","mousedown","heightStart","deltaPixels","changeHeight","updateBodyPadding","$flexible","headerHeight","paddingBottom","footerHeight","animateHeightChange","$composer","oldHeight","newHeight","showBackdrop","$backdrop","hideBackdrop","scrollElement","topOfViewport","defaultHeight","Notification","fromUser","unreadNotificationCount","DiscussionRenamedNotification","postNumber","EditPostComposer","editedContent","editAction","Post","PostControls","footerItems","actionItems","$actions","$controls","existing","GroupBadge","nameSingular","Group","namePlural","ADMINISTRATOR_ID","GUEST_ID","MEMBER_ID","EditUserModal","isEmailConfirmed","setPassword","userGroups","canEditCredentials","nonAdminEditingAdmin","userIsAdmin","canEditGroups","AffixedSidebar","boundOnresize","$sidebar","$header","$footer","$affixElement","UserPage","UserCard","editable","controlsButtonClassName","loadUser","lowercaseUsername","joinTime","navItems","isActor","discussionCount","showDeletionAlert","AvatarEditor","isDraggedOver","quickUpload","ondragover","enableDragover","ondragenter","ondragleave","disableDragover","ondragend","ondrop","dropUpload","openPicker","upload","dataTransfer","files","failure","avatarColor","UserControls","lastSeenAt","online","isOnline","userOnline","PostUser","cardVisible","showCard","hideCard","oncardshow","oncardhide","fullTime","IPAddress","ip","PostMeta","getPermalink","selectPermalink","metaItems","touch","permalink","ipAddress","PostEdited","editedUser","editedInfo","editedAt","CommentPost","revealContent","isEditing","bodyItems","contentHtml","refreshContent","renderFailed","isEdited","editing","toggleContent","EventPost","usernameHelper","descriptionData","descriptionKey","DiscussionRenamedPost","renamed","oldTitle","new","LOCAL_STORAGE_KEY","WelcomeHero","DiscussionComposer","titlePlaceholder","onkeydown","IndexPage","lastDiscussion","setTitle","oldHeroHeight","heroHeight","indexTop","indexBottom","discussionOffset","canStartDiscussion","newDiscussionAction","sortMap","sortOptions","sortId","providesInitialSearch","PostsUserPage","moreResults","loadLimit","loadMore","refresh","loadResults","parseResults","author","PaginatedListState","pages","initialLoading","loadingPrev","loadingNext","loadPrev","getLocation","getPrevPageNumber","getNextPageNumber","links","hasPrev","reqParams","refreshParams","newParams","paramsChanged","isLoadingPrev","getAllItems","EventEmitter","emit","globalEventEmitter","DiscussionListState","extraDiscussions","eventEmitter","deleteDiscussion","preloadedDiscussions","relevance","latest","newest","oldest","removeDiscussion","addDiscussion","DiscussionsUserPage","cb","Checkbox","withAttr","getDisplay","Switch","FieldSet","NotificationGrid","methods","notificationMethods","notificationTypes","preferences","toggleMethod","toggleType","preferenceKey","ChangePasswordModal","requestBody","ChangeEmailModal","requestAttributes","SettingsPage","discloseOnlineLoading","settingsItems","sectionItems","accountItems","notificationsItems","privacyItems","discloseOnline","savePreferences","NotificationsPage","DefaultResolver","makeKey","makeAttrs","requestedPath","DiscussionPageResolver","canonicalizeDiscussionSlug","scrollToPostNumber","LabelValue","AccessTokensList","showingTokens","tokenView","isCurrent","tokenViewItems","tokenInfoItems","tokenActionItems","device","generateTokenTitle","lastActivityAt","lastIpAddress","deleteKey","developer_token","displayKey","revokeButton","revoke","ondelete","tokenValueDisplay","obfuscatedName","fill","NewAccessTokenModal","titleInput","titleLabel","onsuccess","UserSecurityPageState","loadingTerminateSessions","loadingGlobalLogout","hasLoadedTokens","getTokens","setTokens","pushToken","removeToken","getSessionTokens","isSessionToken","getDeveloperTokens","getOtherSessionTokens","hasOtherActiveSessions","removeOtherSessionTokens","UserSecurityPage","routeUsername","loadTokens","developerTokensItems","sessionsItems","globalLogout","hideTokens","terminateAllOthersButton","terminateAllOtherSessions","resolverClass","alertEmailConfirmation","ResendButton","ContainedAlert","candidateSelectors","candidateSelector","NoElement","Element","getCandidates","includeContainer","candidates","getCandidatesIteratively","elementsToCheck","assigned","assignedElements","nestedCandidates","flatten","shadowRoot","getShadowRoot","validShadowRoot","shadowRootFilter","getTabindex","isScope","isContentEditable","sortOrderedTabbables","documentOrder","isZeroArea","isNodeMatchingSelectorFocusable","isHiddenInput","_ref","displayCheck","nodeUnderDetails","parentElement","nodeRootHost","nodeIsAttached","originalNode","rootNode","assignedSlot","isDetailsWithSummary","isDisabledFromFieldset","isNodeMatchingSelectorTabbable","isRadio","radioSet","radioScope","form","queryRadios","CSS","getCheckedRadio","isTabbableRadio","isNonTabbableRadio","isValidShadowRootTabbable","shadowHostNode","sortByOrder","regularTabbables","orderedTabbables","candidateTabindex","sortable","tabbable","isTabbable","focusableCandidateSelector","isFocusable","trapQueue","activeFocusTraps","activateTrap","trap","activeTrap","pause","trapIndex","deactivateTrap","unpause","findIndex","valueOrHandler","getActualTarget","composedPath","createFocusTrap","userOptions","returnFocusOnDeactivate","escapeDeactivates","delayInitialFocus","containers","containerGroups","tabbableGroups","nodeFocusedBeforeActivation","mostRecentlyFocusedNode","delayInitialFocusTimer","getOption","configOverrideOptions","optionName","configOptionName","findContainerIndex","tabbableNodes","getNodeForOption","optionValue","getInitialFocusNode","firstTabbableGroup","firstTabbableNode","updateTabbableNodes","tabbableOptions","focusableNodes","lastTabbableNode","nextTabbableNode","nodeIdx","tryFocus","preventScroll","isSelectableInput","getReturnFocusNode","previousActiveElement","checkPointerDown","clickOutsideDeactivates","deactivate","returnFocus","allowOutsideClick","checkFocusIn","targetContained","Document","checkKey","isEscapeEvent","isTabEvent","destinationNode","containerIndex","containerGroup","startOfGroupIndex","destinationGroupIndex","lastOfGroupIndex","checkTab","checkClick","addListeners","capture","removeListeners","activateOptions","onActivate","onPostActivate","checkCanFocusTrap","finishActivation","deactivateOptions","onDeactivate","onPostDeactivate","checkCanReturnFocus","finishDeactivation","updateContainerElements","containerElements","elementsAsArray","_createFocusTrap","hasPassiveEvents","passiveTestOptions","pluralFormatter","isIosDevice","platform","maxTouchPoints","locks","documentListenerAdded","initialClientY","previousBodyOverflowSetting","previousBodyPosition","previousBodyPaddingRight","allowTouchMove","rawEvent","clearAllBodyScrollLocks","targetElement","ontouchstart","ontouchmove","restorePositionSetting","paddingRight","ModalManager","focusTrap","lastSetFocusTrap","modalClosing","keyUpListener","modalList","handlePossibleBackdropClick","backdropShown","ontransitionend","onBackdropTransitionEnd","handleEscPress","isModalOpen","dialogKey","activeDialogElement","_toConsumableArray","_window","scrollY","scrollX","bottomBarHeight","_reserveScrollBarGap","reserveScrollBarGap","scrollBarGap","innerWidth","clientWidth","computedBodyPaddingRight","setOverflowHidden","isTargetElementTotallyScrolled","handleScroll","disableBodyScroll","activeDialogManagerElement","readyCallback","closedCallback","dismissibleState","propertyName","AlertManager","activeAlerts","getActiveAlerts","urgent","dismiss","RequestErrorModal","formattedError","accumulator","memoize","parseCases","isWhitespace","cases","currTermStart","latestTerm","inTerm","caseBody","branchEndIndex","findClosingBracket","fromIndex","char","splitFormattedArgument","block","separator","indexOfDelimiter","tail","keyCounter","OTHER","replaceNumberSign","numBraces","numberValues","keyParam","pluralTypeHandler","intValue","startsWith","keywordPossibilities","resolvedOptions","PluralRules","pluralKeyword","keyword","selectTypeHandler","replaceRichTags","dontUnescapeIndices","onTagClose","segment","currTagIsClosing","currTag","currTagStart","break","endingLocation","findClosingTag","entireTagInSegment","segmentIndex","segmentContainingClosingTag","tagContents","segmentStart","segmentEnd","processedSegment","newSegmentIndex","traverseMessageTags","unEscapeHtml","startIndex","startSegmentIndex","exit","startI","startJ","inTag","instructions","sanitizeValues","recSanitizeArr","defaultRichHandler","RichMessageFormatter","typeHandlers","richHandler","_classCallCheck","_this","cleanedValues","formatted","sym","fakeValues","fromEntries","_ref2","formattedFake","replaceFake","originalTemplateSegmentIndices","MessageFormatter","_defineProperty","blockStartIndex","blockEndIndex","_splitFormattedArgume2","typeHandler","mithrilRichHandler","Translator","translations","formatter","formatterTypeHandlers","setLocale","getLocale","addTranslations","plural","preprocessParameters","parameters","translation","rich","payloadIsPlural","Store","models","pushObject","allowUnregistered","curr","createRecord","idOrParams","getBy","records","Session","csrfToken","login","logout","Drawer","appElement","resizeHandler","isOpen","drawerAvailableMediaQuery","matchMedia","removeListener","$drawer","addListener","mapRoutes","basePath","resolver","RequestError","updateHumanTimes","liveHumanTimes","override","newMethod","Forum","stringToColor","rgb","hsvToRgb","User","isAdmin","newNotificationCount","calculateAvatarColor","Image","colorThief","crossOrigin","newPreferences","ModalManagerState","stackModal","invalidModalWarning","AlertManagerState","alertId","arg1","arg2","arg3","fireApplicationError","userTitle","consoleTitle","groupEnd","alerts","AccessToken","userId","Application","initializers","forums","users","booted","refs","fontawesome","_title","_titleCount","requestErrorAlert","initialRoute","boot","caughtInitializationErrors","initializer","extension","resources","bootExtensions","extensions","Infinity","appEl","appHeaderEl","preloadedApiDocument","apiDocument","screen","updateTitle","setTitleCount","titleCount","onHomepage","pageTitle","forumName","pageNumber","parser","transformRequestOptions","flarumOptions","modifyText","tmpOptions","originalExtract","requestErrorCatch","customErrorHandler","formattedErrors","decodeURI","requestWasCrossOrigin","isDebug","showDebug","requestErrorDefaultHandler","URL","baseURI","Navigation","onmouseenter","getBackButton","getPaneButton","getDrawerButton","NotificationListState","SearchState","cachedSearches","Set","GlobalSearchState","initialValueSet","currPageProvidesSearch","intializeValue","clearInitialSearch","stickyParams","changeSort","isSafariMobile","vendor","userAgent","ForumApplication","notificationComponents","discussionRenamed","postComponents","comment","makeRouteHelpers","defaultAction","viewingDiscussion","authenticationComplete","loggedIn","ActualModel","PostTypes","Routes","helpers","helper","deprecatedNotice","deprecationIssueId","getHandlers","blockPrefix","blockSuffix","multiline","replaceNext","prefixSpace","scanFor","surroundWithNewlines","orderedList","unorderedList","trimFirst","isMultipleLines","repeat","newlinesToSurroundSelectedText","newlinesToAppend","newlinesToPrepend","beforeSelection","afterSelection","breaksBefore","breaksAfter","newlinesBeforeSelection","newlinesAfterSelection","undoOrderedListStyle","lines","orderedListRegex","shouldUndoOrderedList","line","processed","undoUnorderedListStyle","shouldUndoUnorderedList","makePrefix","proxifyCompat","compat","strings","regex","fileExt","Select","wrapperAttrs","wrapperClassName","wrapperClass","domAttrs","ColorPreviewInput","TextEditorButton","originalView","tooltipText","extenders","evented","Parent","Mixed","mixins","styleArgs","noInitialSelection","lineLength","expandSelectionToLine","selectedText","undoResultOpositeList","undoResult","pristineText","clearExistingListStyle","prefixedLines","totalPrefixLength","previousValue","_currentValue","currentIndex","totalPrefixLengthOpositeList","listStyle","prefixToUse","suffixToUse","multilineStyle","originalSelectionEnd","wordSelectionStart","breakpoint","wordSelectionEnd","expandedSelectionStart","expandedSelectionEnd","beginsWithPrefix","endsWithSuffix","expandSelectedText","hasReplaceNext","ref","replacementText","whitespaceEdges","leadingWhitespace","trailingWhitespace","blockStyle","EditorDriverInterface","ThrottleDebounce","FocusTrap","Fragment","originalOnCreate","humanTimeHelper","third","LogInButton","PostPreview","compatObj"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"forum.js","mappings":";mCAOKA,MAAMC,UAAgB,OACzBD,MAAMC,UAAgB,KAAI,SAASC,EAAuCC,GAExE,OAAa,MAALA,EAAAA,EAAS,GAAK,EAElBH,MAAMC,UAAUG,OAAOC,KAAKC,MAAM,SAACC,EAAKC,GAAG,OAAYD,EAAIE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rB,gCAAiCzU,GACjC,yBAA0BiE,GAC1B,2BAA4B2d,GAC5B,8BAA+B4E,GAC/B,mCAAoCJ,GACpClzC,OAAQA,GACR6wD,iBAAkBA,KCnJpB+G,GAAAA,IAAgBn/C,GAET,IAAMq7C,GAASD,GAAc+D,GAAW","sources":["webpack://@flarum/core/./src/common/utils/arrayFlatPolyfill.ts","webpack://@flarum/core/../../../node_modules/bootstrap/js/affix.js","webpack://@flarum/core/../../../node_modules/bootstrap/js/dropdown.js","webpack://@flarum/core/../../../node_modules/bootstrap/js/tooltip.js","webpack://@flarum/core/../../../node_modules/bootstrap/js/transition.js","webpack://@flarum/core/../../../node_modules/color-thief-browser/dist/color-thief.min.js","webpack://@flarum/core/../../../node_modules/dayjs/dayjs.min.js","webpack://@flarum/core/../../../node_modules/dayjs/plugin/localizedFormat.js","webpack://@flarum/core/../../../node_modules/dayjs/plugin/relativeTime.js","webpack://@flarum/core/../../../node_modules/expose-loader/dist/runtime/getGlobalThis.js","webpack://@flarum/core/../../../node_modules/jquery.hotkeys/jquery.hotkeys.js","webpack://@flarum/core/../../../node_modules/jquery/dist/jquery.js","webpack://@flarum/core/../../../node_modules/mithril/api/mount-redraw.js","webpack://@flarum/core/../../../node_modules/mithril/api/router.js","webpack://@flarum/core/../../../node_modules/mithril/hyperscript.js","webpack://@flarum/core/../../../node_modules/mithril/index.js","webpack://@flarum/core/../../../node_modules/mithril/mount-redraw.js","webpack://@flarum/core/../../../node_modules/mithril/pathname/assign.js","webpack://@flarum/core/../../../node_modules/mithril/pathname/build.js","webpack://@flarum/core/../../../node_modules/mithril/pathname/compileTemplate.js","webpack://@flarum/core/../../../node_modules/mithril/pathname/parse.js","webpack://@flarum/core/../../../node_modules/mithril/promise/polyfill.js","webpack://@flarum/core/../../../node_modules/mithril/promise/promise.js","webpack://@flarum/core/../../../node_modules/mithril/querystring/build.js","webpack://@flarum/core/../../../node_modules/mithril/querystring/parse.js","webpack://@flarum/core/../../../node_modules/mithril/render.js","webpack://@flarum/core/../../../node_modules/mithril/render/fragment.js","webpack://@flarum/core/../../../node_modules/mithril/render/hyperscript.js","webpack://@flarum/core/../../../node_modules/mithril/render/hyperscriptVnode.js","webpack://@flarum/core/../../../node_modules/mithril/render/render.js","webpack://@flarum/core/../../../node_modules/mithril/render/trust.js","webpack://@flarum/core/../../../node_modules/mithril/render/vnode.js","webpack://@flarum/core/../../../node_modules/mithril/request.js","webpack://@flarum/core/../../../node_modules/mithril/request/request.js","webpack://@flarum/core/../../../node_modules/mithril/route.js","webpack://@flarum/core/../../../node_modules/mithril/stream.js","webpack://@flarum/core/../../../node_modules/mithril/stream/stream.js","webpack://@flarum/core/../../../node_modules/punycode/punycode.es6.js","webpack://@flarum/core/../../../node_modules/textarea-caret/index.js","webpack://@flarum/core/../../../node_modules/jquery/dist/jquery-exposed.js","webpack://@flarum/core/../../../node_modules/color-thief-browser/dist/color-thief.min-exposed.js","webpack://@flarum/core/../../../node_modules/dayjs/dayjs.min-exposed.js","webpack://@flarum/core/../../../node_modules/mithril/index-exposed.js","webpack://@flarum/core/../../../node_modules/punycode/punycode.es6-exposed.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/classCallCheck.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/createClass.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/defineProperty.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/inherits.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/slicedToArray.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/typeof.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/regenerator/index.js","webpack://@flarum/core/webpack/bootstrap","webpack://@flarum/core/webpack/runtime/compat get default export","webpack://@flarum/core/webpack/runtime/define property getters","webpack://@flarum/core/webpack/runtime/global","webpack://@flarum/core/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/core/webpack/runtime/make namespace object","webpack://@flarum/core/./src/common/utils/bidi.js","webpack://@flarum/core/./src/common/utils/patchMithril.js","webpack://@flarum/core/./src/common/app.ts","webpack://@flarum/core/./src/common/index.ts","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/core/./src/common/utils/setRouteWithForcedRefresh.ts","webpack://@flarum/core/./src/forum/utils/History.ts","webpack://@flarum/core/./src/forum/utils/Pane.js","webpack://@flarum/core/./src/common/Component.ts","webpack://@flarum/core/./src/common/utils/subclassOf.js","webpack://@flarum/core/./src/common/states/PageState.js","webpack://@flarum/core/./src/common/components/Page.tsx","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://@flarum/core/./src/common/utils/isObject.ts","webpack://@flarum/core/./src/common/utils/ItemList.ts","webpack://@flarum/core/./src/common/components/Separator.js","webpack://@flarum/core/../../../node_modules/clsx/dist/clsx.m.js","webpack://@flarum/core/./src/common/utils/classList.ts","webpack://@flarum/core/./src/common/helpers/listItems.tsx","webpack://@flarum/core/./src/forum/components/DiscussionHero.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://@flarum/core/./src/common/utils/extract.ts","webpack://@flarum/core/./src/common/utils/string.ts","webpack://@flarum/core/./src/common/components/Link.js","webpack://@flarum/core/./src/common/helpers/avatar.tsx","webpack://@flarum/core/./src/common/helpers/highlight.tsx","webpack://@flarum/core/./src/common/helpers/icon.tsx","webpack://@flarum/core/./src/common/utils/extractText.ts","webpack://@flarum/core/./src/common/utils/humanTime.ts","webpack://@flarum/core/./src/common/utils/abbreviateNumber.ts","webpack://@flarum/core/./src/common/components/Dropdown.tsx","webpack://@flarum/core/./src/common/helpers/humanTime.tsx","webpack://@flarum/core/./src/forum/components/TerminalPost.js","webpack://@flarum/core/./src/common/utils/SubtreeRetainer.ts","webpack://@flarum/core/./src/common/components/LoadingIndicator.tsx","webpack://@flarum/core/./src/common/components/ConfirmDocumentUnload.js","webpack://@flarum/core/./src/common/helpers/fireDebugWarning.ts","webpack://@flarum/core/./src/common/components/Button.tsx","webpack://@flarum/core/./src/common/utils/insertText.ts","webpack://@flarum/core/./src/common/utils/BasicEditorDriver.ts","webpack://@flarum/core/./src/common/components/Tooltip.tsx","webpack://@flarum/core/./src/common/components/TextEditor.js","webpack://@flarum/core/./src/forum/components/ComposerBody.js","webpack://@flarum/core/./src/forum/components/ReplyComposer.js","webpack://@flarum/core/./src/common/components/Alert.tsx","webpack://@flarum/core/./src/common/components/Modal.tsx","webpack://@flarum/core/./src/common/utils/Stream.ts","webpack://@flarum/core/./src/forum/components/ForgotPasswordModal.tsx","webpack://@flarum/core/./src/forum/components/LogInButtons.js","webpack://@flarum/core/./src/forum/components/SignUpModal.tsx","webpack://@flarum/core/./src/forum/components/LogInModal.tsx","webpack://@flarum/core/./src/forum/components/RenameDiscussionModal.tsx","webpack://@flarum/core/./src/forum/utils/DiscussionControls.js","webpack://@flarum/core/./src/forum/utils/slidable.js","webpack://@flarum/core/./src/common/utils/escapeRegExp.ts","webpack://@flarum/core/./src/forum/components/DiscussionListItem.tsx","webpack://@flarum/core/./src/common/components/Placeholder.js","webpack://@flarum/core/./src/forum/components/DiscussionList.js","webpack://@flarum/core/./src/forum/components/DiscussionListPane.js","webpack://@flarum/core/./src/common/utils/ScrollListener.js","webpack://@flarum/core/./src/forum/components/LoadingPost.js","webpack://@flarum/core/./src/common/helpers/username.tsx","webpack://@flarum/core/./src/forum/components/ComposerPostPreview.js","webpack://@flarum/core/./src/forum/components/ReplyPlaceholder.js","webpack://@flarum/core/./src/forum/components/PostStream.js","webpack://@flarum/core/./src/common/utils/formatNumber.ts","webpack://@flarum/core/./src/forum/components/PostStreamScrubber.js","webpack://@flarum/core/./src/common/components/SplitDropdown.tsx","webpack://@flarum/core/../throttle.js","webpack://@flarum/core/../debounce.js","webpack://@flarum/core/./src/common/utils/anchorScroll.js","webpack://@flarum/core/./src/forum/states/PostStreamState.ts","webpack://@flarum/core/./src/forum/components/DiscussionPage.tsx","webpack://@flarum/core/./src/forum/components/HeaderPrimary.js","webpack://@flarum/core/./src/common/components/LinkButton.js","webpack://@flarum/core/./src/forum/components/SessionDropdown.tsx","webpack://@flarum/core/./src/common/components/SelectDropdown.tsx","webpack://@flarum/core/./src/common/Model.ts","webpack://@flarum/core/./src/common/utils/computed.ts","webpack://@flarum/core/./src/common/utils/isDark.ts","webpack://@flarum/core/./src/common/helpers/textContrastClass.ts","webpack://@flarum/core/./src/common/utils/KeyboardNavigatable.ts","webpack://@flarum/core/./src/common/components/Badge.tsx","webpack://@flarum/core/./src/common/models/Discussion.tsx","webpack://@flarum/core/./src/forum/components/NotificationList.js","webpack://@flarum/core/./src/forum/components/NotificationsDropdown.tsx","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@flarum/core/./src/forum/components/DiscussionsSearchItem.tsx","webpack://@flarum/core/./src/forum/components/DiscussionsSearchSource.tsx","webpack://@flarum/core/./src/forum/components/UsersSearchSource.tsx","webpack://@flarum/core/./src/forum/components/Search.tsx","webpack://@flarum/core/./src/forum/components/HeaderSecondary.js","webpack://@flarum/core/./src/forum/components/ComposerButton.js","webpack://@flarum/core/./src/forum/states/ComposerState.js","webpack://@flarum/core/./src/forum/components/Composer.js","webpack://@flarum/core/./src/forum/components/Notification.tsx","webpack://@flarum/core/./src/forum/components/DiscussionRenamedNotification.tsx","webpack://@flarum/core/./src/forum/components/EditPostComposer.js","webpack://@flarum/core/./src/forum/utils/PostControls.js","webpack://@flarum/core/./src/forum/components/Post.tsx","webpack://@flarum/core/./src/common/components/GroupBadge.tsx","webpack://@flarum/core/./src/common/models/Group.ts","webpack://@flarum/core/./src/common/components/EditUserModal.tsx","webpack://@flarum/core/./src/forum/components/AffixedSidebar.js","webpack://@flarum/core/./src/forum/components/UserPage.tsx","webpack://@flarum/core/./src/forum/utils/UserControls.js","webpack://@flarum/core/./src/forum/components/AvatarEditor.js","webpack://@flarum/core/./src/forum/components/UserCard.js","webpack://@flarum/core/./src/common/helpers/userOnline.tsx","webpack://@flarum/core/./src/forum/components/PostUser.js","webpack://@flarum/core/./src/common/helpers/fullTime.tsx","webpack://@flarum/core/./src/common/components/IPAddress.tsx","webpack://@flarum/core/./src/forum/components/PostMeta.js","webpack://@flarum/core/./src/forum/components/PostEdited.js","webpack://@flarum/core/./src/forum/components/CommentPost.js","webpack://@flarum/core/./src/forum/components/EventPost.js","webpack://@flarum/core/./src/forum/components/DiscussionRenamedPost.js","webpack://@flarum/core/./src/forum/components/WelcomeHero.tsx","webpack://@flarum/core/./src/forum/components/DiscussionComposer.js","webpack://@flarum/core/./src/forum/components/IndexPage.tsx","webpack://@flarum/core/./src/forum/components/PostsUserPage.tsx","webpack://@flarum/core/./src/common/states/PaginatedListState.ts","webpack://@flarum/core/./src/common/utils/EventEmitter.ts","webpack://@flarum/core/./src/forum/states/DiscussionListState.ts","webpack://@flarum/core/./src/forum/components/DiscussionsUserPage.tsx","webpack://@flarum/core/./src/common/utils/withAttr.ts","webpack://@flarum/core/./src/common/components/Checkbox.tsx","webpack://@flarum/core/./src/common/components/Switch.tsx","webpack://@flarum/core/./src/common/components/FieldSet.js","webpack://@flarum/core/./src/forum/components/NotificationGrid.js","webpack://@flarum/core/./src/forum/components/ChangePasswordModal.tsx","webpack://@flarum/core/./src/forum/components/ChangeEmailModal.tsx","webpack://@flarum/core/./src/forum/components/SettingsPage.tsx","webpack://@flarum/core/./src/forum/components/NotificationsPage.tsx","webpack://@flarum/core/./src/common/resolvers/DefaultResolver.ts","webpack://@flarum/core/./src/forum/resolvers/DiscussionPageResolver.ts","webpack://@flarum/core/./src/common/components/LabelValue.tsx","webpack://@flarum/core/./src/forum/components/AccessTokensList.tsx","webpack://@flarum/core/./src/forum/components/NewAccessTokenModal.tsx","webpack://@flarum/core/./src/forum/states/UserSecurityPageState.ts","webpack://@flarum/core/./src/forum/components/UserSecurityPage.tsx","webpack://@flarum/core/./src/forum/routes.ts","webpack://@flarum/core/./src/forum/utils/alertEmailConfirmation.js","webpack://@flarum/core/../src/index.js","webpack://@flarum/core/../index.js","webpack://@flarum/core/./src/common/utils/focusTrap.ts","webpack://@flarum/core/../../../node_modules/body-scroll-lock/lib/bodyScrollLock.esm.js","webpack://@flarum/core/../source/pluralTypeHandler.js","webpack://@flarum/core/./src/common/components/ModalManager.tsx","webpack://@flarum/core/./src/common/components/AlertManager.tsx","webpack://@flarum/core/./src/common/components/RequestErrorModal.tsx","webpack://@flarum/core/array-utils.js","webpack://@flarum/core/function-utils.js","webpack://@flarum/core/../source/utilities.js","webpack://@flarum/core/../source/selectTypeHandler.js","webpack://@flarum/core/../source/defaultRichHandler.js","webpack://@flarum/core/../source/RichMessageFormatter.js","webpack://@flarum/core/../source/MessageFormatter.js","webpack://@flarum/core/../source/mithrilRichHandler.js","webpack://@flarum/core/./src/common/Translator.tsx","webpack://@flarum/core/./src/common/Store.ts","webpack://@flarum/core/./src/common/Session.ts","webpack://@flarum/core/./src/common/utils/Drawer.js","webpack://@flarum/core/./src/common/utils/mapRoutes.ts","webpack://@flarum/core/./src/common/utils/RequestError.ts","webpack://@flarum/core/./src/common/utils/liveHumanTimes.ts","webpack://@flarum/core/./src/common/extend.ts","webpack://@flarum/core/./src/common/models/Forum.ts","webpack://@flarum/core/./src/common/utils/stringToColor.ts","webpack://@flarum/core/./src/common/models/User.tsx","webpack://@flarum/core/./src/common/models/Post.ts","webpack://@flarum/core/./src/common/models/Notification.ts","webpack://@flarum/core/./src/common/states/ModalManagerState.ts","webpack://@flarum/core/./src/common/states/AlertManagerState.ts","webpack://@flarum/core/./src/common/helpers/fireApplicationError.ts","webpack://@flarum/core/./src/common/models/AccessToken.ts","webpack://@flarum/core/./src/common/Application.tsx","webpack://@flarum/core/./src/common/components/Navigation.tsx","webpack://@flarum/core/./src/forum/states/NotificationListState.ts","webpack://@flarum/core/./src/forum/states/SearchState.ts","webpack://@flarum/core/./src/forum/states/GlobalSearchState.ts","webpack://@flarum/core/./src/forum/utils/isSafariMobile.ts","webpack://@flarum/core/./src/forum/ForumApplication.tsx","webpack://@flarum/core/./src/forum/app.ts","webpack://@flarum/core/./src/common/extenders/Model.ts","webpack://@flarum/core/./src/common/extenders/PostTypes.ts","webpack://@flarum/core/./src/common/extenders/Routes.ts","webpack://@flarum/core/./src/common/extenders/Store.ts","webpack://@flarum/core/./src/common/extenders/index.ts","webpack://@flarum/core/./src/common/utils/evented.js","webpack://@flarum/core/./src/common/utils/styleSelectedText.ts","webpack://@flarum/core/./src/common/utils/proxifyCompat.ts","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js","webpack://@flarum/core/./src/common/components/Select.js","webpack://@flarum/core/./src/common/components/ColorPreviewInput.tsx","webpack://@flarum/core/./src/common/components/TextEditorButton.js","webpack://@flarum/core/./src/common/compat.ts","webpack://@flarum/core/./src/common/utils/mixin.js","webpack://@flarum/core/./src/common/Fragment.ts","webpack://@flarum/core/./src/common/helpers/punctuateSeries.js","webpack://@flarum/core/./src/forum/components/LogInButton.js","webpack://@flarum/core/./src/forum/components/PostPreview.js","webpack://@flarum/core/./src/forum/compat.ts","webpack://@flarum/core/./src/forum/index.ts"],"sourcesContent":["// Based off of the polyfill on MDN\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat#reduce_concat_isarray_recursivity\n//\n// Needed to provide support for Safari on iOS < 12\n\n// ts-ignored because we can afford to encapsulate some messy logic behind the clean typings.\n\nif (!Array.prototype['flat']) {\n  Array.prototype['flat'] = function flat<A, D extends number = 1>(this: A, depth?: D | unknown): any[] {\n    // @ts-ignore\n    return (depth ?? 1) > 0\n      ? // @ts-ignore\n        Array.prototype.reduce.call(this, (acc, val): any[] => acc.concat(Array.isArray(val) ? flat.call(val, depth - 1) : val), [])\n      : // If no depth is provided, or depth is 0, just return a copy of\n        // the array. Spread is supported in all major browsers (iOS 8+)\n        // @ts-ignore\n        [...this];\n  };\n}\n","/* ========================================================================\n * Bootstrap: affix.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#affix\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // AFFIX CLASS DEFINITION\n  // ======================\n\n  var Affix = function (element, options) {\n    this.options = $.extend({}, Affix.DEFAULTS, options)\n\n    var target = this.options.target === Affix.DEFAULTS.target ? $(this.options.target) : $(document).find(this.options.target)\n\n    this.$target = target\n      .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))\n      .on('click.bs.affix.data-api',  $.proxy(this.checkPositionWithEventLoop, this))\n\n    this.$element     = $(element)\n    this.affixed      = null\n    this.unpin        = null\n    this.pinnedOffset = null\n\n    this.checkPosition()\n  }\n\n  Affix.VERSION  = '3.4.1'\n\n  Affix.RESET    = 'affix affix-top affix-bottom'\n\n  Affix.DEFAULTS = {\n    offset: 0,\n    target: window\n  }\n\n  Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {\n    var scrollTop    = this.$target.scrollTop()\n    var position     = this.$element.offset()\n    var targetHeight = this.$target.height()\n\n    if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false\n\n    if (this.affixed == 'bottom') {\n      if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'\n      return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'\n    }\n\n    var initializing   = this.affixed == null\n    var colliderTop    = initializing ? scrollTop : position.top\n    var colliderHeight = initializing ? targetHeight : height\n\n    if (offsetTop != null && scrollTop <= offsetTop) return 'top'\n    if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'\n\n    return false\n  }\n\n  Affix.prototype.getPinnedOffset = function () {\n    if (this.pinnedOffset) return this.pinnedOffset\n    this.$element.removeClass(Affix.RESET).addClass('affix')\n    var scrollTop = this.$target.scrollTop()\n    var position  = this.$element.offset()\n    return (this.pinnedOffset = position.top - scrollTop)\n  }\n\n  Affix.prototype.checkPositionWithEventLoop = function () {\n    setTimeout($.proxy(this.checkPosition, this), 1)\n  }\n\n  Affix.prototype.checkPosition = function () {\n    if (!this.$element.is(':visible')) return\n\n    var height       = this.$element.height()\n    var offset       = this.options.offset\n    var offsetTop    = offset.top\n    var offsetBottom = offset.bottom\n    var scrollHeight = Math.max($(document).height(), $(document.body).height())\n\n    if (typeof offset != 'object')         offsetBottom = offsetTop = offset\n    if (typeof offsetTop == 'function')    offsetTop    = offset.top(this.$element)\n    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)\n\n    var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)\n\n    if (this.affixed != affix) {\n      if (this.unpin != null) this.$element.css('top', '')\n\n      var affixType = 'affix' + (affix ? '-' + affix : '')\n      var e         = $.Event(affixType + '.bs.affix')\n\n      this.$element.trigger(e)\n\n      if (e.isDefaultPrevented()) return\n\n      this.affixed = affix\n      this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null\n\n      this.$element\n        .removeClass(Affix.RESET)\n        .addClass(affixType)\n        .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')\n    }\n\n    if (affix == 'bottom') {\n      this.$element.offset({\n        top: scrollHeight - height - offsetBottom\n      })\n    }\n  }\n\n\n  // AFFIX PLUGIN DEFINITION\n  // =======================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.affix')\n      var options = typeof option == 'object' && option\n\n      if (!data) $this.data('bs.affix', (data = new Affix(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  var old = $.fn.affix\n\n  $.fn.affix             = Plugin\n  $.fn.affix.Constructor = Affix\n\n\n  // AFFIX NO CONFLICT\n  // =================\n\n  $.fn.affix.noConflict = function () {\n    $.fn.affix = old\n    return this\n  }\n\n\n  // AFFIX DATA-API\n  // ==============\n\n  $(window).on('load', function () {\n    $('[data-spy=\"affix\"]').each(function () {\n      var $spy = $(this)\n      var data = $spy.data()\n\n      data.offset = data.offset || {}\n\n      if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom\n      if (data.offsetTop    != null) data.offset.top    = data.offsetTop\n\n      Plugin.call($spy, data)\n    })\n  })\n\n}(jQuery);\n","/* ========================================================================\n * Bootstrap: dropdown.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#dropdowns\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // DROPDOWN CLASS DEFINITION\n  // =========================\n\n  var backdrop = '.dropdown-backdrop'\n  var toggle   = '[data-toggle=\"dropdown\"]'\n  var Dropdown = function (element) {\n    $(element).on('click.bs.dropdown', this.toggle)\n  }\n\n  Dropdown.VERSION = '3.4.1'\n\n  function getParent($this) {\n    var selector = $this.attr('data-target')\n\n    if (!selector) {\n      selector = $this.attr('href')\n      selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\\s]*$)/, '') // strip for ie7\n    }\n\n    var $parent = selector !== '#' ? $(document).find(selector) : null\n\n    return $parent && $parent.length ? $parent : $this.parent()\n  }\n\n  function clearMenus(e) {\n    if (e && e.which === 3) return\n    $(backdrop).remove()\n    $(toggle).each(function () {\n      var $this         = $(this)\n      var $parent       = getParent($this)\n      var relatedTarget = { relatedTarget: this }\n\n      if (!$parent.hasClass('open')) return\n\n      if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return\n\n      $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))\n\n      if (e.isDefaultPrevented()) return\n\n      $this.attr('aria-expanded', 'false')\n      $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))\n    })\n  }\n\n  Dropdown.prototype.toggle = function (e) {\n    var $this = $(this)\n\n    if ($this.is('.disabled, :disabled')) return\n\n    var $parent  = getParent($this)\n    var isActive = $parent.hasClass('open')\n\n    clearMenus()\n\n    if (!isActive) {\n      if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {\n        // if mobile we use a backdrop because click events don't delegate\n        $(document.createElement('div'))\n          .addClass('dropdown-backdrop')\n          .insertAfter($(this))\n          .on('click', clearMenus)\n      }\n\n      var relatedTarget = { relatedTarget: this }\n      $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))\n\n      if (e.isDefaultPrevented()) return\n\n      $this\n        .trigger('focus')\n        .attr('aria-expanded', 'true')\n\n      $parent\n        .toggleClass('open')\n        .trigger($.Event('shown.bs.dropdown', relatedTarget))\n    }\n\n    return false\n  }\n\n  Dropdown.prototype.keydown = function (e) {\n    if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return\n\n    var $this = $(this)\n\n    e.preventDefault()\n    e.stopPropagation()\n\n    if ($this.is('.disabled, :disabled')) return\n\n    var $parent  = getParent($this)\n    var isActive = $parent.hasClass('open')\n\n    if (!isActive && e.which != 27 || isActive && e.which == 27) {\n      if (e.which == 27) $parent.find(toggle).trigger('focus')\n      return $this.trigger('click')\n    }\n\n    var desc = ' li:not(.disabled):visible a'\n    var $items = $parent.find('.dropdown-menu' + desc)\n\n    if (!$items.length) return\n\n    var index = $items.index(e.target)\n\n    if (e.which == 38 && index > 0)                 index--         // up\n    if (e.which == 40 && index < $items.length - 1) index++         // down\n    if (!~index)                                    index = 0\n\n    $items.eq(index).trigger('focus')\n  }\n\n\n  // DROPDOWN PLUGIN DEFINITION\n  // ==========================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this = $(this)\n      var data  = $this.data('bs.dropdown')\n\n      if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n      if (typeof option == 'string') data[option].call($this)\n    })\n  }\n\n  var old = $.fn.dropdown\n\n  $.fn.dropdown             = Plugin\n  $.fn.dropdown.Constructor = Dropdown\n\n\n  // DROPDOWN NO CONFLICT\n  // ====================\n\n  $.fn.dropdown.noConflict = function () {\n    $.fn.dropdown = old\n    return this\n  }\n\n\n  // APPLY TO STANDARD DROPDOWN ELEMENTS\n  // ===================================\n\n  $(document)\n    .on('click.bs.dropdown.data-api', clearMenus)\n    .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })\n    .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)\n    .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)\n    .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)\n\n}(jQuery);\n","/* ========================================================================\n * Bootstrap: tooltip.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#tooltip\n * Inspired by the original jQuery.tipsy by Jason Frame\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n+function ($) {\n  'use strict';\n\n  var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn']\n\n  var uriAttrs = [\n    'background',\n    'cite',\n    'href',\n    'itemtype',\n    'longdesc',\n    'poster',\n    'src',\n    'xlink:href'\n  ]\n\n  var ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i\n\n  var DefaultWhitelist = {\n    // Global attributes allowed on any supplied element below.\n    '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n    a: ['target', 'href', 'title', 'rel'],\n    area: [],\n    b: [],\n    br: [],\n    col: [],\n    code: [],\n    div: [],\n    em: [],\n    hr: [],\n    h1: [],\n    h2: [],\n    h3: [],\n    h4: [],\n    h5: [],\n    h6: [],\n    i: [],\n    img: ['src', 'alt', 'title', 'width', 'height'],\n    li: [],\n    ol: [],\n    p: [],\n    pre: [],\n    s: [],\n    small: [],\n    span: [],\n    sub: [],\n    sup: [],\n    strong: [],\n    u: [],\n    ul: []\n  }\n\n  /**\n   * A pattern that recognizes a commonly useful subset of URLs that are safe.\n   *\n   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n   */\n  var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi\n\n  /**\n   * A pattern that matches safe data URLs. Only matches image, video and audio types.\n   *\n   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n   */\n  var DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i\n\n  function allowedAttribute(attr, allowedAttributeList) {\n    var attrName = attr.nodeName.toLowerCase()\n\n    if ($.inArray(attrName, allowedAttributeList) !== -1) {\n      if ($.inArray(attrName, uriAttrs) !== -1) {\n        return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN))\n      }\n\n      return true\n    }\n\n    var regExp = $(allowedAttributeList).filter(function (index, value) {\n      return value instanceof RegExp\n    })\n\n    // Check if a regular expression validates the attribute.\n    for (var i = 0, l = regExp.length; i < l; i++) {\n      if (attrName.match(regExp[i])) {\n        return true\n      }\n    }\n\n    return false\n  }\n\n  function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {\n    if (unsafeHtml.length === 0) {\n      return unsafeHtml\n    }\n\n    if (sanitizeFn && typeof sanitizeFn === 'function') {\n      return sanitizeFn(unsafeHtml)\n    }\n\n    // IE 8 and below don't support createHTMLDocument\n    if (!document.implementation || !document.implementation.createHTMLDocument) {\n      return unsafeHtml\n    }\n\n    var createdDocument = document.implementation.createHTMLDocument('sanitization')\n    createdDocument.body.innerHTML = unsafeHtml\n\n    var whitelistKeys = $.map(whiteList, function (el, i) { return i })\n    var elements = $(createdDocument.body).find('*')\n\n    for (var i = 0, len = elements.length; i < len; i++) {\n      var el = elements[i]\n      var elName = el.nodeName.toLowerCase()\n\n      if ($.inArray(elName, whitelistKeys) === -1) {\n        el.parentNode.removeChild(el)\n\n        continue\n      }\n\n      var attributeList = $.map(el.attributes, function (el) { return el })\n      var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || [])\n\n      for (var j = 0, len2 = attributeList.length; j < len2; j++) {\n        if (!allowedAttribute(attributeList[j], whitelistedAttributes)) {\n          el.removeAttribute(attributeList[j].nodeName)\n        }\n      }\n    }\n\n    return createdDocument.body.innerHTML\n  }\n\n  // TOOLTIP PUBLIC CLASS DEFINITION\n  // ===============================\n\n  var Tooltip = function (element, options) {\n    this.type       = null\n    this.options    = null\n    this.enabled    = null\n    this.timeout    = null\n    this.hoverState = null\n    this.$element   = null\n    this.inState    = null\n\n    this.init('tooltip', element, options)\n  }\n\n  Tooltip.VERSION  = '3.4.1'\n\n  Tooltip.TRANSITION_DURATION = 150\n\n  Tooltip.DEFAULTS = {\n    animation: true,\n    placement: 'top',\n    selector: false,\n    template: '<div class=\"tooltip\" role=\"tooltip\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\"></div></div>',\n    trigger: 'hover focus',\n    title: '',\n    delay: 0,\n    html: false,\n    container: false,\n    viewport: {\n      selector: 'body',\n      padding: 0\n    },\n    sanitize : true,\n    sanitizeFn : null,\n    whiteList : DefaultWhitelist\n  }\n\n  Tooltip.prototype.init = function (type, element, options) {\n    this.enabled   = true\n    this.type      = type\n    this.$element  = $(element)\n    this.options   = this.getOptions(options)\n    this.$viewport = this.options.viewport && $(document).find($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))\n    this.inState   = { click: false, hover: false, focus: false }\n\n    if (this.$element[0] instanceof document.constructor && !this.options.selector) {\n      throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')\n    }\n\n    var triggers = this.options.trigger.split(' ')\n\n    for (var i = triggers.length; i--;) {\n      var trigger = triggers[i]\n\n      if (trigger == 'click') {\n        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))\n      } else if (trigger != 'manual') {\n        var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focusin'\n        var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'\n\n        this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))\n        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))\n      }\n    }\n\n    this.options.selector ?\n      (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :\n      this.fixTitle()\n  }\n\n  Tooltip.prototype.getDefaults = function () {\n    return Tooltip.DEFAULTS\n  }\n\n  Tooltip.prototype.getOptions = function (options) {\n    var dataAttributes = this.$element.data()\n\n    for (var dataAttr in dataAttributes) {\n      if (dataAttributes.hasOwnProperty(dataAttr) && $.inArray(dataAttr, DISALLOWED_ATTRIBUTES) !== -1) {\n        delete dataAttributes[dataAttr]\n      }\n    }\n\n    options = $.extend({}, this.getDefaults(), dataAttributes, options)\n\n    if (options.delay && typeof options.delay == 'number') {\n      options.delay = {\n        show: options.delay,\n        hide: options.delay\n      }\n    }\n\n    if (options.sanitize) {\n      options.template = sanitizeHtml(options.template, options.whiteList, options.sanitizeFn)\n    }\n\n    return options\n  }\n\n  Tooltip.prototype.getDelegateOptions = function () {\n    var options  = {}\n    var defaults = this.getDefaults()\n\n    this._options && $.each(this._options, function (key, value) {\n      if (defaults[key] != value) options[key] = value\n    })\n\n    return options\n  }\n\n  Tooltip.prototype.enter = function (obj) {\n    var self = obj instanceof this.constructor ?\n      obj : $(obj.currentTarget).data('bs.' + this.type)\n\n    if (!self) {\n      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())\n      $(obj.currentTarget).data('bs.' + this.type, self)\n    }\n\n    if (obj instanceof $.Event) {\n      self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true\n    }\n\n    if (self.tip().hasClass('in') || self.hoverState == 'in') {\n      self.hoverState = 'in'\n      return\n    }\n\n    clearTimeout(self.timeout)\n\n    self.hoverState = 'in'\n\n    if (!self.options.delay || !self.options.delay.show) return self.show()\n\n    self.timeout = setTimeout(function () {\n      if (self.hoverState == 'in') self.show()\n    }, self.options.delay.show)\n  }\n\n  Tooltip.prototype.isInStateTrue = function () {\n    for (var key in this.inState) {\n      if (this.inState[key]) return true\n    }\n\n    return false\n  }\n\n  Tooltip.prototype.leave = function (obj) {\n    var self = obj instanceof this.constructor ?\n      obj : $(obj.currentTarget).data('bs.' + this.type)\n\n    if (!self) {\n      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())\n      $(obj.currentTarget).data('bs.' + this.type, self)\n    }\n\n    if (obj instanceof $.Event) {\n      self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false\n    }\n\n    if (self.isInStateTrue()) return\n\n    clearTimeout(self.timeout)\n\n    self.hoverState = 'out'\n\n    if (!self.options.delay || !self.options.delay.hide) return self.hide()\n\n    self.timeout = setTimeout(function () {\n      if (self.hoverState == 'out') self.hide()\n    }, self.options.delay.hide)\n  }\n\n  Tooltip.prototype.show = function () {\n    var e = $.Event('show.bs.' + this.type)\n\n    if (this.hasContent() && this.enabled) {\n      this.$element.trigger(e)\n\n      var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])\n      if (e.isDefaultPrevented() || !inDom) return\n      var that = this\n\n      var $tip = this.tip()\n\n      var tipId = this.getUID(this.type)\n\n      this.setContent()\n      $tip.attr('id', tipId)\n      this.$element.attr('aria-describedby', tipId)\n\n      if (this.options.animation) $tip.addClass('fade')\n\n      var placement = typeof this.options.placement == 'function' ?\n        this.options.placement.call(this, $tip[0], this.$element[0]) :\n        this.options.placement\n\n      var autoToken = /\\s?auto?\\s?/i\n      var autoPlace = autoToken.test(placement)\n      if (autoPlace) placement = placement.replace(autoToken, '') || 'top'\n\n      $tip\n        .detach()\n        .css({ top: 0, left: 0, display: 'block' })\n        .addClass(placement)\n        .data('bs.' + this.type, this)\n\n      this.options.container ? $tip.appendTo($(document).find(this.options.container)) : $tip.insertAfter(this.$element)\n      this.$element.trigger('inserted.bs.' + this.type)\n\n      var pos          = this.getPosition()\n      var actualWidth  = $tip[0].offsetWidth\n      var actualHeight = $tip[0].offsetHeight\n\n      if (autoPlace) {\n        var orgPlacement = placement\n        var viewportDim = this.getPosition(this.$viewport)\n\n        placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top'    :\n                    placement == 'top'    && pos.top    - actualHeight < viewportDim.top    ? 'bottom' :\n                    placement == 'right'  && pos.right  + actualWidth  > viewportDim.width  ? 'left'   :\n                    placement == 'left'   && pos.left   - actualWidth  < viewportDim.left   ? 'right'  :\n                    placement\n\n        $tip\n          .removeClass(orgPlacement)\n          .addClass(placement)\n      }\n\n      var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)\n\n      this.applyPlacement(calculatedOffset, placement)\n\n      var complete = function () {\n        var prevHoverState = that.hoverState\n        that.$element.trigger('shown.bs.' + that.type)\n        that.hoverState = null\n\n        if (prevHoverState == 'out') that.leave(that)\n      }\n\n      $.support.transition && this.$tip.hasClass('fade') ?\n        $tip\n          .one('bsTransitionEnd', complete)\n          .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :\n        complete()\n    }\n  }\n\n  Tooltip.prototype.applyPlacement = function (offset, placement) {\n    var $tip   = this.tip()\n    var width  = $tip[0].offsetWidth\n    var height = $tip[0].offsetHeight\n\n    // manually read margins because getBoundingClientRect includes difference\n    var marginTop = parseInt($tip.css('margin-top'), 10)\n    var marginLeft = parseInt($tip.css('margin-left'), 10)\n\n    // we must check for NaN for ie 8/9\n    if (isNaN(marginTop))  marginTop  = 0\n    if (isNaN(marginLeft)) marginLeft = 0\n\n    offset.top  += marginTop\n    offset.left += marginLeft\n\n    // $.fn.offset doesn't round pixel values\n    // so we use setOffset directly with our own function B-0\n    $.offset.setOffset($tip[0], $.extend({\n      using: function (props) {\n        $tip.css({\n          top: Math.round(props.top),\n          left: Math.round(props.left)\n        })\n      }\n    }, offset), 0)\n\n    $tip.addClass('in')\n\n    // check to see if placing tip in new offset caused the tip to resize itself\n    var actualWidth  = $tip[0].offsetWidth\n    var actualHeight = $tip[0].offsetHeight\n\n    if (placement == 'top' && actualHeight != height) {\n      offset.top = offset.top + height - actualHeight\n    }\n\n    var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)\n\n    if (delta.left) offset.left += delta.left\n    else offset.top += delta.top\n\n    var isVertical          = /top|bottom/.test(placement)\n    var arrowDelta          = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight\n    var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'\n\n    $tip.offset(offset)\n    this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)\n  }\n\n  Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {\n    this.arrow()\n      .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')\n      .css(isVertical ? 'top' : 'left', '')\n  }\n\n  Tooltip.prototype.setContent = function () {\n    var $tip  = this.tip()\n    var title = this.getTitle()\n\n    if (this.options.html) {\n      if (this.options.sanitize) {\n        title = sanitizeHtml(title, this.options.whiteList, this.options.sanitizeFn)\n      }\n\n      $tip.find('.tooltip-inner').html(title)\n    } else {\n      $tip.find('.tooltip-inner').text(title)\n    }\n\n    $tip.removeClass('fade in top bottom left right')\n  }\n\n  Tooltip.prototype.hide = function (callback) {\n    var that = this\n    var $tip = $(this.$tip)\n    var e    = $.Event('hide.bs.' + this.type)\n\n    function complete() {\n      if (that.hoverState != 'in') $tip.detach()\n      if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.\n        that.$element\n          .removeAttr('aria-describedby')\n          .trigger('hidden.bs.' + that.type)\n      }\n      callback && callback()\n    }\n\n    this.$element.trigger(e)\n\n    if (e.isDefaultPrevented()) return\n\n    $tip.removeClass('in')\n\n    $.support.transition && $tip.hasClass('fade') ?\n      $tip\n        .one('bsTransitionEnd', complete)\n        .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :\n      complete()\n\n    this.hoverState = null\n\n    return this\n  }\n\n  Tooltip.prototype.fixTitle = function () {\n    var $e = this.$element\n    if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {\n      $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')\n    }\n  }\n\n  Tooltip.prototype.hasContent = function () {\n    return this.getTitle()\n  }\n\n  Tooltip.prototype.getPosition = function ($element) {\n    $element   = $element || this.$element\n\n    var el     = $element[0]\n    var isBody = el.tagName == 'BODY'\n\n    var elRect    = el.getBoundingClientRect()\n    if (elRect.width == null) {\n      // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093\n      elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })\n    }\n    var isSvg = window.SVGElement && el instanceof window.SVGElement\n    // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.\n    // See https://github.com/twbs/bootstrap/issues/20280\n    var elOffset  = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())\n    var scroll    = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }\n    var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null\n\n    return $.extend({}, elRect, scroll, outerDims, elOffset)\n  }\n\n  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {\n    return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2 } :\n           placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :\n           placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :\n        /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }\n\n  }\n\n  Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {\n    var delta = { top: 0, left: 0 }\n    if (!this.$viewport) return delta\n\n    var viewportPadding = this.options.viewport && this.options.viewport.padding || 0\n    var viewportDimensions = this.getPosition(this.$viewport)\n\n    if (/right|left/.test(placement)) {\n      var topEdgeOffset    = pos.top - viewportPadding - viewportDimensions.scroll\n      var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight\n      if (topEdgeOffset < viewportDimensions.top) { // top overflow\n        delta.top = viewportDimensions.top - topEdgeOffset\n      } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow\n        delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset\n      }\n    } else {\n      var leftEdgeOffset  = pos.left - viewportPadding\n      var rightEdgeOffset = pos.left + viewportPadding + actualWidth\n      if (leftEdgeOffset < viewportDimensions.left) { // left overflow\n        delta.left = viewportDimensions.left - leftEdgeOffset\n      } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow\n        delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset\n      }\n    }\n\n    return delta\n  }\n\n  Tooltip.prototype.getTitle = function () {\n    var title\n    var $e = this.$element\n    var o  = this.options\n\n    title = $e.attr('data-original-title')\n      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)\n\n    return title\n  }\n\n  Tooltip.prototype.getUID = function (prefix) {\n    do prefix += ~~(Math.random() * 1000000)\n    while (document.getElementById(prefix))\n    return prefix\n  }\n\n  Tooltip.prototype.tip = function () {\n    if (!this.$tip) {\n      this.$tip = $(this.options.template)\n      if (this.$tip.length != 1) {\n        throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')\n      }\n    }\n    return this.$tip\n  }\n\n  Tooltip.prototype.arrow = function () {\n    return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))\n  }\n\n  Tooltip.prototype.enable = function () {\n    this.enabled = true\n  }\n\n  Tooltip.prototype.disable = function () {\n    this.enabled = false\n  }\n\n  Tooltip.prototype.toggleEnabled = function () {\n    this.enabled = !this.enabled\n  }\n\n  Tooltip.prototype.toggle = function (e) {\n    var self = this\n    if (e) {\n      self = $(e.currentTarget).data('bs.' + this.type)\n      if (!self) {\n        self = new this.constructor(e.currentTarget, this.getDelegateOptions())\n        $(e.currentTarget).data('bs.' + this.type, self)\n      }\n    }\n\n    if (e) {\n      self.inState.click = !self.inState.click\n      if (self.isInStateTrue()) self.enter(self)\n      else self.leave(self)\n    } else {\n      self.tip().hasClass('in') ? self.leave(self) : self.enter(self)\n    }\n  }\n\n  Tooltip.prototype.destroy = function () {\n    var that = this\n    clearTimeout(this.timeout)\n    this.hide(function () {\n      that.$element.off('.' + that.type).removeData('bs.' + that.type)\n      if (that.$tip) {\n        that.$tip.detach()\n      }\n      that.$tip = null\n      that.$arrow = null\n      that.$viewport = null\n      that.$element = null\n    })\n  }\n\n  Tooltip.prototype.sanitizeHtml = function (unsafeHtml) {\n    return sanitizeHtml(unsafeHtml, this.options.whiteList, this.options.sanitizeFn)\n  }\n\n  // TOOLTIP PLUGIN DEFINITION\n  // =========================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.tooltip')\n      var options = typeof option == 'object' && option\n\n      if (!data && /destroy|hide/.test(option)) return\n      if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  var old = $.fn.tooltip\n\n  $.fn.tooltip             = Plugin\n  $.fn.tooltip.Constructor = Tooltip\n\n\n  // TOOLTIP NO CONFLICT\n  // ===================\n\n  $.fn.tooltip.noConflict = function () {\n    $.fn.tooltip = old\n    return this\n  }\n\n}(jQuery);\n","/* ========================================================================\n * Bootstrap: transition.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#transitions\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // CSS TRANSITION SUPPORT (Shoutout: https://modernizr.com/)\n  // ============================================================\n\n  function transitionEnd() {\n    var el = document.createElement('bootstrap')\n\n    var transEndEventNames = {\n      WebkitTransition : 'webkitTransitionEnd',\n      MozTransition    : 'transitionend',\n      OTransition      : 'oTransitionEnd otransitionend',\n      transition       : 'transitionend'\n    }\n\n    for (var name in transEndEventNames) {\n      if (el.style[name] !== undefined) {\n        return { end: transEndEventNames[name] }\n      }\n    }\n\n    return false // explicit for ie8 (  ._.)\n  }\n\n  // https://blog.alexmaccaw.com/css-transitions\n  $.fn.emulateTransitionEnd = function (duration) {\n    var called = false\n    var $el = this\n    $(this).one('bsTransitionEnd', function () { called = true })\n    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }\n    setTimeout(callback, duration)\n    return this\n  }\n\n  $(function () {\n    $.support.transition = transitionEnd()\n\n    if (!$.support.transition) return\n\n    $.event.special.bsTransitionEnd = {\n      bindType: $.support.transition.end,\n      delegateType: $.support.transition.end,\n      handle: function (e) {\n        if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)\n      }\n    }\n  })\n\n}(jQuery);\n","/*!\r\n * Color Thief v2.0\r\n * by Lokesh Dhakar - http://www.lokeshdhakar.com\r\n *\r\n * Thanks\r\n * ------\r\n * Nick Rabinowitz - For creating quantize.js.\r\n * John Schulz - For clean up and optimization. @JFSIII\r\n * Nathan Spady - For adding drag and drop support to the demo page.\r\n *\r\n * License\r\n * -------\r\n * Copyright 2011, 2015 Lokesh Dhakar\r\n * Released under the MIT license\r\n * https://raw.githubusercontent.com/lokesh/color-thief/master/LICENSE\r\n *\r\n */\r\nvar CanvasImage=function(a){this.canvas=document.createElement(\"canvas\"),this.context=this.canvas.getContext(\"2d\"),document.body.appendChild(this.canvas),this.width=this.canvas.width=a.width,this.height=this.canvas.height=a.height,this.context.drawImage(a,0,0,this.width,this.height)};CanvasImage.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},CanvasImage.prototype.update=function(a){this.context.putImageData(a,0,0)},CanvasImage.prototype.getPixelCount=function(){return this.width*this.height},CanvasImage.prototype.getImageData=function(){return this.context.getImageData(0,0,this.width,this.height)},CanvasImage.prototype.removeCanvas=function(){this.canvas.parentNode.removeChild(this.canvas)};var ColorThief=function(){};/*!\r\n * quantize.js Copyright 2008 Nick Rabinowitz.\r\n * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php\r\n */\r\n/*!\r\n * Block below copied from Protovis: http://mbostock.github.com/protovis/\r\n * Copyright 2010 Stanford Visualization Group\r\n * Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php\r\n */\r\nif(ColorThief.prototype.getColor=function(a,b){var c=this.getPalette(a,5,b),d=c[0];return d},ColorThief.prototype.getPalette=function(a,b,c){\"undefined\"==typeof b&&(b=10),(\"undefined\"==typeof c||1>c)&&(c=10);for(var d,e,f,g,h,i=new CanvasImage(a),j=i.getImageData(),k=j.data,l=i.getPixelCount(),m=[],n=0;l>n;n+=c)d=4*n,e=k[d+0],f=k[d+1],g=k[d+2],h=k[d+3],h>=125&&(e>250&&f>250&&g>250||m.push([e,f,g]));var o=MMCQ.quantize(m,b),p=o?o.palette():null;return i.removeCanvas(),p},!pv)var pv={map:function(a,b){var c={};return b?a.map(function(a,d){return c.index=d,b.call(c,a)}):a.slice()},naturalOrder:function(a,b){return b>a?-1:a>b?1:0},sum:function(a,b){var c={};return a.reduce(b?function(a,d,e){return c.index=e,a+b.call(c,d)}:function(a,b){return a+b},0)},max:function(a,b){return Math.max.apply(null,b?pv.map(a,b):a)}};var MMCQ=function(){function a(a,b,c){return(a<<2*i)+(b<<i)+c}function b(a){function b(){c.sort(a),d=!0}var c=[],d=!1;return{push:function(a){c.push(a),d=!1},peek:function(a){return d||b(),void 0===a&&(a=c.length-1),c[a]},pop:function(){return d||b(),c.pop()},size:function(){return c.length},map:function(a){return c.map(a)},debug:function(){return d||b(),c}}}function c(a,b,c,d,e,f,g){var h=this;h.r1=a,h.r2=b,h.g1=c,h.g2=d,h.b1=e,h.b2=f,h.histo=g}function d(){this.vboxes=new b(function(a,b){return pv.naturalOrder(a.vbox.count()*a.vbox.volume(),b.vbox.count()*b.vbox.volume())})}function e(b){var c,d,e,f,g=1<<3*i,h=new Array(g);return b.forEach(function(b){d=b[0]>>j,e=b[1]>>j,f=b[2]>>j,c=a(d,e,f),h[c]=(h[c]||0)+1}),h}function f(a,b){var d,e,f,g=1e6,h=0,i=1e6,k=0,l=1e6,m=0;return a.forEach(function(a){d=a[0]>>j,e=a[1]>>j,f=a[2]>>j,g>d?g=d:d>h&&(h=d),i>e?i=e:e>k&&(k=e),l>f?l=f:f>m&&(m=f)}),new c(g,h,i,k,l,m,b)}function g(b,c){function d(a){var b,d,e,f,g,h=a+\"1\",j=a+\"2\",k=0;for(i=c[h];i<=c[j];i++)if(o[i]>n/2){for(e=c.copy(),f=c.copy(),b=i-c[h],d=c[j]-i,g=d>=b?Math.min(c[j]-1,~~(i+d/2)):Math.max(c[h],~~(i-1-b/2));!o[g];)g++;for(k=p[g];!k&&o[g-1];)k=p[--g];return e[j]=g,f[h]=e[j]+1,[e,f]}}if(c.count()){var e=c.r2-c.r1+1,f=c.g2-c.g1+1,g=c.b2-c.b1+1,h=pv.max([e,f,g]);if(1==c.count())return[c.copy()];var i,j,k,l,m,n=0,o=[],p=[];if(h==e)for(i=c.r1;i<=c.r2;i++){for(l=0,j=c.g1;j<=c.g2;j++)for(k=c.b1;k<=c.b2;k++)m=a(i,j,k),l+=b[m]||0;n+=l,o[i]=n}else if(h==f)for(i=c.g1;i<=c.g2;i++){for(l=0,j=c.r1;j<=c.r2;j++)for(k=c.b1;k<=c.b2;k++)m=a(j,i,k),l+=b[m]||0;n+=l,o[i]=n}else for(i=c.b1;i<=c.b2;i++){for(l=0,j=c.r1;j<=c.r2;j++)for(k=c.g1;k<=c.g2;k++)m=a(j,k,i),l+=b[m]||0;n+=l,o[i]=n}return o.forEach(function(a,b){p[b]=n-a}),d(h==e?\"r\":h==f?\"g\":\"b\")}}function h(a,c){function h(a,b){for(var c,d=1,e=0;k>e;)if(c=a.pop(),c.count()){var f=g(i,c),h=f[0],j=f[1];if(!h)return;if(a.push(h),j&&(a.push(j),d++),d>=b)return;if(e++>k)return}else a.push(c),e++}if(!a.length||2>c||c>256)return!1;var i=e(a),j=0;i.forEach(function(){j++});var m=f(a,i),n=new b(function(a,b){return pv.naturalOrder(a.count(),b.count())});n.push(m),h(n,l*c);for(var o=new b(function(a,b){return pv.naturalOrder(a.count()*a.volume(),b.count()*b.volume())});n.size();)o.push(n.pop());h(o,c-o.size());for(var p=new d;o.size();)p.push(o.pop());return p}var i=5,j=8-i,k=1e3,l=.75;return c.prototype={volume:function(a){var b=this;return(!b._volume||a)&&(b._volume=(b.r2-b.r1+1)*(b.g2-b.g1+1)*(b.b2-b.b1+1)),b._volume},count:function(b){var c=this,d=c.histo;if(!c._count_set||b){var e,f,g,h=0;for(e=c.r1;e<=c.r2;e++)for(f=c.g1;f<=c.g2;f++)for(g=c.b1;g<=c.b2;g++)index=a(e,f,g),h+=d[index]||0;c._count=h,c._count_set=!0}return c._count},copy:function(){var a=this;return new c(a.r1,a.r2,a.g1,a.g2,a.b1,a.b2,a.histo)},avg:function(b){var c=this,d=c.histo;if(!c._avg||b){var e,f,g,h,j,k=0,l=1<<8-i,m=0,n=0,o=0;for(f=c.r1;f<=c.r2;f++)for(g=c.g1;g<=c.g2;g++)for(h=c.b1;h<=c.b2;h++)j=a(f,g,h),e=d[j]||0,k+=e,m+=e*(f+.5)*l,n+=e*(g+.5)*l,o+=e*(h+.5)*l;k?c._avg=[~~(m/k),~~(n/k),~~(o/k)]:c._avg=[~~(l*(c.r1+c.r2+1)/2),~~(l*(c.g1+c.g2+1)/2),~~(l*(c.b1+c.b2+1)/2)]}return c._avg},contains:function(a){var b=this,c=a[0]>>j;return gval=a[1]>>j,bval=a[2]>>j,c>=b.r1&&c<=b.r2&&gval>=b.g1&&gval<=b.g2&&bval>=b.b1&&bval<=b.b2}},d.prototype={push:function(a){this.vboxes.push({vbox:a,color:a.avg()})},palette:function(){return this.vboxes.map(function(a){return a.color})},size:function(){return this.vboxes.size()},map:function(a){for(var b=this.vboxes,c=0;c<b.size();c++)if(b.peek(c).vbox.contains(a))return b.peek(c).color;return this.nearest(a)},nearest:function(a){for(var b,c,d,e=this.vboxes,f=0;f<e.size();f++)c=Math.sqrt(Math.pow(a[0]-e.peek(f).color[0],2)+Math.pow(a[1]-e.peek(f).color[1],2)+Math.pow(a[2]-e.peek(f).color[2],2)),(b>c||void 0===b)&&(b=c,d=e.peek(f).color);return d},forcebw:function(){var a=this.vboxes;a.sort(function(a,b){return pv.naturalOrder(pv.sum(a.color),pv.sum(b.color))});var b=a[0].color;b[0]<5&&b[1]<5&&b[2]<5&&(a[0].color=[0,0,0]);var c=a.length-1,d=a[c].color;d[0]>251&&d[1]>251&&d[2]>251&&(a[c].color=[255,255,255])}},{quantize:h}}();\r\nmodule.exports = ColorThief;\r\n","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",f=\"month\",h=\"quarter\",c=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(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,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},g=\"en\",D={};D[g]=M;var p=function(t){return t instanceof _},S=function t(e,n,r){var i;if(!e)return g;if(\"string\"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split(\"-\");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.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($);if(r){var i=r[2]-1||0,s=(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,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.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()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),l=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return O.w(n.toDate()[t].apply(n.toDate(\"s\"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v=\"set\"+(this.$u?\"UTC\":\"\");switch(h){case c:return r?l(1,0):l(31,11);case f:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+\"Hours\",0);case u:return $(v+\"Minutes\",1);case s:return $(v+\"Seconds\",2);case i:return $(v+\"Milliseconds\",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h=\"set\"+(this.$u?\"UTC\":\"\"),l=(n={},n[a]=h+\"Date\",n[d]=h+\"Date\",n[f]=h+\"Month\",n[c]=h+\"FullYear\",n[u]=h+\"Hours\",n[s]=h+\"Minutes\",n[i]=h+\"Seconds\",n[r]=h+\"Milliseconds\",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,l=this;r=Number(r);var $=O.p(h),y=function(t){var e=w(l);return O.w(e.date(e.date()+Math.round(t*r)),l)};if($===f)return this.set(f,this.$M+r);if($===c)return this.set(c,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||\"YYYY-MM-DDTHH:mm:ssZ\",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},c=function(t){return O.s(s%12||12,t,\"0\")},d=n.meridiem||function(t,e,n){var r=t<12?\"AM\":\"PM\";return n?r.toLowerCase():r},$={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,\"0\"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,\"0\"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,\"0\"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,\"0\"),s:String(this.$s),ss:O.s(this.$s,2,\"0\"),SSS:O.s(this.$ms,3,\"0\"),Z:i};return r.replace(y,(function(t,e){return e||$[t]||i.replace(\":\",\"\")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,v=this-M,g=O.m(this,M);return g=($={},$[c]=g/12,$[f]=g,$[h]=g/3,$[o]=(v-m)/6048e5,$[a]=(v-m)/864e5,$[u]=v/n,$[s]=v/e,$[i]=v/t,$)[y]||v,l?g:O.a(g)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),T=_.prototype;return w.prototype=T,[[\"$ms\",r],[\"$s\",i],[\"$m\",s],[\"$H\",u],[\"$W\",a],[\"$M\",f],[\"$y\",c],[\"$D\",d]].forEach((function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[g],w.Ls=D,w.p={},w}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_localizedFormat=t()}(this,(function(){\"use strict\";var e={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(t,o,n){var r=o.prototype,i=r.format;n.en.formats=e,r.format=function(t){void 0===t&&(t=\"YYYY-MM-DDTHH:mm:ssZ\");var o=this.$locale().formats,n=function(t,o){return t.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var i=r&&r.toUpperCase();return n||o[r]||e[r]||o[i].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,o){return t||o.slice(1)}))}))}(t,void 0===o?{}:o);return i.call(this,n)}}}));","!function(r,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(r=\"undefined\"!=typeof globalThis?globalThis:r||self).dayjs_plugin_relativeTime=e()}(this,(function(){\"use strict\";return function(r,e,t){r=r||{};var n=e.prototype,o={future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.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\"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(\"\"+p)),a=\"string\"==typeof v?v.replace(\"%d\",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return\"function\"==typeof M?M(a):M.replace(\"%s\",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)}}}));","\"use strict\";\n\n// eslint-disable-next-line func-names\nmodule.exports = function () {\n  if (typeof globalThis === \"object\") {\n    return globalThis;\n  }\n\n  var g;\n\n  try {\n    // This works if eval is allowed (see CSP)\n    // eslint-disable-next-line no-new-func\n    g = this || new Function(\"return this\")();\n  } catch (e) {\n    // This works if the window reference is available\n    if (typeof window === \"object\") {\n      return window;\n    } // This works if the self reference is available\n\n\n    if (typeof self === \"object\") {\n      return self;\n    } // This works if the global reference is available\n\n\n    if (typeof global !== \"undefined\") {\n      return global;\n    }\n  }\n\n  return g;\n}();","/*jslint browser: true*/\r\n/*jslint jquery: true*/\r\n\r\n/*\r\n * jQuery Hotkeys Plugin\r\n * Copyright 2010, John Resig\r\n * Dual licensed under the MIT or GPL Version 2 licenses.\r\n *\r\n * Based upon the plugin by Tzury Bar Yochay:\r\n * https://github.com/tzuryby/jquery.hotkeys\r\n *\r\n * Original idea by:\r\n * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/\r\n */\r\n\r\n/*\r\n * One small change is: now keys are passed by object { keys: '...' }\r\n * Might be useful, when you want to pass some other data to your handler\r\n */\r\n\r\n(function(jQuery) {\r\n\r\n  jQuery.hotkeys = {\r\n    version: \"0.2.0\",\r\n\r\n    specialKeys: {\r\n      8: \"backspace\",\r\n      9: \"tab\",\r\n      10: \"return\",\r\n      13: \"return\",\r\n      16: \"shift\",\r\n      17: \"ctrl\",\r\n      18: \"alt\",\r\n      19: \"pause\",\r\n      20: \"capslock\",\r\n      27: \"esc\",\r\n      32: \"space\",\r\n      33: \"pageup\",\r\n      34: \"pagedown\",\r\n      35: \"end\",\r\n      36: \"home\",\r\n      37: \"left\",\r\n      38: \"up\",\r\n      39: \"right\",\r\n      40: \"down\",\r\n      45: \"insert\",\r\n      46: \"del\",\r\n      59: \";\",\r\n      61: \"=\",\r\n      96: \"0\",\r\n      97: \"1\",\r\n      98: \"2\",\r\n      99: \"3\",\r\n      100: \"4\",\r\n      101: \"5\",\r\n      102: \"6\",\r\n      103: \"7\",\r\n      104: \"8\",\r\n      105: \"9\",\r\n      106: \"*\",\r\n      107: \"+\",\r\n      109: \"-\",\r\n      110: \".\",\r\n      111: \"/\",\r\n      112: \"f1\",\r\n      113: \"f2\",\r\n      114: \"f3\",\r\n      115: \"f4\",\r\n      116: \"f5\",\r\n      117: \"f6\",\r\n      118: \"f7\",\r\n      119: \"f8\",\r\n      120: \"f9\",\r\n      121: \"f10\",\r\n      122: \"f11\",\r\n      123: \"f12\",\r\n      144: \"numlock\",\r\n      145: \"scroll\",\r\n      173: \"-\",\r\n      186: \";\",\r\n      187: \"=\",\r\n      188: \",\",\r\n      189: \"-\",\r\n      190: \".\",\r\n      191: \"/\",\r\n      192: \"`\",\r\n      219: \"[\",\r\n      220: \"\\\\\",\r\n      221: \"]\",\r\n      222: \"'\"\r\n    },\r\n\r\n    shiftNums: {\r\n      \"`\": \"~\",\r\n      \"1\": \"!\",\r\n      \"2\": \"@\",\r\n      \"3\": \"#\",\r\n      \"4\": \"$\",\r\n      \"5\": \"%\",\r\n      \"6\": \"^\",\r\n      \"7\": \"&\",\r\n      \"8\": \"*\",\r\n      \"9\": \"(\",\r\n      \"0\": \")\",\r\n      \"-\": \"_\",\r\n      \"=\": \"+\",\r\n      \";\": \": \",\r\n      \"'\": \"\\\"\",\r\n      \",\": \"<\",\r\n      \".\": \">\",\r\n      \"/\": \"?\",\r\n      \"\\\\\": \"|\"\r\n    },\r\n\r\n    // excludes: button, checkbox, file, hidden, image, password, radio, reset, search, submit, url\r\n    textAcceptingInputTypes: [\r\n      \"text\", \"password\", \"number\", \"email\", \"url\", \"range\", \"date\", \"month\", \"week\", \"time\", \"datetime\",\r\n      \"datetime-local\", \"search\", \"color\", \"tel\"],\r\n\r\n    // default input types not to bind to unless bound directly\r\n    textInputTypes: /textarea|input|select/i,\r\n\r\n    options: {\r\n      filterInputAcceptingElements: true,\r\n      filterTextInputs: true,\r\n      filterContentEditable: true\r\n    }\r\n  };\r\n\r\n  function keyHandler(handleObj) {\r\n    if (typeof handleObj.data === \"string\") {\r\n      handleObj.data = {\r\n        keys: handleObj.data\r\n      };\r\n    }\r\n\r\n    // Only care when a possible input has been specified\r\n    if (!handleObj.data || !handleObj.data.keys || typeof handleObj.data.keys !== \"string\") {\r\n      return;\r\n    }\r\n\r\n    var origHandler = handleObj.handler,\r\n      keys = handleObj.data.keys.toLowerCase().split(\" \");\r\n\r\n    handleObj.handler = function(event) {\r\n      //      Don't fire in text-accepting inputs that we didn't directly bind to\r\n      if (this !== event.target &&\r\n        (jQuery.hotkeys.options.filterInputAcceptingElements &&\r\n          jQuery.hotkeys.textInputTypes.test(event.target.nodeName) ||\r\n          (jQuery.hotkeys.options.filterContentEditable && jQuery(event.target).attr('contenteditable')) ||\r\n          (jQuery.hotkeys.options.filterTextInputs &&\r\n            jQuery.inArray(event.target.type, jQuery.hotkeys.textAcceptingInputTypes) > -1))) {\r\n        return;\r\n      }\r\n\r\n      var special = event.type !== \"keypress\" && jQuery.hotkeys.specialKeys[event.which],\r\n        character = String.fromCharCode(event.which).toLowerCase(),\r\n        modif = \"\",\r\n        possible = {};\r\n\r\n      jQuery.each([\"alt\", \"ctrl\", \"shift\"], function(index, specialKey) {\r\n\r\n        if (event[specialKey + 'Key'] && special !== specialKey) {\r\n          modif += specialKey + '+';\r\n        }\r\n      });\r\n\r\n      // metaKey is triggered off ctrlKey erronously\r\n      if (event.metaKey && !event.ctrlKey && special !== \"meta\") {\r\n        modif += \"meta+\";\r\n      }\r\n\r\n      if (event.metaKey && special !== \"meta\" && modif.indexOf(\"alt+ctrl+shift+\") > -1) {\r\n        modif = modif.replace(\"alt+ctrl+shift+\", \"hyper+\");\r\n      }\r\n\r\n      if (special) {\r\n        possible[modif + special] = true;\r\n      }\r\n      else {\r\n        possible[modif + character] = true;\r\n        possible[modif + jQuery.hotkeys.shiftNums[character]] = true;\r\n\r\n        // \"$\" can be triggered as \"Shift+4\" or \"Shift+$\" or just \"$\"\r\n        if (modif === \"shift+\") {\r\n          possible[jQuery.hotkeys.shiftNums[character]] = true;\r\n        }\r\n      }\r\n\r\n      for (var i = 0, l = keys.length; i < l; i++) {\r\n        if (possible[keys[i]]) {\r\n          return origHandler.apply(this, arguments);\r\n        }\r\n      }\r\n    };\r\n  }\r\n\r\n  jQuery.each([\"keydown\", \"keyup\", \"keypress\"], function() {\r\n    jQuery.event.special[this] = {\r\n      add: keyHandler\r\n    };\r\n  });\r\n\r\n})(jQuery || this.jQuery || window.jQuery);\r\n","/*!\n * jQuery JavaScript Library v3.6.1\n * https://jquery.com/\n *\n * Includes Sizzle.js\n * https://sizzlejs.com/\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2022-08-26T17:52Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket trac-14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar flat = arr.flat ? function( array ) {\n\treturn arr.flat.call( array );\n} : function( array ) {\n\treturn arr.concat.apply( [], array );\n};\n\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n\t\t// Support: Chrome <=57, Firefox <=52\n\t\t// In some browsers, typeof returns \"function\" for HTML <object> elements\n\t\t// (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n\t\t// We don't want to classify *any* DOM node as a function.\n\t\t// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5\n\t\t// Plus for old WebKit, typeof returns \"function\" for HTML collections\n\t\t// (e.g., `typeof document.getElementsByTagName(\"div\") === \"function\"`). (gh-4756)\n\t\treturn typeof obj === \"function\" && typeof obj.nodeType !== \"number\" &&\n\t\t\ttypeof obj.item !== \"function\";\n\t};\n\n\nvar isWindow = function isWindow( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t};\n\n\nvar document = window.document;\n\n\n\n\tvar preservedScriptAttributes = {\n\t\ttype: true,\n\t\tsrc: true,\n\t\tnonce: true,\n\t\tnoModule: true\n\t};\n\n\tfunction DOMEval( code, node, doc ) {\n\t\tdoc = doc || document;\n\n\t\tvar i, val,\n\t\t\tscript = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tif ( node ) {\n\t\t\tfor ( i in preservedScriptAttributes ) {\n\n\t\t\t\t// Support: Firefox 64+, Edge 18+\n\t\t\t\t// Some browsers don't support the \"nonce\" property on scripts.\n\t\t\t\t// On the other hand, just using `getAttribute` is not enough as\n\t\t\t\t// the `nonce` attribute is reset to an empty string whenever it\n\t\t\t\t// becomes browsing-context connected.\n\t\t\t\t// See https://github.com/whatwg/html/issues/2369\n\t\t\t\t// See https://html.spec.whatwg.org/#nonce-attributes\n\t\t\t\t// The `node.getAttribute` check was added for the sake of\n\t\t\t\t// `jQuery.globalEval` so that it can fake a nonce-containing node\n\t\t\t\t// via an object.\n\t\t\t\tval = node[ i ] || node.getAttribute && node.getAttribute( i );\n\t\t\t\tif ( val ) {\n\t\t\t\t\tscript.setAttribute( i, val );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n\n\nfunction toType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\t// Support: Android <=2.3 only (functionish RegExp)\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar\n\tversion = \"3.6.1\",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teven: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn ( i + 1 ) % 2;\n\t\t} ) );\n\t},\n\n\todd: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn i % 2;\n\t\t} ) );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent Object.prototype pollution\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( name === \"__proto__\" || target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\n\t\t\t\t\tsrc = target[ name ];\n\n\t\t\t\t\t// Ensure proper type for the source value\n\t\t\t\t\tif ( copyIsArray && !Array.isArray( src ) ) {\n\t\t\t\t\t\tclone = [];\n\t\t\t\t\t} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {\n\t\t\t\t\t\tclone = {};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src;\n\t\t\t\t\t}\n\t\t\t\t\tcopyIsArray = false;\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t// Evaluates a script in a provided context; falls back to the global one\n\t// if not specified.\n\tglobalEval: function( code, options, doc ) {\n\t\tDOMEval( code, { nonce: options && options.nonce }, doc );\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn flat( ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\n\tfunction( _i, name ) {\n\t\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n\t} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = toType( obj );\n\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.3.6\n * https://sizzlejs.com/\n *\n * Copyright JS Foundation and other contributors\n * Released under the MIT license\n * https://js.foundation/\n *\n * Date: 2021-02-16\n */\n( function( window ) {\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tnonnativeSelectorCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// Instance methods\n\thasOwn = ( {} ).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpushNative = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\n\t// Use a stripped-down indexOf as it's faster than native\n\t// https://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[ i ] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|\" +\n\t\t\"ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\n\t// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram\n\tidentifier = \"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\n\t\t// \"Attribute values must be CSS identifiers [capture 5]\n\t\t// or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" +\n\t\twhitespace + \"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" +\n\t\twhitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace +\n\t\t\"*\" ),\n\trdescend = new RegExp( whitespace + \"|>\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" +\n\t\t\twhitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" +\n\t\t\twhitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace +\n\t\t\t\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" + whitespace +\n\t\t\t\"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trhtml = /HTML$/i,\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace + \"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\", \"g\" ),\n\tfunescape = function( escape, nonHex ) {\n\t\tvar high = \"0x\" + escape.slice( 1 ) - 0x10000;\n\n\t\treturn nonHex ?\n\n\t\t\t// Strip the backslash prefix from a non-hex escape sequence\n\t\t\tnonHex :\n\n\t\t\t// Replace a hexadecimal escape sequence with the encoded Unicode code point\n\t\t\t// Support: IE <=11+\n\t\t\t// For values outside the Basic Multilingual Plane (BMP), manually construct a\n\t\t\t// surrogate pair\n\t\t\thigh < 0 ?\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// CSS string/identifier serialization\n\t// https://drafts.csswg.org/cssom/#common-serializing-idioms\n\trcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,\n\tfcssescape = function( ch, asCodePoint ) {\n\t\tif ( asCodePoint ) {\n\n\t\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\t\tif ( ch === \"\\0\" ) {\n\t\t\t\treturn \"\\uFFFD\";\n\t\t\t}\n\n\t\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\t\treturn ch.slice( 0, -1 ) + \"\\\\\" +\n\t\t\t\tch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t\t}\n\n\t\t// Other potentially-special ASCII characters get backslash-escaped\n\t\treturn \"\\\\\" + ch;\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tinDisabledFieldset = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && elem.nodeName.toLowerCase() === \"fieldset\";\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t( arr = slice.call( preferredDoc.childNodes ) ),\n\t\tpreferredDoc.childNodes\n\t);\n\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\t// eslint-disable-next-line no-unused-expressions\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpushNative.apply( target, slice.call( els ) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( ( target[ j++ ] = els[ i++ ] ) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\t\tsetDocument( context );\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( ( m = match[ 1 ] ) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( ( elem = context.getElementById( m ) ) ) {\n\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && ( elem = newContext.getElementById( m ) ) &&\n\t\t\t\t\t\t\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[ 2 ] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( ( m = match[ 3 ] ) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( support.qsa &&\n\t\t\t\t!nonnativeSelectorCache[ selector + \" \" ] &&\n\t\t\t\t( !rbuggyQSA || !rbuggyQSA.test( selector ) ) &&\n\n\t\t\t\t// Support: IE 8 only\n\t\t\t\t// Exclude object elements\n\t\t\t\t( nodeType !== 1 || context.nodeName.toLowerCase() !== \"object\" ) ) {\n\n\t\t\t\tnewSelector = selector;\n\t\t\t\tnewContext = context;\n\n\t\t\t\t// qSA considers elements outside a scoping root when evaluating child or\n\t\t\t\t// descendant combinators, which is not what we want.\n\t\t\t\t// In such cases, we work around the behavior by prefixing every selector in the\n\t\t\t\t// list with an ID selector referencing the scope context.\n\t\t\t\t// The technique has to be used as well when a leading combinator is used\n\t\t\t\t// as such selectors are not recognized by querySelectorAll.\n\t\t\t\t// Thanks to Andrew Dupont for this technique.\n\t\t\t\tif ( nodeType === 1 &&\n\t\t\t\t\t( rdescend.test( selector ) || rcombinators.test( selector ) ) ) {\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\n\t\t\t\t\t// We can use :scope instead of the ID hack if the browser\n\t\t\t\t\t// supports it & if we're not changing the context.\n\t\t\t\t\tif ( newContext !== context || !support.scope ) {\n\n\t\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\t\tif ( ( nid = context.getAttribute( \"id\" ) ) ) {\n\t\t\t\t\t\t\tnid = nid.replace( rcssescape, fcssescape );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontext.setAttribute( \"id\", ( nid = expando ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[ i ] = ( nid ? \"#\" + nid : \":scope\" ) + \" \" +\n\t\t\t\t\t\t\ttoSelector( groups[ i ] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\tnonnativeSelectorCache( selector, true );\n\t\t\t\t} finally {\n\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn ( cache[ key + \" \" ] = value );\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement( \"fieldset\" );\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch ( e ) {\n\t\treturn false;\n\t} finally {\n\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\n\t\t// release memory in IE\n\t\tel = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split( \"|\" ),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[ i ] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\ta.sourceIndex - b.sourceIndex;\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( ( cur = cur.nextSibling ) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn ( name === \"input\" || name === \"button\" ) && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\t/* jshint -W018 */\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\tinDisabledFieldset( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction( function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction( function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ ( j = matchIndexes[ i ] ) ] ) {\n\t\t\t\t\tseed[ j ] = !( matches[ j ] = seed[ j ] );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\tvar namespace = elem && elem.namespaceURI,\n\t\tdocElem = elem && ( elem.ownerDocument || elem ).documentElement;\n\n\t// Support: IE <=8\n\t// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes\n\t// https://bugs.jquery.com/ticket/4833\n\treturn !rhtml.test( namespace || docElem && docElem.nodeName || \"HTML\" );\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( preferredDoc != document &&\n\t\t( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 11, Edge\n\t\tif ( subWindow.addEventListener ) {\n\t\t\tsubWindow.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( subWindow.attachEvent ) {\n\t\t\tsubWindow.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t// Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only,\n\t// Safari 4 - 5 only, Opera <=11.6 - 12.x only\n\t// IE/Edge & older browsers don't support the :scope pseudo-class.\n\t// Support: Safari 6.0 only\n\t// Safari 6.0 supports :scope but it's an alias of :root there.\n\tsupport.scope = assert( function( el ) {\n\t\tdocElem.appendChild( el ).appendChild( document.createElement( \"div\" ) );\n\t\treturn typeof el.querySelectorAll !== \"undefined\" &&\n\t\t\t!el.querySelectorAll( \":scope fieldset div\" ).length;\n\t} );\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert( function( el ) {\n\t\tel.className = \"i\";\n\t\treturn !el.getAttribute( \"className\" );\n\t} );\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert( function( el ) {\n\t\tel.appendChild( document.createComment( \"\" ) );\n\t\treturn !el.getElementsByTagName( \"*\" ).length;\n\t} );\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert( function( el ) {\n\t\tdocElem.appendChild( el ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t} );\n\n\t// ID filter and find\n\tif ( support.getById ) {\n\t\tExpr.filter[ \"ID\" ] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute( \"id\" ) === attrId;\n\t\t\t};\n\t\t};\n\t\tExpr.find[ \"ID\" ] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\n\t\tExpr.filter[ \"ID\" ] =  function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode( \"id\" );\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find[ \"ID\" ] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( ( elem = elems[ i++ ] ) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[ \"TAG\" ] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[ \"CLASS\" ] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See https://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) {\n\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert( function( el ) {\n\n\t\t\tvar input;\n\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// https://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( el ).innerHTML = \"<a id='\" + expando + \"'></a>\" +\n\t\t\t\t\"<select id='\" + expando + \"-\\r\\\\' msallowcapture=''>\" +\n\t\t\t\t\"<option selected=''></option></select>\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( el.querySelectorAll( \"[msallowcapture^='']\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !el.querySelectorAll( \"[selected]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"~=\" );\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 15 - 18+\n\t\t\t// IE 11/Edge don't find elements on a `[name='']` query in some cases.\n\t\t\t// Adding a temporary attribute to the document before the selection works\n\t\t\t// around the issue.\n\t\t\t// Interestingly, IE 10 & older don't seem to have the issue.\n\t\t\tinput = document.createElement( \"input\" );\n\t\t\tinput.setAttribute( \"name\", \"\" );\n\t\t\tel.appendChild( input );\n\t\t\tif ( !el.querySelectorAll( \"[name='']\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*name\" + whitespace + \"*=\" +\n\t\t\t\t\twhitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !el.querySelectorAll( \":checked\" ).length ) {\n\t\t\t\trbuggyQSA.push( \":checked\" );\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push( \".#.+[+~]\" );\n\t\t\t}\n\n\t\t\t// Support: Firefox <=3.6 - 5 only\n\t\t\t// Old Firefox doesn't throw on a badly-escaped identifier.\n\t\t\tel.querySelectorAll( \"\\\\\\f\" );\n\t\t\trbuggyQSA.push( \"[\\\\r\\\\n\\\\f]\" );\n\t\t} );\n\n\t\tassert( function( el ) {\n\t\t\tel.innerHTML = \"<a href='' disabled='disabled'></a>\" +\n\t\t\t\t\"<select disabled='disabled'><option/></select>\";\n\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement( \"input\" );\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( el.querySelectorAll( \"[name=d]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( el.querySelectorAll( \":enabled\" ).length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: IE9-11+\n\t\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t\tdocElem.appendChild( el ).disabled = true;\n\t\t\tif ( el.querySelectorAll( \":disabled\" ).length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: Opera 10 - 11 only\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tel.querySelectorAll( \"*,:x\" );\n\t\t\trbuggyQSA.push( \",.*:\" );\n\t\t} );\n\t}\n\n\tif ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector ) ) ) ) {\n\n\t\tassert( function( el ) {\n\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( el, \"*\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( el, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t} );\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( \"|\" ) );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( \"|\" ) );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t) );\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( ( b = b.parentNode ) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = hasCompare ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tcompare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( a == document || a.ownerDocument == preferredDoc &&\n\t\t\t\tcontains( preferredDoc, a ) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( b == document || b.ownerDocument == preferredDoc &&\n\t\t\t\tcontains( preferredDoc, b ) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\tif ( !aup || !bup ) {\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t/* eslint-disable eqeqeq */\n\t\t\treturn a == document ? -1 :\n\t\t\t\tb == document ? 1 :\n\t\t\t\t/* eslint-enable eqeqeq */\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( ( cur = cur.parentNode ) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( ( cur = cur.parentNode ) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[ i ] === bp[ i ] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[ i ], bp[ i ] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t/* eslint-disable eqeqeq */\n\t\t\tap[ i ] == preferredDoc ? -1 :\n\t\t\tbp[ i ] == preferredDoc ? 1 :\n\t\t\t/* eslint-enable eqeqeq */\n\t\t\t0;\n\t};\n\n\treturn document;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\tsetDocument( elem );\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t!nonnativeSelectorCache[ expr + \" \" ] &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\n\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t// fragment in IE 9\n\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch ( e ) {\n\t\t\tnonnativeSelectorCache( expr, true );\n\t\t}\n\t}\n\n\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( context.ownerDocument || context ) != document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( elem.ownerDocument || elem ) != document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val !== undefined ?\n\t\tval :\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t( val = elem.getAttributeNode( name ) ) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull;\n};\n\nSizzle.escape = function( sel ) {\n\treturn ( sel + \"\" ).replace( rcssescape, fcssescape );\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\n\t\t// If no nodeType, this is expected to be an array\n\t\twhile ( ( node = elem[ i++ ] ) ) {\n\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[ 1 ] = match[ 1 ].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[ 3 ] = ( match[ 3 ] || match[ 4 ] ||\n\t\t\t\tmatch[ 5 ] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[ 2 ] === \"~=\" ) {\n\t\t\t\tmatch[ 3 ] = \" \" + match[ 3 ] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[ 1 ] = match[ 1 ].toLowerCase();\n\n\t\t\tif ( match[ 1 ].slice( 0, 3 ) === \"nth\" ) {\n\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[ 3 ] ) {\n\t\t\t\t\tSizzle.error( match[ 0 ] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[ 4 ] = +( match[ 4 ] ?\n\t\t\t\t\tmatch[ 5 ] + ( match[ 6 ] || 1 ) :\n\t\t\t\t\t2 * ( match[ 3 ] === \"even\" || match[ 3 ] === \"odd\" ) );\n\t\t\t\tmatch[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === \"odd\" );\n\n\t\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[ 3 ] ) {\n\t\t\t\tSizzle.error( match[ 0 ] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[ 6 ] && match[ 2 ];\n\n\t\t\tif ( matchExpr[ \"CHILD\" ].test( match[ 0 ] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[ 3 ] ) {\n\t\t\t\tmatch[ 2 ] = match[ 4 ] || match[ 5 ] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t( excess = tokenize( unquoted, true ) ) &&\n\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t( excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length ) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[ 0 ] = match[ 0 ].slice( 0, excess );\n\t\t\t\tmatch[ 2 ] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() {\n\t\t\t\t\treturn true;\n\t\t\t\t} :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t( pattern = new RegExp( \"(^|\" + whitespace +\n\t\t\t\t\t\")\" + className + \"(\" + whitespace + \"|$)\" ) ) && classCache(\n\t\t\t\t\t\tclassName, function( elem ) {\n\t\t\t\t\t\t\treturn pattern.test(\n\t\t\t\t\t\t\t\ttypeof elem.className === \"string\" && elem.className ||\n\t\t\t\t\t\t\t\ttypeof elem.getAttribute !== \"undefined\" &&\n\t\t\t\t\t\t\t\t\telem.getAttribute( \"class\" ) ||\n\t\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t\t);\n\t\t\t\t} );\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\t/* eslint-disable max-len */\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t\t/* eslint-enable max-len */\n\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": function( type, what, _argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tvar cache, uniqueCache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( ( node = node[ dir ] ) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\n\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\tnode = parent;\n\t\t\t\t\t\t\touterCache = node[ expando ] || ( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\n\t\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\touterCache = node[ expando ] || ( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t\"PSEUDO\": function( pseudo, argument ) {\n\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction( function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf( seed, matched[ i ] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[ i ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} ) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\n\t\t// Potentially complex pseudos\n\t\t\"not\": markFunction( function( selector ) {\n\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction( function( seed, matches, _context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\t\t\t\t\tseed[ i ] = !( matches[ i ] = elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} ) :\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tinput[ 0 ] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\n\t\t\t\t\t// Don't keep the element (issue #299)\n\t\t\t\t\tinput[ 0 ] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t} ),\n\n\t\t\"has\": markFunction( function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t} ),\n\n\t\t\"contains\": markFunction( function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t} ),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test( lang || \"\" ) ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( ( elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute( \"xml:lang\" ) || elem.getAttribute( \"lang\" ) ) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t} ),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement &&\n\t\t\t\t( !document.hasFocus || document.hasFocus() ) &&\n\t\t\t\t!!( elem.type || elem.href || ~elem.tabIndex );\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": createDisabledPseudo( false ),\n\t\t\"disabled\": createDisabledPseudo( true ),\n\n\t\t\"checked\": function( elem ) {\n\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn ( nodeName === \"input\" && !!elem.checked ) ||\n\t\t\t\t( nodeName === \"option\" && !!elem.selected );\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t//   but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[ \"empty\" ]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\n\t\t\t\t// Support: IE<8\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\n\t\t\t\t( ( attr = elem.getAttribute( \"type\" ) ) == null ||\n\t\t\t\t\tattr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo( function() {\n\t\t\treturn [ 0 ];\n\t\t} ),\n\n\t\t\"last\": createPositionalPseudo( function( _matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t} ),\n\n\t\t\"eq\": createPositionalPseudo( function( _matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t} ),\n\n\t\t\"even\": createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\t\"odd\": createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\t\"lt\": createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ?\n\t\t\t\targument + length :\n\t\t\t\targument > length ?\n\t\t\t\t\tlength :\n\t\t\t\t\targument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\t\"gt\": createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} )\n\t}\n};\n\nExpr.pseudos[ \"nth\" ] = Expr.pseudos[ \"eq\" ];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || ( match = rcomma.exec( soFar ) ) ) {\n\t\t\tif ( match ) {\n\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[ 0 ].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( ( tokens = [] ) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( ( match = rcombinators.exec( soFar ) ) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push( {\n\t\t\t\tvalue: matched,\n\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[ 0 ].replace( rtrim, \" \" )\n\t\t\t} );\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||\n\t\t\t\t( match = preFilters[ type ]( match ) ) ) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push( {\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t} );\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n};\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[ i ].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tskip = combinator.next,\n\t\tkey = skip || dir,\n\t\tcheckNonElements = base && key === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, uniqueCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\n\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\tuniqueCache = outerCache[ elem.uniqueID ] ||\n\t\t\t\t\t\t\t( outerCache[ elem.uniqueID ] = {} );\n\n\t\t\t\t\t\tif ( skip && skip === elem.nodeName.toLowerCase() ) {\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\n\t\t\t\t\t\t} else if ( ( oldCache = uniqueCache[ key ] ) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn ( newCache[ 2 ] = oldCache[ 2 ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\tuniqueCache[ key ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[ i ]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[ 0 ];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[ i ], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction( function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts(\n\t\t\t\tselector || \"*\",\n\t\t\t\tcontext.nodeType ? [ context ] : context,\n\t\t\t\t[]\n\t\t\t),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( ( elem = temp[ i ] ) ) {\n\t\t\t\t\tmatcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) ) {\n\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( ( matcherIn[ i ] = elem ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, ( matcherOut = [] ), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) &&\n\t\t\t\t\t\t( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) {\n\n\t\t\t\t\t\tseed[ temp ] = !( results[ temp ] = elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t} );\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[ 0 ].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[ \" \" ],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\tvar ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t( checkContext = context ).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\n\t\t\t// Avoid hanging onto element (issue #299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {\n\t\t\tmatchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[ j ].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\n\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\ttokens\n\t\t\t\t\t\t.slice( 0, i - 1 )\n\t\t\t\t\t\t.concat( { value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" } )\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find[ \"TAG\" ]( \"*\", outermost ),\n\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\n\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\toutermostContext = context == document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: IE<9, Safari\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching elements by id\n\t\t\tfor ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( !context && elem.ownerDocument != document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( ( matcher = elementMatchers[ j++ ] ) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml ) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( ( elem = !matcher && elem ) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( ( matcher = setMatchers[ j++ ] ) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !( unmatched[ i ] || setMatched[ i ] ) ) {\n\t\t\t\t\t\t\t\tsetMatched[ i ] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[ i ] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache(\n\t\t\tselector,\n\t\t\tmatcherFromGroupMatchers( elementMatchers, setMatchers )\n\t\t);\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n};\n\n/**\n * A low-level selection function that works with Sizzle's compiled\n *  selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n *  selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nselect = Sizzle.select = function( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( ( selector = compiled.selector || selector ) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[ 0 ] = match[ 0 ].slice( 0 );\n\t\tif ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === \"ID\" &&\n\t\t\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {\n\n\t\t\tcontext = ( Expr.find[ \"ID\" ]( token.matches[ 0 ]\n\t\t\t\t.replace( runescape, funescape ), context ) || [] )[ 0 ];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr[ \"needsContext\" ].test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[ i ];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ ( type = token.type ) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( ( find = Expr.find[ type ] ) ) {\n\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( ( seed = find(\n\t\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext\n\t\t\t\t) ) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n};\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split( \"\" ).sort( sortOrder ).join( \"\" ) === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert( function( el ) {\n\n\t// Should return 1, but returns 4 (following)\n\treturn el.compareDocumentPosition( document.createElement( \"fieldset\" ) ) & 1;\n} );\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert( function( el ) {\n\tel.innerHTML = \"<a href='#'></a>\";\n\treturn el.firstChild.getAttribute( \"href\" ) === \"#\";\n} ) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t} );\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert( function( el ) {\n\tel.innerHTML = \"<input/>\";\n\tel.firstChild.setAttribute( \"value\", \"\" );\n\treturn el.firstChild.getAttribute( \"value\" ) === \"\";\n} ) ) {\n\taddHandle( \"value\", function( elem, _name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t} );\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert( function( el ) {\n\treturn el.getAttribute( \"disabled\" ) == null;\n} ) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\n\t\t\t\t( val = elem.getAttributeNode( name ) ) && val.specified ?\n\t\t\t\t\tval.value :\n\t\t\t\t\tnull;\n\t\t}\n\t} );\n}\n\nreturn Sizzle;\n\n} )( window );\n\n\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\n\n// Deprecated\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\njQuery.escapeSelector = Sizzle.escape;\n\n\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\n\n\nfunction nodeName( elem, name ) {\n\n\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\n}\nvar rsingleTag = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\n\n\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\t}\n\n\t// Single element\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\t}\n\n\t// Arraylike of elements (jQuery, arguments, Array)\n\tif ( typeof qualifier !== \"string\" ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t\t} );\n\t}\n\n\t// Filtered directly for both simple and complex selectors\n\treturn jQuery.filter( qualifier, elements, not );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\tif ( elems.length === 1 && elem.nodeType === 1 ) {\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\n\t}\n\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\treturn elem.nodeType === 1;\n\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i, ret,\n\t\t\tlen = this.length,\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tret = this.pushStack( [] );\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\treturn len > 1 ? jQuery.uniqueSort( ret ) : ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521)\n\t// Strict HTML recognition (trac-11290: must start with <)\n\t// Shortcut simple #id case for speed\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\n\n\t\t// Positional selectors never match, since there's no _selection_ context\n\t\tif ( !rneedsContext.test( selectors ) ) {\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t\t// Always skip document fragments\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\n\n\t\t\t\t\t\t// Don't pass non-elements to Sizzle\n\t\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\tif ( elem.contentDocument != null &&\n\n\t\t\t// Support: IE 11+\n\t\t\t// <object> elements with no `data` attribute has an object\n\t\t\t// `contentDocument` with a `null` prototype.\n\t\t\tgetProto( elem.contentDocument ) ) {\n\n\t\t\treturn elem.contentDocument;\n\t\t}\n\n\t\t// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\n\t\t// Treat the template element as a regular one in browsers that\n\t\t// don't support it.\n\t\tif ( nodeName( elem, \"template\" ) ) {\n\t\t\telem = elem.content || elem;\n\t\t}\n\n\t\treturn jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = locked || options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && toType( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory && !firing ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\nfunction Identity( v ) {\n\treturn v;\n}\nfunction Thrower( ex ) {\n\tthrow ex;\n}\n\nfunction adoptValue( value, resolve, reject, noValue ) {\n\tvar method;\n\n\ttry {\n\n\t\t// Check for promise aspect first to privilege synchronous behavior\n\t\tif ( value && isFunction( ( method = value.promise ) ) ) {\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\n\n\t\t// Other thenables\n\t\t} else if ( value && isFunction( ( method = value.then ) ) ) {\n\t\t\tmethod.call( value, resolve, reject );\n\n\t\t// Other non-thenables\n\t\t} else {\n\n\t\t\t// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\n\t\t\t// * false: [ value ].slice( 0 ) => resolve( value )\n\t\t\t// * true: [ value ].slice( 1 ) => resolve()\n\t\t\tresolve.apply( undefined, [ value ].slice( noValue ) );\n\t\t}\n\n\t// For Promises/A+, convert exceptions into rejections\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\n\t// Deferred#then to conditionally suppress rejection.\n\t} catch ( value ) {\n\n\t\t// Support: Android 4.0 only\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\treject.apply( undefined, [ value ] );\n\t}\n}\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, callbacks,\n\t\t\t\t// ... .then handlers, argument index, [final state]\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\t\"catch\": function( fn ) {\n\t\t\t\t\treturn promise.then( null, fn );\n\t\t\t\t},\n\n\t\t\t\t// Keep pipe for back-compat\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( _i, tuple ) {\n\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\n\t\t\t\t\t\t\tvar fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\n\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\n\t\t\t\t\tvar maxDepth = 0;\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar that = this,\n\t\t\t\t\t\t\t\targs = arguments,\n\t\t\t\t\t\t\t\tmightThrow = function() {\n\t\t\t\t\t\t\t\t\tvar returned, then;\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\n\t\t\t\t\t\t\t\t\tthen = returned &&\n\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\n\t\t\t\t\t\t\t\t\t\treturned.then;\n\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\n\t\t\t\t\t\t\t\t\tif ( isFunction( then ) ) {\n\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\n\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\n\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Handle all other returned values\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Process the value(s)\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\n\t\t\t\t\t\t\t\tprocess = special ?\n\t\t\t\t\t\t\t\t\tmightThrow :\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.stackTrace );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\n\t\t\t\t\t\t\t// subsequent errors\n\t\t\t\t\t\t\tif ( depth ) {\n\t\t\t\t\t\t\t\tprocess();\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Call an optional hook to record the stack, in case of exception\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getStackHook ) {\n\t\t\t\t\t\t\t\t\tprocess.stackTrace = jQuery.Deferred.getStackHook();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\n\t\t\t\t\t\t// progress_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onProgress ) ?\n\t\t\t\t\t\t\t\t\tonProgress :\n\t\t\t\t\t\t\t\t\tIdentity,\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// fulfilled_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onFulfilled ) ?\n\t\t\t\t\t\t\t\t\tonFulfilled :\n\t\t\t\t\t\t\t\t\tIdentity\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// rejected_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onRejected ) ?\n\t\t\t\t\t\t\t\t\tonRejected :\n\t\t\t\t\t\t\t\t\tThrower\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 5 ];\n\n\t\t\t// promise.progress = list.add\n\t\t\t// promise.done = list.add\n\t\t\t// promise.fail = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(\n\t\t\t\t\tfunction() {\n\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\n\t\t\t\t\t\t// state = \"rejected\"\n\t\t\t\t\t\tstate = stateString;\n\t\t\t\t\t},\n\n\t\t\t\t\t// rejected_callbacks.disable\n\t\t\t\t\t// fulfilled_callbacks.disable\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\n\n\t\t\t\t\t// rejected_handlers.disable\n\t\t\t\t\t// fulfilled_handlers.disable\n\t\t\t\t\ttuples[ 3 - i ][ 3 ].disable,\n\n\t\t\t\t\t// progress_callbacks.lock\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock,\n\n\t\t\t\t\t// progress_handlers.lock\n\t\t\t\t\ttuples[ 0 ][ 3 ].lock\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// progress_handlers.fire\n\t\t\t// fulfilled_handlers.fire\n\t\t\t// rejected_handlers.fire\n\t\t\tlist.add( tuple[ 3 ].fire );\n\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\t// deferred.notifyWith = list.fireWith\n\t\t\t// deferred.resolveWith = list.fireWith\n\t\t\t// deferred.rejectWith = list.fireWith\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( singleValue ) {\n\t\tvar\n\n\t\t\t// count of uncompleted subordinates\n\t\t\tremaining = arguments.length,\n\n\t\t\t// count of unprocessed arguments\n\t\t\ti = remaining,\n\n\t\t\t// subordinate fulfillment data\n\t\t\tresolveContexts = Array( i ),\n\t\t\tresolveValues = slice.call( arguments ),\n\n\t\t\t// the primary Deferred\n\t\t\tprimary = jQuery.Deferred(),\n\n\t\t\t// subordinate callback factory\n\t\t\tupdateFunc = function( i ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tresolveContexts[ i ] = this;\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( !( --remaining ) ) {\n\t\t\t\t\t\tprimary.resolveWith( resolveContexts, resolveValues );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t// Single- and empty arguments are adopted like Promise.resolve\n\t\tif ( remaining <= 1 ) {\n\t\t\tadoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,\n\t\t\t\t!remaining );\n\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\n\t\t\tif ( primary.state() === \"pending\" ||\n\t\t\t\tisFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\n\n\t\t\t\treturn primary.then();\n\t\t\t}\n\t\t}\n\n\t\t// Multiple arguments are aggregated like Promise.all array elements\n\t\twhile ( i-- ) {\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );\n\t\t}\n\n\t\treturn primary.promise();\n\t}\n} );\n\n\n// These usually indicate a programmer mistake during development,\n// warn about them ASAP rather than swallowing them by default.\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\n\njQuery.Deferred.exceptionHook = function( error, stack ) {\n\n\t// Support: IE 8 - 9 only\n\t// Console exists when dev tools are open, which can happen at any time\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message, error.stack, stack );\n\t}\n};\n\n\n\n\njQuery.readyException = function( error ) {\n\twindow.setTimeout( function() {\n\t\tthrow error;\n\t} );\n};\n\n\n\n\n// The deferred used on DOM ready\nvar readyList = jQuery.Deferred();\n\njQuery.fn.ready = function( fn ) {\n\n\treadyList\n\t\t.then( fn )\n\n\t\t// Wrap jQuery.readyException in a function so that the lookup\n\t\t// happens at the time of error handling instead of callback\n\t\t// registration.\n\t\t.catch( function( error ) {\n\t\t\tjQuery.readyException( error );\n\t\t} );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See trac-6781\n\treadyWait: 1,\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\t}\n} );\n\njQuery.ready.then = readyList.then;\n\n// The ready event handler and self cleanup method\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\n// Catch cases where $(document).ready() is called\n// after the browser event has already occurred.\n// Support: IE <=9 - 10 only\n// Older IE sometimes signals \"interactive\" too soon\nif ( document.readyState === \"complete\" ||\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\twindow.setTimeout( jQuery.ready );\n\n} else {\n\n\t// Use the handy event callback\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t// A fallback to window.onload, that will always work\n\twindow.addEventListener( \"load\", completed );\n}\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( toType( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, _key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\t\tvalue :\n\t\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( chainable ) {\n\t\treturn elems;\n\t}\n\n\t// Gets\n\tif ( bulk ) {\n\t\treturn fn.call( elems );\n\t}\n\n\treturn len ? fn( elems[ 0 ], key ) : emptyGet;\n};\n\n\n// Matches dashed string for camelizing\nvar rmsPrefix = /^-ms-/,\n\trdashAlpha = /-([a-z])/g;\n\n// Used by camelCase as callback to replace()\nfunction fcamelCase( _all, letter ) {\n\treturn letter.toUpperCase();\n}\n\n// Convert dashed to camelCase; used by the css and data modules\n// Support: IE <=9 - 11, Edge 12 - 15\n// Microsoft forgot to hump their vendor prefix (trac-9572)\nfunction camelCase( string ) {\n\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n}\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t//  - Node\n\t//    - Node.ELEMENT_NODE\n\t//    - Node.DOCUMENT_NODE\n\t//  - Object\n\t//    - Any\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tcache: function( owner ) {\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see trac-8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\t// Always use camelCase key (gh-2257)\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ camelCase( data ) ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ camelCase( prop ) ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\n\t\t\t// Always use camelCase key (gh-2257)\n\t\t\towner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];\n\t},\n\taccess: function( owner, key, value ) {\n\n\t\t// In cases where either:\n\t\t//\n\t\t//   1. No key was specified\n\t\t//   2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t//   1. The entire cache object\n\t\t//   2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\treturn this.get( owner, key );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t//   1. An object of properties\n\t\t//   2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key !== undefined ) {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( Array.isArray( key ) ) {\n\n\t\t\t\t// If key is an array of keys...\n\t\t\t\t// We always set camelCase keys, so remove that.\n\t\t\t\tkey = key.map( camelCase );\n\t\t\t} else {\n\t\t\t\tkey = camelCase( key );\n\n\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\tkey = key in cache ?\n\t\t\t\t\t[ key ] :\n\t\t\t\t\t( key.match( rnothtmlwhite ) || [] );\n\t\t\t}\n\n\t\t\ti = key.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ key[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <=35 - 45\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction getData( data ) {\n\tif ( data === \"true\" ) {\n\t\treturn true;\n\t}\n\n\tif ( data === \"false\" ) {\n\t\treturn false;\n\t}\n\n\tif ( data === \"null\" ) {\n\t\treturn null;\n\t}\n\n\t// Only convert to a number if it doesn't change the string\n\tif ( data === +data + \"\" ) {\n\t\treturn +data;\n\t}\n\n\tif ( rbrace.test( data ) ) {\n\t\treturn JSON.parse( data );\n\t}\n\n\treturn data;\n}\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = getData( data );\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE 11 only\n\t\t\t\t\t\t// The attrs elements can be null (trac-14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// The key will always be camelCased in Data\n\t\t\t\tdata = dataUser.get( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tthis.each( function() {\n\n\t\t\t\t// We always store the camelCased key\n\t\t\t\tdataUser.set( this, key, value );\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || Array.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar documentElement = document.documentElement;\n\n\n\n\tvar isAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem );\n\t\t},\n\t\tcomposed = { composed: true };\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only\n\t// Check attachment across shadow DOM boundaries when possible (gh-3504)\n\t// Support: iOS 10.0-10.2 only\n\t// Early iOS 10 versions support `attachShadow` but not `getRootNode`,\n\t// leading to errors. We need to check for `getRootNode`.\n\tif ( documentElement.getRootNode ) {\n\t\tisAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem ) ||\n\t\t\t\telem.getRootNode( composed ) === elem.ownerDocument;\n\t\t};\n\t}\nvar isHiddenWithinTree = function( elem, el ) {\n\n\t\t// isHiddenWithinTree might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\n\t\t// Inline style trumps all\n\t\treturn elem.style.display === \"none\" ||\n\t\t\telem.style.display === \"\" &&\n\n\t\t\t// Otherwise, check computed style\n\t\t\t// Support: Firefox <=43 - 45\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\n\t\t\t// in the document.\n\t\t\tisAttached( elem ) &&\n\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted, scale,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() {\n\t\t\t\treturn tween.cur();\n\t\t\t} :\n\t\t\tfunction() {\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\n\t\t\t},\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = elem.nodeType &&\n\t\t\t( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Support: Firefox <=54\n\t\t// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\n\t\tinitial = initial / 2;\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\twhile ( maxIterations-- ) {\n\n\t\t\t// Evaluate and update our best guess (doubling guesses that zero out).\n\t\t\t// Finish if the scale equals or crosses 1 (making the old*new product non-positive).\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\t\t\tif ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {\n\t\t\t\tmaxIterations = 0;\n\t\t\t}\n\t\t\tinitialInUnit = initialInUnit / scale;\n\n\t\t}\n\n\t\tinitialInUnit = initialInUnit * 2;\n\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\nvar defaultDisplayMap = {};\n\nfunction getDefaultDisplay( elem ) {\n\tvar temp,\n\t\tdoc = elem.ownerDocument,\n\t\tnodeName = elem.nodeName,\n\t\tdisplay = defaultDisplayMap[ nodeName ];\n\n\tif ( display ) {\n\t\treturn display;\n\t}\n\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\n\tdisplay = jQuery.css( temp, \"display\" );\n\n\ttemp.parentNode.removeChild( temp );\n\n\tif ( display === \"none\" ) {\n\t\tdisplay = \"block\";\n\t}\n\tdefaultDisplayMap[ nodeName ] = display;\n\n\treturn display;\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\t// Determine new display value for elements that need to change\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\n\t\t\t// inline or about-to-be-restored)\n\t\t\tif ( display === \"none\" ) {\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\n\t\t\t\tif ( !values[ index ] ) {\n\t\t\t\t\telem.style.display = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( display !== \"none\" ) {\n\t\t\t\tvalues[ index ] = \"none\";\n\n\t\t\t\t// Remember what we're overwriting\n\t\t\t\tdataPriv.set( elem, \"display\", display );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of the elements in a second loop to avoid constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\tif ( values[ index ] != null ) {\n\t\t\telements[ index ].style.display = values[ index ];\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend( {\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHiddenWithinTree( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i );\n\nvar rscriptType = ( /^$|^module$|\\/(?:java|ecma)script/i );\n\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0 - 4.3 only\n\t// Check state lost if the name is set (trac-11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (trac-14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Android <=4.1 only\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE <=11 only\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n\n\t// Support: IE <=9 only\n\t// IE <=9 replaces <option> tags with their contents when inserted outside of\n\t// the select element.\n\tdiv.innerHTML = \"<option></option>\";\n\tsupport.option = !!div.lastChild;\n} )();\n\n\n// We have to close these tags to support XHTML (trac-13200)\nvar wrapMap = {\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting <tbody> or other required elements.\n\tthead: [ 1, \"<table>\", \"</table>\" ],\n\tcol: [ 2, \"<table><colgroup>\", \"</colgroup></table>\" ],\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// Support: IE <=9 only\nif ( !support.option ) {\n\twrapMap.optgroup = wrapMap.option = [ 1, \"<select multiple='multiple'>\", \"</select>\" ];\n}\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE <=9 - 11 only\n\t// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)\n\tvar ret;\n\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\tret = context.getElementsByTagName( tag || \"*\" );\n\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\n\t\tret = context.querySelectorAll( tag || \"*\" );\n\n\t} else {\n\t\tret = [];\n\t}\n\n\tif ( tag === undefined || tag && nodeName( context, tag ) ) {\n\t\treturn jQuery.merge( [ context ], ret );\n\t}\n\n\treturn ret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, attached, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( toType( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (trac-12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tattached = isAttached( elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( attached ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\nvar rtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\n// Support: IE <=9 - 11+\n// focus() and blur() are asynchronous, except when they are no-op.\n// So expect focus to be synchronous when the element is already active,\n// and blur to be synchronous when the element is not already active.\n// (focus and blur are always synchronous in other supported browsers,\n// this just defines when we can count on it).\nfunction expectSync( elem, type ) {\n\treturn ( elem === safeActiveElement() ) === ( type === \"focus\" );\n}\n\n// Support: IE <=9 only\n// Accessing document.activeElement can throw unexpectedly\n// https://bugs.jquery.com/ticket/13393\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Only attach events to objects that accept data\n\t\tif ( !acceptData( elem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Ensure that invalid selectors throw exceptions at attach time\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\n\t\tif ( selector ) {\n\t\t\tjQuery.find.matchesSelector( documentElement, selector );\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = Object.create( null );\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( nativeEvent ) {\n\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\n\t\t\targs = new Array( arguments.length ),\n\n\t\t\t// Make a writable jQuery.Event from the native event object\n\t\t\tevent = jQuery.event.fix( nativeEvent ),\n\n\t\t\thandlers = (\n\t\t\t\tdataPriv.get( this, \"events\" ) || Object.create( null )\n\t\t\t)[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// If the event is namespaced, then each handler is only invoked if it is\n\t\t\t\t// specially universal or its namespaces are a superset of the event's.\n\t\t\t\tif ( !event.rnamespace || handleObj.namespace === false ||\n\t\t\t\t\tevent.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, handleObj, sel, matchedHandlers, matchedSelectors,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\tif ( delegateCount &&\n\n\t\t\t// Support: IE <=9\n\t\t\t// Black-hole SVG <use> instance trees (trac-13180)\n\t\t\tcur.nodeType &&\n\n\t\t\t// Support: Firefox <=42\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n\t\t\t// Support: IE 11 only\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\n\t\t\t!( event.type === \"click\" && event.button >= 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (trac-13208)\n\t\t\t\t// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)\n\t\t\t\tif ( cur.nodeType === 1 && !( event.type === \"click\" && cur.disabled === true ) ) {\n\t\t\t\t\tmatchedHandlers = [];\n\t\t\t\t\tmatchedSelectors = {};\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (trac-13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatchedSelectors[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] ) {\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matchedHandlers.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tcur = this;\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\taddProp: function( name, hook ) {\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget: isFunction( hook ) ?\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn hook( this.originalEvent );\n\t\t\t\t\t}\n\t\t\t\t} :\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn this.originalEvent[ name ];\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\tset: function( value ) {\n\t\t\t\tObject.defineProperty( this, name, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: value\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\tfix: function( originalEvent ) {\n\t\treturn originalEvent[ jQuery.expando ] ?\n\t\t\toriginalEvent :\n\t\t\tnew jQuery.Event( originalEvent );\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tclick: {\n\n\t\t\t// Utilize native event to ensure correct state for checkable inputs\n\t\t\tsetup: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Claim the first handler\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\t// dataPriv.set( el, \"click\", ... )\n\t\t\t\t\tleverageNative( el, \"click\", returnTrue );\n\t\t\t\t}\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\ttrigger: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Force setup before triggering a click\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\tleverageNative( el, \"click\" );\n\t\t\t\t}\n\n\t\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, suppress native .click() on links\n\t\t\t// Also prevent it if we're currently inside a leveraged native-event stack\n\t\t\t_default: function( event ) {\n\t\t\t\tvar target = event.target;\n\t\t\t\treturn rcheckableType.test( target.type ) &&\n\t\t\t\t\ttarget.click && nodeName( target, \"input\" ) &&\n\t\t\t\t\tdataPriv.get( target, \"click\" ) ||\n\t\t\t\t\tnodeName( target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Ensure the presence of an event listener that handles manually-triggered\n// synthetic events by interrupting progress until reinvoked in response to\n// *native* events that it fires directly, ensuring that state changes have\n// already occurred before other listeners are invoked.\nfunction leverageNative( el, type, expectSync ) {\n\n\t// Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add\n\tif ( !expectSync ) {\n\t\tif ( dataPriv.get( el, type ) === undefined ) {\n\t\t\tjQuery.event.add( el, type, returnTrue );\n\t\t}\n\t\treturn;\n\t}\n\n\t// Register the controller as a special universal handler for all event namespaces\n\tdataPriv.set( el, type, false );\n\tjQuery.event.add( el, type, {\n\t\tnamespace: false,\n\t\thandler: function( event ) {\n\t\t\tvar notAsync, result,\n\t\t\t\tsaved = dataPriv.get( this, type );\n\n\t\t\tif ( ( event.isTrigger & 1 ) && this[ type ] ) {\n\n\t\t\t\t// Interrupt processing of the outer synthetic .trigger()ed event\n\t\t\t\t// Saved data should be false in such cases, but might be a leftover capture object\n\t\t\t\t// from an async native handler (gh-4350)\n\t\t\t\tif ( !saved.length ) {\n\n\t\t\t\t\t// Store arguments for use when handling the inner native event\n\t\t\t\t\t// There will always be at least one argument (an event object), so this array\n\t\t\t\t\t// will not be confused with a leftover capture object.\n\t\t\t\t\tsaved = slice.call( arguments );\n\t\t\t\t\tdataPriv.set( this, type, saved );\n\n\t\t\t\t\t// Trigger the native event and capture its result\n\t\t\t\t\t// Support: IE <=9 - 11+\n\t\t\t\t\t// focus() and blur() are asynchronous\n\t\t\t\t\tnotAsync = expectSync( this, type );\n\t\t\t\t\tthis[ type ]();\n\t\t\t\t\tresult = dataPriv.get( this, type );\n\t\t\t\t\tif ( saved !== result || notAsync ) {\n\t\t\t\t\t\tdataPriv.set( this, type, false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult = {};\n\t\t\t\t\t}\n\t\t\t\t\tif ( saved !== result ) {\n\n\t\t\t\t\t\t// Cancel the outer synthetic event\n\t\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t// Support: Chrome 86+\n\t\t\t\t\t\t// In Chrome, if an element having a focusout handler is blurred by\n\t\t\t\t\t\t// clicking outside of it, it invokes the handler synchronously. If\n\t\t\t\t\t\t// that handler calls `.remove()` on the element, the data is cleared,\n\t\t\t\t\t\t// leaving `result` undefined. We need to guard against this.\n\t\t\t\t\t\treturn result && result.value;\n\t\t\t\t\t}\n\n\t\t\t\t// If this is an inner synthetic event for an event with a bubbling surrogate\n\t\t\t\t// (focus or blur), assume that the surrogate already propagated from triggering the\n\t\t\t\t// native event and prevent that from happening again here.\n\t\t\t\t// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the\n\t\t\t\t// bubbling surrogate propagates *after* the non-bubbling base), but that seems\n\t\t\t\t// less bad than duplication.\n\t\t\t\t} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\n\t\t\t// If this is a native event triggered above, everything is now in order\n\t\t\t// Fire an inner synthetic event with the original arguments\n\t\t\t} else if ( saved.length ) {\n\n\t\t\t\t// ...and capture the result\n\t\t\t\tdataPriv.set( this, type, {\n\t\t\t\t\tvalue: jQuery.event.trigger(\n\n\t\t\t\t\t\t// Support: IE <=9 - 11+\n\t\t\t\t\t\t// Extend with the prototype to reset the above stopImmediatePropagation()\n\t\t\t\t\t\tjQuery.extend( saved[ 0 ], jQuery.Event.prototype ),\n\t\t\t\t\t\tsaved.slice( 1 ),\n\t\t\t\t\t\tthis\n\t\t\t\t\t)\n\t\t\t\t} );\n\n\t\t\t\t// Abort handling of the native event\n\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t}\n\t\t}\n\t} );\n}\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android <=2.3 only\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t\t// Create target properties\n\t\t// Support: Safari <=6 - 7 only\n\t\t// Target should not be a text node (trac-504, trac-13143)\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\n\t\t\tsrc.target.parentNode :\n\t\t\tsrc.target;\n\n\t\tthis.currentTarget = src.currentTarget;\n\t\tthis.relatedTarget = src.relatedTarget;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || Date.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Includes all common event props including KeyEvent and MouseEvent specific props\njQuery.each( {\n\taltKey: true,\n\tbubbles: true,\n\tcancelable: true,\n\tchangedTouches: true,\n\tctrlKey: true,\n\tdetail: true,\n\teventPhase: true,\n\tmetaKey: true,\n\tpageX: true,\n\tpageY: true,\n\tshiftKey: true,\n\tview: true,\n\t\"char\": true,\n\tcode: true,\n\tcharCode: true,\n\tkey: true,\n\tkeyCode: true,\n\tbutton: true,\n\tbuttons: true,\n\tclientX: true,\n\tclientY: true,\n\toffsetX: true,\n\toffsetY: true,\n\tpointerId: true,\n\tpointerType: true,\n\tscreenX: true,\n\tscreenY: true,\n\ttargetTouches: true,\n\ttoElement: true,\n\ttouches: true,\n\twhich: true\n}, jQuery.event.addProp );\n\njQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( type, delegateType ) {\n\tjQuery.event.special[ type ] = {\n\n\t\t// Utilize native event if possible so blur/focus sequence is correct\n\t\tsetup: function() {\n\n\t\t\t// Claim the first handler\n\t\t\t// dataPriv.set( this, \"focus\", ... )\n\t\t\t// dataPriv.set( this, \"blur\", ... )\n\t\t\tleverageNative( this, type, expectSync );\n\n\t\t\t// Return false to allow normal processing in the caller\n\t\t\treturn false;\n\t\t},\n\t\ttrigger: function() {\n\n\t\t\t// Force setup before trigger\n\t\t\tleverageNative( this, type );\n\n\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\treturn true;\n\t\t},\n\n\t\t// Suppress native focus or blur if we're currently inside\n\t\t// a leveraged native-event stack\n\t\t_default: function( event ) {\n\t\t\treturn dataPriv.get( event.target, type );\n\t\t},\n\n\t\tdelegateType: delegateType\n\t};\n} );\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://bugs.chromium.org/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event )  dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\n\t// Support: IE <=10 - 11, Edge 12 - 13 only\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /<script|<style|<link/i,\n\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\n\trcleanScript = /^\\s*<!\\[CDATA\\[|\\]\\]>\\s*$/g;\n\n// Prefer a tbody over its parent table for containing new rows\nfunction manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tif ( ( elem.type || \"\" ).slice( 0, 5 ) === \"true/\" ) {\n\t\telem.type = elem.type.slice( 5 );\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.get( src );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdataPriv.remove( dest, \"handle events\" );\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = flat( args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tvalueIsFunction = isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( valueIsFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (trac-8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Reenable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src && ( node.type || \"\" ).toLowerCase()  !== \"module\" ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl && !node.noModule ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src, {\n\t\t\t\t\t\t\t\t\tnonce: node.nonce || node.getAttribute( \"nonce\" )\n\t\t\t\t\t\t\t\t}, doc );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Unwrap a CDATA section containing script contents. This shouldn't be\n\t\t\t\t\t\t\t// needed as in XML documents they're already not visible when\n\t\t\t\t\t\t\t// inspecting element contents and in HTML documents they have no\n\t\t\t\t\t\t\t// meaning but we're preserving that logic for backwards compatibility.\n\t\t\t\t\t\t\t// This will be removed completely in 4.0. See gh-4904.\n\t\t\t\t\t\t\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), node, doc );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && isAttached( node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html;\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = isAttached( elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar rcustomProp = /^--/;\n\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\nvar swap = function( elem, options, callback ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.call( elem );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar rboxStyle = new RegExp( cssExpand.join( \"|\" ), \"i\" );\n\nvar whitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\";\n\n\nvar rtrimCSS = new RegExp(\n\t\"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\",\n\t\"g\"\n);\n\n\n\n\n( function() {\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\tdiv.style.cssText =\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"width:60%;top:1%\";\n\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.right = \"60%\";\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t// Support: IE 9 - 11 only\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t// Support: IE 9 only\n\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t// Support: Chrome <=64\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\tdiv.style.position = \"absolute\";\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}\n\n\tfunction roundPixelMeasures( measure ) {\n\t\treturn Math.round( parseFloat( measure ) );\n\t}\n\n\tvar pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,\n\t\treliableTrDimensionsVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE <=9 - 11 only\n\t// Style of cloned element affects source element cloned (trac-8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tjQuery.extend( support, {\n\t\tboxSizingReliable: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelBoxStyles: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelBoxStylesVal;\n\t\t},\n\t\tpixelPosition: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn reliableMarginLeftVal;\n\t\t},\n\t\tscrollboxSize: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn scrollboxSizeVal;\n\t\t},\n\n\t\t// Support: IE 9 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Behavior in IE 9 is more subtle than in newer versions & it passes\n\t\t// some versions of this test; make sure not to make it pass there!\n\t\t//\n\t\t// Support: Firefox 70+\n\t\t// Only Firefox includes border widths\n\t\t// in computed dimensions. (gh-4529)\n\t\treliableTrDimensions: function() {\n\t\t\tvar table, tr, trChild, trStyle;\n\t\t\tif ( reliableTrDimensionsVal == null ) {\n\t\t\t\ttable = document.createElement( \"table\" );\n\t\t\t\ttr = document.createElement( \"tr\" );\n\t\t\t\ttrChild = document.createElement( \"div\" );\n\n\t\t\t\ttable.style.cssText = \"position:absolute;left:-11111px;border-collapse:separate\";\n\t\t\t\ttr.style.cssText = \"border:1px solid\";\n\n\t\t\t\t// Support: Chrome 86+\n\t\t\t\t// Height set through cssText does not get applied.\n\t\t\t\t// Computed height then comes back as 0.\n\t\t\t\ttr.style.height = \"1px\";\n\t\t\t\ttrChild.style.height = \"9px\";\n\n\t\t\t\t// Support: Android 8 Chrome 86+\n\t\t\t\t// In our bodyBackground.html iframe,\n\t\t\t\t// display for all div elements is set to \"inline\",\n\t\t\t\t// which causes a problem only in Android 8 Chrome 86.\n\t\t\t\t// Ensuring the div is display: block\n\t\t\t\t// gets around this issue.\n\t\t\t\ttrChild.style.display = \"block\";\n\n\t\t\t\tdocumentElement\n\t\t\t\t\t.appendChild( table )\n\t\t\t\t\t.appendChild( tr )\n\t\t\t\t\t.appendChild( trChild );\n\n\t\t\t\ttrStyle = window.getComputedStyle( tr );\n\t\t\t\treliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderTopWidth, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;\n\n\t\t\t\tdocumentElement.removeChild( table );\n\t\t\t}\n\t\t\treturn reliableTrDimensionsVal;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\t\tisCustomProp = rcustomProp.test( name ),\n\n\t\t// Support: Firefox 51+\n\t\t// Retrieving style before computed somehow\n\t\t// fixes an issue with getting wrong values\n\t\t// on detached elements\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\n\t// getPropertyValue is needed for:\n\t//   .css('filter') (IE 9 only, trac-12537)\n\t//   .css('--customProperty) (gh-3144)\n\tif ( computed ) {\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\n\t\t// trim whitespace for custom property (issue gh-4926)\n\t\tif ( isCustomProp ) {\n\n\t\t\t// rtrim treats U+000D CARRIAGE RETURN and U+000C FORM FEED\n\t\t\t// as whitespace while CSS does not, but this is not a problem\n\t\t\t// because CSS preprocessing replaces them with U+000A LINE FEED\n\t\t\t// (which *is* CSS whitespace)\n\t\t\t// https://www.w3.org/TR/css-syntax-3/#input-preprocessing\n\t\t\tret = ret.replace( rtrimCSS, \"$1\" );\n\t\t}\n\n\t\tif ( ret === \"\" && !isAttached( elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// https://drafts.csswg.org/cssom/#resolved-values\n\t\tif ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE <=9 - 11 only\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar cssPrefixes = [ \"Webkit\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style,\n\tvendorProps = {};\n\n// Return a vendor-prefixed property or undefined\nfunction vendorPropName( name ) {\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\n// Return a potentially-mapped jQuery.cssProps or vendor prefixed property\nfunction finalPropName( name ) {\n\tvar final = jQuery.cssProps[ name ] || vendorProps[ name ];\n\n\tif ( final ) {\n\t\treturn final;\n\t}\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\treturn vendorProps[ name ] = vendorPropName( name ) || name;\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t};\n\nfunction setPositiveNumber( _elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {\n\tvar i = dimension === \"width\" ? 1 : 0,\n\t\textra = 0,\n\t\tdelta = 0;\n\n\t// Adjustment may not be necessary\n\tif ( box === ( isBorderBox ? \"border\" : \"content\" ) ) {\n\t\treturn 0;\n\t}\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin\n\t\tif ( box === \"margin\" ) {\n\t\t\tdelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\t// If we get here with a content-box, we're seeking \"padding\" or \"border\" or \"margin\"\n\t\tif ( !isBorderBox ) {\n\n\t\t\t// Add padding\n\t\t\tdelta += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// For \"border\" or \"margin\", add border\n\t\t\tif ( box !== \"padding\" ) {\n\t\t\t\tdelta += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\n\t\t\t// But still keep track of it otherwise\n\t\t\t} else {\n\t\t\t\textra += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\n\t\t// If we get here with a border-box (content + padding + border), we're seeking \"content\" or\n\t\t// \"padding\" or \"margin\"\n\t\t} else {\n\n\t\t\t// For \"content\", subtract padding\n\t\t\tif ( box === \"content\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// For \"content\" or \"padding\", subtract border\n\t\t\tif ( box !== \"margin\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Account for positive content-box scroll gutter when requested by providing computedVal\n\tif ( !isBorderBox && computedVal >= 0 ) {\n\n\t\t// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\n\t\t// Assuming integer scroll gutter, subtract the rest and round down\n\t\tdelta += Math.max( 0, Math.ceil(\n\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\tcomputedVal -\n\t\t\tdelta -\n\t\t\textra -\n\t\t\t0.5\n\n\t\t// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter\n\t\t// Use an explicit zero to avoid NaN (gh-3964)\n\t\t) ) || 0;\n\t}\n\n\treturn delta;\n}\n\nfunction getWidthOrHeight( elem, dimension, extra ) {\n\n\t// Start with computed style\n\tvar styles = getStyles( elem ),\n\n\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).\n\t\t// Fake content-box until we know it's needed to know the true value.\n\t\tboxSizingNeeded = !support.boxSizingReliable() || extra,\n\t\tisBorderBox = boxSizingNeeded &&\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\tvalueIsBorderBox = isBorderBox,\n\n\t\tval = curCSS( elem, dimension, styles ),\n\t\toffsetProp = \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );\n\n\t// Support: Firefox <=54\n\t// Return a confounding non-pixel value or feign ignorance, as appropriate.\n\tif ( rnumnonpx.test( val ) ) {\n\t\tif ( !extra ) {\n\t\t\treturn val;\n\t\t}\n\t\tval = \"auto\";\n\t}\n\n\n\t// Support: IE 9 - 11 only\n\t// Use offsetWidth/offsetHeight for when box sizing is unreliable.\n\t// In those cases, the computed value can be trusted to be border-box.\n\tif ( ( !support.boxSizingReliable() && isBorderBox ||\n\n\t\t// Support: IE 10 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Interestingly, in some cases IE 9 doesn't suffer from this issue.\n\t\t!support.reliableTrDimensions() && nodeName( elem, \"tr\" ) ||\n\n\t\t// Fall back to offsetWidth/offsetHeight when value is \"auto\"\n\t\t// This happens for inline elements with no explicit setting (gh-3571)\n\t\tval === \"auto\" ||\n\n\t\t// Support: Android <=4.1 - 4.3 only\n\t\t// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)\n\t\t!parseFloat( val ) && jQuery.css( elem, \"display\", false, styles ) === \"inline\" ) &&\n\n\t\t// Make sure the element is visible & connected\n\t\telem.getClientRects().length ) {\n\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t\t// Where available, offsetWidth/offsetHeight approximate border box dimensions.\n\t\t// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the\n\t\t// retrieved value as a content box dimension.\n\t\tvalueIsBorderBox = offsetProp in elem;\n\t\tif ( valueIsBorderBox ) {\n\t\t\tval = elem[ offsetProp ];\n\t\t}\n\t}\n\n\t// Normalize \"\" and auto\n\tval = parseFloat( val ) || 0;\n\n\t// Adjust for the element's box model\n\treturn ( val +\n\t\tboxModelAdjustment(\n\t\t\telem,\n\t\t\tdimension,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles,\n\n\t\t\t// Provide the current computed size to request scroll gutter calculation (gh-3589)\n\t\t\tval\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\t\"animationIterationCount\": true,\n\t\t\"columnCount\": true,\n\t\t\"fillOpacity\": true,\n\t\t\"flexGrow\": true,\n\t\t\"flexShrink\": true,\n\t\t\"fontWeight\": true,\n\t\t\"gridArea\": true,\n\t\t\"gridColumn\": true,\n\t\t\"gridColumnEnd\": true,\n\t\t\"gridColumnStart\": true,\n\t\t\"gridRow\": true,\n\t\t\"gridRowEnd\": true,\n\t\t\"gridRowStart\": true,\n\t\t\"lineHeight\": true,\n\t\t\"opacity\": true,\n\t\t\"order\": true,\n\t\t\"orphans\": true,\n\t\t\"widows\": true,\n\t\t\"zIndex\": true,\n\t\t\"zoom\": true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name ),\n\t\t\tstyle = elem.style;\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to query the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (trac-7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug trac-9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (trac-7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\t// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append\n\t\t\t// \"px\" to a few hardcoded values.\n\t\t\tif ( type === \"number\" && !isCustomProp ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tif ( isCustomProp ) {\n\t\t\t\t\tstyle.setProperty( name, value );\n\t\t\t\t} else {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name );\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to modify the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( _i, dimension ) {\n\tjQuery.cssHooks[ dimension ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\n\t\t\t\t\t// Support: Safari 8+\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\n\t\t\t\t\t// Support: IE <=11 only\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\n\t\t\t\t\t// in IE throws an error.\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\n\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\treturn getWidthOrHeight( elem, dimension, extra );\n\t\t\t\t\t} ) :\n\t\t\t\t\tgetWidthOrHeight( elem, dimension, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = getStyles( elem ),\n\n\t\t\t\t// Only read styles.position if the test has a chance to fail\n\t\t\t\t// to avoid forcing a reflow.\n\t\t\t\tscrollboxSizeBuggy = !support.scrollboxSize() &&\n\t\t\t\t\tstyles.position === \"absolute\",\n\n\t\t\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)\n\t\t\t\tboxSizingNeeded = scrollboxSizeBuggy || extra,\n\t\t\t\tisBorderBox = boxSizingNeeded &&\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\tsubtract = extra ?\n\t\t\t\t\tboxModelAdjustment(\n\t\t\t\t\t\telem,\n\t\t\t\t\t\tdimension,\n\t\t\t\t\t\textra,\n\t\t\t\t\t\tisBorderBox,\n\t\t\t\t\t\tstyles\n\t\t\t\t\t) :\n\t\t\t\t\t0;\n\n\t\t\t// Account for unreliable border-box dimensions by comparing offset* to computed and\n\t\t\t// faking a content-box to get border and padding (gh-3699)\n\t\t\tif ( isBorderBox && scrollboxSizeBuggy ) {\n\t\t\t\tsubtract -= Math.ceil(\n\t\t\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\t\t\tparseFloat( styles[ dimension ] ) -\n\t\t\t\t\tboxModelAdjustment( elem, dimension, \"border\", false, styles ) -\n\t\t\t\t\t0.5\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\n\n\t\t\t\telem.style[ dimension ] = value;\n\t\t\t\tvalue = jQuery.css( elem, dimension );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( prefix !== \"margin\" ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 && (\n\t\t\t\tjQuery.cssHooks[ tween.prop ] ||\n\t\t\t\t\ttween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9 only\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, inProgress,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\nfunction schedule() {\n\tif ( inProgress ) {\n\t\tif ( document.hidden === false && window.requestAnimationFrame ) {\n\t\t\twindow.requestAnimationFrame( schedule );\n\t\t} else {\n\t\t\twindow.setTimeout( schedule, jQuery.fx.interval );\n\t\t}\n\n\t\tjQuery.fx.tick();\n\t}\n}\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\n\t\tisBox = \"width\" in props || \"height\" in props,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Queue-skipping animations hijack the fx hooks\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Detect show/hide animations\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.test( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// Pretend to be hidden if this is a \"show\" and\n\t\t\t\t// there is still data from a stopped show/hide\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\n\t\t\t\t// Ignore all other no-op show/hide data\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\t\t}\n\t}\n\n\t// Bail out if this is a no-op like .hide().hide()\n\tpropTween = !jQuery.isEmptyObject( props );\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\n\t\treturn;\n\t}\n\n\t// Restrict \"overflow\" and \"display\" styles during box animations\n\tif ( isBox && elem.nodeType === 1 ) {\n\n\t\t// Support: IE <=9 - 11, Edge 12 - 15\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\n\t\t// from identically-valued overflowX and overflowY and Edge just mirrors\n\t\t// the overflowX value there.\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\n\t\trestoreDisplay = dataShow && dataShow.display;\n\t\tif ( restoreDisplay == null ) {\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\n\t\t}\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\tif ( display === \"none\" ) {\n\t\t\tif ( restoreDisplay ) {\n\t\t\t\tdisplay = restoreDisplay;\n\t\t\t} else {\n\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\t\t\tshowHide( [ elem ] );\n\t\t\t}\n\t\t}\n\n\t\t// Animate inline elements as inline-block\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\n\t\t\t\tif ( !propTween ) {\n\t\t\t\t\tanim.done( function() {\n\t\t\t\t\t\tstyle.display = restoreDisplay;\n\t\t\t\t\t} );\n\t\t\t\t\tif ( restoreDisplay == null ) {\n\t\t\t\t\t\tdisplay = style.display;\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// Implement show/hide animations\n\tpropTween = false;\n\tfor ( prop in orig ) {\n\n\t\t// General show/hide setup for this element animation\n\t\tif ( !propTween ) {\n\t\t\tif ( dataShow ) {\n\t\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\t\thidden = dataShow.hidden;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\n\t\t\t}\n\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\n\t\t\tif ( toggle ) {\n\t\t\t\tdataShow.hidden = !hidden;\n\t\t\t}\n\n\t\t\t// Show elements before animating them\n\t\t\tif ( hidden ) {\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t}\n\n\t\t\t/* eslint-disable no-loop-func */\n\n\t\t\tanim.done( function() {\n\n\t\t\t\t/* eslint-enable no-loop-func */\n\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\n\t\t\t\tif ( !hidden ) {\n\t\t\t\t\tshowHide( [ elem ] );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\t\tfor ( prop in orig ) {\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Per-property setup\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\t\tif ( !( prop in dataShow ) ) {\n\t\t\tdataShow[ prop ] = propTween.start;\n\t\t\tif ( hidden ) {\n\t\t\t\tpropTween.end = propTween.start;\n\t\t\t\tpropTween.start = 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( Array.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3 only\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\t// If there's more to do, yield\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t}\n\n\t\t\t// If this was an empty animation, synthesize a final progress notification\n\t\t\tif ( !length ) {\n\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t}\n\n\t\t\t// Resolve the animation and report its conclusion\n\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\treturn false;\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tresult.stop.bind( result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\t// Attach callbacks from options\n\tanimation\n\t\t.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\treturn animation;\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnothtmlwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tisFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !isFunction( easing ) && easing\n\t};\n\n\t// Go to the end state if fx are off\n\tif ( jQuery.fx.off ) {\n\t\topt.duration = 0;\n\n\t} else {\n\t\tif ( typeof opt.duration !== \"number\" ) {\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\n\n\t\t\t} else {\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHiddenWithinTree ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\n\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( _i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = Date.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Run the timer and safely remove it when done (allowing for external removal)\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tjQuery.fx.start();\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( inProgress ) {\n\t\treturn;\n\t}\n\n\tinProgress = true;\n\tschedule();\n};\n\njQuery.fx.stop = function() {\n\tinProgress = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: Android <=4.3 only\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE <=11 only\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: IE <=11 only\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// Attribute hooks are determined by the lowercase version\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tnodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name,\n\t\t\ti = 0,\n\n\t\t\t// Attribute names can contain non-HTML whitespace characters\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( _i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle,\n\t\t\tlowercaseName = name.toLowerCase();\n\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ lowercaseName ];\n\t\t\tattrHandle[ lowercaseName ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tlowercaseName :\n\t\t\t\tnull;\n\t\t\tattrHandle[ lowercaseName ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// Support: IE <=9 - 11 only\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// Use proper attribute retrieval (trac-12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\tif ( tabindex ) {\n\t\t\t\t\treturn parseInt( tabindex, 10 );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\n\t\t\t\t\telem.href\n\t\t\t\t) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Support: IE <=11 only\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\n// eslint rule \"no-unused-expressions\" is disabled for this code\n// since it considers such accessions noop\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\n\t// Strip and collapse whitespace according to HTML spec\n\t// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace\n\tfunction stripAndCollapse( value ) {\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\treturn tokens.join( \" \" );\n\t}\n\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\n}\n\nfunction classesToArray( value ) {\n\tif ( Array.isArray( value ) ) {\n\t\treturn value;\n\t}\n\tif ( typeof value === \"string\" ) {\n\t\treturn value.match( rnothtmlwhite ) || [];\n\t}\n\treturn [];\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + className + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += className + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + className + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + className + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar classNames, className, i, self,\n\t\t\ttype = typeof value,\n\t\t\tisValidValue = type === \"string\" || Array.isArray( value );\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\tif ( typeof stateVal === \"boolean\" && isValidValue ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\treturn this.each( function() {\n\t\t\tif ( isValidValue ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\tself = jQuery( this );\n\n\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( \"class\",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t\t\"\" :\n\t\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, valueIsFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\t// Handle most common string cases\n\t\t\t\tif ( typeof ret === \"string\" ) {\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\n\t\t\t\t}\n\n\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\treturn ret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tvalueIsFunction = isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( Array.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE <=10 - 11 only\n\t\t\t\t\t// option.text throws exceptions (trac-14686, trac-14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tstripAndCollapse( jQuery.text( elem ) );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option, i,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\",\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length;\n\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\ti = max;\n\n\t\t\t\t} else {\n\t\t\t\t\ti = one ? index : 0;\n\t\t\t\t}\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (trac-2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t!option.disabled &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t/* eslint-disable no-cond-assign */\n\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* eslint-enable no-cond-assign */\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\n\n\nsupport.focusin = \"onfocusin\" in window;\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\tstopPropagationCallback = function( e ) {\n\t\te.stopPropagation();\n\t};\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special, lastElement,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = lastElement = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (trac-9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tlastElement = cur;\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( dataPriv.get( cur, \"events\" ) || Object.create( null ) )[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (trac-6170)\n\t\t\t\tif ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.addEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\telem[ type ]();\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.removeEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\t// Used only for `focus(in | out)` events\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\n// Support: Firefox <=44\n// Firefox doesn't have focus(in | out) events\n// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n//\n// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\n// focus(in | out) events fire after focus & blur events,\n// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\nif ( !support.focusin ) {\n\tjQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler on the document while someone wants focusin/focusout\n\t\tvar handler = function( event ) {\n\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );\n\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\n\t\t\t\t// Handle: regular nodes (via `this.ownerDocument`), window\n\t\t\t\t// (via `this.document`) & document (via `this`).\n\t\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix );\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.access( doc, fix, ( attaches || 0 ) + 1 );\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix ) - 1;\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.removeEventListener( orig, handler, true );\n\t\t\t\t\tdataPriv.remove( doc, fix );\n\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.access( doc, fix, attaches );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} );\n}\nvar location = window.location;\n\nvar nonce = { guid: Date.now() };\n\nvar rquery = ( /\\?/ );\n\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml, parserErrorElem;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE throws on parseFromString with invalid input.\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {}\n\n\tparserErrorElem = xml && xml.getElementsByTagName( \"parsererror\" )[ 0 ];\n\tif ( !xml || parserErrorElem ) {\n\t\tjQuery.error( \"Invalid XML: \" + (\n\t\t\tparserErrorElem ?\n\t\t\t\tjQuery.map( parserErrorElem.childNodes, function( el ) {\n\t\t\t\t\treturn el.textContent;\n\t\t\t\t} ).join( \"\\n\" ) :\n\t\t\t\tdata\n\t\t) );\n\t}\n\treturn xml;\n};\n\n\nvar\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( Array.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && toType( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, valueOrFunction ) {\n\n\t\t\t// If value is a function, invoke it and use its return value\n\t\t\tvar value = isFunction( valueOrFunction ) ?\n\t\t\t\tvalueOrFunction() :\n\t\t\t\tvalueOrFunction;\n\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\n\t\t};\n\n\tif ( a == null ) {\n\t\treturn \"\";\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} ).filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} ).map( function( _i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\tif ( val == null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( Array.isArray( val ) ) {\n\t\t\t\treturn jQuery.map( val, function( val ) {\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\nvar\n\tr20 = /%20/g,\n\trhash = /#.*$/,\n\trantiCache = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// trac-7653, trac-8125, trac-8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t *    - BEFORE asking for a transport\n\t *    - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( \"a\" );\n\noriginAnchor.href = location.href;\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];\n\n\t\tif ( isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes trac-9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": JSON.parse,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// Request state (becomes false upon send and true upon completion)\n\t\t\tcompleted,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// uncached part of the url\n\t\t\tuncached,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( completed ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() + \" \" ] =\n\t\t\t\t\t\t\t\t\t( responseHeaders[ match[ 1 ].toLowerCase() + \" \" ] || [] )\n\t\t\t\t\t\t\t\t\t\t.concat( match[ 2 ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() + \" \" ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match.join( \", \" );\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn completed ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( completed ) {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR );\n\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (trac-10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" )\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\n\n\t\t// Alias method option to type as per ticket trac-12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = ( s.dataType || \"*\" ).toLowerCase().match( rnothtmlwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( \"a\" );\n\n\t\t\t// Support: IE <=8 - 11, Edge 12 - 15\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\n\t\t\t// e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE <=8 - 11 only\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( completed ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\t// Remove hash to simplify url manipulation\n\t\tcacheURL = s.url.replace( rhash, \"\" );\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// Remember the hash so we can put it back\n\t\t\tuncached = s.url.slice( cacheURL.length );\n\n\t\t\t// If data is available and should be processed, append data to url\n\t\t\tif ( s.data && ( s.processData || typeof s.data === \"string\" ) ) {\n\t\t\t\tcacheURL += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data;\n\n\t\t\t\t// trac-9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add or update anti-cache param if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce.guid++ ) +\n\t\t\t\t\tuncached;\n\t\t\t}\n\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\n\t\t\ts.url = cacheURL + uncached;\n\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\n\t\t} else if ( s.data && s.processData &&\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\n\t\t\ts.data = s.data.replace( r20, \"+\" );\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tcompleteDeferred.add( s.complete );\n\t\tjqXHR.done( s.success );\n\t\tjqXHR.fail( s.error );\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( completed ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tcompleted = false;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Rethrow post-completion exceptions\n\t\t\t\tif ( completed ) {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\n\t\t\t\t// Propagate others as results\n\t\t\t\tdone( -1, e );\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompleted = true;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Use a noop converter for missing script but not if jsonp\n\t\t\tif ( !isSuccess &&\n\t\t\t\tjQuery.inArray( \"script\", s.dataTypes ) > -1 &&\n\t\t\t\tjQuery.inArray( \"json\", s.dataTypes ) < 0 ) {\n\t\t\t\ts.converters[ \"text script\" ] = function() {};\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( _i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\njQuery.ajaxPrefilter( function( s ) {\n\tvar i;\n\tfor ( i in s.headers ) {\n\t\tif ( i.toLowerCase() === \"content-type\" ) {\n\t\t\ts.contentType = s.headers[ i ] || \"\";\n\t\t}\n\t}\n} );\n\n\njQuery._evalUrl = function( url, options, doc ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (trac-11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\n\t\t// Only evaluate the response if it is successful (gh-4126)\n\t\t// dataFilter is not invoked for failure responses, so using it instead\n\t\t// of the default converter is kludgy but it works.\n\t\tconverters: {\n\t\t\t\"text script\": function() {}\n\t\t},\n\t\tdataFilter: function( response ) {\n\t\t\tjQuery.globalEval( response, options, doc );\n\t\t}\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( this[ 0 ] ) {\n\t\t\tif ( isFunction( html ) ) {\n\t\t\t\thtml = html.call( this[ 0 ] );\n\t\t\t}\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar htmlIsFunction = isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function( selector ) {\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t} );\n\t\treturn this;\n\t}\n} );\n\n\njQuery.expr.pseudos.hidden = function( elem ) {\n\treturn !jQuery.expr.pseudos.visible( elem );\n};\njQuery.expr.pseudos.visible = function( elem ) {\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n};\n\n\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE <=9 only\n\t\t// trac-1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.ontimeout =\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see trac-8605, trac-14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\"  ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = xhr.ontimeout = callback( \"error\" );\n\n\t\t\t\t// Support: IE 9 only\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( \"abort\" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// trac-14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\njQuery.ajaxPrefilter( function( s ) {\n\tif ( s.crossDomain ) {\n\t\ts.contents.script = false;\n\t}\n} );\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain or forced-by-attrs requests\n\tif ( s.crossDomain || s.scriptAttrs ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( \"<script>\" )\n\t\t\t\t\t.attr( s.scriptAttrs || {} )\n\t\t\t\t\t.prop( { charset: s.scriptCharset, src: s.url } )\n\t\t\t\t\t.on( \"load error\", callback = function( evt ) {\n\t\t\t\t\t\tscript.remove();\n\t\t\t\t\t\tcallback = null;\n\t\t\t\t\t\tif ( evt ) {\n\t\t\t\t\t\t\tcomplete( evt.type === \"error\" ? 404 : 200, evt.type );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\tdocument.head.appendChild( script[ 0 ] );\n\t\t\t},\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup( {\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce.guid++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n} );\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" &&\n\t\t\t\t( s.contentType || \"\" )\n\t\t\t\t\t.indexOf( \"application/x-www-form-urlencoded\" ) === 0 &&\n\t\t\t\trjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[ \"script json\" ] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// Force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always( function() {\n\n\t\t\t// If previous value didn't exist - remove it\n\t\t\tif ( overwritten === undefined ) {\n\t\t\t\tjQuery( window ).removeProp( callbackName );\n\n\t\t\t// Otherwise restore preexisting value\n\t\t\t} else {\n\t\t\t\twindow[ callbackName ] = overwritten;\n\t\t\t}\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\n\t\t\t\t// Make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// Save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t} );\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n} );\n\n\n\n\n// Support: Safari 8 only\n// In Safari 8 documents created via document.implementation.createHTMLDocument\n// collapse sibling forms: the second one becomes a child of the first one.\n// Because of that, this security measure has to be disabled in Safari 8.\n// https://bugs.webkit.org/show_bug.cgi?id=137337\nsupport.createHTMLDocument = ( function() {\n\tvar body = document.implementation.createHTMLDocument( \"\" ).body;\n\tbody.innerHTML = \"<form></form><form></form>\";\n\treturn body.childNodes.length === 2;\n} )();\n\n\n// Argument \"data\" should be string of html\n// context (optional): If specified, the fragment will be created in this context,\n// defaults to document\n// keepScripts (optional): If true, will include scripts passed in the html string\njQuery.parseHTML = function( data, context, keepScripts ) {\n\tif ( typeof data !== \"string\" ) {\n\t\treturn [];\n\t}\n\tif ( typeof context === \"boolean\" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\n\tvar base, parsed, scripts;\n\n\tif ( !context ) {\n\n\t\t// Stop scripts or inline event handlers from being executed immediately\n\t\t// by using document.implementation\n\t\tif ( support.createHTMLDocument ) {\n\t\t\tcontext = document.implementation.createHTMLDocument( \"\" );\n\n\t\t\t// Set the base href for the created document\n\t\t\t// so any parsed elements with URLs\n\t\t\t// are based on the document's URL (gh-2965)\n\t\t\tbase = context.createElement( \"base\" );\n\t\t\tbase.href = document.location.href;\n\t\t\tcontext.head.appendChild( base );\n\t\t} else {\n\t\t\tcontext = document;\n\t\t}\n\t}\n\n\tparsed = rsingleTag.exec( data );\n\tscripts = !keepScripts && [];\n\n\t// Single tag\n\tif ( parsed ) {\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\n\t}\n\n\tparsed = buildFragment( [ data ], context, scripts );\n\n\tif ( scripts && scripts.length ) {\n\t\tjQuery( scripts ).remove();\n\t}\n\n\treturn jQuery.merge( [], parsed.childNodes );\n};\n\n\n/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf( \" \" );\n\n\tif ( off > -1 ) {\n\t\tselector = stripAndCollapse( url.slice( off ) );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax( {\n\t\t\turl: url,\n\n\t\t\t// If \"type\" variable is undefined, then \"GET\" method will be used.\n\t\t\t// Make value of this field explicit since\n\t\t\t// user can override it through ajaxSetup method\n\t\t\ttype: type || \"GET\",\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t} ).done( function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery( \"<div>\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t// If the request succeeds, this function gets \"data\", \"status\", \"jqXHR\"\n\t\t// but they are ignored because response was set above.\n\t\t// If it fails, this function gets \"jqXHR\", \"status\", \"error\"\n\t\t} ).always( callback && function( jqXHR, status ) {\n\t\t\tself.each( function() {\n\t\t\t\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t\t} );\n\t\t} );\n\t}\n\n\treturn this;\n};\n\n\n\n\njQuery.expr.pseudos.animated = function( elem ) {\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\n\t\treturn elem === fn.elem;\n\t} ).length;\n};\n\n\n\n\njQuery.offset = {\n\tsetOffset: function( elem, options, i ) {\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\n\t\t\tposition = jQuery.css( elem, \"position\" ),\n\t\t\tcurElem = jQuery( elem ),\n\t\t\tprops = {};\n\n\t\t// Set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tcurOffset = curElem.offset();\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\n\t\t\t( curCSSTop + curCSSLeft ).indexOf( \"auto\" ) > -1;\n\n\t\t// Need to be able to calculate position if either\n\t\t// top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( isFunction( options ) ) {\n\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\njQuery.fn.extend( {\n\n\t// offset() relates an element's border box to the document origin\n\toffset: function( options ) {\n\n\t\t// Preserve chaining for setter\n\t\tif ( arguments.length ) {\n\t\t\treturn options === undefined ?\n\t\t\t\tthis :\n\t\t\t\tthis.each( function( i ) {\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t\t} );\n\t\t}\n\n\t\tvar rect, win,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !elem ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Return zeros for disconnected and hidden (display: none) elements (gh-2310)\n\t\t// Support: IE <=11 only\n\t\t// Running getBoundingClientRect on a\n\t\t// disconnected node in IE throws an error\n\t\tif ( !elem.getClientRects().length ) {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t\t// Get document-relative position by adding viewport scroll to viewport-relative gBCR\n\t\trect = elem.getBoundingClientRect();\n\t\twin = elem.ownerDocument.defaultView;\n\t\treturn {\n\t\t\ttop: rect.top + win.pageYOffset,\n\t\t\tleft: rect.left + win.pageXOffset\n\t\t};\n\t},\n\n\t// position() relates an element's margin box to its offset parent's padding box\n\t// This corresponds to the behavior of CSS absolute positioning\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset, doc,\n\t\t\telem = this[ 0 ],\n\t\t\tparentOffset = { top: 0, left: 0 };\n\n\t\t// position:fixed elements are offset from the viewport, which itself always has zero offset\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\n\t\t\t// Assume position:fixed implies availability of getBoundingClientRect\n\t\t\toffset = elem.getBoundingClientRect();\n\n\t\t} else {\n\t\t\toffset = this.offset();\n\n\t\t\t// Account for the *real* offset parent, which can be the document or its root element\n\t\t\t// when a statically positioned element is identified\n\t\t\tdoc = elem.ownerDocument;\n\t\t\toffsetParent = elem.offsetParent || doc.documentElement;\n\t\t\twhile ( offsetParent &&\n\t\t\t\t( offsetParent === doc.body || offsetParent === doc.documentElement ) &&\n\t\t\t\tjQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\n\t\t\t\toffsetParent = offsetParent.parentNode;\n\t\t\t}\n\t\t\tif ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {\n\n\t\t\t\t// Incorporate borders into its offset, since they are outside its content origin\n\t\t\t\tparentOffset = jQuery( offsetParent ).offset();\n\t\t\t\tparentOffset.top += jQuery.css( offsetParent, \"borderTopWidth\", true );\n\t\t\t\tparentOffset.left += jQuery.css( offsetParent, \"borderLeftWidth\", true );\n\t\t\t}\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\treturn {\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\n\t\t};\n\t},\n\n\t// This method will return documentElement in the following cases:\n\t// 1) For the element inside the iframe without offsetParent, this method will return\n\t//    documentElement of the parent window\n\t// 2) For the hidden or detached element\n\t// 3) For body or html element, i.e. in case of the html node - it will return itself\n\t//\n\t// but those exceptions were never presented as a real life use-cases\n\t// and might be considered as more preferable results.\n\t//\n\t// This logic, however, is not guaranteed and can change at any point in the future\n\toffsetParent: function() {\n\t\treturn this.map( function() {\n\t\t\tvar offsetParent = this.offsetParent;\n\n\t\t\twhile ( offsetParent && jQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\n\t\t\treturn offsetParent || documentElement;\n\t\t} );\n\t}\n} );\n\n// Create scrollLeft and scrollTop methods\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\n\tvar top = \"pageYOffset\" === prop;\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn access( this, function( elem, method, val ) {\n\n\t\t\t// Coalesce documents and windows\n\t\t\tvar win;\n\t\t\tif ( isWindow( elem ) ) {\n\t\t\t\twin = elem;\n\t\t\t} else if ( elem.nodeType === 9 ) {\n\t\t\t\twin = elem.defaultView;\n\t\t\t}\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? win[ prop ] : elem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : win.pageXOffset,\n\t\t\t\t\ttop ? val : win.pageYOffset\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length );\n\t};\n} );\n\n// Support: Safari <=7 - 9.1, Chrome <=37 - 49\n// Add the top/left cssHooks using jQuery.fn.position\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347\n// getComputedStyle returns percent when specified for top/left/bottom/right;\n// rather than make the css module depend on the offset module, just check for it here\njQuery.each( [ \"top\", \"left\" ], function( _i, prop ) {\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\n\t\tfunction( elem, computed ) {\n\t\t\tif ( computed ) {\n\t\t\t\tcomputed = curCSS( elem, prop );\n\n\t\t\t\t// If curCSS returns percentage, fallback to offset\n\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\tcomputed;\n\t\t\t}\n\t\t}\n\t);\n} );\n\n\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( {\n\t\tpadding: \"inner\" + name,\n\t\tcontent: type,\n\t\t\"\": \"outer\" + name\n\t}, function( defaultExtra, funcName ) {\n\n\t\t// Margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( isWindow( elem ) ) {\n\n\t\t\t\t\t// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)\n\t\t\t\t\treturn funcName.indexOf( \"outer\" ) === 0 ?\n\t\t\t\t\t\telem[ \"inner\" + name ] :\n\t\t\t\t\t\telem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\n\t\t\t\t\t// whichever is greatest\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable );\n\t\t};\n\t} );\n} );\n\n\njQuery.each( [\n\t\"ajaxStart\",\n\t\"ajaxStop\",\n\t\"ajaxComplete\",\n\t\"ajaxError\",\n\t\"ajaxSuccess\",\n\t\"ajaxSend\"\n], function( _i, type ) {\n\tjQuery.fn[ type ] = function( fn ) {\n\t\treturn this.on( type, fn );\n\t};\n} );\n\n\n\n\njQuery.fn.extend( {\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ?\n\t\t\tthis.off( selector, \"**\" ) :\n\t\t\tthis.off( types, selector || \"**\", fn );\n\t},\n\n\thover: function( fnOver, fnOut ) {\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\n\t}\n} );\n\njQuery.each(\n\t( \"blur focus focusin focusout resize scroll click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup contextmenu\" ).split( \" \" ),\n\tfunction( _i, name ) {\n\n\t\t// Handle event binding\n\t\tjQuery.fn[ name ] = function( data, fn ) {\n\t\t\treturn arguments.length > 0 ?\n\t\t\t\tthis.on( name, null, data, fn ) :\n\t\t\t\tthis.trigger( name );\n\t\t};\n\t}\n);\n\n\n\n\n// Support: Android <=4.0 only\n// Make sure we trim BOM and NBSP\n// Require that the \"whitespace run\" starts from a non-whitespace\n// to avoid O(N^2) behavior when the engine would try matching \"\\s+$\" at each space position.\nvar rtrim = /^[\\s\\uFEFF\\xA0]+|([^\\s\\uFEFF\\xA0])[\\s\\uFEFF\\xA0]+$/g;\n\n// Bind a function to a context, optionally partially applying any\n// arguments.\n// jQuery.proxy is deprecated to promote standards (specifically Function#bind)\n// However, it is not slated for removal any time soon\njQuery.proxy = function( fn, context ) {\n\tvar tmp, args, proxy;\n\n\tif ( typeof context === \"string\" ) {\n\t\ttmp = fn[ context ];\n\t\tcontext = fn;\n\t\tfn = tmp;\n\t}\n\n\t// Quick check to determine if target is callable, in the spec\n\t// this throws a TypeError, but we will just return undefined.\n\tif ( !isFunction( fn ) ) {\n\t\treturn undefined;\n\t}\n\n\t// Simulated bind\n\targs = slice.call( arguments, 2 );\n\tproxy = function() {\n\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t};\n\n\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\treturn proxy;\n};\n\njQuery.holdReady = function( hold ) {\n\tif ( hold ) {\n\t\tjQuery.readyWait++;\n\t} else {\n\t\tjQuery.ready( true );\n\t}\n};\njQuery.isArray = Array.isArray;\njQuery.parseJSON = JSON.parse;\njQuery.nodeName = nodeName;\njQuery.isFunction = isFunction;\njQuery.isWindow = isWindow;\njQuery.camelCase = camelCase;\njQuery.type = toType;\n\njQuery.now = Date.now;\n\njQuery.isNumeric = function( obj ) {\n\n\t// As of jQuery 3.0, isNumeric is limited to\n\t// strings and numbers (primitives or objects)\n\t// that can be coerced to finite numbers (gh-2662)\n\tvar type = jQuery.type( obj );\n\treturn ( type === \"number\" || type === \"string\" ) &&\n\n\t\t// parseFloat NaNs numeric-cast false positives (\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t!isNaN( obj - parseFloat( obj ) );\n};\n\njQuery.trim = function( text ) {\n\treturn text == null ?\n\t\t\"\" :\n\t\t( text + \"\" ).replace( rtrim, \"$1\" );\n};\n\n\n\n// Register as a named AMD module, since jQuery can be concatenated with other\n// files that may use define, but not via a proper concatenation script that\n// understands anonymous AMD modules. A named AMD is safest and most robust\n// way to register. Lowercase jquery is used because AMD module names are\n// derived from file names, and jQuery is normally delivered in a lowercase\n// file name. Do this after creating the global so that if an AMD module wants\n// to call noConflict to hide this version of jQuery, it will work.\n\n// Note that for maximum portability, libraries that are not jQuery should\n// declare themselves as anonymous modules, and avoid setting a global if an\n// AMD loader is present. jQuery is a special case. For more information, see\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\n\nif ( typeof define === \"function\" && define.amd ) {\n\tdefine( \"jquery\", [], function() {\n\t\treturn jQuery;\n\t} );\n}\n\n\n\n\nvar\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$;\n\njQuery.noConflict = function( deep ) {\n\tif ( window.$ === jQuery ) {\n\t\twindow.$ = _$;\n\t}\n\n\tif ( deep && window.jQuery === jQuery ) {\n\t\twindow.jQuery = _jQuery;\n\t}\n\n\treturn jQuery;\n};\n\n// Expose jQuery and $ identifiers, even in AMD\n// (trac-7102#comment:10, https://github.com/jquery/jquery/pull/557)\n// and CommonJS for browser emulators (trac-13566)\nif ( typeof noGlobal === \"undefined\" ) {\n\twindow.jQuery = window.$ = jQuery;\n}\n\n\n\n\nreturn jQuery;\n} );\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function(render, schedule, console) {\n\tvar subscriptions = []\n\tvar rendering = false\n\tvar pending = false\n\n\tfunction sync() {\n\t\tif (rendering) throw new Error(\"Nested m.redraw.sync() call\")\n\t\trendering = true\n\t\tfor (var i = 0; i < subscriptions.length; i += 2) {\n\t\t\ttry { render(subscriptions[i], Vnode(subscriptions[i + 1]), redraw) }\n\t\t\tcatch (e) { console.error(e) }\n\t\t}\n\t\trendering = false\n\t}\n\n\tfunction redraw() {\n\t\tif (!pending) {\n\t\t\tpending = true\n\t\t\tschedule(function() {\n\t\t\t\tpending = false\n\t\t\t\tsync()\n\t\t\t})\n\t\t}\n\t}\n\n\tredraw.sync = sync\n\n\tfunction mount(root, component) {\n\t\tif (component != null && component.view == null && typeof component !== \"function\") {\n\t\t\tthrow new TypeError(\"m.mount(element, component) expects a component, not a vnode\")\n\t\t}\n\n\t\tvar index = subscriptions.indexOf(root)\n\t\tif (index >= 0) {\n\t\t\tsubscriptions.splice(index, 2)\n\t\t\trender(root, [], redraw)\n\t\t}\n\n\t\tif (component != null) {\n\t\t\tsubscriptions.push(root, component)\n\t\t\trender(root, Vnode(component), redraw)\n\t\t}\n\t}\n\n\treturn {mount: mount, redraw: redraw}\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar m = require(\"../render/hyperscript\")\nvar Promise = require(\"../promise/promise\")\n\nvar buildPathname = require(\"../pathname/build\")\nvar parsePathname = require(\"../pathname/parse\")\nvar compileTemplate = require(\"../pathname/compileTemplate\")\nvar assign = require(\"../pathname/assign\")\n\nvar sentinel = {}\n\nmodule.exports = function($window, mountRedraw) {\n\tvar fireAsync\n\n\tfunction setPath(path, data, options) {\n\t\tpath = buildPathname(path, data)\n\t\tif (fireAsync != null) {\n\t\t\tfireAsync()\n\t\t\tvar state = options ? options.state : null\n\t\t\tvar title = options ? options.title : null\n\t\t\tif (options && options.replace) $window.history.replaceState(state, title, route.prefix + path)\n\t\t\telse $window.history.pushState(state, title, route.prefix + path)\n\t\t}\n\t\telse {\n\t\t\t$window.location.href = route.prefix + path\n\t\t}\n\t}\n\n\tvar currentResolver = sentinel, component, attrs, currentPath, lastUpdate\n\n\tvar SKIP = route.SKIP = {}\n\n\tfunction route(root, defaultRoute, routes) {\n\t\tif (root == null) throw new Error(\"Ensure the DOM element that was passed to `m.route` is not undefined\")\n\t\t// 0 = start\n\t\t// 1 = init\n\t\t// 2 = ready\n\t\tvar state = 0\n\n\t\tvar compiled = Object.keys(routes).map(function(route) {\n\t\t\tif (route[0] !== \"/\") throw new SyntaxError(\"Routes must start with a `/`\")\n\t\t\tif ((/:([^\\/\\.-]+)(\\.{3})?:/).test(route)) {\n\t\t\t\tthrow new SyntaxError(\"Route parameter names must be separated with either `/`, `.`, or `-`\")\n\t\t\t}\n\t\t\treturn {\n\t\t\t\troute: route,\n\t\t\t\tcomponent: routes[route],\n\t\t\t\tcheck: compileTemplate(route),\n\t\t\t}\n\t\t})\n\t\tvar callAsync = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\t\tvar p = Promise.resolve()\n\t\tvar scheduled = false\n\t\tvar onremove\n\n\t\tfireAsync = null\n\n\t\tif (defaultRoute != null) {\n\t\t\tvar defaultData = parsePathname(defaultRoute)\n\n\t\t\tif (!compiled.some(function (i) { return i.check(defaultData) })) {\n\t\t\t\tthrow new ReferenceError(\"Default route doesn't match any known routes\")\n\t\t\t}\n\t\t}\n\n\t\tfunction resolveRoute() {\n\t\t\tscheduled = false\n\t\t\t// Consider the pathname holistically. The prefix might even be invalid,\n\t\t\t// but that's not our problem.\n\t\t\tvar prefix = $window.location.hash\n\t\t\tif (route.prefix[0] !== \"#\") {\n\t\t\t\tprefix = $window.location.search + prefix\n\t\t\t\tif (route.prefix[0] !== \"?\") {\n\t\t\t\t\tprefix = $window.location.pathname + prefix\n\t\t\t\t\tif (prefix[0] !== \"/\") prefix = \"/\" + prefix\n\t\t\t\t}\n\t\t\t}\n\t\t\t// This seemingly useless `.concat()` speeds up the tests quite a bit,\n\t\t\t// since the representation is consistently a relatively poorly\n\t\t\t// optimized cons string.\n\t\t\tvar path = prefix.concat()\n\t\t\t\t.replace(/(?:%[a-f89][a-f0-9])+/gim, decodeURIComponent)\n\t\t\t\t.slice(route.prefix.length)\n\t\t\tvar data = parsePathname(path)\n\n\t\t\tassign(data.params, $window.history.state)\n\n\t\t\tfunction fail() {\n\t\t\t\tif (path === defaultRoute) throw new Error(\"Could not resolve default route \" + defaultRoute)\n\t\t\t\tsetPath(defaultRoute, null, {replace: true})\n\t\t\t}\n\n\t\t\tloop(0)\n\t\t\tfunction loop(i) {\n\t\t\t\t// 0 = init\n\t\t\t\t// 1 = scheduled\n\t\t\t\t// 2 = done\n\t\t\t\tfor (; i < compiled.length; i++) {\n\t\t\t\t\tif (compiled[i].check(data)) {\n\t\t\t\t\t\tvar payload = compiled[i].component\n\t\t\t\t\t\tvar matchedRoute = compiled[i].route\n\t\t\t\t\t\tvar localComp = payload\n\t\t\t\t\t\tvar update = lastUpdate = function(comp) {\n\t\t\t\t\t\t\tif (update !== lastUpdate) return\n\t\t\t\t\t\t\tif (comp === SKIP) return loop(i + 1)\n\t\t\t\t\t\t\tcomponent = comp != null && (typeof comp.view === \"function\" || typeof comp === \"function\")? comp : \"div\"\n\t\t\t\t\t\t\tattrs = data.params, currentPath = path, lastUpdate = null\n\t\t\t\t\t\t\tcurrentResolver = payload.render ? payload : null\n\t\t\t\t\t\t\tif (state === 2) mountRedraw.redraw()\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tstate = 2\n\t\t\t\t\t\t\t\tmountRedraw.redraw.sync()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// There's no understating how much I *wish* I could\n\t\t\t\t\t\t// use `async`/`await` here...\n\t\t\t\t\t\tif (payload.view || typeof payload === \"function\") {\n\t\t\t\t\t\t\tpayload = {}\n\t\t\t\t\t\t\tupdate(localComp)\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (payload.onmatch) {\n\t\t\t\t\t\t\tp.then(function () {\n\t\t\t\t\t\t\t\treturn payload.onmatch(data.params, path, matchedRoute)\n\t\t\t\t\t\t\t}).then(update, fail)\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse update(\"div\")\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfail()\n\t\t\t}\n\t\t}\n\n\t\t// Set it unconditionally so `m.route.set` and `m.route.Link` both work,\n\t\t// even if neither `pushState` nor `hashchange` are supported. It's\n\t\t// cleared if `hashchange` is used, since that makes it automatically\n\t\t// async.\n\t\tfireAsync = function() {\n\t\t\tif (!scheduled) {\n\t\t\t\tscheduled = true\n\t\t\t\tcallAsync(resolveRoute)\n\t\t\t}\n\t\t}\n\n\t\tif (typeof $window.history.pushState === \"function\") {\n\t\t\tonremove = function() {\n\t\t\t\t$window.removeEventListener(\"popstate\", fireAsync, false)\n\t\t\t}\n\t\t\t$window.addEventListener(\"popstate\", fireAsync, false)\n\t\t} else if (route.prefix[0] === \"#\") {\n\t\t\tfireAsync = null\n\t\t\tonremove = function() {\n\t\t\t\t$window.removeEventListener(\"hashchange\", resolveRoute, false)\n\t\t\t}\n\t\t\t$window.addEventListener(\"hashchange\", resolveRoute, false)\n\t\t}\n\n\t\treturn mountRedraw.mount(root, {\n\t\t\tonbeforeupdate: function() {\n\t\t\t\tstate = state ? 2 : 1\n\t\t\t\treturn !(!state || sentinel === currentResolver)\n\t\t\t},\n\t\t\toncreate: resolveRoute,\n\t\t\tonremove: onremove,\n\t\t\tview: function() {\n\t\t\t\tif (!state || sentinel === currentResolver) return\n\t\t\t\t// Wrap in a fragment to preserve existing key semantics\n\t\t\t\tvar vnode = [Vnode(component, attrs.key, attrs)]\n\t\t\t\tif (currentResolver) vnode = currentResolver.render(vnode[0])\n\t\t\t\treturn vnode\n\t\t\t},\n\t\t})\n\t}\n\troute.set = function(path, data, options) {\n\t\tif (lastUpdate != null) {\n\t\t\toptions = options || {}\n\t\t\toptions.replace = true\n\t\t}\n\t\tlastUpdate = null\n\t\tsetPath(path, data, options)\n\t}\n\troute.get = function() {return currentPath}\n\troute.prefix = \"#!\"\n\troute.Link = {\n\t\tview: function(vnode) {\n\t\t\tvar options = vnode.attrs.options\n\t\t\t// Remove these so they don't get overwritten\n\t\t\tvar attrs = {}, onclick, href\n\t\t\tassign(attrs, vnode.attrs)\n\t\t\t// The first two are internal, but the rest are magic attributes\n\t\t\t// that need censored to not screw up rendering.\n\t\t\tattrs.selector = attrs.options = attrs.key = attrs.oninit =\n\t\t\tattrs.oncreate = attrs.onbeforeupdate = attrs.onupdate =\n\t\t\tattrs.onbeforeremove = attrs.onremove = null\n\n\t\t\t// Do this now so we can get the most current `href` and `disabled`.\n\t\t\t// Those attributes may also be specified in the selector, and we\n\t\t\t// should honor that.\n\t\t\tvar child = m(vnode.attrs.selector || \"a\", attrs, vnode.children)\n\n\t\t\t// Let's provide a *right* way to disable a route link, rather than\n\t\t\t// letting people screw up accessibility on accident.\n\t\t\t//\n\t\t\t// The attribute is coerced so users don't get surprised over\n\t\t\t// `disabled: 0` resulting in a button that's somehow routable\n\t\t\t// despite being visibly disabled.\n\t\t\tif (child.attrs.disabled = Boolean(child.attrs.disabled)) {\n\t\t\t\tchild.attrs.href = null\n\t\t\t\tchild.attrs[\"aria-disabled\"] = \"true\"\n\t\t\t\t// If you *really* do want to do this on a disabled link, use\n\t\t\t\t// an `oncreate` hook to add it.\n\t\t\t\tchild.attrs.onclick = null\n\t\t\t} else {\n\t\t\t\tonclick = child.attrs.onclick\n\t\t\t\thref = child.attrs.href\n\t\t\t\tchild.attrs.href = route.prefix + href\n\t\t\t\tchild.attrs.onclick = function(e) {\n\t\t\t\t\tvar result\n\t\t\t\t\tif (typeof onclick === \"function\") {\n\t\t\t\t\t\tresult = onclick.call(e.currentTarget, e)\n\t\t\t\t\t} else if (onclick == null || typeof onclick !== \"object\") {\n\t\t\t\t\t\t// do nothing\n\t\t\t\t\t} else if (typeof onclick.handleEvent === \"function\") {\n\t\t\t\t\t\tonclick.handleEvent(e)\n\t\t\t\t\t}\n\n\t\t\t\t\t// Adapted from React Router's implementation:\n\t\t\t\t\t// https://github.com/ReactTraining/react-router/blob/520a0acd48ae1b066eb0b07d6d4d1790a1d02482/packages/react-router-dom/modules/Link.js\n\t\t\t\t\t//\n\t\t\t\t\t// Try to be flexible and intuitive in how we handle links.\n\t\t\t\t\t// Fun fact: links aren't as obvious to get right as you\n\t\t\t\t\t// would expect. There's a lot more valid ways to click a\n\t\t\t\t\t// link than this, and one might want to not simply click a\n\t\t\t\t\t// link, but right click or command-click it to copy the\n\t\t\t\t\t// link target, etc. Nope, this isn't just for blind people.\n\t\t\t\t\tif (\n\t\t\t\t\t\t// Skip if `onclick` prevented default\n\t\t\t\t\t\tresult !== false && !e.defaultPrevented &&\n\t\t\t\t\t\t// Ignore everything but left clicks\n\t\t\t\t\t\t(e.button === 0 || e.which === 0 || e.which === 1) &&\n\t\t\t\t\t\t// Let the browser handle `target=_blank`, etc.\n\t\t\t\t\t\t(!e.currentTarget.target || e.currentTarget.target === \"_self\") &&\n\t\t\t\t\t\t// No modifier keys\n\t\t\t\t\t\t!e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey\n\t\t\t\t\t) {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\te.redraw = false\n\t\t\t\t\t\troute.set(href, null, options)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn child\n\t\t},\n\t}\n\troute.param = function(key) {\n\t\treturn attrs && key != null ? attrs[key] : attrs\n\t}\n\n\treturn route\n}\n","\"use strict\"\n\nvar hyperscript = require(\"./render/hyperscript\")\n\nhyperscript.trust = require(\"./render/trust\")\nhyperscript.fragment = require(\"./render/fragment\")\n\nmodule.exports = hyperscript\n","\"use strict\"\n\nvar hyperscript = require(\"./hyperscript\")\nvar request = require(\"./request\")\nvar mountRedraw = require(\"./mount-redraw\")\n\nvar m = function m() { return hyperscript.apply(this, arguments) }\nm.m = hyperscript\nm.trust = hyperscript.trust\nm.fragment = hyperscript.fragment\nm.mount = mountRedraw.mount\nm.route = require(\"./route\")\nm.render = require(\"./render\")\nm.redraw = mountRedraw.redraw\nm.request = request.request\nm.jsonp = request.jsonp\nm.parseQueryString = require(\"./querystring/parse\")\nm.buildQueryString = require(\"./querystring/build\")\nm.parsePathname = require(\"./pathname/parse\")\nm.buildPathname = require(\"./pathname/build\")\nm.vnode = require(\"./render/vnode\")\nm.PromisePolyfill = require(\"./promise/polyfill\")\n\nmodule.exports = m\n","\"use strict\"\n\nvar render = require(\"./render\")\n\nmodule.exports = require(\"./api/mount-redraw\")(render, requestAnimationFrame, console)\n","\"use strict\"\n\nmodule.exports = Object.assign || function(target, source) {\n\tif(source) Object.keys(source).forEach(function(key) { target[key] = source[key] })\n}\n","\"use strict\"\n\nvar buildQueryString = require(\"../querystring/build\")\nvar assign = require(\"./assign\")\n\n// Returns `path` from `template` + `params`\nmodule.exports = function(template, params) {\n\tif ((/:([^\\/\\.-]+)(\\.{3})?:/).test(template)) {\n\t\tthrow new SyntaxError(\"Template parameter names *must* be separated\")\n\t}\n\tif (params == null) return template\n\tvar queryIndex = template.indexOf(\"?\")\n\tvar hashIndex = template.indexOf(\"#\")\n\tvar queryEnd = hashIndex < 0 ? template.length : hashIndex\n\tvar pathEnd = queryIndex < 0 ? queryEnd : queryIndex\n\tvar path = template.slice(0, pathEnd)\n\tvar query = {}\n\n\tassign(query, params)\n\n\tvar resolved = path.replace(/:([^\\/\\.-]+)(\\.{3})?/g, function(m, key, variadic) {\n\t\tdelete query[key]\n\t\t// If no such parameter exists, don't interpolate it.\n\t\tif (params[key] == null) return m\n\t\t// Escape normal parameters, but not variadic ones.\n\t\treturn variadic ? params[key] : encodeURIComponent(String(params[key]))\n\t})\n\n\t// In case the template substitution adds new query/hash parameters.\n\tvar newQueryIndex = resolved.indexOf(\"?\")\n\tvar newHashIndex = resolved.indexOf(\"#\")\n\tvar newQueryEnd = newHashIndex < 0 ? resolved.length : newHashIndex\n\tvar newPathEnd = newQueryIndex < 0 ? newQueryEnd : newQueryIndex\n\tvar result = resolved.slice(0, newPathEnd)\n\n\tif (queryIndex >= 0) result += template.slice(queryIndex, queryEnd)\n\tif (newQueryIndex >= 0) result += (queryIndex < 0 ? \"?\" : \"&\") + resolved.slice(newQueryIndex, newQueryEnd)\n\tvar querystring = buildQueryString(query)\n\tif (querystring) result += (queryIndex < 0 && newQueryIndex < 0 ? \"?\" : \"&\") + querystring\n\tif (hashIndex >= 0) result += template.slice(hashIndex)\n\tif (newHashIndex >= 0) result += (hashIndex < 0 ? \"\" : \"&\") + resolved.slice(newHashIndex)\n\treturn result\n}\n","\"use strict\"\n\nvar parsePathname = require(\"./parse\")\n\n// Compiles a template into a function that takes a resolved path (without query\n// strings) and returns an object containing the template parameters with their\n// parsed values. This expects the input of the compiled template to be the\n// output of `parsePathname`. Note that it does *not* remove query parameters\n// specified in the template.\nmodule.exports = function(template) {\n\tvar templateData = parsePathname(template)\n\tvar templateKeys = Object.keys(templateData.params)\n\tvar keys = []\n\tvar regexp = new RegExp(\"^\" + templateData.path.replace(\n\t\t// I escape literal text so people can use things like `:file.:ext` or\n\t\t// `:lang-:locale` in routes. This is all merged into one pass so I\n\t\t// don't also accidentally escape `-` and make it harder to detect it to\n\t\t// ban it from template parameters.\n\t\t/:([^\\/.-]+)(\\.{3}|\\.(?!\\.)|-)?|[\\\\^$*+.()|\\[\\]{}]/g,\n\t\tfunction(m, key, extra) {\n\t\t\tif (key == null) return \"\\\\\" + m\n\t\t\tkeys.push({k: key, r: extra === \"...\"})\n\t\t\tif (extra === \"...\") return \"(.*)\"\n\t\t\tif (extra === \".\") return \"([^/]+)\\\\.\"\n\t\t\treturn \"([^/]+)\" + (extra || \"\")\n\t\t}\n\t) + \"$\")\n\treturn function(data) {\n\t\t// First, check the params. Usually, there isn't any, and it's just\n\t\t// checking a static set.\n\t\tfor (var i = 0; i < templateKeys.length; i++) {\n\t\t\tif (templateData.params[templateKeys[i]] !== data.params[templateKeys[i]]) return false\n\t\t}\n\t\t// If no interpolations exist, let's skip all the ceremony\n\t\tif (!keys.length) return regexp.test(data.path)\n\t\tvar values = regexp.exec(data.path)\n\t\tif (values == null) return false\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tdata.params[keys[i].k] = keys[i].r ? values[i + 1] : decodeURIComponent(values[i + 1])\n\t\t}\n\t\treturn true\n\t}\n}\n","\"use strict\"\n\nvar parseQueryString = require(\"../querystring/parse\")\n\n// Returns `{path, params}` from `url`\nmodule.exports = function(url) {\n\tvar queryIndex = url.indexOf(\"?\")\n\tvar hashIndex = url.indexOf(\"#\")\n\tvar queryEnd = hashIndex < 0 ? url.length : hashIndex\n\tvar pathEnd = queryIndex < 0 ? queryEnd : queryIndex\n\tvar path = url.slice(0, pathEnd).replace(/\\/{2,}/g, \"/\")\n\n\tif (!path) path = \"/\"\n\telse {\n\t\tif (path[0] !== \"/\") path = \"/\" + path\n\t\tif (path.length > 1 && path[path.length - 1] === \"/\") path = path.slice(0, -1)\n\t}\n\treturn {\n\t\tpath: path,\n\t\tparams: queryIndex < 0\n\t\t\t? {}\n\t\t\t: parseQueryString(url.slice(queryIndex + 1, queryEnd)),\n\t}\n}\n","\"use strict\"\n/** @constructor */\nvar PromisePolyfill = function(executor) {\n\tif (!(this instanceof PromisePolyfill)) throw new Error(\"Promise must be called with `new`\")\n\tif (typeof executor !== \"function\") throw new TypeError(\"executor must be a function\")\n\n\tvar self = this, resolvers = [], rejectors = [], resolveCurrent = handler(resolvers, true), rejectCurrent = handler(rejectors, false)\n\tvar instance = self._instance = {resolvers: resolvers, rejectors: rejectors}\n\tvar callAsync = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\tfunction handler(list, shouldAbsorb) {\n\t\treturn function execute(value) {\n\t\t\tvar then\n\t\t\ttry {\n\t\t\t\tif (shouldAbsorb && value != null && (typeof value === \"object\" || typeof value === \"function\") && typeof (then = value.then) === \"function\") {\n\t\t\t\t\tif (value === self) throw new TypeError(\"Promise can't be resolved w/ itself\")\n\t\t\t\t\texecuteOnce(then.bind(value))\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcallAsync(function() {\n\t\t\t\t\t\tif (!shouldAbsorb && list.length === 0) console.error(\"Possible unhandled promise rejection:\", value)\n\t\t\t\t\t\tfor (var i = 0; i < list.length; i++) list[i](value)\n\t\t\t\t\t\tresolvers.length = 0, rejectors.length = 0\n\t\t\t\t\t\tinstance.state = shouldAbsorb\n\t\t\t\t\t\tinstance.retry = function() {execute(value)}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\trejectCurrent(e)\n\t\t\t}\n\t\t}\n\t}\n\tfunction executeOnce(then) {\n\t\tvar runs = 0\n\t\tfunction run(fn) {\n\t\t\treturn function(value) {\n\t\t\t\tif (runs++ > 0) return\n\t\t\t\tfn(value)\n\t\t\t}\n\t\t}\n\t\tvar onerror = run(rejectCurrent)\n\t\ttry {then(run(resolveCurrent), onerror)} catch (e) {onerror(e)}\n\t}\n\n\texecuteOnce(executor)\n}\nPromisePolyfill.prototype.then = function(onFulfilled, onRejection) {\n\tvar self = this, instance = self._instance\n\tfunction handle(callback, list, next, state) {\n\t\tlist.push(function(value) {\n\t\t\tif (typeof callback !== \"function\") next(value)\n\t\t\telse try {resolveNext(callback(value))} catch (e) {if (rejectNext) rejectNext(e)}\n\t\t})\n\t\tif (typeof instance.retry === \"function\" && state === instance.state) instance.retry()\n\t}\n\tvar resolveNext, rejectNext\n\tvar promise = new PromisePolyfill(function(resolve, reject) {resolveNext = resolve, rejectNext = reject})\n\thandle(onFulfilled, instance.resolvers, resolveNext, true), handle(onRejection, instance.rejectors, rejectNext, false)\n\treturn promise\n}\nPromisePolyfill.prototype.catch = function(onRejection) {\n\treturn this.then(null, onRejection)\n}\nPromisePolyfill.prototype.finally = function(callback) {\n\treturn this.then(\n\t\tfunction(value) {\n\t\t\treturn PromisePolyfill.resolve(callback()).then(function() {\n\t\t\t\treturn value\n\t\t\t})\n\t\t},\n\t\tfunction(reason) {\n\t\t\treturn PromisePolyfill.resolve(callback()).then(function() {\n\t\t\t\treturn PromisePolyfill.reject(reason);\n\t\t\t})\n\t\t}\n\t)\n}\nPromisePolyfill.resolve = function(value) {\n\tif (value instanceof PromisePolyfill) return value\n\treturn new PromisePolyfill(function(resolve) {resolve(value)})\n}\nPromisePolyfill.reject = function(value) {\n\treturn new PromisePolyfill(function(resolve, reject) {reject(value)})\n}\nPromisePolyfill.all = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tvar total = list.length, count = 0, values = []\n\t\tif (list.length === 0) resolve([])\n\t\telse for (var i = 0; i < list.length; i++) {\n\t\t\t(function(i) {\n\t\t\t\tfunction consume(value) {\n\t\t\t\t\tcount++\n\t\t\t\t\tvalues[i] = value\n\t\t\t\t\tif (count === total) resolve(values)\n\t\t\t\t}\n\t\t\t\tif (list[i] != null && (typeof list[i] === \"object\" || typeof list[i] === \"function\") && typeof list[i].then === \"function\") {\n\t\t\t\t\tlist[i].then(consume, reject)\n\t\t\t\t}\n\t\t\t\telse consume(list[i])\n\t\t\t})(i)\n\t\t}\n\t})\n}\nPromisePolyfill.race = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tfor (var i = 0; i < list.length; i++) {\n\t\t\tlist[i].then(resolve, reject)\n\t\t}\n\t})\n}\n\nmodule.exports = PromisePolyfill\n","\"use strict\"\n\nvar PromisePolyfill = require(\"./polyfill\")\n\nif (typeof window !== \"undefined\") {\n\tif (typeof window.Promise === \"undefined\") {\n\t\twindow.Promise = PromisePolyfill\n\t} else if (!window.Promise.prototype.finally) {\n\t\twindow.Promise.prototype.finally = PromisePolyfill.prototype.finally\n\t}\n\tmodule.exports = window.Promise\n} else if (typeof global !== \"undefined\") {\n\tif (typeof global.Promise === \"undefined\") {\n\t\tglobal.Promise = PromisePolyfill\n\t} else if (!global.Promise.prototype.finally) {\n\t\tglobal.Promise.prototype.finally = PromisePolyfill.prototype.finally\n\t}\n\tmodule.exports = global.Promise\n} else {\n\tmodule.exports = PromisePolyfill\n}\n","\"use strict\"\n\nmodule.exports = function(object) {\n\tif (Object.prototype.toString.call(object) !== \"[object Object]\") return \"\"\n\n\tvar args = []\n\tfor (var key in object) {\n\t\tdestructure(key, object[key])\n\t}\n\n\treturn args.join(\"&\")\n\n\tfunction destructure(key, value) {\n\t\tif (Array.isArray(value)) {\n\t\t\tfor (var i = 0; i < value.length; i++) {\n\t\t\t\tdestructure(key + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse if (Object.prototype.toString.call(value) === \"[object Object]\") {\n\t\t\tfor (var i in value) {\n\t\t\t\tdestructure(key + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse args.push(encodeURIComponent(key) + (value != null && value !== \"\" ? \"=\" + encodeURIComponent(value) : \"\"))\n\t}\n}\n","\"use strict\"\n\nmodule.exports = function(string) {\n\tif (string === \"\" || string == null) return {}\n\tif (string.charAt(0) === \"?\") string = string.slice(1)\n\n\tvar entries = string.split(\"&\"), counters = {}, data = {}\n\tfor (var i = 0; i < entries.length; i++) {\n\t\tvar entry = entries[i].split(\"=\")\n\t\tvar key = decodeURIComponent(entry[0])\n\t\tvar value = entry.length === 2 ? decodeURIComponent(entry[1]) : \"\"\n\n\t\tif (value === \"true\") value = true\n\t\telse if (value === \"false\") value = false\n\n\t\tvar levels = key.split(/\\]\\[?|\\[/)\n\t\tvar cursor = data\n\t\tif (key.indexOf(\"[\") > -1) levels.pop()\n\t\tfor (var j = 0; j < levels.length; j++) {\n\t\t\tvar level = levels[j], nextLevel = levels[j + 1]\n\t\t\tvar isNumber = nextLevel == \"\" || !isNaN(parseInt(nextLevel, 10))\n\t\t\tif (level === \"\") {\n\t\t\t\tvar key = levels.slice(0, j).join()\n\t\t\t\tif (counters[key] == null) {\n\t\t\t\t\tcounters[key] = Array.isArray(cursor) ? cursor.length : 0\n\t\t\t\t}\n\t\t\t\tlevel = counters[key]++\n\t\t\t}\n\t\t\t// Disallow direct prototype pollution\n\t\t\telse if (level === \"__proto__\") break\n\t\t\tif (j === levels.length - 1) cursor[level] = value\n\t\t\telse {\n\t\t\t\t// Read own properties exclusively to disallow indirect\n\t\t\t\t// prototype pollution\n\t\t\t\tvar desc = Object.getOwnPropertyDescriptor(cursor, level)\n\t\t\t\tif (desc != null) desc = desc.value\n\t\t\t\tif (desc == null) cursor[level] = desc = isNumber ? [] : {}\n\t\t\t\tcursor = desc\n\t\t\t}\n\t\t}\n\t}\n\treturn data\n}\n","\"use strict\"\n\nmodule.exports = require(\"./render/render\")(window)\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar hyperscriptVnode = require(\"./hyperscriptVnode\")\n\nmodule.exports = function() {\n\tvar vnode = hyperscriptVnode.apply(0, arguments)\n\n\tvnode.tag = \"[\"\n\tvnode.children = Vnode.normalizeChildren(vnode.children)\n\treturn vnode\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar hyperscriptVnode = require(\"./hyperscriptVnode\")\n\nvar selectorParser = /(?:(^|#|\\.)([^#\\.\\[\\]]+))|(\\[(.+?)(?:\\s*=\\s*(\"|'|)((?:\\\\[\"'\\]]|.)*?)\\5)?\\])/g\nvar selectorCache = {}\nvar hasOwn = {}.hasOwnProperty\n\nfunction isEmpty(object) {\n\tfor (var key in object) if (hasOwn.call(object, key)) return false\n\treturn true\n}\n\nfunction compileSelector(selector) {\n\tvar match, tag = \"div\", classes = [], attrs = {}\n\twhile (match = selectorParser.exec(selector)) {\n\t\tvar type = match[1], value = match[2]\n\t\tif (type === \"\" && value !== \"\") tag = value\n\t\telse if (type === \"#\") attrs.id = value\n\t\telse if (type === \".\") classes.push(value)\n\t\telse if (match[3][0] === \"[\") {\n\t\t\tvar attrValue = match[6]\n\t\t\tif (attrValue) attrValue = attrValue.replace(/\\\\([\"'])/g, \"$1\").replace(/\\\\\\\\/g, \"\\\\\")\n\t\t\tif (match[4] === \"class\") classes.push(attrValue)\n\t\t\telse attrs[match[4]] = attrValue === \"\" ? attrValue : attrValue || true\n\t\t}\n\t}\n\tif (classes.length > 0) attrs.className = classes.join(\" \")\n\treturn selectorCache[selector] = {tag: tag, attrs: attrs}\n}\n\nfunction execSelector(state, vnode) {\n\tvar attrs = vnode.attrs\n\tvar children = Vnode.normalizeChildren(vnode.children)\n\tvar hasClass = hasOwn.call(attrs, \"class\")\n\tvar className = hasClass ? attrs.class : attrs.className\n\n\tvnode.tag = state.tag\n\tvnode.attrs = null\n\tvnode.children = undefined\n\n\tif (!isEmpty(state.attrs) && !isEmpty(attrs)) {\n\t\tvar newAttrs = {}\n\n\t\tfor (var key in attrs) {\n\t\t\tif (hasOwn.call(attrs, key)) newAttrs[key] = attrs[key]\n\t\t}\n\n\t\tattrs = newAttrs\n\t}\n\n\tfor (var key in state.attrs) {\n\t\tif (hasOwn.call(state.attrs, key) && key !== \"className\" && !hasOwn.call(attrs, key)){\n\t\t\tattrs[key] = state.attrs[key]\n\t\t}\n\t}\n\tif (className != null || state.attrs.className != null) attrs.className =\n\t\tclassName != null\n\t\t\t? state.attrs.className != null\n\t\t\t\t? String(state.attrs.className) + \" \" + String(className)\n\t\t\t\t: className\n\t\t\t: state.attrs.className != null\n\t\t\t\t? state.attrs.className\n\t\t\t\t: null\n\n\tif (hasClass) attrs.class = null\n\n\tfor (var key in attrs) {\n\t\tif (hasOwn.call(attrs, key) && key !== \"key\") {\n\t\t\tvnode.attrs = attrs\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif (Array.isArray(children) && children.length === 1 && children[0] != null && children[0].tag === \"#\") {\n\t\tvnode.text = children[0].children\n\t} else {\n\t\tvnode.children = children\n\t}\n\n\treturn vnode\n}\n\nfunction hyperscript(selector) {\n\tif (selector == null || typeof selector !== \"string\" && typeof selector !== \"function\" && typeof selector.view !== \"function\") {\n\t\tthrow Error(\"The selector must be either a string or a component.\");\n\t}\n\n\tvar vnode = hyperscriptVnode.apply(1, arguments)\n\n\tif (typeof selector === \"string\") {\n\t\tvnode.children = Vnode.normalizeChildren(vnode.children)\n\t\tif (selector !== \"[\") return execSelector(selectorCache[selector] || compileSelector(selector), vnode)\n\t}\n\n\tvnode.tag = selector\n\treturn vnode\n}\n\nmodule.exports = hyperscript\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\n// Call via `hyperscriptVnode.apply(startOffset, arguments)`\n//\n// The reason I do it this way, forwarding the arguments and passing the start\n// offset in `this`, is so I don't have to create a temporary array in a\n// performance-critical path.\n//\n// In native ES6, I'd instead add a final `...args` parameter to the\n// `hyperscript` and `fragment` factories and define this as\n// `hyperscriptVnode(...args)`, since modern engines do optimize that away. But\n// ES5 (what Mithril requires thanks to IE support) doesn't give me that luxury,\n// and engines aren't nearly intelligent enough to do either of these:\n//\n// 1. Elide the allocation for `[].slice.call(arguments, 1)` when it's passed to\n//    another function only to be indexed.\n// 2. Elide an `arguments` allocation when it's passed to any function other\n//    than `Function.prototype.apply` or `Reflect.apply`.\n//\n// In ES6, it'd probably look closer to this (I'd need to profile it, though):\n// module.exports = function(attrs, ...children) {\n//     if (attrs == null || typeof attrs === \"object\" && attrs.tag == null && !Array.isArray(attrs)) {\n//         if (children.length === 1 && Array.isArray(children[0])) children = children[0]\n//     } else {\n//         children = children.length === 0 && Array.isArray(attrs) ? attrs : [attrs, ...children]\n//         attrs = undefined\n//     }\n//\n//     if (attrs == null) attrs = {}\n//     return Vnode(\"\", attrs.key, attrs, children)\n// }\nmodule.exports = function() {\n\tvar attrs = arguments[this], start = this + 1, children\n\n\tif (attrs == null) {\n\t\tattrs = {}\n\t} else if (typeof attrs !== \"object\" || attrs.tag != null || Array.isArray(attrs)) {\n\t\tattrs = {}\n\t\tstart = this\n\t}\n\n\tif (arguments.length === start + 1) {\n\t\tchildren = arguments[start]\n\t\tif (!Array.isArray(children)) children = [children]\n\t} else {\n\t\tchildren = []\n\t\twhile (start < arguments.length) children.push(arguments[start++])\n\t}\n\n\treturn Vnode(\"\", attrs.key, attrs, children)\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function($window) {\n\tvar $doc = $window && $window.document\n\tvar currentRedraw\n\n\tvar nameSpace = {\n\t\tsvg: \"http://www.w3.org/2000/svg\",\n\t\tmath: \"http://www.w3.org/1998/Math/MathML\"\n\t}\n\n\tfunction getNameSpace(vnode) {\n\t\treturn vnode.attrs && vnode.attrs.xmlns || nameSpace[vnode.tag]\n\t}\n\n\t//sanity check to discourage people from doing `vnode.state = ...`\n\tfunction checkState(vnode, original) {\n\t\tif (vnode.state !== original) throw new Error(\"`vnode.state` must not be modified\")\n\t}\n\n\t//Note: the hook is passed as the `this` argument to allow proxying the\n\t//arguments without requiring a full array allocation to do so. It also\n\t//takes advantage of the fact the current `vnode` is the first argument in\n\t//all lifecycle methods.\n\tfunction callHook(vnode) {\n\t\tvar original = vnode.state\n\t\ttry {\n\t\t\treturn this.apply(original, arguments)\n\t\t} finally {\n\t\t\tcheckState(vnode, original)\n\t\t}\n\t}\n\n\t// IE11 (at least) throws an UnspecifiedError when accessing document.activeElement when\n\t// inside an iframe. Catch and swallow this error, and heavy-handidly return null.\n\tfunction activeElement() {\n\t\ttry {\n\t\t\treturn $doc.activeElement\n\t\t} catch (e) {\n\t\t\treturn null\n\t\t}\n\t}\n\t//create\n\tfunction createNodes(parent, vnodes, start, end, hooks, nextSibling, ns) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) {\n\t\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t}\n\tfunction createNode(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tif (typeof tag === \"string\") {\n\t\t\tvnode.state = {}\n\t\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\t\tswitch (tag) {\n\t\t\t\tcase \"#\": createText(parent, vnode, nextSibling); break\n\t\t\t\tcase \"<\": createHTML(parent, vnode, ns, nextSibling); break\n\t\t\t\tcase \"[\": createFragment(parent, vnode, hooks, ns, nextSibling); break\n\t\t\t\tdefault: createElement(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t\telse createComponent(parent, vnode, hooks, ns, nextSibling)\n\t}\n\tfunction createText(parent, vnode, nextSibling) {\n\t\tvnode.dom = $doc.createTextNode(vnode.children)\n\t\tinsertNode(parent, vnode.dom, nextSibling)\n\t}\n\tvar possibleParents = {caption: \"table\", thead: \"table\", tbody: \"table\", tfoot: \"table\", tr: \"tbody\", th: \"tr\", td: \"tr\", colgroup: \"table\", col: \"colgroup\"}\n\tfunction createHTML(parent, vnode, ns, nextSibling) {\n\t\tvar match = vnode.children.match(/^\\s*?<(\\w+)/im) || []\n\t\t// not using the proper parent makes the child element(s) vanish.\n\t\t//     var div = document.createElement(\"div\")\n\t\t//     div.innerHTML = \"<td>i</td><td>j</td>\"\n\t\t//     console.log(div.innerHTML)\n\t\t// --> \"ij\", no <td> in sight.\n\t\tvar temp = $doc.createElement(possibleParents[match[1]] || \"div\")\n\t\tif (ns === \"http://www.w3.org/2000/svg\") {\n\t\t\ttemp.innerHTML = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\" + vnode.children + \"</svg>\"\n\t\t\ttemp = temp.firstChild\n\t\t} else {\n\t\t\ttemp.innerHTML = vnode.children\n\t\t}\n\t\tvnode.dom = temp.firstChild\n\t\tvnode.domSize = temp.childNodes.length\n\t\t// Capture nodes to remove, so we don't confuse them.\n\t\tvnode.instance = []\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tvar child\n\t\twhile (child = temp.firstChild) {\n\t\t\tvnode.instance.push(child)\n\t\t\tfragment.appendChild(child)\n\t\t}\n\t\tinsertNode(parent, fragment, nextSibling)\n\t}\n\tfunction createFragment(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tif (vnode.children != null) {\n\t\t\tvar children = vnode.children\n\t\t\tcreateNodes(fragment, children, 0, children.length, hooks, null, ns)\n\t\t}\n\t\tvnode.dom = fragment.firstChild\n\t\tvnode.domSize = fragment.childNodes.length\n\t\tinsertNode(parent, fragment, nextSibling)\n\t}\n\tfunction createElement(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tvar attrs = vnode.attrs\n\t\tvar is = attrs && attrs.is\n\n\t\tns = getNameSpace(vnode) || ns\n\n\t\tvar element = ns ?\n\t\t\tis ? $doc.createElementNS(ns, tag, {is: is}) : $doc.createElementNS(ns, tag) :\n\t\t\tis ? $doc.createElement(tag, {is: is}) : $doc.createElement(tag)\n\t\tvnode.dom = element\n\n\t\tif (attrs != null) {\n\t\t\tsetAttrs(vnode, attrs, ns)\n\t\t}\n\n\t\tinsertNode(parent, element, nextSibling)\n\n\t\tif (!maybeSetContentEditable(vnode)) {\n\t\t\tif (vnode.text != null) {\n\t\t\t\tif (vnode.text !== \"\") element.textContent = vnode.text\n\t\t\t\telse vnode.children = [Vnode(\"#\", undefined, undefined, vnode.text, undefined, undefined)]\n\t\t\t}\n\t\t\tif (vnode.children != null) {\n\t\t\t\tvar children = vnode.children\n\t\t\t\tcreateNodes(element, children, 0, children.length, hooks, null, ns)\n\t\t\t\tif (vnode.tag === \"select\" && attrs != null) setLateSelectAttrs(vnode, attrs)\n\t\t\t}\n\t\t}\n\t}\n\tfunction initComponent(vnode, hooks) {\n\t\tvar sentinel\n\t\tif (typeof vnode.tag.view === \"function\") {\n\t\t\tvnode.state = Object.create(vnode.tag)\n\t\t\tsentinel = vnode.state.view\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t} else {\n\t\t\tvnode.state = void 0\n\t\t\tsentinel = vnode.tag\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t\tvnode.state = (vnode.tag.prototype != null && typeof vnode.tag.prototype.view === \"function\") ? new vnode.tag(vnode) : vnode.tag(vnode)\n\t\t}\n\t\tinitLifecycle(vnode.state, vnode, hooks)\n\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\tvnode.instance = Vnode.normalize(callHook.call(vnode.state.view, vnode))\n\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\tsentinel.$$reentrantLock$$ = null\n\t}\n\tfunction createComponent(parent, vnode, hooks, ns, nextSibling) {\n\t\tinitComponent(vnode, hooks)\n\t\tif (vnode.instance != null) {\n\t\t\tcreateNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.dom != null ? vnode.instance.domSize : 0\n\t\t}\n\t\telse {\n\t\t\tvnode.domSize = 0\n\t\t}\n\t}\n\n\t//update\n\t/**\n\t * @param {Element|Fragment} parent - the parent element\n\t * @param {Vnode[] | null} old - the list of vnodes of the last `render()` call for\n\t *                               this part of the tree\n\t * @param {Vnode[] | null} vnodes - as above, but for the current `render()` call.\n\t * @param {Function[]} hooks - an accumulator of post-render hooks (oncreate/onupdate)\n\t * @param {Element | null} nextSibling - the next DOM node if we're dealing with a\n\t *                                       fragment that is not the last item in its\n\t *                                       parent\n\t * @param {'svg' | 'math' | String | null} ns) - the current XML namespace, if any\n\t * @returns void\n\t */\n\t// This function diffs and patches lists of vnodes, both keyed and unkeyed.\n\t//\n\t// We will:\n\t//\n\t// 1. describe its general structure\n\t// 2. focus on the diff algorithm optimizations\n\t// 3. discuss DOM node operations.\n\n\t// ## Overview:\n\t//\n\t// The updateNodes() function:\n\t// - deals with trivial cases\n\t// - determines whether the lists are keyed or unkeyed based on the first non-null node\n\t//   of each list.\n\t// - diffs them and patches the DOM if needed (that's the brunt of the code)\n\t// - manages the leftovers: after diffing, are there:\n\t//   - old nodes left to remove?\n\t// \t - new nodes to insert?\n\t// \t deal with them!\n\t//\n\t// The lists are only iterated over once, with an exception for the nodes in `old` that\n\t// are visited in the fourth part of the diff and in the `removeNodes` loop.\n\n\t// ## Diffing\n\t//\n\t// Reading https://github.com/localvoid/ivi/blob/ddc09d06abaef45248e6133f7040d00d3c6be853/packages/ivi/src/vdom/implementation.ts#L617-L837\n\t// may be good for context on longest increasing subsequence-based logic for moving nodes.\n\t//\n\t// In order to diff keyed lists, one has to\n\t//\n\t// 1) match nodes in both lists, per key, and update them accordingly\n\t// 2) create the nodes present in the new list, but absent in the old one\n\t// 3) remove the nodes present in the old list, but absent in the new one\n\t// 4) figure out what nodes in 1) to move in order to minimize the DOM operations.\n\t//\n\t// To achieve 1) one can create a dictionary of keys => index (for the old list), then iterate\n\t// over the new list and for each new vnode, find the corresponding vnode in the old list using\n\t// the map.\n\t// 2) is achieved in the same step: if a new node has no corresponding entry in the map, it is new\n\t// and must be created.\n\t// For the removals, we actually remove the nodes that have been updated from the old list.\n\t// The nodes that remain in that list after 1) and 2) have been performed can be safely removed.\n\t// The fourth step is a bit more complex and relies on the longest increasing subsequence (LIS)\n\t// algorithm.\n\t//\n\t// the longest increasing subsequence is the list of nodes that can remain in place. Imagine going\n\t// from `1,2,3,4,5` to `4,5,1,2,3` where the numbers are not necessarily the keys, but the indices\n\t// corresponding to the keyed nodes in the old list (keyed nodes `e,d,c,b,a` => `b,a,e,d,c` would\n\t//  match the above lists, for example).\n\t//\n\t// In there are two increasing subsequences: `4,5` and `1,2,3`, the latter being the longest. We\n\t// can update those nodes without moving them, and only call `insertNode` on `4` and `5`.\n\t//\n\t// @localvoid adapted the algo to also support node deletions and insertions (the `lis` is actually\n\t// the longest increasing subsequence *of old nodes still present in the new list*).\n\t//\n\t// It is a general algorithm that is fireproof in all circumstances, but it requires the allocation\n\t// and the construction of a `key => oldIndex` map, and three arrays (one with `newIndex => oldIndex`,\n\t// the `LIS` and a temporary one to create the LIS).\n\t//\n\t// So we cheat where we can: if the tails of the lists are identical, they are guaranteed to be part of\n\t// the LIS and can be updated without moving them.\n\t//\n\t// If two nodes are swapped, they are guaranteed not to be part of the LIS, and must be moved (with\n\t// the exception of the last node if the list is fully reversed).\n\t//\n\t// ## Finding the next sibling.\n\t//\n\t// `updateNode()` and `createNode()` expect a nextSibling parameter to perform DOM operations.\n\t// When the list is being traversed top-down, at any index, the DOM nodes up to the previous\n\t// vnode reflect the content of the new list, whereas the rest of the DOM nodes reflect the old\n\t// list. The next sibling must be looked for in the old list using `getNextSibling(... oldStart + 1 ...)`.\n\t//\n\t// In the other scenarios (swaps, upwards traversal, map-based diff),\n\t// the new vnodes list is traversed upwards. The DOM nodes at the bottom of the list reflect the\n\t// bottom part of the new vnodes list, and we can use the `v.dom`  value of the previous node\n\t// as the next sibling (cached in the `nextSibling` variable).\n\n\n\t// ## DOM node moves\n\t//\n\t// In most scenarios `updateNode()` and `createNode()` perform the DOM operations. However,\n\t// this is not the case if the node moved (second and fourth part of the diff algo). We move\n\t// the old DOM nodes before updateNode runs because it enables us to use the cached `nextSibling`\n\t// variable rather than fetching it using `getNextSibling()`.\n\t//\n\t// The fourth part of the diff currently inserts nodes unconditionally, leading to issues\n\t// like #1791 and #1999. We need to be smarter about those situations where adjascent old\n\t// nodes remain together in the new list in a way that isn't covered by parts one and\n\t// three of the diff algo.\n\n\tfunction updateNodes(parent, old, vnodes, hooks, nextSibling, ns) {\n\t\tif (old === vnodes || old == null && vnodes == null) return\n\t\telse if (old == null || old.length === 0) createNodes(parent, vnodes, 0, vnodes.length, hooks, nextSibling, ns)\n\t\telse if (vnodes == null || vnodes.length === 0) removeNodes(parent, old, 0, old.length)\n\t\telse {\n\t\t\tvar isOldKeyed = old[0] != null && old[0].key != null\n\t\t\tvar isKeyed = vnodes[0] != null && vnodes[0].key != null\n\t\t\tvar start = 0, oldStart = 0\n\t\t\tif (!isOldKeyed) while (oldStart < old.length && old[oldStart] == null) oldStart++\n\t\t\tif (!isKeyed) while (start < vnodes.length && vnodes[start] == null) start++\n\t\t\tif (isKeyed === null && isOldKeyed == null) return // both lists are full of nulls\n\t\t\tif (isOldKeyed !== isKeyed) {\n\t\t\t\tremoveNodes(parent, old, oldStart, old.length)\n\t\t\t\tcreateNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns)\n\t\t\t} else if (!isKeyed) {\n\t\t\t\t// Don't index past the end of either list (causes deopts).\n\t\t\t\tvar commonLength = old.length < vnodes.length ? old.length : vnodes.length\n\t\t\t\t// Rewind if necessary to the first non-null index on either side.\n\t\t\t\t// We could alternatively either explicitly create or remove nodes when `start !== oldStart`\n\t\t\t\t// but that would be optimizing for sparse lists which are more rare than dense ones.\n\t\t\t\tstart = start < oldStart ? start : oldStart\n\t\t\t\tfor (; start < commonLength; start++) {\n\t\t\t\t\to = old[start]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t\tif (o === v || o == null && v == null) continue\n\t\t\t\t\telse if (o == null) createNode(parent, v, hooks, ns, getNextSibling(old, start + 1, nextSibling))\n\t\t\t\t\telse if (v == null) removeNode(parent, o)\n\t\t\t\t\telse updateNode(parent, o, v, hooks, getNextSibling(old, start + 1, nextSibling), ns)\n\t\t\t\t}\n\t\t\t\tif (old.length > commonLength) removeNodes(parent, old, start, old.length)\n\t\t\t\tif (vnodes.length > commonLength) createNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns)\n\t\t\t} else {\n\t\t\t\t// keyed diff\n\t\t\t\tvar oldEnd = old.length - 1, end = vnodes.length - 1, map, o, v, oe, ve, topSibling\n\n\t\t\t\t// bottom-up\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t\tif (oe.key !== ve.key) break\n\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldEnd--, end--\n\t\t\t\t}\n\t\t\t\t// top-down\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\to = old[oldStart]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t\tif (o.key !== v.key) break\n\t\t\t\t\toldStart++, start++\n\t\t\t\t\tif (o !== v) updateNode(parent, o, v, hooks, getNextSibling(old, oldStart, nextSibling), ns)\n\t\t\t\t}\n\t\t\t\t// swaps and list reversals\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\tif (start === end) break\n\t\t\t\t\tif (o.key !== ve.key || oe.key !== v.key) break\n\t\t\t\t\ttopSibling = getNextSibling(old, oldStart, nextSibling)\n\t\t\t\t\tmoveNodes(parent, oe, topSibling)\n\t\t\t\t\tif (oe !== v) updateNode(parent, oe, v, hooks, topSibling, ns)\n\t\t\t\t\tif (++start <= --end) moveNodes(parent, o, nextSibling)\n\t\t\t\t\tif (o !== ve) updateNode(parent, o, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldStart++; oldEnd--\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t\to = old[oldStart]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t}\n\t\t\t\t// bottom up once again\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\tif (oe.key !== ve.key) break\n\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldEnd--, end--\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t}\n\t\t\t\tif (start > end) removeNodes(parent, old, oldStart, oldEnd + 1)\n\t\t\t\telse if (oldStart > oldEnd) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)\n\t\t\t\telse {\n\t\t\t\t\t// inspired by ivi https://github.com/ivijs/ivi/ by Boris Kaul\n\t\t\t\t\tvar originalNextSibling = nextSibling, vnodesLength = end - start + 1, oldIndices = new Array(vnodesLength), li=0, i=0, pos = 2147483647, matched = 0, map, lisIndices\n\t\t\t\t\tfor (i = 0; i < vnodesLength; i++) oldIndices[i] = -1\n\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\tif (map == null) map = getKeyMap(old, oldStart, oldEnd + 1)\n\t\t\t\t\t\tve = vnodes[i]\n\t\t\t\t\t\tvar oldIndex = map[ve.key]\n\t\t\t\t\t\tif (oldIndex != null) {\n\t\t\t\t\t\t\tpos = (oldIndex < pos) ? oldIndex : -1 // becomes -1 if nodes were re-ordered\n\t\t\t\t\t\t\toldIndices[i-start] = oldIndex\n\t\t\t\t\t\t\toe = old[oldIndex]\n\t\t\t\t\t\t\told[oldIndex] = null\n\t\t\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\t\t\tmatched++\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tnextSibling = originalNextSibling\n\t\t\t\t\tif (matched !== oldEnd - oldStart + 1) removeNodes(parent, old, oldStart, oldEnd + 1)\n\t\t\t\t\tif (matched === 0) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (pos === -1) {\n\t\t\t\t\t\t\t// the indices of the indices of the items that are part of the\n\t\t\t\t\t\t\t// longest increasing subsequence in the oldIndices list\n\t\t\t\t\t\t\tlisIndices = makeLisIndices(oldIndices)\n\t\t\t\t\t\t\tli = lisIndices.length - 1\n\t\t\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\t\t\tv = vnodes[i]\n\t\t\t\t\t\t\t\tif (oldIndices[i-start] === -1) createNode(parent, v, hooks, ns, nextSibling)\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tif (lisIndices[li] === i - start) li--\n\t\t\t\t\t\t\t\t\telse moveNodes(parent, v, nextSibling)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (v.dom != null) nextSibling = vnodes[i].dom\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\t\t\tv = vnodes[i]\n\t\t\t\t\t\t\t\tif (oldIndices[i-start] === -1) createNode(parent, v, hooks, ns, nextSibling)\n\t\t\t\t\t\t\t\tif (v.dom != null) nextSibling = vnodes[i].dom\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction updateNode(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tvar oldTag = old.tag, tag = vnode.tag\n\t\tif (oldTag === tag) {\n\t\t\tvnode.state = old.state\n\t\t\tvnode.events = old.events\n\t\t\tif (shouldNotUpdate(vnode, old)) return\n\t\t\tif (typeof oldTag === \"string\") {\n\t\t\t\tif (vnode.attrs != null) {\n\t\t\t\t\tupdateLifecycle(vnode.attrs, vnode, hooks)\n\t\t\t\t}\n\t\t\t\tswitch (oldTag) {\n\t\t\t\t\tcase \"#\": updateText(old, vnode); break\n\t\t\t\t\tcase \"<\": updateHTML(parent, old, vnode, ns, nextSibling); break\n\t\t\t\t\tcase \"[\": updateFragment(parent, old, vnode, hooks, nextSibling, ns); break\n\t\t\t\t\tdefault: updateElement(old, vnode, hooks, ns)\n\t\t\t\t}\n\t\t\t}\n\t\t\telse updateComponent(parent, old, vnode, hooks, nextSibling, ns)\n\t\t}\n\t\telse {\n\t\t\tremoveNode(parent, old)\n\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t}\n\t}\n\tfunction updateText(old, vnode) {\n\t\tif (old.children.toString() !== vnode.children.toString()) {\n\t\t\told.dom.nodeValue = vnode.children\n\t\t}\n\t\tvnode.dom = old.dom\n\t}\n\tfunction updateHTML(parent, old, vnode, ns, nextSibling) {\n\t\tif (old.children !== vnode.children) {\n\t\t\tremoveHTML(parent, old)\n\t\t\tcreateHTML(parent, vnode, ns, nextSibling)\n\t\t}\n\t\telse {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t\tvnode.instance = old.instance\n\t\t}\n\t}\n\tfunction updateFragment(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tupdateNodes(parent, old.children, vnode.children, hooks, nextSibling, ns)\n\t\tvar domSize = 0, children = vnode.children\n\t\tvnode.dom = null\n\t\tif (children != null) {\n\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\tvar child = children[i]\n\t\t\t\tif (child != null && child.dom != null) {\n\t\t\t\t\tif (vnode.dom == null) vnode.dom = child.dom\n\t\t\t\t\tdomSize += child.domSize || 1\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (domSize !== 1) vnode.domSize = domSize\n\t\t}\n\t}\n\tfunction updateElement(old, vnode, hooks, ns) {\n\t\tvar element = vnode.dom = old.dom\n\t\tns = getNameSpace(vnode) || ns\n\n\t\tif (vnode.tag === \"textarea\") {\n\t\t\tif (vnode.attrs == null) vnode.attrs = {}\n\t\t\tif (vnode.text != null) {\n\t\t\t\tvnode.attrs.value = vnode.text //FIXME handle multiple children\n\t\t\t\tvnode.text = undefined\n\t\t\t}\n\t\t}\n\t\tupdateAttrs(vnode, old.attrs, vnode.attrs, ns)\n\t\tif (!maybeSetContentEditable(vnode)) {\n\t\t\tif (old.text != null && vnode.text != null && vnode.text !== \"\") {\n\t\t\t\tif (old.text.toString() !== vnode.text.toString()) old.dom.firstChild.nodeValue = vnode.text\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (old.text != null) old.children = [Vnode(\"#\", undefined, undefined, old.text, undefined, old.dom.firstChild)]\n\t\t\t\tif (vnode.text != null) vnode.children = [Vnode(\"#\", undefined, undefined, vnode.text, undefined, undefined)]\n\t\t\t\tupdateNodes(element, old.children, vnode.children, hooks, null, ns)\n\t\t\t}\n\t\t}\n\t}\n\tfunction updateComponent(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tvnode.instance = Vnode.normalize(callHook.call(vnode.state.view, vnode))\n\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\tupdateLifecycle(vnode.state, vnode, hooks)\n\t\tif (vnode.attrs != null) updateLifecycle(vnode.attrs, vnode, hooks)\n\t\tif (vnode.instance != null) {\n\t\t\tif (old.instance == null) createNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\telse updateNode(parent, old.instance, vnode.instance, hooks, nextSibling, ns)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.instance.domSize\n\t\t}\n\t\telse if (old.instance != null) {\n\t\t\tremoveNode(parent, old.instance)\n\t\t\tvnode.dom = undefined\n\t\t\tvnode.domSize = 0\n\t\t}\n\t\telse {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t}\n\t}\n\tfunction getKeyMap(vnodes, start, end) {\n\t\tvar map = Object.create(null)\n\t\tfor (; start < end; start++) {\n\t\t\tvar vnode = vnodes[start]\n\t\t\tif (vnode != null) {\n\t\t\t\tvar key = vnode.key\n\t\t\t\tif (key != null) map[key] = start\n\t\t\t}\n\t\t}\n\t\treturn map\n\t}\n\t// Lifted from ivi https://github.com/ivijs/ivi/\n\t// takes a list of unique numbers (-1 is special and can\n\t// occur multiple times) and returns an array with the indices\n\t// of the items that are part of the longest increasing\n\t// subsequece\n\tvar lisTemp = []\n\tfunction makeLisIndices(a) {\n\t\tvar result = [0]\n\t\tvar u = 0, v = 0, i = 0\n\t\tvar il = lisTemp.length = a.length\n\t\tfor (var i = 0; i < il; i++) lisTemp[i] = a[i]\n\t\tfor (var i = 0; i < il; ++i) {\n\t\t\tif (a[i] === -1) continue\n\t\t\tvar j = result[result.length - 1]\n\t\t\tif (a[j] < a[i]) {\n\t\t\t\tlisTemp[i] = j\n\t\t\t\tresult.push(i)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tu = 0\n\t\t\tv = result.length - 1\n\t\t\twhile (u < v) {\n\t\t\t\t// Fast integer average without overflow.\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tvar c = (u >>> 1) + (v >>> 1) + (u & v & 1)\n\t\t\t\tif (a[result[c]] < a[i]) {\n\t\t\t\t\tu = c + 1\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tv = c\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (a[i] < a[result[u]]) {\n\t\t\t\tif (u > 0) lisTemp[i] = result[u - 1]\n\t\t\t\tresult[u] = i\n\t\t\t}\n\t\t}\n\t\tu = result.length\n\t\tv = result[u - 1]\n\t\twhile (u-- > 0) {\n\t\t\tresult[u] = v\n\t\t\tv = lisTemp[v]\n\t\t}\n\t\tlisTemp.length = 0\n\t\treturn result\n\t}\n\n\tfunction getNextSibling(vnodes, i, nextSibling) {\n\t\tfor (; i < vnodes.length; i++) {\n\t\t\tif (vnodes[i] != null && vnodes[i].dom != null) return vnodes[i].dom\n\t\t}\n\t\treturn nextSibling\n\t}\n\n\t// This covers a really specific edge case:\n\t// - Parent node is keyed and contains child\n\t// - Child is removed, returns unresolved promise in `onbeforeremove`\n\t// - Parent node is moved in keyed diff\n\t// - Remaining children still need moved appropriately\n\t//\n\t// Ideally, I'd track removed nodes as well, but that introduces a lot more\n\t// complexity and I'm not exactly interested in doing that.\n\tfunction moveNodes(parent, vnode, nextSibling) {\n\t\tvar frag = $doc.createDocumentFragment()\n\t\tmoveChildToFrag(parent, frag, vnode)\n\t\tinsertNode(parent, frag, nextSibling)\n\t}\n\tfunction moveChildToFrag(parent, frag, vnode) {\n\t\t// Dodge the recursion overhead in a few of the most common cases.\n\t\twhile (vnode.dom != null && vnode.dom.parentNode === parent) {\n\t\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\t\tvnode = vnode.instance\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else if (vnode.tag === \"<\") {\n\t\t\t\tfor (var i = 0; i < vnode.instance.length; i++) {\n\t\t\t\t\tfrag.appendChild(vnode.instance[i])\n\t\t\t\t}\n\t\t\t} else if (vnode.tag !== \"[\") {\n\t\t\t\t// Don't recurse for text nodes *or* elements, just fragments\n\t\t\t\tfrag.appendChild(vnode.dom)\n\t\t\t} else if (vnode.children.length === 1) {\n\t\t\t\tvnode = vnode.children[0]\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else {\n\t\t\t\tfor (var i = 0; i < vnode.children.length; i++) {\n\t\t\t\t\tvar child = vnode.children[i]\n\t\t\t\t\tif (child != null) moveChildToFrag(parent, frag, child)\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\n\tfunction insertNode(parent, dom, nextSibling) {\n\t\tif (nextSibling != null) parent.insertBefore(dom, nextSibling)\n\t\telse parent.appendChild(dom)\n\t}\n\n\tfunction maybeSetContentEditable(vnode) {\n\t\tif (vnode.attrs == null || (\n\t\t\tvnode.attrs.contenteditable == null && // attribute\n\t\t\tvnode.attrs.contentEditable == null // property\n\t\t)) return false\n\t\tvar children = vnode.children\n\t\tif (children != null && children.length === 1 && children[0].tag === \"<\") {\n\t\t\tvar content = children[0].children\n\t\t\tif (vnode.dom.innerHTML !== content) vnode.dom.innerHTML = content\n\t\t}\n\t\telse if (vnode.text != null || children != null && children.length !== 0) throw new Error(\"Child node of a contenteditable must be trusted\")\n\t\treturn true\n\t}\n\n\t//remove\n\tfunction removeNodes(parent, vnodes, start, end) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) removeNode(parent, vnode)\n\t\t}\n\t}\n\tfunction removeNode(parent, vnode) {\n\t\tvar mask = 0\n\t\tvar original = vnode.state\n\t\tvar stateResult, attrsResult\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onbeforeremove === \"function\") {\n\t\t\tvar result = callHook.call(vnode.state.onbeforeremove, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\tmask = 1\n\t\t\t\tstateResult = result\n\t\t\t}\n\t\t}\n\t\tif (vnode.attrs && typeof vnode.attrs.onbeforeremove === \"function\") {\n\t\t\tvar result = callHook.call(vnode.attrs.onbeforeremove, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tmask |= 2\n\t\t\t\tattrsResult = result\n\t\t\t}\n\t\t}\n\t\tcheckState(vnode, original)\n\n\t\t// If we can, try to fast-path it and avoid all the overhead of awaiting\n\t\tif (!mask) {\n\t\t\tonremove(vnode)\n\t\t\tremoveChild(parent, vnode)\n\t\t} else {\n\t\t\tif (stateResult != null) {\n\t\t\t\tvar next = function () {\n\t\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\t\tif (mask & 1) { mask &= 2; if (!mask) reallyRemove() }\n\t\t\t\t}\n\t\t\t\tstateResult.then(next, next)\n\t\t\t}\n\t\t\tif (attrsResult != null) {\n\t\t\t\tvar next = function () {\n\t\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\t\tif (mask & 2) { mask &= 1; if (!mask) reallyRemove() }\n\t\t\t\t}\n\t\t\t\tattrsResult.then(next, next)\n\t\t\t}\n\t\t}\n\n\t\tfunction reallyRemove() {\n\t\t\tcheckState(vnode, original)\n\t\t\tonremove(vnode)\n\t\t\tremoveChild(parent, vnode)\n\t\t}\n\t}\n\tfunction removeHTML(parent, vnode) {\n\t\tfor (var i = 0; i < vnode.instance.length; i++) {\n\t\t\tparent.removeChild(vnode.instance[i])\n\t\t}\n\t}\n\tfunction removeChild(parent, vnode) {\n\t\t// Dodge the recursion overhead in a few of the most common cases.\n\t\twhile (vnode.dom != null && vnode.dom.parentNode === parent) {\n\t\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\t\tvnode = vnode.instance\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else if (vnode.tag === \"<\") {\n\t\t\t\tremoveHTML(parent, vnode)\n\t\t\t} else {\n\t\t\t\tif (vnode.tag !== \"[\") {\n\t\t\t\t\tparent.removeChild(vnode.dom)\n\t\t\t\t\tif (!Array.isArray(vnode.children)) break\n\t\t\t\t}\n\t\t\t\tif (vnode.children.length === 1) {\n\t\t\t\t\tvnode = vnode.children[0]\n\t\t\t\t\tif (vnode != null) continue\n\t\t\t\t} else {\n\t\t\t\t\tfor (var i = 0; i < vnode.children.length; i++) {\n\t\t\t\t\t\tvar child = vnode.children[i]\n\t\t\t\t\t\tif (child != null) removeChild(parent, child)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\tfunction onremove(vnode) {\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onremove === \"function\") callHook.call(vnode.state.onremove, vnode)\n\t\tif (vnode.attrs && typeof vnode.attrs.onremove === \"function\") callHook.call(vnode.attrs.onremove, vnode)\n\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\tif (vnode.instance != null) onremove(vnode.instance)\n\t\t} else {\n\t\t\tvar children = vnode.children\n\t\t\tif (Array.isArray(children)) {\n\t\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\t\tvar child = children[i]\n\t\t\t\t\tif (child != null) onremove(child)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t//attrs\n\tfunction setAttrs(vnode, attrs, ns) {\n\t\tfor (var key in attrs) {\n\t\t\tsetAttr(vnode, key, null, attrs[key], ns)\n\t\t}\n\t}\n\tfunction setAttr(vnode, key, old, value, ns) {\n\t\tif (key === \"key\" || key === \"is\" || value == null || isLifecycleMethod(key) || (old === value && !isFormAttribute(vnode, key)) && typeof value !== \"object\") return\n\t\tif (key[0] === \"o\" && key[1] === \"n\") return updateEvent(vnode, key, value)\n\t\tif (key.slice(0, 6) === \"xlink:\") vnode.dom.setAttributeNS(\"http://www.w3.org/1999/xlink\", key.slice(6), value)\n\t\telse if (key === \"style\") updateStyle(vnode.dom, old, value)\n\t\telse if (hasPropertyKey(vnode, key, ns)) {\n\t\t\tif (key === \"value\") {\n\t\t\t\t// Only do the coercion if we're actually going to check the value.\n\t\t\t\t/* eslint-disable no-implicit-coercion */\n\t\t\t\t//setting input[value] to same value by typing on focused element moves cursor to end in Chrome\n\t\t\t\tif ((vnode.tag === \"input\" || vnode.tag === \"textarea\") && vnode.dom.value === \"\" + value && vnode.dom === activeElement()) return\n\t\t\t\t//setting select[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\t\tif (vnode.tag === \"select\" && old !== null && vnode.dom.value === \"\" + value) return\n\t\t\t\t//setting option[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\t\tif (vnode.tag === \"option\" && old !== null && vnode.dom.value === \"\" + value) return\n\t\t\t\t/* eslint-enable no-implicit-coercion */\n\t\t\t}\n\t\t\t// If you assign an input type that is not supported by IE 11 with an assignment expression, an error will occur.\n\t\t\tif (vnode.tag === \"input\" && key === \"type\") vnode.dom.setAttribute(key, value)\n\t\t\telse vnode.dom[key] = value\n\t\t} else {\n\t\t\tif (typeof value === \"boolean\") {\n\t\t\t\tif (value) vnode.dom.setAttribute(key, \"\")\n\t\t\t\telse vnode.dom.removeAttribute(key)\n\t\t\t}\n\t\t\telse vnode.dom.setAttribute(key === \"className\" ? \"class\" : key, value)\n\t\t}\n\t}\n\tfunction removeAttr(vnode, key, old, ns) {\n\t\tif (key === \"key\" || key === \"is\" || old == null || isLifecycleMethod(key)) return\n\t\tif (key[0] === \"o\" && key[1] === \"n\" && !isLifecycleMethod(key)) updateEvent(vnode, key, undefined)\n\t\telse if (key === \"style\") updateStyle(vnode.dom, old, null)\n\t\telse if (\n\t\t\thasPropertyKey(vnode, key, ns)\n\t\t\t&& key !== \"className\"\n\t\t\t&& !(key === \"value\" && (\n\t\t\t\tvnode.tag === \"option\"\n\t\t\t\t|| vnode.tag === \"select\" && vnode.dom.selectedIndex === -1 && vnode.dom === activeElement()\n\t\t\t))\n\t\t\t&& !(vnode.tag === \"input\" && key === \"type\")\n\t\t) {\n\t\t\tvnode.dom[key] = null\n\t\t} else {\n\t\t\tvar nsLastIndex = key.indexOf(\":\")\n\t\t\tif (nsLastIndex !== -1) key = key.slice(nsLastIndex + 1)\n\t\t\tif (old !== false) vnode.dom.removeAttribute(key === \"className\" ? \"class\" : key)\n\t\t}\n\t}\n\tfunction setLateSelectAttrs(vnode, attrs) {\n\t\tif (\"value\" in attrs) {\n\t\t\tif(attrs.value === null) {\n\t\t\t\tif (vnode.dom.selectedIndex !== -1) vnode.dom.value = null\n\t\t\t} else {\n\t\t\t\tvar normalized = \"\" + attrs.value // eslint-disable-line no-implicit-coercion\n\t\t\t\tif (vnode.dom.value !== normalized || vnode.dom.selectedIndex === -1) {\n\t\t\t\t\tvnode.dom.value = normalized\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (\"selectedIndex\" in attrs) setAttr(vnode, \"selectedIndex\", null, attrs.selectedIndex, undefined)\n\t}\n\tfunction updateAttrs(vnode, old, attrs, ns) {\n\t\tif (attrs != null) {\n\t\t\tfor (var key in attrs) {\n\t\t\t\tsetAttr(vnode, key, old && old[key], attrs[key], ns)\n\t\t\t}\n\t\t}\n\t\tvar val\n\t\tif (old != null) {\n\t\t\tfor (var key in old) {\n\t\t\t\tif (((val = old[key]) != null) && (attrs == null || attrs[key] == null)) {\n\t\t\t\t\tremoveAttr(vnode, key, val, ns)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction isFormAttribute(vnode, attr) {\n\t\treturn attr === \"value\" || attr === \"checked\" || attr === \"selectedIndex\" || attr === \"selected\" && vnode.dom === activeElement() || vnode.tag === \"option\" && vnode.dom.parentNode === $doc.activeElement\n\t}\n\tfunction isLifecycleMethod(attr) {\n\t\treturn attr === \"oninit\" || attr === \"oncreate\" || attr === \"onupdate\" || attr === \"onremove\" || attr === \"onbeforeremove\" || attr === \"onbeforeupdate\"\n\t}\n\tfunction hasPropertyKey(vnode, key, ns) {\n\t\t// Filter out namespaced keys\n\t\treturn ns === undefined && (\n\t\t\t// If it's a custom element, just keep it.\n\t\t\tvnode.tag.indexOf(\"-\") > -1 || vnode.attrs != null && vnode.attrs.is ||\n\t\t\t// If it's a normal element, let's try to avoid a few browser bugs.\n\t\t\tkey !== \"href\" && key !== \"list\" && key !== \"form\" && key !== \"width\" && key !== \"height\"// && key !== \"type\"\n\t\t\t// Defer the property check until *after* we check everything.\n\t\t) && key in vnode.dom\n\t}\n\n\t//style\n\tvar uppercaseRegex = /[A-Z]/g\n\tfunction toLowerCase(capital) { return \"-\" + capital.toLowerCase() }\n\tfunction normalizeKey(key) {\n\t\treturn key[0] === \"-\" && key[1] === \"-\" ? key :\n\t\t\tkey === \"cssFloat\" ? \"float\" :\n\t\t\t\tkey.replace(uppercaseRegex, toLowerCase)\n\t}\n\tfunction updateStyle(element, old, style) {\n\t\tif (old === style) {\n\t\t\t// Styles are equivalent, do nothing.\n\t\t} else if (style == null) {\n\t\t\t// New style is missing, just clear it.\n\t\t\telement.style.cssText = \"\"\n\t\t} else if (typeof style !== \"object\") {\n\t\t\t// New style is a string, let engine deal with patching.\n\t\t\telement.style.cssText = style\n\t\t} else if (old == null || typeof old !== \"object\") {\n\t\t\t// `old` is missing or a string, `style` is an object.\n\t\t\telement.style.cssText = \"\"\n\t\t\t// Add new style properties\n\t\t\tfor (var key in style) {\n\t\t\t\tvar value = style[key]\n\t\t\t\tif (value != null) element.style.setProperty(normalizeKey(key), String(value))\n\t\t\t}\n\t\t} else {\n\t\t\t// Both old & new are (different) objects.\n\t\t\t// Update style properties that have changed\n\t\t\tfor (var key in style) {\n\t\t\t\tvar value = style[key]\n\t\t\t\tif (value != null && (value = String(value)) !== String(old[key])) {\n\t\t\t\t\telement.style.setProperty(normalizeKey(key), value)\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Remove style properties that no longer exist\n\t\t\tfor (var key in old) {\n\t\t\t\tif (old[key] != null && style[key] == null) {\n\t\t\t\t\telement.style.removeProperty(normalizeKey(key))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Here's an explanation of how this works:\n\t// 1. The event names are always (by design) prefixed by `on`.\n\t// 2. The EventListener interface accepts either a function or an object\n\t//    with a `handleEvent` method.\n\t// 3. The object does not inherit from `Object.prototype`, to avoid\n\t//    any potential interference with that (e.g. setters).\n\t// 4. The event name is remapped to the handler before calling it.\n\t// 5. In function-based event handlers, `ev.target === this`. We replicate\n\t//    that below.\n\t// 6. In function-based event handlers, `return false` prevents the default\n\t//    action and stops event propagation. We replicate that below.\n\tfunction EventDict() {\n\t\t// Save this, so the current redraw is correctly tracked.\n\t\tthis._ = currentRedraw\n\t}\n\tEventDict.prototype = Object.create(null)\n\tEventDict.prototype.handleEvent = function (ev) {\n\t\tvar handler = this[\"on\" + ev.type]\n\t\tvar result\n\t\tif (typeof handler === \"function\") result = handler.call(ev.currentTarget, ev)\n\t\telse if (typeof handler.handleEvent === \"function\") handler.handleEvent(ev)\n\t\tif (this._ && ev.redraw !== false) (0, this._)()\n\t\tif (result === false) {\n\t\t\tev.preventDefault()\n\t\t\tev.stopPropagation()\n\t\t}\n\t}\n\n\t//event\n\tfunction updateEvent(vnode, key, value) {\n\t\tif (vnode.events != null) {\n\t\t\tif (vnode.events[key] === value) return\n\t\t\tif (value != null && (typeof value === \"function\" || typeof value === \"object\")) {\n\t\t\t\tif (vnode.events[key] == null) vnode.dom.addEventListener(key.slice(2), vnode.events, false)\n\t\t\t\tvnode.events[key] = value\n\t\t\t} else {\n\t\t\t\tif (vnode.events[key] != null) vnode.dom.removeEventListener(key.slice(2), vnode.events, false)\n\t\t\t\tvnode.events[key] = undefined\n\t\t\t}\n\t\t} else if (value != null && (typeof value === \"function\" || typeof value === \"object\")) {\n\t\t\tvnode.events = new EventDict()\n\t\t\tvnode.dom.addEventListener(key.slice(2), vnode.events, false)\n\t\t\tvnode.events[key] = value\n\t\t}\n\t}\n\n\t//lifecycle\n\tfunction initLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.oninit === \"function\") callHook.call(source.oninit, vnode)\n\t\tif (typeof source.oncreate === \"function\") hooks.push(callHook.bind(source.oncreate, vnode))\n\t}\n\tfunction updateLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.onupdate === \"function\") hooks.push(callHook.bind(source.onupdate, vnode))\n\t}\n\tfunction shouldNotUpdate(vnode, old) {\n\t\tdo {\n\t\t\tif (vnode.attrs != null && typeof vnode.attrs.onbeforeupdate === \"function\") {\n\t\t\t\tvar force = callHook.call(vnode.attrs.onbeforeupdate, vnode, old)\n\t\t\t\tif (force !== undefined && !force) break\n\t\t\t}\n\t\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onbeforeupdate === \"function\") {\n\t\t\t\tvar force = callHook.call(vnode.state.onbeforeupdate, vnode, old)\n\t\t\t\tif (force !== undefined && !force) break\n\t\t\t}\n\t\t\treturn false\n\t\t} while (false); // eslint-disable-line no-constant-condition\n\t\tvnode.dom = old.dom\n\t\tvnode.domSize = old.domSize\n\t\tvnode.instance = old.instance\n\t\t// One would think having the actual latest attributes would be ideal,\n\t\t// but it doesn't let us properly diff based on our current internal\n\t\t// representation. We have to save not only the old DOM info, but also\n\t\t// the attributes used to create it, as we diff *that*, not against the\n\t\t// DOM directly (with a few exceptions in `setAttr`). And, of course, we\n\t\t// need to save the children and text as they are conceptually not\n\t\t// unlike special \"attributes\" internally.\n\t\tvnode.attrs = old.attrs\n\t\tvnode.children = old.children\n\t\tvnode.text = old.text\n\t\treturn true\n\t}\n\n\treturn function(dom, vnodes, redraw) {\n\t\tif (!dom) throw new TypeError(\"Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.\")\n\t\tvar hooks = []\n\t\tvar active = activeElement()\n\t\tvar namespace = dom.namespaceURI\n\n\t\t// First time rendering into a node clears it out\n\t\tif (dom.vnodes == null) dom.textContent = \"\"\n\n\t\tvnodes = Vnode.normalizeChildren(Array.isArray(vnodes) ? vnodes : [vnodes])\n\t\tvar prevRedraw = currentRedraw\n\t\ttry {\n\t\t\tcurrentRedraw = typeof redraw === \"function\" ? redraw : undefined\n\t\t\tupdateNodes(dom, dom.vnodes, vnodes, hooks, null, namespace === \"http://www.w3.org/1999/xhtml\" ? undefined : namespace)\n\t\t} finally {\n\t\t\tcurrentRedraw = prevRedraw\n\t\t}\n\t\tdom.vnodes = vnodes\n\t\t// `document.activeElement` can return null: https://html.spec.whatwg.org/multipage/interaction.html#dom-document-activeelement\n\t\tif (active != null && activeElement() !== active && typeof active.focus === \"function\") active.focus()\n\t\tfor (var i = 0; i < hooks.length; i++) hooks[i]()\n\t}\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function(html) {\n\tif (html == null) html = \"\"\n\treturn Vnode(\"<\", undefined, undefined, html, undefined, undefined)\n}\n","\"use strict\"\n\nfunction Vnode(tag, key, attrs, children, text, dom) {\n\treturn {tag: tag, key: key, attrs: attrs, children: children, text: text, dom: dom, domSize: undefined, state: undefined, events: undefined, instance: undefined}\n}\nVnode.normalize = function(node) {\n\tif (Array.isArray(node)) return Vnode(\"[\", undefined, undefined, Vnode.normalizeChildren(node), undefined, undefined)\n\tif (node == null || typeof node === \"boolean\") return null\n\tif (typeof node === \"object\") return node\n\treturn Vnode(\"#\", undefined, undefined, String(node), undefined, undefined)\n}\nVnode.normalizeChildren = function(input) {\n\tvar children = []\n\tif (input.length) {\n\t\tvar isKeyed = input[0] != null && input[0].key != null\n\t\t// Note: this is a *very* perf-sensitive check.\n\t\t// Fun fact: merging the loop like this is somehow faster than splitting\n\t\t// it, noticeably so.\n\t\tfor (var i = 1; i < input.length; i++) {\n\t\t\tif ((input[i] != null && input[i].key != null) !== isKeyed) {\n\t\t\t\tthrow new TypeError(\"Vnodes must either always have keys or never have keys!\")\n\t\t\t}\n\t\t}\n\t\tfor (var i = 0; i < input.length; i++) {\n\t\t\tchildren[i] = Vnode.normalize(input[i])\n\t\t}\n\t}\n\treturn children\n}\n\nmodule.exports = Vnode\n","\"use strict\"\n\nvar PromisePolyfill = require(\"./promise/promise\")\nvar mountRedraw = require(\"./mount-redraw\")\n\nmodule.exports = require(\"./request/request\")(window, PromisePolyfill, mountRedraw.redraw)\n","\"use strict\"\n\nvar buildPathname = require(\"../pathname/build\")\n\nmodule.exports = function($window, Promise, oncompletion) {\n\tvar callbackCount = 0\n\n\tfunction PromiseProxy(executor) {\n\t\treturn new Promise(executor)\n\t}\n\n\t// In case the global Promise is some userland library's where they rely on\n\t// `foo instanceof this.constructor`, `this.constructor.resolve(value)`, or\n\t// similar. Let's *not* break them.\n\tPromiseProxy.prototype = Promise.prototype\n\tPromiseProxy.__proto__ = Promise // eslint-disable-line no-proto\n\n\tfunction makeRequest(factory) {\n\t\treturn function(url, args) {\n\t\t\tif (typeof url !== \"string\") { args = url; url = url.url }\n\t\t\telse if (args == null) args = {}\n\t\t\tvar promise = new Promise(function(resolve, reject) {\n\t\t\t\tfactory(buildPathname(url, args.params), args, function (data) {\n\t\t\t\t\tif (typeof args.type === \"function\") {\n\t\t\t\t\t\tif (Array.isArray(data)) {\n\t\t\t\t\t\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\t\t\t\t\t\tdata[i] = new args.type(data[i])\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse data = new args.type(data)\n\t\t\t\t\t}\n\t\t\t\t\tresolve(data)\n\t\t\t\t}, reject)\n\t\t\t})\n\t\t\tif (args.background === true) return promise\n\t\t\tvar count = 0\n\t\t\tfunction complete() {\n\t\t\t\tif (--count === 0 && typeof oncompletion === \"function\") oncompletion()\n\t\t\t}\n\n\t\t\treturn wrap(promise)\n\n\t\t\tfunction wrap(promise) {\n\t\t\t\tvar then = promise.then\n\t\t\t\t// Set the constructor, so engines know to not await or resolve\n\t\t\t\t// this as a native promise. At the time of writing, this is\n\t\t\t\t// only necessary for V8, but their behavior is the correct\n\t\t\t\t// behavior per spec. See this spec issue for more details:\n\t\t\t\t// https://github.com/tc39/ecma262/issues/1577. Also, see the\n\t\t\t\t// corresponding comment in `request/tests/test-request.js` for\n\t\t\t\t// a bit more background on the issue at hand.\n\t\t\t\tpromise.constructor = PromiseProxy\n\t\t\t\tpromise.then = function() {\n\t\t\t\t\tcount++\n\t\t\t\t\tvar next = then.apply(promise, arguments)\n\t\t\t\t\tnext.then(complete, function(e) {\n\t\t\t\t\t\tcomplete()\n\t\t\t\t\t\tif (count === 0) throw e\n\t\t\t\t\t})\n\t\t\t\t\treturn wrap(next)\n\t\t\t\t}\n\t\t\t\treturn promise\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction hasHeader(args, name) {\n\t\tfor (var key in args.headers) {\n\t\t\tif ({}.hasOwnProperty.call(args.headers, key) && name.test(key)) return true\n\t\t}\n\t\treturn false\n\t}\n\n\treturn {\n\t\trequest: makeRequest(function(url, args, resolve, reject) {\n\t\t\tvar method = args.method != null ? args.method.toUpperCase() : \"GET\"\n\t\t\tvar body = args.body\n\t\t\tvar assumeJSON = (args.serialize == null || args.serialize === JSON.serialize) && !(body instanceof $window.FormData)\n\t\t\tvar responseType = args.responseType || (typeof args.extract === \"function\" ? \"\" : \"json\")\n\n\t\t\tvar xhr = new $window.XMLHttpRequest(), aborted = false\n\t\t\tvar original = xhr, replacedAbort\n\t\t\tvar abort = xhr.abort\n\n\t\t\txhr.abort = function() {\n\t\t\t\taborted = true\n\t\t\t\tabort.call(this)\n\t\t\t}\n\n\t\t\txhr.open(method, url, args.async !== false, typeof args.user === \"string\" ? args.user : undefined, typeof args.password === \"string\" ? args.password : undefined)\n\n\t\t\tif (assumeJSON && body != null && !hasHeader(args, /^content-type$/i)) {\n\t\t\t\txhr.setRequestHeader(\"Content-Type\", \"application/json; charset=utf-8\")\n\t\t\t}\n\t\t\tif (typeof args.deserialize !== \"function\" && !hasHeader(args, /^accept$/i)) {\n\t\t\t\txhr.setRequestHeader(\"Accept\", \"application/json, text/*\")\n\t\t\t}\n\t\t\tif (args.withCredentials) xhr.withCredentials = args.withCredentials\n\t\t\tif (args.timeout) xhr.timeout = args.timeout\n\t\t\txhr.responseType = responseType\n\n\t\t\tfor (var key in args.headers) {\n\t\t\t\tif ({}.hasOwnProperty.call(args.headers, key)) {\n\t\t\t\t\txhr.setRequestHeader(key, args.headers[key])\n\t\t\t\t}\n\t\t\t}\n\n\t\t\txhr.onreadystatechange = function(ev) {\n\t\t\t\t// Don't throw errors on xhr.abort().\n\t\t\t\tif (aborted) return\n\n\t\t\t\tif (ev.target.readyState === 4) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar success = (ev.target.status >= 200 && ev.target.status < 300) || ev.target.status === 304 || (/^file:\\/\\//i).test(url)\n\t\t\t\t\t\t// When the response type isn't \"\" or \"text\",\n\t\t\t\t\t\t// `xhr.responseText` is the wrong thing to use.\n\t\t\t\t\t\t// Browsers do the right thing and throw here, and we\n\t\t\t\t\t\t// should honor that and do the right thing by\n\t\t\t\t\t\t// preferring `xhr.response` where possible/practical.\n\t\t\t\t\t\tvar response = ev.target.response, message\n\n\t\t\t\t\t\tif (responseType === \"json\") {\n\t\t\t\t\t\t\t// For IE and Edge, which don't implement\n\t\t\t\t\t\t\t// `responseType: \"json\"`.\n\t\t\t\t\t\t\tif (!ev.target.responseType && typeof args.extract !== \"function\") response = JSON.parse(ev.target.responseText)\n\t\t\t\t\t\t} else if (!responseType || responseType === \"text\") {\n\t\t\t\t\t\t\t// Only use this default if it's text. If a parsed\n\t\t\t\t\t\t\t// document is needed on old IE and friends (all\n\t\t\t\t\t\t\t// unsupported), the user should use a custom\n\t\t\t\t\t\t\t// `config` instead. They're already using this at\n\t\t\t\t\t\t\t// their own risk.\n\t\t\t\t\t\t\tif (response == null) response = ev.target.responseText\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (typeof args.extract === \"function\") {\n\t\t\t\t\t\t\tresponse = args.extract(ev.target, args)\n\t\t\t\t\t\t\tsuccess = true\n\t\t\t\t\t\t} else if (typeof args.deserialize === \"function\") {\n\t\t\t\t\t\t\tresponse = args.deserialize(response)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (success) resolve(response)\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttry { message = ev.target.responseText }\n\t\t\t\t\t\t\tcatch (e) { message = response }\n\t\t\t\t\t\t\tvar error = new Error(message)\n\t\t\t\t\t\t\terror.code = ev.target.status\n\t\t\t\t\t\t\terror.response = response\n\t\t\t\t\t\t\treject(error)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\treject(e)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (typeof args.config === \"function\") {\n\t\t\t\txhr = args.config(xhr, args, url) || xhr\n\n\t\t\t\t// Propagate the `abort` to any replacement XHR as well.\n\t\t\t\tif (xhr !== original) {\n\t\t\t\t\treplacedAbort = xhr.abort\n\t\t\t\t\txhr.abort = function() {\n\t\t\t\t\t\taborted = true\n\t\t\t\t\t\treplacedAbort.call(this)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (body == null) xhr.send()\n\t\t\telse if (typeof args.serialize === \"function\") xhr.send(args.serialize(body))\n\t\t\telse if (body instanceof $window.FormData) xhr.send(body)\n\t\t\telse xhr.send(JSON.stringify(body))\n\t\t}),\n\t\tjsonp: makeRequest(function(url, args, resolve, reject) {\n\t\t\tvar callbackName = args.callbackName || \"_mithril_\" + Math.round(Math.random() * 1e16) + \"_\" + callbackCount++\n\t\t\tvar script = $window.document.createElement(\"script\")\n\t\t\t$window[callbackName] = function(data) {\n\t\t\t\tdelete $window[callbackName]\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\tresolve(data)\n\t\t\t}\n\t\t\tscript.onerror = function() {\n\t\t\t\tdelete $window[callbackName]\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\treject(new Error(\"JSONP request failed\"))\n\t\t\t}\n\t\t\tscript.src = url + (url.indexOf(\"?\") < 0 ? \"?\" : \"&\") +\n\t\t\t\tencodeURIComponent(args.callbackKey || \"callback\") + \"=\" +\n\t\t\t\tencodeURIComponent(callbackName)\n\t\t\t$window.document.documentElement.appendChild(script)\n\t\t}),\n\t}\n}\n","\"use strict\"\n\nvar mountRedraw = require(\"./mount-redraw\")\n\nmodule.exports = require(\"./api/router\")(window, mountRedraw)\n","\"use strict\"\n\nmodule.exports = require(\"./stream/stream\")\n","/* eslint-disable */\n;(function() {\n\"use strict\"\n/* eslint-enable */\nStream.SKIP = {}\nStream.lift = lift\nStream.scan = scan\nStream.merge = merge\nStream.combine = combine\nStream.scanMerge = scanMerge\nStream[\"fantasy-land/of\"] = Stream\n\nvar warnedHalt = false\nObject.defineProperty(Stream, \"HALT\", {\n\tget: function() {\n\t\twarnedHalt || console.log(\"HALT is deprecated and has been renamed to SKIP\");\n\t\twarnedHalt = true\n\t\treturn Stream.SKIP\n\t}\n})\n\nfunction Stream(value) {\n\tvar dependentStreams = []\n\tvar dependentFns = []\n\n\tfunction stream(v) {\n\t\tif (arguments.length && v !== Stream.SKIP) {\n\t\t\tvalue = v\n\t\t\tif (open(stream)) {\n\t\t\t\tstream._changing()\n\t\t\t\tstream._state = \"active\"\n\t\t\t\tdependentStreams.forEach(function(s, i) { s(dependentFns[i](value)) })\n\t\t\t}\n\t\t}\n\n\t\treturn value\n\t}\n\n\tstream.constructor = Stream\n\tstream._state = arguments.length && value !== Stream.SKIP ? \"active\" : \"pending\"\n\tstream._parents = []\n\n\tstream._changing = function() {\n\t\tif (open(stream)) stream._state = \"changing\"\n\t\tdependentStreams.forEach(function(s) {\n\t\t\ts._changing()\n\t\t})\n\t}\n\n\tstream._map = function(fn, ignoreInitial) {\n\t\tvar target = ignoreInitial ? Stream() : Stream(fn(value))\n\t\ttarget._parents.push(stream)\n\t\tdependentStreams.push(target)\n\t\tdependentFns.push(fn)\n\t\treturn target\n\t}\n\n\tstream.map = function(fn) {\n\t\treturn stream._map(fn, stream._state !== \"active\")\n\t}\n\n\tvar end\n\tfunction createEnd() {\n\t\tend = Stream()\n\t\tend.map(function(value) {\n\t\t\tif (value === true) {\n\t\t\t\tstream._parents.forEach(function (p) {p._unregisterChild(stream)})\n\t\t\t\tstream._state = \"ended\"\n\t\t\t\tstream._parents.length = dependentStreams.length = dependentFns.length = 0\n\t\t\t}\n\t\t\treturn value\n\t\t})\n\t\treturn end\n\t}\n\n\tstream.toJSON = function() { return value != null && typeof value.toJSON === \"function\" ? value.toJSON() : value }\n\n\tstream[\"fantasy-land/map\"] = stream.map\n\tstream[\"fantasy-land/ap\"] = function(x) { return combine(function(s1, s2) { return s1()(s2()) }, [x, stream]) }\n\n\tstream._unregisterChild = function(child) {\n\t\tvar childIndex = dependentStreams.indexOf(child)\n\t\tif (childIndex !== -1) {\n\t\t\tdependentStreams.splice(childIndex, 1)\n\t\t\tdependentFns.splice(childIndex, 1)\n\t\t}\n\t}\n\n\tObject.defineProperty(stream, \"end\", {\n\t\tget: function() { return end || createEnd() }\n\t})\n\n\treturn stream\n}\n\nfunction combine(fn, streams) {\n\tvar ready = streams.every(function(s) {\n\t\tif (s.constructor !== Stream)\n\t\t\tthrow new Error(\"Ensure that each item passed to stream.combine/stream.merge/lift is a stream\")\n\t\treturn s._state === \"active\"\n\t})\n\tvar stream = ready\n\t\t? Stream(fn.apply(null, streams.concat([streams])))\n\t\t: Stream()\n\n\tvar changed = []\n\n\tvar mappers = streams.map(function(s) {\n\t\treturn s._map(function(value) {\n\t\t\tchanged.push(s)\n\t\t\tif (ready || streams.every(function(s) { return s._state !== \"pending\" })) {\n\t\t\t\tready = true\n\t\t\t\tstream(fn.apply(null, streams.concat([changed])))\n\t\t\t\tchanged = []\n\t\t\t}\n\t\t\treturn value\n\t\t}, true)\n\t})\n\n\tvar endStream = stream.end.map(function(value) {\n\t\tif (value === true) {\n\t\t\tmappers.forEach(function(mapper) { mapper.end(true) })\n\t\t\tendStream.end(true)\n\t\t}\n\t\treturn undefined\n\t})\n\n\treturn stream\n}\n\nfunction merge(streams) {\n\treturn combine(function() { return streams.map(function(s) { return s() }) }, streams)\n}\n\nfunction scan(fn, acc, origin) {\n\tvar stream = origin.map(function(v) {\n\t\tvar next = fn(acc, v)\n\t\tif (next !== Stream.SKIP) acc = next\n\t\treturn next\n\t})\n\tstream(acc)\n\treturn stream\n}\n\nfunction scanMerge(tuples, seed) {\n\tvar streams = tuples.map(function(tuple) { return tuple[0] })\n\n\tvar stream = combine(function() {\n\t\tvar changed = arguments[arguments.length - 1]\n\t\tstreams.forEach(function(stream, i) {\n\t\t\tif (changed.indexOf(stream) > -1)\n\t\t\t\tseed = tuples[i][1](seed, stream())\n\t\t})\n\n\t\treturn seed\n\t}, streams)\n\n\tstream(seed)\n\n\treturn stream\n}\n\nfunction lift() {\n\tvar fn = arguments[0]\n\tvar streams = Array.prototype.slice.call(arguments, 1)\n\treturn merge(streams).map(function(streams) {\n\t\treturn fn.apply(undefined, streams)\n\t})\n}\n\nfunction open(s) {\n\treturn s._state === \"pending\" || s._state === \"active\" || s._state === \"changing\"\n}\n\nif (typeof module !== \"undefined\") module[\"exports\"] = Stream\nelse if (typeof window.m === \"function\" && !(\"stream\" in window.m)) window.m.stream = Stream\nelse window.m = {stream : Stream}\n\n}());\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7E]/; // non-ASCII chars\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, fn) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = fn(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(string, fn) {\n\tconst parts = string.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tstring = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tstring = string.replace(regexSeparators, '\\x2E');\n\tconst labels = string.split('.');\n\tconst encoded = map(labels, fn).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = array => String.fromCodePoint(...array);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint - 0x30 < 0x0A) {\n\t\treturn codePoint - 0x16;\n\t}\n\tif (codePoint - 0x41 < 0x1A) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint - 0x61 < 0x1A) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t//  0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tlet oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tlet inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tlet basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue == n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.1.0',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode };\nexport default punycode;\n","/* jshint browser: true */\n\n(function () {\n\n// We'll copy the properties below into the mirror div.\n// Note that some browsers, such as Firefox, do not concatenate properties\n// into their shorthand (e.g. padding-top, padding-bottom etc. -> padding),\n// so we have to list every single property explicitly.\nvar properties = [\n  'direction',  // RTL support\n  'boxSizing',\n  'width',  // on Chrome and IE, exclude the scrollbar, so the mirror div wraps exactly as the textarea does\n  'height',\n  'overflowX',\n  'overflowY',  // copy the scrollbar for IE\n\n  'borderTopWidth',\n  'borderRightWidth',\n  'borderBottomWidth',\n  'borderLeftWidth',\n  'borderStyle',\n\n  'paddingTop',\n  'paddingRight',\n  'paddingBottom',\n  'paddingLeft',\n\n  // https://developer.mozilla.org/en-US/docs/Web/CSS/font\n  'fontStyle',\n  'fontVariant',\n  'fontWeight',\n  'fontStretch',\n  'fontSize',\n  'fontSizeAdjust',\n  'lineHeight',\n  'fontFamily',\n\n  'textAlign',\n  'textTransform',\n  'textIndent',\n  'textDecoration',  // might not make a difference, but better be safe\n\n  'letterSpacing',\n  'wordSpacing',\n\n  'tabSize',\n  'MozTabSize'\n\n];\n\nvar isBrowser = (typeof window !== 'undefined');\nvar isFirefox = (isBrowser && window.mozInnerScreenX != null);\n\nfunction getCaretCoordinates(element, position, options) {\n  if (!isBrowser) {\n    throw new Error('textarea-caret-position#getCaretCoordinates should only be called in a browser');\n  }\n\n  var debug = options && options.debug || false;\n  if (debug) {\n    var el = document.querySelector('#input-textarea-caret-position-mirror-div');\n    if (el) el.parentNode.removeChild(el);\n  }\n\n  // The mirror div will replicate the textarea's style\n  var div = document.createElement('div');\n  div.id = 'input-textarea-caret-position-mirror-div';\n  document.body.appendChild(div);\n\n  var style = div.style;\n  var computed = window.getComputedStyle ? window.getComputedStyle(element) : element.currentStyle;  // currentStyle for IE < 9\n  var isInput = element.nodeName === 'INPUT';\n\n  // Default textarea styles\n  style.whiteSpace = 'pre-wrap';\n  if (!isInput)\n    style.wordWrap = 'break-word';  // only for textarea-s\n\n  // Position off-screen\n  style.position = 'absolute';  // required to return coordinates properly\n  if (!debug)\n    style.visibility = 'hidden';  // not 'display: none' because we want rendering\n\n  // Transfer the element's properties to the div\n  properties.forEach(function (prop) {\n    if (isInput && prop === 'lineHeight') {\n      // Special case for <input>s because text is rendered centered and line height may be != height\n      style.lineHeight = computed.height;\n    } else {\n      style[prop] = computed[prop];\n    }\n  });\n\n  if (isFirefox) {\n    // Firefox lies about the overflow property for textareas: https://bugzilla.mozilla.org/show_bug.cgi?id=984275\n    if (element.scrollHeight > parseInt(computed.height))\n      style.overflowY = 'scroll';\n  } else {\n    style.overflow = 'hidden';  // for Chrome to not render a scrollbar; IE keeps overflowY = 'scroll'\n  }\n\n  div.textContent = element.value.substring(0, position);\n  // The second special handling for input type=\"text\" vs textarea:\n  // spaces need to be replaced with non-breaking spaces - http://stackoverflow.com/a/13402035/1269037\n  if (isInput)\n    div.textContent = div.textContent.replace(/\\s/g, '\\u00a0');\n\n  var span = document.createElement('span');\n  // Wrapping must be replicated *exactly*, including when a long word gets\n  // onto the next line, with whitespace at the end of the line before (#7).\n  // The  *only* reliable way to do that is to copy the *entire* rest of the\n  // textarea's content into the <span> created at the caret position.\n  // For inputs, just '.' would be enough, but no need to bother.\n  span.textContent = element.value.substring(position) || '.';  // || because a completely empty faux span doesn't render at all\n  div.appendChild(span);\n\n  var coordinates = {\n    top: span.offsetTop + parseInt(computed['borderTopWidth']),\n    left: span.offsetLeft + parseInt(computed['borderLeftWidth']),\n    height: parseInt(computed['lineHeight'])\n  };\n\n  if (debug) {\n    span.style.backgroundColor = '#aaa';\n  } else {\n    document.body.removeChild(div);\n  }\n\n  return coordinates;\n}\n\nif (typeof module != 'undefined' && typeof module.exports != 'undefined') {\n  module.exports = getCaretCoordinates;\n} else if(isBrowser) {\n  window.getCaretCoordinates = getCaretCoordinates;\n}\n\n}());\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../../babel-loader/lib/index.js??ruleSet[1].rules[0]!./jquery.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"$\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"$\"] = ___EXPOSE_LOADER_IMPORT___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"jQuery\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"jQuery\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../../babel-loader/lib/index.js??ruleSet[1].rules[0]!./color-thief.min.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"ColorThief\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"ColorThief\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../babel-loader/lib/index.js??ruleSet[1].rules[0]!./dayjs.min.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"dayjs\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"dayjs\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../babel-loader/lib/index.js??ruleSet[1].rules[0]!./index.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"m\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"m\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../babel-loader/lib/index.js??ruleSet[1].rules[0]!./punycode.es6.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"punycode\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"punycode\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","function _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n  for (var i = 0, arr2 = new Array(len); i < len; i++) {\n    arr2[i] = arr[i];\n  }\n  return arr2;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayWithHoles(arr) {\n  if (Array.isArray(arr)) return arr;\n}\nmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n  return self;\n}\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _defineProperties(target, props) {\n  for (var i = 0; i < props.length; i++) {\n    var descriptor = props[i];\n    descriptor.enumerable = descriptor.enumerable || false;\n    descriptor.configurable = true;\n    if (\"value\" in descriptor) descriptor.writable = true;\n    Object.defineProperty(target, descriptor.key, descriptor);\n  }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  Object.defineProperty(Constructor, \"prototype\", {\n    writable: false\n  });\n  return Constructor;\n}\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n  return obj;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _getPrototypeOf(o) {\n  module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n    return o.__proto__ || Object.getPrototypeOf(o);\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  return _getPrototypeOf(o);\n}\nmodule.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\nfunction _inherits(subClass, superClass) {\n  if (typeof superClass !== \"function\" && superClass !== null) {\n    throw new TypeError(\"Super expression must either be null or a function\");\n  }\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      writable: true,\n      configurable: true\n    }\n  });\n  Object.defineProperty(subClass, \"prototype\", {\n    writable: false\n  });\n  if (superClass) setPrototypeOf(subClass, superClass);\n}\nmodule.exports = _inherits, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArrayLimit(arr, i) {\n  var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n  if (_i == null) return;\n  var _arr = [];\n  var _n = true;\n  var _d = false;\n  var _s, _e;\n  try {\n    for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n      _arr.push(_s.value);\n      if (i && _arr.length === i) break;\n    }\n  } catch (err) {\n    _d = true;\n    _e = err;\n  } finally {\n    try {\n      if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n    } finally {\n      if (_d) throw _e;\n    }\n  }\n  return _arr;\n}\nmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableRest() {\n  throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\nfunction _possibleConstructorReturn(self, call) {\n  if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n    return call;\n  } else if (call !== void 0) {\n    throw new TypeError(\"Derived constructors may only return object or undefined\");\n  }\n  return assertThisInitialized(self);\n}\nmodule.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n  \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n  module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n    return exports;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  var exports = {},\n    Op = Object.prototype,\n    hasOwn = Op.hasOwnProperty,\n    defineProperty = Object.defineProperty || function (obj, key, desc) {\n      obj[key] = desc.value;\n    },\n    $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n    iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n    asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n    toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n  function define(obj, key, value) {\n    return Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: !0,\n      configurable: !0,\n      writable: !0\n    }), obj[key];\n  }\n  try {\n    define({}, \"\");\n  } catch (err) {\n    define = function define(obj, key, value) {\n      return obj[key] = value;\n    };\n  }\n  function wrap(innerFn, outerFn, self, tryLocsList) {\n    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n      generator = Object.create(protoGenerator.prototype),\n      context = new Context(tryLocsList || []);\n    return defineProperty(generator, \"_invoke\", {\n      value: makeInvokeMethod(innerFn, self, context)\n    }), generator;\n  }\n  function tryCatch(fn, obj, arg) {\n    try {\n      return {\n        type: \"normal\",\n        arg: fn.call(obj, arg)\n      };\n    } catch (err) {\n      return {\n        type: \"throw\",\n        arg: err\n      };\n    }\n  }\n  exports.wrap = wrap;\n  var ContinueSentinel = {};\n  function Generator() {}\n  function GeneratorFunction() {}\n  function GeneratorFunctionPrototype() {}\n  var IteratorPrototype = {};\n  define(IteratorPrototype, iteratorSymbol, function () {\n    return this;\n  });\n  var getProto = Object.getPrototypeOf,\n    NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n  NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n  var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n  function defineIteratorMethods(prototype) {\n    [\"next\", \"throw\", \"return\"].forEach(function (method) {\n      define(prototype, method, function (arg) {\n        return this._invoke(method, arg);\n      });\n    });\n  }\n  function AsyncIterator(generator, PromiseImpl) {\n    function invoke(method, arg, resolve, reject) {\n      var record = tryCatch(generator[method], generator, arg);\n      if (\"throw\" !== record.type) {\n        var result = record.arg,\n          value = result.value;\n        return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n          invoke(\"next\", value, resolve, reject);\n        }, function (err) {\n          invoke(\"throw\", err, resolve, reject);\n        }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n          result.value = unwrapped, resolve(result);\n        }, function (error) {\n          return invoke(\"throw\", error, resolve, reject);\n        });\n      }\n      reject(record.arg);\n    }\n    var previousPromise;\n    defineProperty(this, \"_invoke\", {\n      value: function value(method, arg) {\n        function callInvokeWithMethodAndArg() {\n          return new PromiseImpl(function (resolve, reject) {\n            invoke(method, arg, resolve, reject);\n          });\n        }\n        return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n      }\n    });\n  }\n  function makeInvokeMethod(innerFn, self, context) {\n    var state = \"suspendedStart\";\n    return function (method, arg) {\n      if (\"executing\" === state) throw new Error(\"Generator is already running\");\n      if (\"completed\" === state) {\n        if (\"throw\" === method) throw arg;\n        return doneResult();\n      }\n      for (context.method = method, context.arg = arg;;) {\n        var delegate = context.delegate;\n        if (delegate) {\n          var delegateResult = maybeInvokeDelegate(delegate, context);\n          if (delegateResult) {\n            if (delegateResult === ContinueSentinel) continue;\n            return delegateResult;\n          }\n        }\n        if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n          if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n          context.dispatchException(context.arg);\n        } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n        state = \"executing\";\n        var record = tryCatch(innerFn, self, context);\n        if (\"normal\" === record.type) {\n          if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n          return {\n            value: record.arg,\n            done: context.done\n          };\n        }\n        \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n      }\n    };\n  }\n  function maybeInvokeDelegate(delegate, context) {\n    var method = delegate.iterator[context.method];\n    if (undefined === method) {\n      if (context.delegate = null, \"throw\" === context.method) {\n        if (delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method)) return ContinueSentinel;\n        context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a 'throw' method\");\n      }\n      return ContinueSentinel;\n    }\n    var record = tryCatch(method, delegate.iterator, context.arg);\n    if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n    var info = record.arg;\n    return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n  }\n  function pushTryEntry(locs) {\n    var entry = {\n      tryLoc: locs[0]\n    };\n    1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n  }\n  function resetTryEntry(entry) {\n    var record = entry.completion || {};\n    record.type = \"normal\", delete record.arg, entry.completion = record;\n  }\n  function Context(tryLocsList) {\n    this.tryEntries = [{\n      tryLoc: \"root\"\n    }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n  }\n  function values(iterable) {\n    if (iterable) {\n      var iteratorMethod = iterable[iteratorSymbol];\n      if (iteratorMethod) return iteratorMethod.call(iterable);\n      if (\"function\" == typeof iterable.next) return iterable;\n      if (!isNaN(iterable.length)) {\n        var i = -1,\n          next = function next() {\n            for (; ++i < iterable.length;) {\n              if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n            }\n            return next.value = undefined, next.done = !0, next;\n          };\n        return next.next = next;\n      }\n    }\n    return {\n      next: doneResult\n    };\n  }\n  function doneResult() {\n    return {\n      value: undefined,\n      done: !0\n    };\n  }\n  return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n    value: GeneratorFunctionPrototype,\n    configurable: !0\n  }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n    value: GeneratorFunction,\n    configurable: !0\n  }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n    var ctor = \"function\" == typeof genFun && genFun.constructor;\n    return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n  }, exports.mark = function (genFun) {\n    return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n  }, exports.awrap = function (arg) {\n    return {\n      __await: arg\n    };\n  }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n    return this;\n  }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n    void 0 === PromiseImpl && (PromiseImpl = Promise);\n    var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n    return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n      return result.done ? result.value : iter.next();\n    });\n  }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n    return this;\n  }), define(Gp, \"toString\", function () {\n    return \"[object Generator]\";\n  }), exports.keys = function (val) {\n    var object = Object(val),\n      keys = [];\n    for (var key in object) {\n      keys.push(key);\n    }\n    return keys.reverse(), function next() {\n      for (; keys.length;) {\n        var key = keys.pop();\n        if (key in object) return next.value = key, next.done = !1, next;\n      }\n      return next.done = !0, next;\n    };\n  }, exports.values = values, Context.prototype = {\n    constructor: Context,\n    reset: function reset(skipTempReset) {\n      if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {\n        \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n      }\n    },\n    stop: function stop() {\n      this.done = !0;\n      var rootRecord = this.tryEntries[0].completion;\n      if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n      return this.rval;\n    },\n    dispatchException: function dispatchException(exception) {\n      if (this.done) throw exception;\n      var context = this;\n      function handle(loc, caught) {\n        return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n      }\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i],\n          record = entry.completion;\n        if (\"root\" === entry.tryLoc) return handle(\"end\");\n        if (entry.tryLoc <= this.prev) {\n          var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n            hasFinally = hasOwn.call(entry, \"finallyLoc\");\n          if (hasCatch && hasFinally) {\n            if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n            if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n          } else if (hasCatch) {\n            if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n          } else {\n            if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n            if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n          }\n        }\n      }\n    },\n    abrupt: function abrupt(type, arg) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n          var finallyEntry = entry;\n          break;\n        }\n      }\n      finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n      var record = finallyEntry ? finallyEntry.completion : {};\n      return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n    },\n    complete: function complete(record, afterLoc) {\n      if (\"throw\" === record.type) throw record.arg;\n      return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n    },\n    finish: function finish(finallyLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n      }\n    },\n    \"catch\": function _catch(tryLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc === tryLoc) {\n          var record = entry.completion;\n          if (\"throw\" === record.type) {\n            var thrown = record.arg;\n            resetTryEntry(entry);\n          }\n          return thrown;\n        }\n      }\n      throw new Error(\"illegal catch attempt\");\n    },\n    delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n      return this.delegate = {\n        iterator: values(iterable),\n        resultName: resultName,\n        nextLoc: nextLoc\n      }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n    }\n  }, exports;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _setPrototypeOf(o, p) {\n  module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  return _setPrototypeOf(o, p);\n}\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithHoles = require(\"./arrayWithHoles.js\");\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableRest = require(\"./nonIterableRest.js\");\nfunction _slicedToArray(arr, i) {\n  return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n    return typeof obj;\n  } : function (obj) {\n    return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n  regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n  if (typeof globalThis === \"object\") {\n    globalThis.regeneratorRuntime = runtime;\n  } else {\n    Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n  }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","function bidi(node, prop) {\n  var type = node.tag === 'select' ? (node.attrs.multi ? 'multi' : 'select') : node.attrs.type;\n\n  // Setup: bind listeners\n  if (type === 'multi') {\n    node.attrs.onchange = function () {\n      prop(\n        [].slice.call(this.selectedOptions, function (x) {\n          return x.value;\n        })\n      );\n    };\n  } else if (type === 'select') {\n    node.attrs.onchange = function (e) {\n      prop(this.selectedOptions[0].value);\n    };\n  } else if (type === 'checkbox') {\n    node.attrs.onchange = function (e) {\n      prop(this.checked);\n    };\n  } else {\n    node.attrs.onchange = node.attrs.oninput = function (e) {\n      prop(this.value);\n    };\n  }\n\n  if (node.tag === 'select') {\n    node.children.forEach(function (option) {\n      if (option.attrs.value === prop() || option.children[0] === prop()) {\n        option.attrs.selected = true;\n      }\n    });\n  } else if (type === 'checkbox') {\n    node.attrs.checked = prop();\n  } else if (type === 'radio') {\n    node.attrs.checked = prop() === node.attrs.value;\n  } else {\n    node.attrs.value = prop();\n  }\n\n  node.attrs.bidi = null;\n\n  return node;\n}\n\nbidi.view = function (ctrl, node, prop) {\n  return bidi(node, node.attrs.bidi);\n};\n\nexport default bidi;\n","import bidi from './bidi';\n\nexport default function patchMithril(global) {\n  const defaultMithril = global.m;\n\n  const modifiedMithril = function (comp, ...args) {\n    const node = defaultMithril.apply(this, arguments);\n\n    if (!node.attrs) node.attrs = {};\n\n    // Allows the use of the bidi attr.\n    if (node.attrs.bidi) {\n      bidi(node, node.attrs.bidi);\n    }\n\n    return node;\n  };\n\n  Object.keys(defaultMithril).forEach((key) => (modifiedMithril[key] = defaultMithril[key]));\n\n  global.m = modifiedMithril;\n}\n","import type Application from './Application';\n\n// Used to fix typings\nconst w = window as any;\n\n/**\n * Proxy app. Common JS is run first, at which point `window.app` is not\n * set as this is done by the namespaced JS.\n *\n * When the corrent value is set, this code would retain the reference to\n * the original invalid value.\n *\n * By using a proxy, we can ensure that our `window.app` value is always\n * up-to-date with the latest reference.\n */\nconst appProxy = new Proxy(\n  {},\n  {\n    get(_, properties) {\n      return Reflect.get(w.app, properties, w.app);\n    },\n    set(_, properties, value) {\n      return Reflect.set(w.app, properties, value, w.app);\n    },\n  }\n);\n\n/**\n * The instance of Application within the common namespace.\n */\nexport default appProxy as Application;\n","// Expose jQuery, mithril and dayjs to the window browser object\nimport 'expose-loader?exposes=$,jQuery!jquery';\nimport 'expose-loader?exposes=m!mithril';\nimport 'expose-loader?exposes=dayjs!dayjs';\n\nimport 'bootstrap/js/affix';\nimport 'bootstrap/js/dropdown';\nimport 'bootstrap/js/tooltip';\nimport 'bootstrap/js/transition';\nimport 'jquery.hotkeys/jquery.hotkeys';\n\nimport relativeTime from 'dayjs/plugin/relativeTime';\nimport localizedFormat from 'dayjs/plugin/localizedFormat';\n\ndayjs.extend(relativeTime);\ndayjs.extend(localizedFormat);\n\nimport patchMithril from './utils/patchMithril';\n\npatchMithril(window);\n\nimport app from './app';\n\nexport { app };\n\nimport './utils/arrayFlatPolyfill';\n\nconst tooltipGen = $.fn.tooltip;\n\n// Remove in a future version of Flarum.\n// @ts-ignore\n$.fn.tooltip = function (options, caller) {\n  // Show a warning when `$.tooltip` is used outside of the Tooltip component.\n  // This functionality is deprecated and should not be used.\n  if (!['DANGEROUS_tooltip_jquery_fn_deprecation_exempt'].includes(caller)) {\n    console.warn(\n      \"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\"\n    );\n  }\n\n  tooltipGen.bind(this)(options);\n};\n","export default function _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n  return self;\n}","export default function _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n  return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n  setPrototypeOf(subClass, superClass);\n}","export default function _extends() {\n  _extends = Object.assign ? Object.assign.bind() : function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n    return target;\n  };\n  return _extends.apply(this, arguments);\n}","import type Mithril from 'mithril';\n\n/**\n * Mithril 2 does not completely rerender the page if a route change leads to the same route\n * (or the same component handling a different route). This util calls m.route.set, forcing a reonit.\n *\n * @see https://mithril.js.org/route.html#key-parameter\n */\nexport default function setRouteWithForcedRefresh(route: string, params = null, options: Mithril.RouteOptions = {}) {\n  const newOptions = { ...options };\n  newOptions.state = newOptions.state || {};\n  newOptions.state.key = Date.now();\n\n  m.route.set(route, params, newOptions);\n}\n","import setRouteWithForcedRefresh from '../../common/utils/setRouteWithForcedRefresh';\nimport IHistory, { HistoryEntry } from '../../common/IHistory';\n\n/**\n * The `History` class keeps track and manages a stack of routes that the user\n * has navigated to in their session.\n *\n * An item can be pushed to the top of the stack using the `push` method. An\n * item in the stack has a name and a URL. The name need not be unique; if it is\n * the same as the item before it, that will be overwritten with the new URL. In\n * this way, if a user visits a discussion, and then visits another discussion,\n * popping the history stack will still take them back to the discussion list\n * rather than the previous discussion.\n */\nexport default class History implements IHistory {\n  /**\n   * The stack of routes that have been navigated to.\n   */\n  protected stack: HistoryEntry[] = [];\n\n  /**\n   * Get the item on the top of the stack.\n   */\n  getCurrent(): HistoryEntry {\n    return this.stack[this.stack.length - 1];\n  }\n\n  /**\n   * Get the previous item on the stack.\n   */\n  getPrevious(): HistoryEntry {\n    return this.stack[this.stack.length - 2];\n  }\n\n  /**\n   * Push an item to the top of the stack.\n   *\n   * @param {string} name The name of the route.\n   * @param {string} title The title of the route.\n   * @param {string} [url] The URL of the route. The current URL will be used if\n   *     not provided.\n   */\n  push(name: string, title: string, url = m.route.get()) {\n    // If we're pushing an item with the same name as second-to-top item in the\n    // stack, we will assume that the user has clicked the 'back' button in\n    // their browser. In this case, we don't want to push a new item, so we will\n    // pop off the top item, and then the second-to-top item will be overwritten\n    // below.\n    const secondTop = this.stack[this.stack.length - 2];\n    if (secondTop && secondTop.name === name) {\n      this.stack.pop();\n    }\n\n    // If we're pushing an item with the same name as the top item in the stack,\n    // then we'll overwrite it with the new URL.\n    const top = this.getCurrent();\n    if (top && top.name === name) {\n      Object.assign(top, { url, title });\n    } else {\n      this.stack.push({ name, url, title });\n    }\n  }\n\n  /**\n   * Check whether or not the history stack is able to be popped.\n   */\n  canGoBack(): boolean {\n    return this.stack.length > 1;\n  }\n\n  /**\n   * Go back to the previous route in the history stack.\n   */\n  back() {\n    if (!this.canGoBack()) {\n      return this.home();\n    }\n\n    this.stack.pop();\n\n    m.route.set(this.getCurrent().url);\n  }\n\n  /**\n   * Get the URL of the previous page.\n   */\n  backUrl(): string {\n    const secondTop = this.stack[this.stack.length - 2];\n\n    return secondTop.url;\n  }\n\n  /**\n   * Go to the first route in the history stack.\n   */\n  home() {\n    this.stack.splice(0);\n\n    setRouteWithForcedRefresh('/');\n  }\n}\n","/**\n * The `Pane` class manages the page's discussion list sidepane. The pane is a\n * part of the content view (DiscussionPage component), but its visibility is\n * determined by CSS classes applied to the outer page element. This class\n * manages the application of those CSS classes.\n */\nexport default class Pane {\n  constructor(element) {\n    /**\n     * The localStorage key to store the pane's pinned state with.\n     *\n     * @type {String}\n     * @protected\n     */\n    this.pinnedKey = 'panePinned';\n\n    /**\n     * The page element.\n     *\n     * @type {jQuery}\n     * @protected\n     */\n    this.$element = $(element);\n\n    /**\n     * Whether or not the pane is currently pinned.\n     *\n     * @type {Boolean}\n     * @protected\n     */\n    this.pinned = localStorage.getItem(this.pinnedKey) === 'true';\n\n    /**\n     * Whether or not the pane is currently exists.\n     *\n     * @type {Boolean}\n     * @protected\n     */\n    this.active = false;\n\n    /**\n     * Whether or not the pane is currently showing, or is hidden off the edge\n     * of the screen.\n     *\n     * @type {Boolean}\n     * @protected\n     */\n    this.showing = false;\n\n    this.render();\n  }\n\n  /**\n   * Enable the pane.\n   */\n  enable() {\n    this.active = true;\n    this.render();\n  }\n\n  /**\n   * Disable the pane.\n   */\n  disable() {\n    this.active = false;\n    this.showing = false;\n    this.render();\n  }\n\n  /**\n   * Show the pane.\n   */\n  show() {\n    clearTimeout(this.hideTimeout);\n    this.showing = true;\n    this.render();\n  }\n\n  /**\n   * Hide the pane.\n   */\n  hide() {\n    this.showing = false;\n    this.render();\n  }\n\n  /**\n   * Begin a timeout to hide the pane, which can be cancelled by showing the\n   * pane.\n   */\n  onmouseleave() {\n    this.hideTimeout = setTimeout(this.hide.bind(this), 250);\n  }\n\n  /**\n   * Toggle whether or not the pane is pinned.\n   */\n  togglePinned() {\n    this.pinned = !this.pinned;\n\n    localStorage.setItem(this.pinnedKey, this.pinned ? 'true' : 'false');\n\n    this.render();\n  }\n\n  /**\n   * Apply the appropriate CSS classes to the page element.\n   *\n   * @protected\n   */\n  render() {\n    this.$element.toggleClass('panePinned', this.pinned).toggleClass('hasPane', this.active).toggleClass('paneShowing', this.showing);\n  }\n}\n","import type Mithril from 'mithril';\n\nexport interface ComponentAttrs extends Mithril.Attributes {}\n\n/**\n * The `Component` class defines a user interface 'building block'. A component\n * generates a virtual DOM to be rendered on each redraw.\n *\n * Essentially, this is a wrapper for Mithril's components that adds several useful features:\n *\n *  - In the `oninit` and `onbeforeupdate` lifecycle hooks, we store vnode attrs in `this.attrs.\n *    This allows us to use attrs across components without having to pass the vnode to every single\n *    method.\n *  - The static `initAttrs` method allows a convenient way to provide defaults (or to otherwise modify)\n *    the attrs that have been passed into a component.\n *  - When the component is created in the DOM, we store its DOM element under `this.element`; this lets\n *    us use jQuery to modify child DOM state from internal methods via the `this.$()` method.\n *  - A convenience `component` method, which serves as an alternative to hyperscript and JSX.\n *\n * As with other Mithril components, components extending Component can be initialized\n * and nested using JSX, hyperscript, or a combination of both. The `component` method can also\n * be used.\n *\n * @example\n * return m('div', <MyComponent foo=\"bar\"><p>Hello World</p></MyComponent>);\n *\n * @example\n * return m('div', MyComponent.component({foo: 'bar'), m('p', 'Hello World!'));\n *\n * @see https://mithril.js.org/components.html\n */\nexport default abstract class Component<Attrs extends ComponentAttrs = ComponentAttrs, State = undefined> implements Mithril.ClassComponent<Attrs> {\n  /**\n   * The root DOM element for the component.\n   */\n  element!: Element;\n\n  /**\n   * The attributes passed into the component.\n   *\n   * @see https://mithril.js.org/components.html#passing-data-to-components\n   */\n  attrs!: Attrs;\n\n  /**\n   * Class component state that is persisted between redraws.\n   *\n   * Updating this will **not** automatically trigger a redraw, unlike\n   * other frameworks.\n   *\n   * This is different to Vnode state, which is always an instance of your\n   * class component.\n   *\n   * This is `undefined` by default.\n   */\n  state!: State;\n\n  /**\n   * @inheritdoc\n   */\n  abstract view(vnode: Mithril.Vnode<Attrs, this>): Mithril.Children;\n\n  /**\n   * @inheritdoc\n   */\n  oninit(vnode: Mithril.Vnode<Attrs, this>) {\n    this.setAttrs(vnode.attrs);\n  }\n\n  /**\n   * @inheritdoc\n   */\n  oncreate(vnode: Mithril.VnodeDOM<Attrs, this>) {\n    this.element = vnode.dom;\n  }\n\n  /**\n   * @inheritdoc\n   */\n  onbeforeupdate(vnode: Mithril.VnodeDOM<Attrs, this>) {\n    this.setAttrs(vnode.attrs);\n  }\n\n  /**\n   * @inheritdoc\n   */\n  onupdate(vnode: Mithril.VnodeDOM<Attrs, this>) {}\n\n  /**\n   * @inheritdoc\n   */\n  onbeforeremove(vnode: Mithril.VnodeDOM<Attrs, this>) {}\n\n  /**\n   * @inheritdoc\n   */\n  onremove(vnode: Mithril.VnodeDOM<Attrs, this>) {}\n\n  /**\n   * Returns a jQuery object for this component's element. If you pass in a\n   * selector string, this method will return a jQuery object, using the current\n   * element as its buffer.\n   *\n   * For example, calling `component.$('li')` will return a jQuery object\n   * containing all of the `li` elements inside the DOM element of this\n   * component.\n   *\n   * @param [selector] a jQuery-compatible selector string\n   * @returns the jQuery object for the DOM node\n   * @final\n   */\n  $(selector?: string): JQuery {\n    const $element = $(this.element) as JQuery<HTMLElement>;\n\n    return selector ? $element.find(selector) : $element;\n  }\n\n  /**\n   * Convenience method to attach a component without JSX.\n   * Has the same effect as calling `m(THIS_CLASS, attrs, children)`.\n   *\n   * @see https://mithril.js.org/hyperscript.html#mselector,-attributes,-children\n   */\n  static component<SAttrs extends ComponentAttrs = ComponentAttrs>(attrs: SAttrs = {} as SAttrs, children: Mithril.Children = null): Mithril.Vnode {\n    const componentAttrs = { ...attrs };\n\n    return m(this as any, componentAttrs, children);\n  }\n\n  /**\n   * Saves a reference to the vnode attrs after running them through initAttrs,\n   * and checking for common issues.\n   */\n  private setAttrs(attrs: Attrs = {} as Attrs): void {\n    (this.constructor as typeof Component).initAttrs(attrs);\n\n    if (attrs) {\n      if ('children' in attrs) {\n        throw new Error(\n          `[${\n            (this.constructor as typeof Component).name\n          }] The \"children\" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute`\n        );\n      }\n\n      if ('tag' in attrs) {\n        throw new Error(`[${(this.constructor as typeof Component).name}] You cannot use the \"tag\" attribute name with Mithril 2.`);\n      }\n    }\n\n    this.attrs = attrs;\n  }\n\n  /**\n   * Initialize the component's attrs.\n   *\n   * This can be used to assign default values for missing, optional attrs.\n   */\n  static initAttrs(attrs: unknown): void {}\n}\n","/**\n * Check if class A is the same as or a subclass of class B.\n */\nexport default function subclassOf(A, B) {\n  return A && (A === B || A.prototype instanceof B);\n}\n","import subclassOf from '../../common/utils/subclassOf';\n\nexport default class PageState {\n  constructor(type, data = {}) {\n    this.type = type;\n    this.data = data;\n  }\n\n  /**\n   * Determine whether the page matches the given class and data.\n   *\n   * @param {object} type The page class to check against. Subclasses are accepted as well.\n   * @param {Record<string, unknown>} data\n   * @return {boolean}\n   */\n  matches(type, data = {}) {\n    // Fail early when the page is of a different type\n    if (!subclassOf(this.type, type)) return false;\n\n    // Now that the type is known to be correct, we loop through the provided\n    // data to see whether it matches the data in our state.\n    return Object.keys(data).every((key) => this.data[key] === data[key]);\n  }\n\n  get(key) {\n    return this.data[key];\n  }\n\n  set(key, value) {\n    this.data[key] = value;\n  }\n}\n","import type Mithril from 'mithril';\nimport app from '../app';\nimport Component from '../Component';\nimport PageState from '../states/PageState';\n\nexport interface IPageAttrs {\n  key?: number;\n  routeName: string;\n}\n\n/**\n * The `Page` component\n *\n * @abstract\n */\nexport default abstract class Page<CustomAttrs extends IPageAttrs = IPageAttrs, CustomState = undefined> extends Component<CustomAttrs, CustomState> {\n  /**\n   * A class name to apply to the body while the route is active.\n   */\n  protected bodyClass = '';\n\n  /**\n   * Whether we should scroll to the top of the page when its rendered.\n   */\n  protected scrollTopOnCreate = true;\n\n  /**\n   * Whether the browser should restore scroll state on refreshes.\n   */\n  protected useBrowserScrollRestoration = true;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    app.previous = app.current;\n    app.current = new PageState(this.constructor, { routeName: this.attrs.routeName });\n\n    app.drawer.hide();\n    app.modal.close();\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    if (this.bodyClass) {\n      $('#app').addClass(this.bodyClass);\n    }\n\n    if (this.scrollTopOnCreate) {\n      $(window).scrollTop(0);\n    }\n\n    if ('scrollRestoration' in history) {\n      history.scrollRestoration = this.useBrowserScrollRestoration ? 'auto' : 'manual';\n    }\n  }\n\n  onremove(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onremove(vnode);\n\n    if (this.bodyClass) {\n      $('#app').removeClass(this.bodyClass);\n    }\n  }\n}\n","function _defineProperties(target, props) {\n  for (var i = 0; i < props.length; i++) {\n    var descriptor = props[i];\n    descriptor.enumerable = descriptor.enumerable || false;\n    descriptor.configurable = true;\n    if (\"value\" in descriptor) descriptor.writable = true;\n    Object.defineProperty(target, descriptor.key, descriptor);\n  }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  Object.defineProperty(Constructor, \"prototype\", {\n    writable: false\n  });\n  return Constructor;\n}","/**\n * Returns if the passed value is an object.\n *\n * In this context, \"object\" refers to **any non-primitive value**, including\n * arrays, function, maps, dates, and more.\n *\n * @example\n * isObject({}); // true\n * @example\n * isObject([]); // true\n * @example\n * isObject(function () {}); // true\n * @example\n * isObject(Object(1)); // true\n * @example\n * isObject(null); // false\n * @example\n * isObject(1); // false\n * @example\n * isObject(\"hello world\"); // false\n *\n * @see https://github.com/jashkenas/underscore/blob/943977e34e2279503528a71ddcc2dd5f96483945/underscore.js#L87-L91\n */\nexport default function isObject(obj: unknown): obj is object {\n  const type = typeof obj;\n  return type === 'function' || (type === 'object' && !!obj);\n}\n","import isObject from './isObject';\n\nexport interface IItemObject<T> {\n  content: T;\n  itemName: string;\n  priority: number;\n}\n\nclass Item<T> {\n  content: T;\n  priority: number;\n\n  constructor(content: T, priority: number) {\n    this.content = content;\n    this.priority = priority;\n  }\n}\n\n/**\n * The `ItemList` class collects items and then arranges them into an array\n * by priority.\n */\nexport default class ItemList<T> {\n  /**\n   * The items in the list.\n   */\n  protected _items: Record<string, Item<T>> = {};\n\n  // TODO: [Flarum 2.0] Remove `.items` getter.\n  /**\n   * A **read-only copy** of items in the list.\n   *\n   * We don't allow adding new items to the ItemList via setting new properties,\n   * nor do we allow modifying existing items directly.\n   *\n   * @deprecated Use {@link ItemList.toObject} instead.\n   */\n  get items(): DeepReadonly<Record<string, Item<T>>> {\n    return new Proxy(this._items, {\n      set() {\n        console.warn('Modifying `ItemList.items` is not allowed.');\n        return false;\n      },\n    });\n  }\n\n  /**\n   * Check whether the list is empty.\n   */\n  isEmpty(): boolean {\n    return Object.keys(this._items).length === 0;\n  }\n\n  /**\n   * Check whether an item is present in the list.\n   */\n  has(key: string): boolean {\n    return Object.keys(this._items).includes(key);\n  }\n\n  /**\n   * Get the content of an item.\n   */\n  get(key: string): T {\n    return this._items[key].content;\n  }\n\n  /**\n   * Get the priority of an item.\n   */\n  getPriority(key: string): number {\n    return this._items[key].priority;\n  }\n\n  /**\n   * Add an item to the list.\n   *\n   * @param key A unique key for the item.\n   * @param content The item's content.\n   * @param priority The priority of the item. Items with a higher priority\n   * will be positioned before items with a lower priority.\n   */\n  add(key: string, content: T, priority: number = 0): this {\n    this._items[key] = new Item(content, priority);\n\n    return this;\n  }\n\n  // TODO: [Flarum 2.0] Remove deprecated `.replace()` method.\n  /**\n   * Replace an item and/or priority in the list, only if it is already present.\n   *\n   * If `content` or `priority` are `null`, these values will not be replaced.\n   *\n   * If the provided `key` is not present, nothing will happen.\n   *\n   * @deprecated Please use the {@link ItemList.setContent} and {@link ItemList.setPriority}\n   * methods to replace items and their priorities. This method will be removed in Flarum 2.0.\n   *\n   * @param key The key of the item in the list\n   * @param content The item's new content\n   * @param priority The item's new priority\n   *\n   * @example <caption>Replace priority and not content.</caption>\n   * items.replace('myItem', null, 10);\n   *\n   * @example <caption>Replace content and not priority.</caption>\n   * items.replace('myItem', <p>My new value.</p>);\n   *\n   * @example <caption>Replace content and priority.</caption>\n   * items.replace('myItem', <p>My new value.</p>, 10);\n   */\n  replace(key: string, content: T | null = null, priority: number | null = null): this {\n    if (!this.has(key)) return this;\n\n    if (content !== null) {\n      this._items[key].content = content;\n    }\n\n    if (priority !== null) {\n      this._items[key].priority = priority;\n    }\n\n    return this;\n  }\n\n  /**\n   * Replaces an item's content, if the provided item key exists.\n   *\n   * If the provided `key` is not present, an error will be thrown.\n   *\n   * @param key The key of the item in the list\n   * @param content The item's new content\n   *\n   * @example <caption>Replace item content.</caption>\n   * items.setContent('myItem', <p>My new value.</p>);\n   *\n   * @example <caption>Replace item content and priority.</caption>\n   *          items\n   *            .setContent('myItem', <p>My new value.</p>)\n   *            .setPriority('myItem', 10);\n   *\n   * @throws If the provided `key` is not present in the ItemList.\n   */\n  setContent(key: string, content: T): this {\n    if (!this.has(key)) {\n      throw new Error(`[ItemList] Cannot set content of Item. Key \\`${key}\\` is not present.`);\n    }\n\n    // Saves on bundle size to call the deprecated method internally\n    return this.replace(key, content);\n  }\n\n  /**\n   * Replaces an item's priority, if the provided item key exists.\n   *\n   * If the provided `key` is not present, an error will be thrown.\n   *\n   * @param key The key of the item in the list\n   * @param priority The item's new priority\n   *\n   * @example <caption>Replace item priority.</caption>\n   * items.setPriority('myItem', 10);\n   *\n   * @example <caption>Replace item priority and content.</caption>\n   *          items\n   *            .setPriority('myItem', 10)\n   *            .setContent('myItem', <p>My new value.</p>);\n   *\n   * @throws If the provided `key` is not present in the ItemList.\n   */\n  setPriority(key: string, priority: number): this {\n    if (!this.has(key)) {\n      throw new Error(`[ItemList] Cannot set priority of Item. Key \\`${key}\\` is not present.`);\n    }\n\n    this._items[key].priority = priority;\n\n    return this;\n  }\n\n  /**\n   * Remove an item from the list.\n   *\n   * If the provided `key` is not present, nothing will happen.\n   */\n  remove(key: string): this {\n    delete this._items[key];\n\n    return this;\n  }\n\n  /**\n   * Merge another list's items into this one.\n   *\n   * The list passed to this function will overwrite items which already exist\n   * with the same key.\n   */\n  merge(otherList: ItemList<T>): ItemList<T> {\n    Object.keys(otherList._items).forEach((key) => {\n      const val = otherList._items[key];\n\n      if (val instanceof Item) {\n        this._items[key] = val;\n      }\n    });\n\n    return this;\n  }\n\n  /**\n   * Convert the list into an array of item content arranged by priority.\n   *\n   * This **does not** preserve the original types of primitives and proxies\n   * all content values to make `itemName` accessible on them.\n   *\n   * **NOTE:** If your ItemList holds primitive types (such as numbers, booleans\n   * or strings), these will be converted to their object counterparts if you do\n   * not provide `true` to this function.\n   *\n   * **NOTE:** Modifying any objects in the final array may also update the\n   * content of the original ItemList.\n   *\n   * @param keepPrimitives Converts item content to objects and sets the\n   * `itemName` property on them.\n   *\n   * @see https://github.com/flarum/core/issues/3030\n   */\n  toArray(keepPrimitives?: false): (T & { itemName: string })[];\n  /**\n   * Convert the list into an array of item content arranged by priority.\n   *\n   * Content values that are already objects will be proxied and have\n   * `itemName` accessible on them. Primitive values will not have the\n   * `itemName` property accessible.\n   *\n   * **NOTE:** Modifying any objects in the final array may also update the\n   * content of the original ItemList.\n   *\n   * @param keepPrimitives Converts item content to objects and sets the\n   * `itemName` property on them.\n   */\n  toArray(keepPrimitives: true): (T extends object ? T & Readonly<{ itemName: string }> : T)[];\n\n  toArray(keepPrimitives: boolean = false): T[] | (T & Readonly<{ itemName: string }>)[] {\n    const items: Item<T>[] = Object.keys(this._items).map((key, i) => {\n      const item = this._items[key];\n\n      if (!keepPrimitives || isObject(item.content)) {\n        // Convert content to object, then proxy it\n        return {\n          ...item,\n          content: this.createItemContentProxy(isObject(item.content) ? item.content : Object(item.content), key),\n        };\n      } else {\n        // ...otherwise just return a clone of the item.\n        return { ...item };\n      }\n    });\n\n    return items.sort((a, b) => b.priority - a.priority).map((item) => item.content);\n  }\n\n  /**\n   * A read-only map of all keys to their respective items in no particular order.\n   *\n   * We don't allow adding new items to the ItemList via setting new properties,\n   * nor do we allow modifying existing items directly. You should use the\n   * {@link ItemList.add}, {@link ItemList.setContent} and\n   * {@link ItemList.setPriority} methods instead.\n   *\n   * To match the old behaviour of the `ItemList.items` property, call\n   * `Object.values(ItemList.toObject())`.\n   *\n   * @example\n   * const items = new ItemList();\n   * items.add('b', 'My cool value', 20);\n   * items.add('a', 'My value', 10);\n   * items.toObject();\n   * // {\n   * //   a: { content: 'My value', priority: 10, itemName: 'a' },\n   * //   b: { content: 'My cool value', priority: 20, itemName: 'b' },\n   * // }\n   */\n  toObject(): DeepReadonly<Record<string, IItemObject<T>>> {\n    return Object.keys(this._items).reduce((map, key) => {\n      const obj = {\n        content: this.get(key),\n        itemName: key,\n        priority: this.getPriority(key),\n      };\n\n      map[key] = obj;\n\n      return map;\n    }, {} as Record<string, IItemObject<T>>);\n  }\n\n  /**\n   * Proxies an item's content, adding the `itemName` readonly property to it.\n   *\n   * @example\n   * createItemContentProxy({ foo: 'bar' }, 'myItem');\n   * // { foo: 'bar', itemName: 'myItem' }\n   *\n   * @param content The item's content (objects only)\n   * @param key The item's key\n   * @return Proxied content\n   *\n   * @internal\n   */\n  private createItemContentProxy<C extends object>(content: C, key: string): Readonly<C & { itemName: string }> {\n    return new Proxy(content, {\n      get(target, property, receiver) {\n        if (property === 'itemName') return key;\n\n        return Reflect.get(target, property, receiver);\n      },\n      set(target, property, value, receiver) {\n        if (key !== null && property === 'itemName') {\n          throw new Error('`itemName` property is read-only');\n        }\n\n        return Reflect.set(target, property, value, receiver);\n      },\n    }) as C & { itemName: string };\n  }\n}\n","import Component from '../Component';\n\n/**\n * The `Separator` component defines a menu separator item.\n */\nclass Separator extends Component {\n  view() {\n    return <li className=\"Dropdown-separator\" />;\n  }\n}\n\nSeparator.isListItem = true;\n\nexport default Separator;\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f);else for(t in e)e[t]&&(n&&(n+=\" \"),n+=t);return n}export function clsx(){for(var e,t,f=0,n=\"\";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","import clsx from 'clsx';\n\n/**\n * This util exposes `clsx` to core and extensions as a re-usable utility.\n *\n * For full documentation, see `clsx` on GitHub.\n *\n * @see https://github.com/lukeed/clsx\n */\nconst classList = clsx;\n\nexport default classList;\n","import type Mithril from 'mithril';\nimport Component, { ComponentAttrs } from '../Component';\nimport Separator from '../components/Separator';\nimport classList from '../utils/classList';\n\ntype ModdedVnodeAttrs = {\n  itemClassName?: string;\n  key?: string;\n};\n\ntype ModdedTag = Mithril.Vnode['tag'] & {\n  isListItem?: boolean;\n  isActive?: (attrs: ComponentAttrs) => boolean;\n};\n\ntype ModdedVnode = Mithril.Vnode<ModdedVnodeAttrs> & { itemName?: string; itemClassName?: string; tag: ModdedTag };\n\ntype ModdedChild = ModdedVnode | string | number | boolean | null | undefined;\ntype ModdedChildArray = ModdedChildren[];\ntype ModdedChildren = ModdedChild | ModdedChildArray;\n\n/**\n * This type represents an element of a list returned by `ItemList.toArray()`,\n * coupled with some static properties used on various components.\n */\nexport type ModdedChildrenWithItemName = ModdedChildren & { itemName?: string };\n\nfunction isVnode(item: ModdedChildren): item is Mithril.Vnode {\n  return typeof item === 'object' && item !== null && 'tag' in item;\n}\n\nfunction isSeparator(item: ModdedChildren): boolean {\n  return isVnode(item) && item.tag === Separator;\n}\n\nfunction withoutUnnecessarySeparators(items: ModdedChildrenWithItemName[]): ModdedChildrenWithItemName[] {\n  const newItems: ModdedChildrenWithItemName[] = [];\n  let prevItem: ModdedChildren;\n\n  items.filter(Boolean).forEach((item, i: number) => {\n    if (!isSeparator(item) || (prevItem && !isSeparator(prevItem) && i !== items.length - 1)) {\n      prevItem = item;\n      newItems.push(item);\n    }\n  });\n\n  return newItems;\n}\n\n/**\n * The `listItems` helper wraps an array of components in the provided tag,\n * stripping out any unnecessary `Separator` components.\n *\n * By default, this tag is an `<li>` tag, but this is customisable through the\n * second function parameter, `customTag`.\n */\nexport default function listItems<Attrs extends ComponentAttrs>(\n  rawItems: ModdedChildrenWithItemName[],\n  customTag: VnodeElementTag<Attrs> = 'li',\n  attributes: Attrs = {} as Attrs\n): Mithril.Vnode[] {\n  const items = rawItems instanceof Array ? rawItems : [rawItems];\n  const Tag = customTag;\n\n  return withoutUnnecessarySeparators(items).map((item) => {\n    const classes = [item.itemName && `item-${item.itemName}`];\n\n    if (isVnode(item) && item.tag.isListItem) {\n      item.attrs = item.attrs || {};\n      item.attrs.key = item.attrs.key || item.itemName;\n      item.key = item.attrs.key;\n\n      return item;\n    }\n\n    if (isVnode(item)) {\n      classes.push(item.attrs?.itemClassName || item.itemClassName);\n\n      if (item.tag.isActive?.(item.attrs)) {\n        classes.push('active');\n      }\n    }\n\n    const key = (isVnode(item) && item?.attrs?.key) || item.itemName;\n\n    return (\n      <Tag className={classList(classes)} key={key} {...attributes}>\n        {item}\n      </Tag>\n    );\n  });\n}\n","import Component from '../../common/Component';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\n\n/**\n * The `DiscussionHero` component displays the hero on a discussion page.\n *\n * ### attrs\n *\n * - `discussion`\n */\nexport default class DiscussionHero extends Component {\n  view() {\n    return (\n      <header className=\"Hero DiscussionHero\">\n        <div className=\"container\">\n          <ul className=\"DiscussionHero-items\">{listItems(this.items().toArray())}</ul>\n        </div>\n      </header>\n    );\n  }\n\n  /**\n   * Build an item list for the contents of the discussion hero.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  items() {\n    const items = new ItemList();\n    const discussion = this.attrs.discussion;\n    const badges = discussion.badges().toArray();\n\n    if (badges.length) {\n      items.add('badges', <ul className=\"DiscussionHero-badges badges\">{listItems(badges)}</ul>, 10);\n    }\n\n    items.add('title', <h1 className=\"DiscussionHero-title\">{discussion.title()}</h1>);\n\n    return items;\n  }\n}\n","export default function _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = Object.keys(source);\n  var key, i;\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (excluded.indexOf(key) >= 0) continue;\n    target[key] = source[key];\n  }\n  return target;\n}","/**\n * The `extract` utility deletes a property from an object and returns its\n * value.\n *\n * @param object The object that owns the property\n * @param property The name of the property to extract\n * @return The value of the property\n */\nexport default function extract<T, K extends keyof T>(object: T, property: K): T[K] {\n  const value = object[property];\n\n  delete object[property];\n\n  return value;\n}\n","/**\n * Truncate a string to the given length, appending ellipses if necessary.\n */\nexport function truncate(string: string, length: number, start: number = 0): string {\n  return (start > 0 ? '...' : '') + string.substring(start, start + length) + (string.length > start + length ? '...' : '');\n}\n\n/**\n * Create a slug out of the given string depending on the selected mode.\n * Invalid characters are converted to hyphens.\n *\n * NOTE: This method does not use the comparably sophisticated transliteration\n * mechanism that is employed in the backend. Therefore, it should only be used\n * to *suggest* slugs that can be overridden by the user.\n */\nexport function slug(string: string, mode: SluggingMode = SluggingMode.ALPHANUMERIC): string {\n  switch (mode) {\n    case SluggingMode.UTF8:\n      return (\n        string\n          .toLowerCase()\n          // Match non-word characters (take UTF8 into consideration) and replace with a dash.\n          .replace(/[^\\p{L}\\p{N}\\p{M}]/giu, '-')\n          .replace(/-+/g, '-')\n          .replace(/-$|^-/g, '')\n      );\n\n    case SluggingMode.ALPHANUMERIC:\n    default:\n      return string\n        .toLowerCase()\n        .replace(/[^a-z0-9]/gi, '-')\n        .replace(/-+/g, '-')\n        .replace(/-$|^-/g, '');\n  }\n}\n\nenum SluggingMode {\n  ALPHANUMERIC = 'alphanum',\n  UTF8 = 'utf8',\n}\n\n/**\n * Strip HTML tags and quotes out of the given string, replacing them with\n * meaningful punctuation.\n */\nexport function getPlainContent(string: string): string {\n  const html = string.replace(/(<\\/p>|<br>)/g, '$1 &nbsp;').replace(/<img\\b[^>]*>/gi, ' ');\n\n  const element = new DOMParser().parseFromString(html, 'text/html').documentElement;\n\n  getPlainContent.removeSelectors.forEach((selector) => {\n    const el = element.querySelectorAll(selector);\n    el.forEach((e) => {\n      e.remove();\n    });\n  });\n\n  return element.innerText.replace(/\\s+/g, ' ').trim();\n}\n\n/**\n * An array of DOM selectors to remove when getting plain content.\n *\n * @type {Array}\n */\ngetPlainContent.removeSelectors = ['blockquote', 'script'];\n\n/**\n * Make a string's first character uppercase.\n */\nexport function ucfirst(string: string): string {\n  return string.substr(0, 1).toUpperCase() + string.substr(1);\n}\n\n/**\n * Transform a camel case string to snake case.\n */\nexport function camelCaseToSnakeCase(str: string): string {\n  return str.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`);\n}\n\n/**\n * Generate a random string (a-z, 0-9) of a given length.\n *\n * Providing a length of less than 0 will result in an error.\n *\n * @param length Length of the random string to generate\n * @returns A random string of provided length\n */\nexport function generateRandomString(length: number): string {\n  if (length < 0) throw new Error('Cannot generate a random string with length less than 0.');\n  if (length === 0) return '';\n\n  const arr = new Uint8Array(length / 2);\n  window.crypto.getRandomValues(arr);\n\n  return Array.from(arr, (dec) => {\n    return dec.toString(16).padStart(2, '0');\n  }).join('');\n}\n","import Component from '../Component';\nimport extract from '../utils/extract';\n\n/**\n * The link component enables both internal and external links.\n * It will return a regular HTML link for any links to external sites,\n * and it will use Mithril's m.route.Link for any internal links.\n *\n * Links will default to internal; the 'external' attr must be set to\n * `true` for the link to be external.\n */\nexport default class Link extends Component {\n  view(vnode) {\n    let { options = {}, ...attrs } = vnode.attrs;\n\n    attrs.href ||= '';\n\n    // For some reason, m.route.Link does not like vnode.text, so if present, we\n    // need to convert it to text vnodes and store it in children.\n    const children = vnode.children || { tag: '#', children: vnode.text };\n\n    if (attrs.external) {\n      return <a {...attrs}>{children}</a>;\n    }\n\n    // If the href URL of the link is the same as the current page path\n    // we will not add a new entry to the browser history.\n    // This allows us to still refresh the Page component\n    // without adding endless history entries.\n    if (attrs.href === m.route.get()) {\n      if (!('replace' in options)) options.replace = true;\n    }\n\n    // Mithril 2 does not completely rerender the page if a route change leads to the same route\n    // (or the same component handling a different route).\n    // Here, the `force` parameter will use Mithril's key system to force a full rerender\n    // see https://mithril.js.org/route.html#key-parameter\n    if (extract(attrs, 'force')) {\n      if (!('state' in options)) options.state = {};\n      if (!('key' in options.state)) options.state.key = Date.now();\n    }\n\n    attrs.options = options;\n\n    return <m.route.Link {...attrs}>{children}</m.route.Link>;\n  }\n}\n","import type Mithril from 'mithril';\nimport type { ComponentAttrs } from '../Component';\nimport User from '../models/User';\nimport classList from '../utils/classList';\n\nexport interface AvatarAttrs extends ComponentAttrs {}\n\n/**\n * The `avatar` helper displays a user's avatar.\n *\n * @param user\n * @param attrs Attributes to apply to the avatar element\n */\nexport default function avatar(user: User | null, attrs: ComponentAttrs = {}): Mithril.Vnode {\n  attrs.className = classList('Avatar', attrs.className);\n  attrs.loading ??= 'lazy';\n  let content: string = '';\n\n  // If the `title` attribute is set to null or false, we don't want to give the\n  // avatar a title. On the other hand, if it hasn't been given at all, we can\n  // safely default it to the user's username.\n  const hasTitle: boolean | string = attrs.title === 'undefined' || attrs.title;\n  if (!hasTitle) delete attrs.title;\n\n  // If a user has been passed, then we will set up an avatar using their\n  // uploaded image, or the first letter of their username if they haven't\n  // uploaded one.\n  if (user) {\n    const username = user.displayName() || '?';\n    const avatarUrl = user.avatarUrl();\n\n    if (hasTitle) attrs.title = attrs.title || username;\n\n    if (avatarUrl) {\n      return <img {...attrs} src={avatarUrl} alt=\"\" />;\n    }\n\n    content = username.charAt(0).toUpperCase();\n    attrs.style = { '--avatar-bg': user.color() };\n  }\n\n  return <span {...attrs}>{content}</span>;\n}\n","import type Mithril from 'mithril';\nimport { truncate } from '../utils/string';\n\n/**\n * The `highlight` helper searches for a word phrase in a string, and wraps\n * matches with the <mark> tag.\n *\n * @param string The string to highlight.\n * @param phrase The word or words to highlight.\n * @param [length] The number of characters to truncate the string to.\n *     The string will be truncated surrounding the first match.\n */\nexport default function highlight(string: string, phrase?: string | RegExp, length?: number): Mithril.Vnode<any, any> | string {\n  if (!phrase && !length) return string;\n\n  // Convert the word phrase into a global regular expression (if it isn't\n  // already) so we can search the string for matched.\n  const regexp = phrase instanceof RegExp ? phrase : new RegExp(phrase ?? '', 'gi');\n\n  let highlighted = string;\n  let start = 0;\n\n  // If a length was given, the truncate the string surrounding the first match.\n  if (length) {\n    if (phrase) start = Math.max(0, string.search(regexp) - length / 2);\n\n    highlighted = truncate(highlighted, length, start);\n  }\n\n  // Convert the string into HTML entities, then highlight all matches with\n  // <mark> tags. Then we will return the result as a trusted HTML string.\n  highlighted = $('<div/>').text(highlighted).html();\n\n  if (phrase) highlighted = highlighted.replace(regexp, '<mark>$&</mark>');\n\n  return m.trust(highlighted);\n}\n","import type Mithril from 'mithril';\nimport classList from '../utils/classList';\n\n/**\n * The `icon` helper displays an icon.\n *\n * @param fontClass The full icon class, prefix and the icon’s name.\n * @param attrs Any other attributes to apply.\n */\nexport default function icon(fontClass: string, attrs: Mithril.Attributes = {}): Mithril.Vnode {\n  attrs.className = classList('icon', fontClass, attrs.className);\n\n  return <i aria-hidden=\"true\" {...attrs} />;\n}\n","import type Mithril from 'mithril';\n\n/**\n * Extract the text nodes from a virtual element.\n */\nexport default function extractText(vdom: Mithril.Children): string {\n  if (vdom instanceof Array) {\n    return vdom.map((element) => extractText(element)).join('');\n  } else if (typeof vdom === 'object' && vdom !== null) {\n    return vdom.children ? extractText(vdom.children) : String(vdom.text);\n  } else {\n    return String(vdom);\n  }\n}\n","import app from '../../common/app';\nimport dayjs from 'dayjs';\nimport extractText from './extractText';\n\n/**\n * The `humanTime` utility converts a date to a localized, human-readable time-\n * ago string.\n */\nexport default function humanTime(time: dayjs.ConfigType): string {\n  let d = dayjs(time);\n  const now = dayjs();\n\n  // To prevent showing things like \"in a few seconds\" due to small offsets\n  // between client and server time, we always reset future dates to the\n  // current time. This will result in \"just now\" being shown instead.\n  if (d.isAfter(now)) {\n    d = now;\n  }\n\n  const day = 864e5;\n  const diff = d.diff(dayjs());\n  let ago: string;\n\n  // If this date was more than a month ago, we'll show the name of the month\n  // in the string. If it wasn't this year, we'll show the year as well.\n  if (diff < -30 * day) {\n    if (d.year() === dayjs().year()) {\n      ago = d.format(extractText(app.translator.trans('core.lib.datetime_formats.humanTimeShort')));\n    } else {\n      ago = d.format(extractText(app.translator.trans('core.lib.datetime_formats.humanTimeLong')));\n    }\n  } else {\n    ago = d.fromNow();\n  }\n\n  return ago;\n}\n","import app from '../../common/app';\nimport extractText from './extractText';\n\n/**\n * The `abbreviateNumber` utility converts a number to a shorter localized form.\n *\n * @example\n * abbreviateNumber(1234);\n * // \"1.2K\"\n */\nexport default function abbreviateNumber(number: number): string {\n  // TODO: translation\n  if (number >= 1000000) {\n    return Math.floor(number / 1000000) + extractText(app.translator.trans('core.lib.number_suffix.mega_text'));\n  } else if (number >= 1000) {\n    return (number / 1000).toFixed(1) + extractText(app.translator.trans('core.lib.number_suffix.kilo_text'));\n  } else {\n    return number.toString();\n  }\n}\n","import app from '../../common/app';\nimport Component, { ComponentAttrs } from '../Component';\nimport icon from '../helpers/icon';\nimport listItems, { ModdedChildrenWithItemName } from '../helpers/listItems';\nimport extractText from '../utils/extractText';\nimport type Mithril from 'mithril';\n\nexport interface IDropdownAttrs extends ComponentAttrs {\n  /** A class name to apply to the dropdown toggle button. */\n  buttonClassName?: string;\n  /** A class name to apply to the dropdown menu. */\n  menuClassName?: string;\n  /** The name of an icon to show in the dropdown toggle button. */\n  icon?: string;\n  /** The name of an icon to show on the right of the button. */\n  caretIcon?: string;\n  /** The label of the dropdown toggle button. Defaults to 'Controls'. */\n  label: Mithril.Children;\n  /** The label used to describe the dropdown toggle button to assistive readers. Defaults to 'Toggle dropdown menu'. */\n  accessibleToggleLabel?: string;\n  /** An action to take when the dropdown is collapsed. */\n  onhide?: () => void;\n  /** An action to take when the dropdown is opened. */\n  onshow?: () => void;\n\n  lazyDraw?: boolean;\n}\n\n/**\n * The `Dropdown` component displays a button which, when clicked, shows a\n * dropdown menu beneath it.\n *\n * The children will be displayed as a list inside the dropdown menu.\n */\nexport default class Dropdown<CustomAttrs extends IDropdownAttrs = IDropdownAttrs> extends Component<CustomAttrs> {\n  protected showing = false;\n\n  static initAttrs(attrs: IDropdownAttrs) {\n    attrs.className ||= '';\n    attrs.buttonClassName ||= '';\n    attrs.menuClassName ||= '';\n    attrs.label ||= '';\n    attrs.caretIcon ??= 'fas fa-caret-down';\n    attrs.accessibleToggleLabel ||= extractText(app.translator.trans('core.lib.dropdown.toggle_dropdown_accessible_label'));\n  }\n\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    const items = vnode.children ? listItems(vnode.children as ModdedChildrenWithItemName[]) : [];\n    const renderItems = this.attrs.lazyDraw ? this.showing : true;\n\n    return (\n      <div className={'ButtonGroup Dropdown dropdown ' + this.attrs.className + ' itemCount' + items.length + (this.showing ? ' open' : '')}>\n        {this.getButton(vnode.children as Mithril.ChildArray)}\n        {renderItems && this.getMenu(items)}\n      </div>\n    );\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    // When opening the dropdown menu, work out if the menu goes beyond the\n    // bottom of the viewport. If it does, we will apply class to make it show\n    // above the toggle button instead of below it.\n    this.$().on('shown.bs.dropdown', () => {\n      const { lazyDraw, onshow } = this.attrs;\n\n      this.showing = true;\n\n      // If using lazy drawing, redraw before calling `onshow` function\n      // to make sure the menu DOM exists in case the callback tries to use it.\n      if (lazyDraw) {\n        m.redraw.sync();\n      }\n\n      if (typeof onshow === 'function') {\n        onshow();\n      }\n\n      // If not using lazy drawing, keep previous functionality\n      // of redrawing after calling onshow()\n      if (!lazyDraw) {\n        m.redraw();\n      }\n\n      const $menu = this.$('.Dropdown-menu');\n      const isRight = $menu.hasClass('Dropdown-menu--right');\n\n      const top = $menu.offset()?.top ?? 0;\n      const height = $menu.height() ?? 0;\n      const windowSrollTop = $(window).scrollTop() ?? 0;\n      const windowHeight = $(window).height() ?? 0;\n\n      $menu.removeClass('Dropdown-menu--top Dropdown-menu--right');\n\n      $menu.toggleClass('Dropdown-menu--top', top + height > windowSrollTop + windowHeight);\n\n      if (($menu.offset()?.top || 0) < 0) {\n        $menu.removeClass('Dropdown-menu--top');\n      }\n\n      const left = $menu.offset()?.left ?? 0;\n      const width = $menu.width() ?? 0;\n      const windowScrollLeft = $(window).scrollLeft() ?? 0;\n      const windowWidth = $(window).width() ?? 0;\n\n      $menu.toggleClass('Dropdown-menu--right', isRight || left + width > windowScrollLeft + windowWidth);\n    });\n\n    this.$().on('hidden.bs.dropdown', () => {\n      this.showing = false;\n\n      if (this.attrs.onhide) {\n        this.attrs.onhide();\n      }\n\n      m.redraw();\n    });\n  }\n\n  /**\n   * Get the template for the button.\n   */\n  getButton(children: Mithril.ChildArray): Mithril.Vnode<any, any> {\n    return (\n      <button\n        className={'Dropdown-toggle ' + this.attrs.buttonClassName}\n        aria-haspopup=\"menu\"\n        aria-label={this.attrs.accessibleToggleLabel}\n        data-toggle=\"dropdown\"\n        onclick={this.attrs.onclick}\n      >\n        {this.getButtonContent(children)}\n      </button>\n    );\n  }\n\n  /**\n   * Get the template for the button's content.\n   */\n  getButtonContent(children: Mithril.ChildArray): Mithril.ChildArray {\n    return [\n      this.attrs.icon ? icon(this.attrs.icon, { className: 'Button-icon' }) : '',\n      <span className=\"Button-label\">{this.attrs.label}</span>,\n      this.attrs.caretIcon ? icon(this.attrs.caretIcon, { className: 'Button-caret' }) : '',\n    ];\n  }\n\n  getMenu(items: Mithril.Vnode<any, any>[]): Mithril.Vnode<any, any> {\n    return <ul className={'Dropdown-menu dropdown-menu ' + this.attrs.menuClassName}>{items}</ul>;\n  }\n}\n","import dayjs from 'dayjs';\nimport type Mithril from 'mithril';\nimport humanTimeUtil from '../utils/humanTime';\n\n/**\n * The `humanTime` helper displays a time in a human-friendly time-ago format\n * (e.g. '12 days ago'), wrapped in a <time> tag with other information about\n * the time.\n */\nexport default function humanTime(time: Date): Mithril.Vnode {\n  const d = dayjs(time);\n\n  const datetime = d.format();\n  const full = d.format('LLLL');\n  const ago = humanTimeUtil(time);\n\n  return (\n    <time pubdate datetime={datetime} title={full} data-humantime>\n      {ago}\n    </time>\n  );\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport humanTime from '../../common/helpers/humanTime';\nimport icon from '../../common/helpers/icon';\n\n/**\n * Displays information about a the first or last post in a discussion.\n *\n * ### Attrs\n *\n * - `discussion`\n * - `lastPost`\n */\nexport default class TerminalPost extends Component {\n  view() {\n    const discussion = this.attrs.discussion;\n    const lastPost = this.attrs.lastPost && discussion.replyCount();\n\n    const user = discussion[lastPost ? 'lastPostedUser' : 'user']();\n    const time = discussion[lastPost ? 'lastPostedAt' : 'createdAt']();\n\n    return (\n      <span>\n        {!!lastPost && icon('fas fa-reply')}{' '}\n        {app.translator.trans('core.forum.discussion_list.' + (lastPost ? 'replied' : 'started') + '_text', {\n          user,\n          ago: humanTime(time),\n        })}\n      </span>\n    );\n  }\n}\n","/**\n * The `SubtreeRetainer` class keeps track of a number of pieces of data,\n * comparing the values of these pieces at every iteration.\n *\n * This is useful for preventing redraws to relatively static (or huge)\n * components whose VDOM only depends on very few values, when none of them\n * have changed.\n *\n * @example\n * // Check two callbacks for changes on each update\n * this.subtree = new SubtreeRetainer(\n *   () => this.attrs.post.freshness,\n *   () => this.showing\n * );\n *\n * // Add more callbacks to be checked for updates\n * this.subtree.check(() => this.attrs.user.freshness);\n *\n * // In a component's onbeforeupdate() method:\n * return this.subtree.needsRebuild()\n *\n * @see https://mithril.js.org/lifecycle-methods.html#onbeforeupdate\n */\nexport default class SubtreeRetainer {\n  protected callbacks: (() => any)[];\n  protected data: Record<string, any>;\n\n  /**\n   * @param callbacks Functions returning data to keep track of.\n   */\n  constructor(...callbacks: (() => any)[]) {\n    this.callbacks = callbacks;\n    this.data = {};\n\n    // Build the initial data, so it is available when calling\n    // needsRebuild from the onbeforeupdate hook.\n    this.needsRebuild();\n  }\n\n  /**\n   * Return whether any data has changed since the last check.\n   * If so, Mithril needs to re-diff the vnode and its children.\n   */\n  needsRebuild(): boolean {\n    let needsRebuild = false;\n\n    this.callbacks.forEach((callback, i) => {\n      const result = callback();\n\n      if (result !== this.data[i]) {\n        this.data[i] = result;\n        needsRebuild = true;\n      }\n    });\n\n    return needsRebuild;\n  }\n\n  /**\n   * Add another callback to be checked.\n   */\n  check(...callbacks: (() => any)[]): void {\n    this.callbacks = this.callbacks.concat(callbacks);\n    // Update the data cache when new checks are added.\n    this.needsRebuild();\n  }\n\n  /**\n   * Invalidate the subtree, forcing it to be redrawn.\n   */\n  invalidate(): void {\n    this.data = {};\n  }\n}\n","import app from '../../common/app';\nimport Component, { ComponentAttrs } from '../Component';\nimport classList from '../utils/classList';\n\nexport interface LoadingIndicatorAttrs extends ComponentAttrs {\n  /**\n   * Custom classes for the loading indicator's container.\n   */\n  className?: string;\n  /**\n   * Custom classes for the loading indicator's container.\n   */\n  containerClassName?: string;\n  /**\n   * Optional size for the loading indicator.\n   */\n  size?: 'large' | 'medium' | 'small';\n  /**\n   * Optional attributes to apply to the loading indicator's container.\n   */\n  containerAttrs?: Partial<ComponentAttrs>;\n  /**\n   * Display type of the spinner.\n   *\n   * @default 'block'\n   */\n  display?: 'block' | 'inline' | 'unset';\n}\n\n/**\n * The `LoadingIndicator` component displays a simple CSS-based loading spinner.\n *\n * To set a custom color, use the CSS `color` property.\n *\n * To increase spacing around the spinner, use the CSS `height` property on the\n * spinner's **container**. Setting the `display` attribute to `block` will set\n * a height of `100px` by default.\n *\n * To apply a custom size to the loading indicator, set the `--size` and\n * `--thickness` CSS custom properties on the loading indicator container.\n *\n * If you *really* want to change how this looks as part of your custom theme,\n * you can override the `border-radius` and `border` then set either a\n * background image, or use `content: \"\\<glyph>\"` (e.g. `content: \"\\f1ce\"`)\n * and `font-family: 'Font Awesome 5 Free'` to set an FA icon if you'd rather.\n *\n * ### Attrs\n *\n * - `containerClassName` Class name(s) to apply to the indicator's parent\n * - `className` Class name(s) to apply to the indicator itself\n * - `display` Determines how the spinner should be displayed (`inline`, `block` (default) or `unset`)\n * - `size` Size of the loading indicator (`small`, `medium` or `large`)\n * - `containerAttrs` Optional attrs to be applied to the container DOM element\n *\n * All other attrs will be assigned as attributes on the DOM element.\n */\nexport default class LoadingIndicator extends Component<LoadingIndicatorAttrs> {\n  view() {\n    const { display = 'block', size = 'medium', containerClassName, className, ...attrs } = this.attrs;\n\n    const completeClassName = classList('LoadingIndicator', className);\n    const completeContainerClassName = classList(\n      'LoadingIndicator-container',\n      display !== 'unset' && `LoadingIndicator-container--${display}`,\n      size && `LoadingIndicator-container--${size}`,\n      containerClassName\n    );\n\n    return (\n      <div\n        aria-label={app.translator.trans('core.lib.loading_indicator.accessible_label')}\n        role=\"status\"\n        {...attrs.containerAttrs}\n        data-size={size}\n        className={completeContainerClassName}\n      >\n        <div aria-hidden=\"true\" className={completeClassName} {...attrs} />\n      </div>\n    );\n  }\n}\n","import Component from '../Component';\n\n/**\n * The `ConfirmDocumentUnload` component can be used to register a global\n * event handler that prevents closing the browser window/tab based on the\n * return value of a given callback prop.\n *\n * ### Attrs\n *\n * - `when` - a callback returning true when the browser should prompt for\n *            confirmation before closing the window/tab\n */\nexport default class ConfirmDocumentUnload extends Component {\n  handler() {\n    return this.attrs.when() || undefined;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.boundHandler = this.handler.bind(this);\n    $(window).on('beforeunload', this.boundHandler);\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    $(window).off('beforeunload', this.boundHandler);\n  }\n\n  view(vnode) {\n    return <>{vnode.children}</>;\n  }\n}\n","import app from '../app';\n\n/**\n * Calls `console.warn` with the provided arguments, but only if the forum is in debug mode.\n *\n * This function is intended to provide warnings to extension developers about issues with\n * their extensions that may not be easily noticed when testing, such as accessibility\n * issues.\n *\n * These warnings should be hidden on production forums to ensure webmasters are not\n * inundated with do-gooders telling them they have an issue when it isn't something they\n * can fix.\n */\nexport default function fireDebugWarning(...args: Parameters<typeof console.warn>): void {\n  if (!app.forum.attribute('debug')) return;\n\n  console.warn(...args);\n}\n\n/**\n * Fire a Flarum deprecation warning which is shown in the JS console.\n *\n * These warnings are only shown when the forum is in debug mode, and the function exists to\n * reduce bundle size caused by multiple warnings across our JavaScript.\n *\n * @param message The message to display. (Short, but sweet, please!)\n * @param githubId The PR or Issue ID with more info in relation to this change.\n * @param [removedFrom] The version in which this feature will be completely removed. (default: 2.0)\n * @param [repo] The repo which the issue or PR is located in. (default: flarum/core)\n *\n * @see {@link fireDebugWarning}\n */\nexport function fireDeprecationWarning(message: string, githubId: string, removedFrom: string = '2.0', repo: string = 'flarum/core'): void {\n  // GitHub auto-redirects between `/pull` and `/issues` for us, so using `/pull` saves 2 bytes!\n  fireDebugWarning(`[Flarum ${removedFrom} Deprecation] ${message}\\n\\nSee: https://github.com/${repo}/pull/${githubId}`);\n}\n","import type Mithril from 'mithril';\nimport Component, { ComponentAttrs } from '../Component';\nimport fireDebugWarning from '../helpers/fireDebugWarning';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport extractText from '../utils/extractText';\nimport LoadingIndicator from './LoadingIndicator';\n\nexport interface IButtonAttrs extends ComponentAttrs {\n  /**\n   * Class(es) of an optional icon to be rendered within the button.\n   *\n   * If provided, the button will gain a `has-icon` class.\n   */\n  icon?: string;\n  /**\n   * Disables button from user input.\n   *\n   * Default: `false`\n   */\n  disabled?: boolean;\n  /**\n   * Show a loading spinner within the button.\n   *\n   * If `true`, also disables the button.\n   *\n   * Default: `false`\n   */\n  loading?: boolean;\n  /**\n   * **DEPRECATED:** Please use the `aria-label` attribute instead. For tooltips, use\n   * the `<Tooltip>` component.\n   *\n   * Accessible text for the button. This should always be present if the button only\n   * contains an icon.\n   *\n   * The textual content of this attribute is passed to the DOM element as `aria-label`.\n   *\n   * @deprecated\n   */\n  title?: string | Mithril.ChildArray;\n  /**\n   * Accessible text for the button. This should always be present if the button only\n   * contains an icon.\n   *\n   * The textual content of this attribute is passed to the DOM element as `aria-label`.\n   */\n  'aria-label'?: string | Mithril.ChildArray;\n  /**\n   * Button type.\n   *\n   * Default: `\"button\"`\n   *\n   * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type\n   */\n  type?: string;\n}\n\n/**\n * The `Button` component defines an element which, when clicked, performs an\n * action.\n *\n * Other attrs will be assigned as attributes on the `<button>` element.\n *\n * Note that a Button has no default class names. This is because a Button can\n * be used to represent any generic clickable control, like a menu item. Common\n * styles can be applied by providing `className=\"Button\"` to the Button component.\n */\nexport default class Button<CustomAttrs extends IButtonAttrs = IButtonAttrs> extends Component<CustomAttrs> {\n  view(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    let { type, title, 'aria-label': ariaLabel, icon: iconName, disabled, loading, className, class: _class, ...attrs } = this.attrs;\n\n    // If no `type` attr provided, set to \"button\"\n    type ||= 'button';\n\n    // Use `title` attribute as `aria-label` if none provided\n    ariaLabel ||= title;\n\n    // If given a translation object, extract the text.\n    if (typeof ariaLabel === 'object') {\n      ariaLabel = extractText(ariaLabel);\n    }\n\n    if (disabled || loading) {\n      delete attrs.onclick;\n    }\n\n    className = classList(_class, className, {\n      hasIcon: iconName,\n      disabled: disabled || loading,\n      loading: loading,\n    });\n\n    const buttonAttrs = {\n      disabled,\n      className,\n      type,\n      'aria-label': ariaLabel,\n      ...attrs,\n    };\n\n    return <button {...buttonAttrs}>{this.getButtonContent(vnode.children)}</button>;\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    const { 'aria-label': ariaLabel } = this.attrs;\n\n    if (this.view === Button.prototype.view && !ariaLabel && !extractText(vnode.children) && !this.element?.getAttribute?.('aria-label')) {\n      fireDebugWarning(\n        '[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',\n        this.element\n      );\n    }\n  }\n\n  /**\n   * Get the template for the button's content.\n   */\n  protected getButtonContent(children: Mithril.Children): Mithril.ChildArray {\n    const iconName = this.attrs.icon;\n\n    return [\n      iconName && icon(iconName, { className: 'Button-icon' }),\n      children && <span className=\"Button-label\">{children}</span>,\n      this.attrs.loading && <LoadingIndicator size=\"small\" display=\"inline\" />,\n    ];\n  }\n}\n","/*\n * Original Copyright GitHub, Inc. Licensed under the MIT License.\n * See license text at https://github.com/github/markdown-toolbar-element/blob/master/LICENSE.\n */\n\nexport interface SelectionRange {\n  text: string;\n  selectionStart: number | undefined;\n  selectionEnd: number | undefined;\n}\n\nlet canInsertText: boolean | null = null;\n\nexport default function insertText(textarea: HTMLTextAreaElement, { text, selectionStart, selectionEnd }: SelectionRange) {\n  const originalSelectionStart = textarea.selectionStart;\n  const before = textarea.value.slice(0, originalSelectionStart);\n  const after = textarea.value.slice(textarea.selectionEnd);\n\n  if (canInsertText === null || canInsertText === true) {\n    textarea.contentEditable = 'true';\n    try {\n      canInsertText = document.execCommand('insertText', false, text);\n    } catch (error) {\n      canInsertText = false;\n    }\n    textarea.contentEditable = 'false';\n  }\n\n  if (canInsertText && !textarea.value.slice(0, textarea.selectionStart).endsWith(text)) {\n    canInsertText = false;\n  }\n\n  if (!canInsertText) {\n    textarea.value = before + text + after;\n    textarea.dispatchEvent(new CustomEvent('input', { bubbles: true, cancelable: true }));\n  }\n\n  if (selectionStart != null && selectionEnd != null) {\n    textarea.setSelectionRange(selectionStart, selectionEnd);\n  } else {\n    textarea.setSelectionRange(originalSelectionStart, textarea.selectionEnd);\n  }\n}\n","import getCaretCoordinates from 'textarea-caret';\nimport insertText from './insertText';\nimport ItemList from './ItemList';\nimport type EditorDriverInterface from './EditorDriverInterface';\nimport { type EditorDriverParams } from './EditorDriverInterface';\n\nexport default class BasicEditorDriver implements EditorDriverInterface {\n  el: HTMLTextAreaElement;\n\n  constructor(dom: HTMLElement, params: EditorDriverParams) {\n    this.el = document.createElement('textarea');\n\n    this.build(dom, params);\n  }\n\n  protected build(dom: HTMLElement, params: EditorDriverParams) {\n    this.el.className = params.classNames.join(' ');\n    this.el.disabled = params.disabled;\n    this.el.placeholder = params.placeholder;\n    this.el.value = params.value;\n\n    const callInputListeners = (e: Event) => {\n      params.inputListeners.forEach((listener) => {\n        listener();\n      });\n\n      e.redraw = false;\n    };\n\n    this.el.oninput = (e) => {\n      params.oninput(this.el.value);\n      callInputListeners(e);\n    };\n\n    this.el.onclick = callInputListeners;\n    this.el.onkeyup = callInputListeners;\n\n    this.el.addEventListener('keydown', (e) => {\n      this.keyHandlers(params)\n        .toArray()\n        .forEach((handler) => handler(e));\n    });\n\n    dom.append(this.el);\n  }\n\n  protected keyHandlers(params: EditorDriverParams) {\n    const items = new ItemList<(e: KeyboardEvent) => void>();\n\n    items.add('submit', function (e: KeyboardEvent) {\n      if ((e.metaKey || e.ctrlKey) && e.key === 'Enter') {\n        params.onsubmit();\n      }\n    });\n\n    return items;\n  }\n\n  moveCursorTo(position: number) {\n    this.setSelectionRange(position, position);\n  }\n\n  getSelectionRange(): Array<number> {\n    return [this.el.selectionStart, this.el.selectionEnd];\n  }\n\n  getLastNChars(n: number): string {\n    const value = this.el.value;\n\n    return value.slice(Math.max(0, this.el.selectionStart - n), this.el.selectionStart);\n  }\n\n  insertAtCursor(text: string) {\n    this.insertAt(this.el.selectionStart, text);\n  }\n\n  insertAt(pos: number, text: string) {\n    this.insertBetween(pos, pos, text);\n  }\n\n  insertBetween(selectionStart: number, selectionEnd: number, text: string) {\n    this.setSelectionRange(selectionStart, selectionEnd);\n\n    const cursorPos = selectionStart + text.length;\n    insertText(this.el, { text, selectionStart: cursorPos, selectionEnd: cursorPos });\n  }\n\n  replaceBeforeCursor(start: number, text: string) {\n    this.insertBetween(start, this.el.selectionStart, text);\n  }\n\n  protected setSelectionRange(start: number, end: number) {\n    this.el.setSelectionRange(start, end);\n    this.focus();\n  }\n\n  getCaretCoordinates(position: number) {\n    const relCoords = getCaretCoordinates(this.el, position);\n\n    return {\n      top: relCoords.top - this.el.scrollTop,\n      left: relCoords.left,\n    };\n  }\n\n  // DOM Interactions\n\n  /**\n   * Set the disabled status of the editor.\n   */\n  disabled(disabled: boolean) {\n    this.el.disabled = disabled;\n  }\n\n  /**\n   * Focus on the editor.\n   */\n  focus() {\n    this.el.focus();\n  }\n\n  /**\n   * Destroy the editor\n   */\n  destroy() {\n    this.el.remove();\n  }\n}\n","import Component from '../Component';\nimport type Mithril from 'mithril';\nimport classList from '../utils/classList';\nimport extractText from '../utils/extractText';\n\nexport interface TooltipAttrs extends Mithril.CommonAttributes<TooltipAttrs, Tooltip> {\n  /**\n   * Tooltip textual content.\n   *\n   * String arrays, like those provided by the translator, will be flattened\n   * into strings.\n   */\n  text: string | string[];\n  /**\n   * Use to manually show or hide the tooltip. `undefined` will show based on cursor events.\n   *\n   * Default: `undefined`.\n   */\n  tooltipVisible?: boolean;\n  /**\n   * Whether to show on focus.\n   *\n   * Default: `true`.\n   */\n  showOnFocus?: boolean;\n  /**\n   * Tooltip position around element.\n   *\n   * Default: `'top'`.\n   */\n  position?: 'top' | 'bottom' | 'left' | 'right';\n  /**\n   * Whether HTML content is allowed in the tooltip.\n   *\n   * **Warning:** this is a possible XSS attack vector. This option shouldn't\n   * be used wherever possible, and may not work when we migrate to another\n   * tooltip library. Be prepared for this to break in Flarum stable.\n   *\n   * Default: `false`.\n   *\n   * @deprecated\n   */\n  html?: boolean;\n  /**\n   * Sets the delay between a trigger state occurring and the tooltip appearing\n   * on-screen.\n   *\n   * **Warning:** this option may be removed when switching to another tooltip\n   * library. Be prepared for this to break in Flarum stable.\n   *\n   * Default: `0`.\n   *\n   * @deprecated\n   */\n  delay?: number;\n  /**\n   * Used to disable the warning for passing text to the `title` attribute.\n   *\n   * Tooltip text should be passed to the `text` attribute.\n   */\n  ignoreTitleWarning?: boolean;\n}\n\n/**\n * The `Tooltip` component is used to create a tooltip for an element. It\n * requires a single child element to be passed to it. Passing multiple\n * children or fragments will throw an error.\n *\n * You should use this for any tooltips you create to allow for backwards\n * compatibility when we switch to another tooltip library instead of\n * Bootstrap tooltips.\n *\n * If you need to pass multiple children, surround them with another element,\n * such as a `<span>` or `<div>`.\n *\n * **Note:** this component will overwrite the `title` attribute of the first\n * child you pass to it, as this is how the current tooltip system works in\n * Flarum. This shouldn't be an issue if you're using this component correctly.\n *\n * @example <caption>Basic usage</caption>\n *          <Tooltip text=\"You wish!\">\n *            <Button>\n *              Click for free money!\n *            </Button>\n *          </Tooltip>\n *\n * @example <caption>Use of `position` and `showOnFocus` attrs</caption>\n *          <Tooltip text=\"Woah! That's cool!\" position=\"bottom\" showOnFocus>\n *            <span>3 replies</span>\n *          </Tooltip>\n *\n * @example <caption>Incorrect usage</caption>\n *          // This is wrong! Surround the children with a <span> or similar.\n *          <Tooltip text=\"This won't work\">\n *            Click\n *            <a href=\"/\">here</a>\n *          </Tooltip>\n */\nexport default class Tooltip extends Component<TooltipAttrs> {\n  private firstChild: Mithril.Vnode<any, any> | null = null;\n  private childDomNode: HTMLElement | null = null;\n\n  private oldText: string = '';\n  private oldVisibility: boolean | undefined;\n\n  private shouldRecreateTooltip: boolean = false;\n  private shouldChangeTooltipVisibility: boolean = false;\n\n  view(vnode: Mithril.Vnode<TooltipAttrs, this>) {\n    /**\n     * We know this will be a ChildArray and not a primitive as this\n     * vnode is a component, not a text or trusted HTML vnode.\n     */\n    const children = vnode.children as Mithril.ChildArray | undefined;\n\n    // We remove these to get the remaining attrs to pass to the DOM element\n    const { text, tooltipVisible, showOnFocus = true, position = 'top', ignoreTitleWarning = false, html = false, delay = 0, ...attrs } = this.attrs;\n\n    if ((this.attrs as any).title && !ignoreTitleWarning) {\n      console.warn(\n        '`title` attribute was passed to Tooltip component. Was this intentional? Tooltip content should be passed to the `text` attr instead.'\n      );\n    }\n\n    const realText = this.getRealText();\n\n    // We need to recreate the tooltip if the text has changed\n    if (realText !== this.oldText) {\n      this.oldText = realText;\n      this.shouldRecreateTooltip = true;\n    }\n\n    if (tooltipVisible !== this.oldVisibility) {\n      this.oldVisibility = this.attrs.tooltipVisible;\n      this.shouldChangeTooltipVisibility = true;\n    }\n\n    // We'll try our best to detect any issues created by devs before they cause any weird effects.\n    // Throwing an error will prevent the forum rendering, but will be better at alerting devs to\n    // an issue.\n\n    if (typeof children === 'undefined') {\n      throw new Error(\n        `Tooltip component was provided with no direct child DOM element. Tooltips must contain a single direct DOM node to attach to.`\n      );\n    }\n\n    if (children.length !== 1) {\n      throw new Error(\n        `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>.`\n      );\n    }\n\n    const firstChild = children[0];\n\n    if (typeof firstChild !== 'object' || Array.isArray(firstChild) || firstChild === null) {\n      throw new Error(\n        `Tooltip component was provided with no direct child DOM element. Tooltips must contain a single direct DOM node to attach to.`\n      );\n    }\n\n    if (typeof firstChild.tag === 'string' && ['#', '[', '<'].includes(firstChild.tag)) {\n      throw new Error(\n        `Tooltip component with provided with a vnode with tag \"${firstChild.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>.`\n      );\n    }\n\n    this.firstChild = firstChild;\n\n    return children;\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<TooltipAttrs, this>) {\n    super.oncreate(vnode);\n\n    this.checkDomNodeChanged();\n    this.recreateTooltip();\n  }\n\n  onupdate(vnode: Mithril.VnodeDOM<TooltipAttrs, this>) {\n    super.onupdate(vnode);\n\n    this.checkDomNodeChanged();\n    this.recreateTooltip();\n  }\n\n  private recreateTooltip() {\n    if (this.shouldRecreateTooltip && this.childDomNode !== null) {\n      $(this.childDomNode).tooltip(\n        'destroy',\n        // @ts-expect-error We don't want this arg to be part of the public API. It only exists to prevent deprecation warnings when using `$.tooltip` in this component.\n        'DANGEROUS_tooltip_jquery_fn_deprecation_exempt'\n      );\n      this.createTooltip();\n      this.shouldRecreateTooltip = false;\n    }\n\n    if (this.shouldChangeTooltipVisibility) {\n      this.shouldChangeTooltipVisibility = false;\n      this.updateVisibility();\n    }\n  }\n\n  private updateVisibility() {\n    if (this.childDomNode === null) return;\n\n    if (this.attrs.tooltipVisible === true) {\n      $(this.childDomNode).tooltip(\n        'show',\n        // @ts-expect-error We don't want this arg to be part of the public API. It only exists to prevent deprecation warnings when using `$.tooltip` in this component.\n        'DANGEROUS_tooltip_jquery_fn_deprecation_exempt'\n      );\n    } else if (this.attrs.tooltipVisible === false) {\n      $(this.childDomNode).tooltip(\n        'hide',\n        // @ts-expect-error We don't want this arg to be part of the public API. It only exists to prevent deprecation warnings when using `$.tooltip` in this component.\n        'DANGEROUS_tooltip_jquery_fn_deprecation_exempt'\n      );\n    }\n  }\n\n  private createTooltip() {\n    if (this.childDomNode === null) return;\n\n    const {\n      showOnFocus = true,\n      position = 'top',\n      delay,\n      // This will have no effect when switching to CSS tooltips\n      html = false,\n      tooltipVisible,\n      text,\n    } = this.attrs;\n\n    // Fancy \"hack\" to assemble the trigger string\n    const trigger = typeof tooltipVisible === 'boolean' ? 'manual' : classList('hover', [showOnFocus && 'focus']);\n\n    const realText = this.getRealText();\n    this.childDomNode.setAttribute('title', realText);\n    this.childDomNode.setAttribute('aria-label', realText);\n\n    // https://getbootstrap.com/docs/3.3/javascript/#tooltips-options\n    $(this.childDomNode).tooltip(\n      {\n        html,\n        delay,\n        placement: position,\n        trigger,\n      },\n      // @ts-expect-error We don't want this arg to be part of the public API. It only exists to prevent deprecation warnings when using `$.tooltip` in this component.\n      'DANGEROUS_tooltip_jquery_fn_deprecation_exempt'\n    );\n  }\n\n  private getRealText(): string {\n    const { text } = this.attrs;\n\n    return Array.isArray(text) ? extractText(text) : text;\n  }\n\n  /**\n   * Checks if the tooltip DOM node has changed.\n   *\n   * If it has, it updates `this.childDomNode` to the new node, and sets\n   * `shouldRecreateTooltip` to `true`.\n   */\n  private checkDomNodeChanged() {\n    const domNode = (this.firstChild as Mithril.VnodeDOM<any, any>).dom as HTMLElement;\n\n    if (domNode && !domNode.isSameNode(this.childDomNode)) {\n      this.childDomNode = domNode;\n      this.shouldRecreateTooltip = true;\n    }\n  }\n}\n","import app from '../../common/app';\n\nimport Component from '../Component';\nimport ItemList from '../utils/ItemList';\nimport listItems from '../helpers/listItems';\nimport Button from './Button';\n\nimport BasicEditorDriver from '../utils/BasicEditorDriver';\nimport Tooltip from './Tooltip';\n\n/**\n * The `TextEditor` component displays a textarea with controls, including a\n * submit button.\n *\n * ### Attrs\n *\n * - `composer`\n * - `submitLabel`\n * - `value`\n * - `placeholder`\n * - `disabled`\n * - `preview`\n */\nexport default class TextEditor extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * The value of the editor.\n     *\n     * @type {String}\n     */\n    this.value = this.attrs.value || '';\n\n    /**\n     * Whether the editor is disabled.\n     */\n    this.disabled = !!this.attrs.disabled;\n  }\n\n  view() {\n    return (\n      <div className=\"TextEditor\">\n        <div className=\"TextEditor-editorContainer\"></div>\n\n        <ul className=\"TextEditor-controls Composer-footer\">\n          {listItems(this.controlItems().toArray())}\n          <li className=\"TextEditor-toolbar\">{this.toolbarItems().toArray()}</li>\n        </ul>\n      </div>\n    );\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.attrs.composer.editor = this.buildEditor(this.$('.TextEditor-editorContainer')[0]);\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    const newDisabled = !!this.attrs.disabled;\n\n    if (this.disabled !== newDisabled) {\n      this.disabled = newDisabled;\n      this.attrs.composer.editor.disabled(newDisabled);\n    }\n  }\n\n  buildEditorParams() {\n    return {\n      classNames: ['FormControl', 'Composer-flexible', 'TextEditor-editor'],\n      disabled: this.disabled,\n      placeholder: this.attrs.placeholder || '',\n      value: this.value,\n      oninput: this.oninput.bind(this),\n      inputListeners: [],\n      onsubmit: () => {\n        this.onsubmit();\n        m.redraw();\n      },\n    };\n  }\n\n  buildEditor(dom) {\n    return new BasicEditorDriver(dom, this.buildEditorParams());\n  }\n\n  /**\n   * Build an item list for the text editor controls.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controlItems() {\n    const items = new ItemList();\n\n    items.add(\n      'submit',\n      <Button icon=\"fas fa-paper-plane\" className=\"Button Button--primary\" itemClassName=\"App-primaryControl\" onclick={this.onsubmit.bind(this)}>\n        {this.attrs.submitLabel}\n      </Button>\n    );\n\n    if (this.attrs.preview) {\n      items.add(\n        'preview',\n        <Tooltip text={app.translator.trans('core.forum.composer.preview_tooltip')}>\n          <Button icon=\"far fa-eye\" className=\"Button Button--icon\" onclick={this.attrs.preview} />\n        </Tooltip>\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the toolbar controls.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  toolbarItems() {\n    return new ItemList();\n  }\n\n  /**\n   * Handle input into the textarea.\n   *\n   * @param {string} value\n   */\n  oninput(value) {\n    this.value = value;\n\n    this.attrs.onchange(this.value);\n  }\n\n  /**\n   * Handle the submit button being clicked.\n   */\n  onsubmit() {\n    this.attrs.onsubmit(this.value);\n  }\n}\n","import Component from '../../common/Component';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport ConfirmDocumentUnload from '../../common/components/ConfirmDocumentUnload';\nimport TextEditor from '../../common/components/TextEditor';\nimport avatar from '../../common/helpers/avatar';\nimport listItems from '../../common/helpers/listItems';\nimport ItemList from '../../common/utils/ItemList';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `ComposerBody` component handles the body, or the content, of the\n * composer. Subclasses should implement the `onsubmit` method and override\n * `headerTimes`.\n *\n * ### Attrs\n *\n * - `composer`\n * - `originalContent`\n * - `submitLabel`\n * - `placeholder`\n * - `user`\n * - `confirmExit`\n * - `disabled`\n *\n * @abstract\n */\nexport default class ComposerBody extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.composer = this.attrs.composer;\n\n    /**\n     * Whether or not the component is loading.\n     *\n     * @type {Boolean}\n     */\n    this.loading = false;\n\n    // Let the composer state know to ask for confirmation under certain\n    // circumstances, if the body supports / requires it and has a corresponding\n    // confirmation question to ask.\n    if (this.attrs.confirmExit) {\n      this.composer.preventClosingWhen(() => this.hasChanges(), this.attrs.confirmExit);\n    }\n\n    this.composer.fields.content(this.attrs.originalContent || '');\n  }\n\n  view() {\n    return (\n      <ConfirmDocumentUnload when={this.hasChanges.bind(this)}>\n        <div className={classList('ComposerBody', this.attrs.className)}>\n          {avatar(this.attrs.user, { className: 'ComposerBody-avatar' })}\n          <div className=\"ComposerBody-content\">\n            <ul className=\"ComposerBody-header\">{listItems(this.headerItems().toArray())}</ul>\n            <div className=\"ComposerBody-editor\">\n              <TextEditor\n                submitLabel={this.attrs.submitLabel}\n                placeholder={this.attrs.placeholder}\n                disabled={this.loading || this.attrs.disabled}\n                composer={this.composer}\n                preview={this.jumpToPreview?.bind(this)}\n                onchange={this.composer.fields.content}\n                onsubmit={this.onsubmit.bind(this)}\n                value={this.composer.fields.content()}\n              />\n            </div>\n          </div>\n          <LoadingIndicator display=\"unset\" containerClassName={classList('ComposerBody-loading', this.loading && 'active')} size=\"large\" />\n        </div>\n      </ConfirmDocumentUnload>\n    );\n  }\n\n  /**\n   * Check if there is any unsaved data.\n   *\n   * @return {boolean}\n   */\n  hasChanges() {\n    const content = this.composer.fields.content();\n\n    return content && content !== this.attrs.originalContent;\n  }\n\n  /**\n   * Build an item list for the composer's header.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  headerItems() {\n    return new ItemList();\n  }\n\n  /**\n   * Handle the submit event of the text editor.\n   *\n   * @abstract\n   */\n  onsubmit() {}\n\n  /**\n   * Stop loading.\n   */\n  loaded() {\n    this.loading = false;\n    m.redraw();\n  }\n}\n","import app from '../../forum/app';\nimport ComposerBody from './ComposerBody';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport icon from '../../common/helpers/icon';\nimport extractText from '../../common/utils/extractText';\n\nfunction minimizeComposerIfFullScreen(e) {\n  if (app.composer.isFullScreen()) {\n    app.composer.minimize();\n    e.stopPropagation();\n  }\n}\n\n/**\n * The `ReplyComposer` component displays the composer content for replying to a\n * discussion.\n *\n * ### Attrs\n *\n * - All of the attrs of ComposerBody\n * - `discussion`\n */\nexport default class ReplyComposer extends ComposerBody {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.placeholder = attrs.placeholder || extractText(app.translator.trans('core.forum.composer_reply.body_placeholder'));\n    attrs.submitLabel = attrs.submitLabel || app.translator.trans('core.forum.composer_reply.submit_button');\n    attrs.confirmExit = attrs.confirmExit || extractText(app.translator.trans('core.forum.composer_reply.discard_confirmation'));\n  }\n\n  headerItems() {\n    const items = super.headerItems();\n    const discussion = this.attrs.discussion;\n\n    items.add(\n      'title',\n      <h3>\n        {icon('fas fa-reply')}{' '}\n        <Link href={app.route.discussion(discussion)} onclick={minimizeComposerIfFullScreen}>\n          {discussion.title()}\n        </Link>\n      </h3>\n    );\n\n    return items;\n  }\n\n  /**\n   * Jump to the preview when triggered by the text editor.\n   */\n  jumpToPreview(e) {\n    minimizeComposerIfFullScreen(e);\n\n    m.route.set(app.route.discussion(this.attrs.discussion, 'reply'));\n  }\n\n  /**\n   * Get the data to submit to the server when the reply is saved.\n   *\n   * @return {Record<string, unknown>}\n   */\n  data() {\n    return {\n      content: this.composer.fields.content(),\n      relationships: { discussion: this.attrs.discussion },\n    };\n  }\n\n  onsubmit() {\n    const discussion = this.attrs.discussion;\n\n    this.loading = true;\n    m.redraw();\n\n    const data = this.data();\n\n    app.store\n      .createRecord('posts')\n      .save(data)\n      .then((post) => {\n        // If we're currently viewing the discussion which this reply was made\n        // in, then we can update the post stream and scroll to the post.\n        if (app.viewingDiscussion(discussion)) {\n          const stream = app.current.get('stream');\n          stream.update().then(() => stream.goToNumber(post.number()));\n        } else {\n          // Otherwise, we'll create an alert message to inform the user that\n          // their reply has been posted, containing a button which will\n          // transition to their new post when clicked.\n          let alert;\n          const viewButton = (\n            <Button\n              className=\"Button Button--link\"\n              onclick={() => {\n                m.route.set(app.route.post(post));\n                app.alerts.dismiss(alert);\n              }}\n            >\n              {app.translator.trans('core.forum.composer_reply.view_button')}\n            </Button>\n          );\n          alert = app.alerts.show(\n            {\n              type: 'success',\n              controls: [viewButton],\n            },\n            app.translator.trans('core.forum.composer_reply.posted_message')\n          );\n        }\n\n        this.composer.hide();\n      }, this.loaded.bind(this));\n  }\n}\n","import Component, { ComponentAttrs } from '../Component';\nimport Button from './Button';\nimport listItems from '../helpers/listItems';\nimport extract from '../utils/extract';\nimport type Mithril from 'mithril';\nimport classList from '../utils/classList';\nimport app from '../app';\nimport iconHelper from '../helpers/icon';\n\nexport interface AlertAttrs extends ComponentAttrs {\n  /** The type of alert this is. Will be used to give the alert a class name of `Alert--{type}`. */\n  type?: string;\n  /** Title of the alert. Optional. */\n  title?: Mithril.Children;\n  /** Icon used next to the title. Optional. */\n  icon?: string;\n  /** An array of controls to show in the alert. */\n  controls?: Mithril.Children;\n  /** Whether or not the alert can be dismissed. */\n  dismissible?: boolean;\n  /** A callback to run when the alert is dismissed */\n  ondismiss?: Function;\n}\n\n/**\n * The `Alert` component represents an alert box, which contains a message,\n * some controls, and may be dismissible.\n */\nexport default class Alert<T extends AlertAttrs = AlertAttrs> extends Component<T> {\n  view(vnode: Mithril.VnodeDOM<T, this>) {\n    const attrs = Object.assign({}, this.attrs);\n\n    const type = extract(attrs, 'type');\n    attrs.className = classList('Alert', `Alert--${type}`, attrs.className);\n\n    const title = extract(attrs, 'title');\n    const icon = extract(attrs, 'icon');\n    const content = extract(attrs, 'content') || vnode.children;\n    const controls = (extract(attrs, 'controls') || []) as Mithril.Vnode[];\n\n    // If the alert is meant to be dismissible (which is the case by default),\n    // then we will create a dismiss button to append as the final control in\n    // the alert.\n    const dismissible = extract(attrs, 'dismissible');\n    const ondismiss = extract(attrs, 'ondismiss');\n    const dismissControl: Mithril.Vnode[] = [];\n\n    if (dismissible || dismissible === undefined) {\n      dismissControl.push(\n        <Button\n          aria-label={app.translator.trans('core.lib.alert.dismiss_a11y_label')}\n          icon=\"fas fa-times\"\n          className=\"Button Button--link Button--icon Alert-dismiss\"\n          onclick={ondismiss}\n        />\n      );\n    }\n\n    return (\n      <div {...attrs}>\n        {!!title && (\n          <div className=\"Alert-title\">\n            {!!icon && <span className=\"Alert-title-icon\">{iconHelper(icon)}</span>}\n            <span className=\"Alert-title-text\">{title}</span>\n          </div>\n        )}\n        <span className=\"Alert-body\">{content}</span>\n        <ul className=\"Alert-controls\">{listItems(controls.concat(dismissControl))}</ul>\n      </div>\n    );\n  }\n}\n","import app from '../../common/app';\nimport Component from '../Component';\nimport Alert, { AlertAttrs } from './Alert';\nimport Button from './Button';\n\nimport type Mithril from 'mithril';\nimport type ModalManagerState from '../states/ModalManagerState';\nimport type RequestError from '../utils/RequestError';\nimport type ModalManager from './ModalManager';\nimport fireDebugWarning from '../helpers/fireDebugWarning';\nimport classList from '../utils/classList';\n\nexport interface IInternalModalAttrs {\n  state: ModalManagerState;\n  animateShow: ModalManager['animateShow'];\n  animateHide: ModalManager['animateHide'];\n}\n\nexport interface IDismissibleOptions {\n  /**\n   * @deprecated Check specific individual attributes instead. Will be removed in Flarum 2.0.\n   */\n  isDismissible: boolean;\n  viaCloseButton: boolean;\n  viaEscKey: boolean;\n  viaBackdropClick: boolean;\n}\n\n/**\n * The `Modal` component displays a modal dialog, wrapped in a form. Subclasses\n * should implement the `className`, `title`, and `content` methods.\n */\nexport default abstract class Modal<ModalAttrs extends IInternalModalAttrs = IInternalModalAttrs, CustomState = undefined> extends Component<\n  ModalAttrs,\n  CustomState\n> {\n  // TODO: [Flarum 2.0] remove `isDismissible` static attribute\n  /**\n   * Determine whether or not the modal should be dismissible via an 'x' button.\n   *\n   * @deprecated Use the individual `isDismissibleVia...` attributes instead and remove references to this.\n   */\n  static readonly isDismissible: boolean = true;\n\n  /**\n   * Can the model be dismissed with a close button (X)?\n   *\n   * If `false`, no close button is shown.\n   */\n  protected static readonly isDismissibleViaCloseButton: boolean = true;\n  /**\n   * Can the modal be dismissed by pressing the Esc key on a keyboard?\n   */\n  protected static readonly isDismissibleViaEscKey: boolean = true;\n  /**\n   * Can the modal be dismissed via a click on the backdrop.\n   */\n  protected static readonly isDismissibleViaBackdropClick: boolean = true;\n\n  static get dismissibleOptions(): IDismissibleOptions {\n    // If someone sets this to `false`, provide the same behaviour as previous versions of Flarum.\n    if (!this.isDismissible) {\n      return {\n        isDismissible: false,\n        viaCloseButton: false,\n        viaEscKey: false,\n        viaBackdropClick: false,\n      };\n    }\n\n    return {\n      isDismissible: true,\n      viaCloseButton: this.isDismissibleViaCloseButton,\n      viaEscKey: this.isDismissibleViaEscKey,\n      viaBackdropClick: this.isDismissibleViaBackdropClick,\n    };\n  }\n\n  protected loading: boolean = false;\n\n  /**\n   * Attributes for an alert component to show below the header.\n   */\n  alertAttrs: AlertAttrs | null = null;\n\n  oninit(vnode: Mithril.Vnode<ModalAttrs, this>) {\n    super.oninit(vnode);\n\n    // TODO: [Flarum 2.0] Remove the code below.\n    // This code prevents extensions which do not implement all abstract methods of this class from breaking\n    // the forum frontend. Without it, function calls would would error rather than returning `undefined.`\n\n    const missingMethods: string[] = [];\n\n    ['className', 'title', 'content', 'onsubmit'].forEach((method) => {\n      if (!(this as any)[method]) {\n        (this as any)[method] = function (): void {};\n        missingMethods.push(method);\n      }\n    });\n\n    if (missingMethods.length > 0) {\n      fireDebugWarning(\n        `Modal \\`${this.constructor.name}\\` does not implement all abstract methods of the Modal super class. Missing methods: ${missingMethods.join(\n          ', '\n        )}.`\n      );\n    }\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<ModalAttrs, this>) {\n    super.oncreate(vnode);\n\n    this.attrs.animateShow(() => this.onready());\n  }\n\n  onbeforeremove(vnode: Mithril.VnodeDOM<ModalAttrs, this>): Promise<void> | void {\n    super.onbeforeremove(vnode);\n\n    // If the global modal state currently contains a modal,\n    // we've just opened up a new one, and accordingly,\n    // we don't need to show a hide animation.\n    if (!this.attrs.state.modal) {\n      // Here, we ensure that the animation has time to complete.\n      // See https://mithril.js.org/lifecycle-methods.html#onbeforeremove\n      // Bootstrap's Modal.TRANSITION_DURATION is 300 ms.\n      return new Promise((resolve) => setTimeout(resolve, 300));\n    }\n  }\n\n  /**\n   * @todo split into FormModal and Modal in 2.0\n   */\n  view() {\n    if (this.alertAttrs) {\n      this.alertAttrs.dismissible = false;\n    }\n\n    return (\n      <div className={classList('Modal modal-dialog fade', this.className())}>\n        <div className=\"Modal-content\">\n          {this.dismissibleOptions.viaCloseButton && (\n            <div className=\"Modal-close App-backControl\">\n              <Button\n                icon=\"fas fa-times\"\n                onclick={() => this.hide()}\n                className=\"Button Button--icon Button--link\"\n                aria-label={app.translator.trans('core.lib.modal.close')}\n              />\n            </div>\n          )}\n\n          <form onsubmit={this.onsubmit.bind(this)}>\n            <div className=\"Modal-header\">\n              <h3 className=\"App-titleControl App-titleControl--text\">{this.title()}</h3>\n            </div>\n\n            {!!this.alertAttrs && (\n              <div className=\"Modal-alert\">\n                <Alert {...this.alertAttrs} />\n              </div>\n            )}\n\n            {this.content()}\n          </form>\n        </div>\n      </div>\n    );\n  }\n\n  /**\n   * Get the class name to apply to the modal.\n   */\n  abstract className(): string;\n\n  /**\n   * Get the title of the modal dialog.\n   */\n  abstract title(): Mithril.Children;\n\n  /**\n   * Get the content of the modal.\n   */\n  abstract content(): Mithril.Children;\n\n  /**\n   * Handle the modal form's submit event.\n   */\n  onsubmit(e: SubmitEvent): void {\n    // ...\n  }\n\n  /**\n   * Callback executed when the modal is shown and ready to be interacted with.\n   *\n   * @remark Focuses the first input in the modal.\n   */\n  onready(): void {\n    this.$().find('input, select, textarea').first().trigger('focus').trigger('select');\n  }\n\n  /**\n   * Hides the modal.\n   */\n  hide(): void {\n    this.attrs.animateHide();\n  }\n\n  /**\n   * Sets `loading` to false and triggers a redraw.\n   */\n  loaded(): void {\n    this.loading = false;\n    m.redraw();\n  }\n\n  /**\n   * Shows an alert describing an error returned from the API, and gives focus to\n   * the first relevant field involved in the error.\n   */\n  onerror(error: RequestError): void {\n    this.alertAttrs = error.alert;\n\n    m.redraw();\n\n    if (error.status === 422 && error.response?.errors) {\n      this.$('form [name=' + (error.response.errors as any[])[0].source.pointer.replace('/data/attributes/', '') + ']').trigger('select');\n    } else {\n      this.onready();\n    }\n  }\n\n  private get dismissibleOptions(): IDismissibleOptions {\n    return (this.constructor as typeof Modal).dismissibleOptions;\n  }\n}\n","import Stream from 'mithril/stream';\n\nexport default Stream;\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport extractText from '../../common/utils/extractText';\nimport Stream from '../../common/utils/Stream';\nimport Mithril from 'mithril';\nimport RequestError from '../../common/utils/RequestError';\nimport ItemList from '../../common/utils/ItemList';\n\nexport interface IForgotPasswordModalAttrs extends IInternalModalAttrs {\n  email?: string;\n}\n\n/**\n * The `ForgotPasswordModal` component displays a modal which allows the user to\n * enter their email address and request a link to reset their password.\n */\nexport default class ForgotPasswordModal<CustomAttrs extends IForgotPasswordModalAttrs = IForgotPasswordModalAttrs> extends Modal<CustomAttrs> {\n  /**\n   * The value of the email input.\n   */\n  email!: Stream<string>;\n\n  success: boolean = false;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.email = Stream(this.attrs.email || '');\n  }\n\n  className() {\n    return 'ForgotPasswordModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.forgot_password.title');\n  }\n\n  content() {\n    if (this.success) {\n      return (\n        <div className=\"Modal-body\">\n          <div className=\"Form Form--centered\">\n            <p className=\"helpText\">{app.translator.trans('core.forum.forgot_password.email_sent_message')}</p>\n            <div className=\"Form-group\">\n              <Button className=\"Button Button--primary Button--block\" onclick={this.hide.bind(this)}>\n                {app.translator.trans('core.forum.forgot_password.dismiss_button')}\n              </Button>\n            </div>\n          </div>\n        </div>\n      );\n    }\n\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">\n          <p className=\"helpText\">{app.translator.trans('core.forum.forgot_password.text')}</p>\n          {this.fields().toArray()}\n        </div>\n      </div>\n    );\n  }\n\n  fields() {\n    const items = new ItemList();\n\n    const emailLabel = extractText(app.translator.trans('core.forum.forgot_password.email_placeholder'));\n\n    items.add(\n      'email',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"email\"\n          type=\"email\"\n          placeholder={emailLabel}\n          aria-label={emailLabel}\n          bidi={this.email}\n          disabled={this.loading}\n        />\n      </div>,\n      50\n    );\n\n    items.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.forum.forgot_password.submit_button')}\n        </Button>\n      </div>,\n      -10\n    );\n\n    return items;\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    app\n      .request({\n        method: 'POST',\n        url: app.forum.attribute('apiUrl') + '/forgot',\n        body: this.requestParams(),\n        errorHandler: this.onerror.bind(this),\n      })\n      .then(() => {\n        this.success = true;\n        this.alertAttrs = null;\n      })\n      .catch(() => {})\n      .then(this.loaded.bind(this));\n  }\n\n  requestParams(): Record<string, unknown> {\n    const data = {\n      email: this.email(),\n    };\n\n    return data;\n  }\n\n  onerror(error: RequestError) {\n    if (error.status === 404 && error.alert) {\n      error.alert.content = app.translator.trans('core.forum.forgot_password.not_found_message');\n    }\n\n    super.onerror(error);\n  }\n}\n","import Component from '../../common/Component';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `LogInButtons` component displays a collection of social login buttons.\n */\nexport default class LogInButtons extends Component {\n  view() {\n    return <div className=\"LogInButtons\">{this.items().toArray()}</div>;\n  }\n\n  /**\n   * Build a list of LogInButton components.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  items() {\n    return new ItemList();\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport LogInModal from './LogInModal';\nimport Button from '../../common/components/Button';\nimport LogInButtons from './LogInButtons';\nimport extractText from '../../common/utils/extractText';\nimport ItemList from '../../common/utils/ItemList';\nimport Stream from '../../common/utils/Stream';\nimport type Mithril from 'mithril';\n\nexport interface ISignupModalAttrs extends IInternalModalAttrs {\n  username?: string;\n  email?: string;\n  password?: string;\n  token?: string;\n  provided?: string[];\n}\n\nexport type SignupBody = {\n  username: string;\n  email: string;\n} & ({ token: string } | { password: string });\n\nexport default class SignUpModal<CustomAttrs extends ISignupModalAttrs = ISignupModalAttrs> extends Modal<CustomAttrs> {\n  /**\n   * The value of the username input.\n   */\n  username!: Stream<string>;\n\n  /**\n   * The value of the email input.\n   */\n  email!: Stream<string>;\n\n  /**\n   * The value of the password input.\n   */\n  password!: Stream<string>;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.username = Stream(this.attrs.username || '');\n    this.email = Stream(this.attrs.email || '');\n    this.password = Stream(this.attrs.password || '');\n  }\n\n  className() {\n    return 'Modal--small SignUpModal';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.sign_up.title');\n  }\n\n  content() {\n    return [<div className=\"Modal-body\">{this.body()}</div>, <div className=\"Modal-footer\">{this.footer()}</div>];\n  }\n\n  isProvided(field: string): boolean {\n    return this.attrs.provided?.includes(field) ?? false;\n  }\n\n  body() {\n    return [!this.attrs.token && <LogInButtons />, <div className=\"Form Form--centered\">{this.fields().toArray()}</div>];\n  }\n\n  fields() {\n    const items = new ItemList();\n\n    const usernameLabel = extractText(app.translator.trans('core.forum.sign_up.username_placeholder'));\n    const emailLabel = extractText(app.translator.trans('core.forum.sign_up.email_placeholder'));\n    const passwordLabel = extractText(app.translator.trans('core.forum.sign_up.password_placeholder'));\n\n    items.add(\n      'username',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"username\"\n          type=\"text\"\n          placeholder={usernameLabel}\n          aria-label={usernameLabel}\n          bidi={this.username}\n          disabled={this.loading || this.isProvided('username')}\n        />\n      </div>,\n      30\n    );\n\n    items.add(\n      'email',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"email\"\n          type=\"email\"\n          placeholder={emailLabel}\n          aria-label={emailLabel}\n          bidi={this.email}\n          disabled={this.loading || this.isProvided('email')}\n        />\n      </div>,\n      20\n    );\n\n    if (!this.attrs.token) {\n      items.add(\n        'password',\n        <div className=\"Form-group\">\n          <input\n            className=\"FormControl\"\n            name=\"password\"\n            type=\"password\"\n            autocomplete=\"new-password\"\n            placeholder={passwordLabel}\n            aria-label={passwordLabel}\n            bidi={this.password}\n            disabled={this.loading}\n          />\n        </div>,\n        10\n      );\n    }\n\n    items.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.forum.sign_up.submit_button')}\n        </Button>\n      </div>,\n      -10\n    );\n\n    return items;\n  }\n\n  footer() {\n    return [\n      <p className=\"SignUpModal-logIn\">{app.translator.trans('core.forum.sign_up.log_in_text', { a: <a onclick={this.logIn.bind(this)} /> })}</p>,\n    ];\n  }\n\n  /**\n   * Open the log in modal, prefilling it with an email/username/password if\n   * the user has entered one.\n   */\n  logIn() {\n    const attrs = {\n      identification: this.email() || this.username(),\n    };\n\n    app.modal.show(LogInModal, attrs);\n  }\n\n  onready() {\n    if (this.attrs.username && !this.attrs.email) {\n      this.$('[name=email]').select();\n    } else {\n      this.$('[name=username]').select();\n    }\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    const body = this.submitData();\n\n    app\n      .request({\n        url: app.forum.attribute('baseUrl') + '/register',\n        method: 'POST',\n        body,\n        errorHandler: this.onerror.bind(this),\n      })\n      .then(() => window.location.reload(), this.loaded.bind(this));\n  }\n\n  /**\n   * Get the data that should be submitted in the sign-up request.\n   */\n  submitData(): SignupBody {\n    const authData = this.attrs.token ? { token: this.attrs.token } : { password: this.password() };\n\n    const data = {\n      username: this.username(),\n      email: this.email(),\n      ...authData,\n    };\n\n    return data;\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport ForgotPasswordModal from './ForgotPasswordModal';\nimport SignUpModal from './SignUpModal';\nimport Button from '../../common/components/Button';\nimport LogInButtons from './LogInButtons';\nimport extractText from '../../common/utils/extractText';\nimport ItemList from '../../common/utils/ItemList';\nimport Stream from '../../common/utils/Stream';\nimport type Mithril from 'mithril';\nimport RequestError from '../../common/utils/RequestError';\nimport type { LoginParams } from '../../common/Session';\n\nexport interface ILoginModalAttrs extends IInternalModalAttrs {\n  identification?: string;\n  password?: string;\n  remember?: boolean;\n}\n\nexport default class LogInModal<CustomAttrs extends ILoginModalAttrs = ILoginModalAttrs> extends Modal<CustomAttrs> {\n  /**\n   * The value of the identification input.\n   */\n  identification!: Stream<string>;\n  /**\n   * The value of the password input.\n   */\n  password!: Stream<string>;\n  /**\n   * The value of the remember me input.\n   */\n  remember!: Stream<boolean>;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.identification = Stream(this.attrs.identification || '');\n    this.password = Stream(this.attrs.password || '');\n    this.remember = Stream(!!this.attrs.remember);\n  }\n\n  className() {\n    return 'LogInModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.log_in.title');\n  }\n\n  content() {\n    return [<div className=\"Modal-body\">{this.body()}</div>, <div className=\"Modal-footer\">{this.footer()}</div>];\n  }\n\n  body() {\n    return [<LogInButtons />, <div className=\"Form Form--centered\">{this.fields().toArray()}</div>];\n  }\n\n  fields() {\n    const items = new ItemList();\n\n    const identificationLabel = extractText(app.translator.trans('core.forum.log_in.username_or_email_placeholder'));\n    const passwordLabel = extractText(app.translator.trans('core.forum.log_in.password_placeholder'));\n\n    items.add(\n      'identification',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"identification\"\n          type=\"text\"\n          placeholder={identificationLabel}\n          aria-label={identificationLabel}\n          bidi={this.identification}\n          disabled={this.loading}\n        />\n      </div>,\n      30\n    );\n\n    items.add(\n      'password',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"password\"\n          type=\"password\"\n          autocomplete=\"current-password\"\n          placeholder={passwordLabel}\n          aria-label={passwordLabel}\n          bidi={this.password}\n          disabled={this.loading}\n        />\n      </div>,\n      20\n    );\n\n    items.add(\n      'remember',\n      <div className=\"Form-group\">\n        <div>\n          <label className=\"checkbox\">\n            <input type=\"checkbox\" bidi={this.remember} disabled={this.loading} />\n            {app.translator.trans('core.forum.log_in.remember_me_label')}\n          </label>\n        </div>\n      </div>,\n      10\n    );\n\n    items.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.forum.log_in.submit_button')}\n        </Button>\n      </div>,\n      -10\n    );\n\n    return items;\n  }\n\n  footer() {\n    return (\n      <>\n        <p className=\"LogInModal-forgotPassword\">\n          <a onclick={this.forgotPassword.bind(this)}>{app.translator.trans('core.forum.log_in.forgot_password_link')}</a>\n        </p>\n        {app.forum.attribute<boolean>('allowSignUp') && (\n          <p className=\"LogInModal-signUp\">{app.translator.trans('core.forum.log_in.sign_up_text', { a: <a onclick={this.signUp.bind(this)} /> })}</p>\n        )}\n      </>\n    );\n  }\n\n  /**\n   * Open the forgot password modal, prefilling it with an email if the user has\n   * entered one.\n   */\n  forgotPassword() {\n    const email = this.identification();\n    const attrs = email.includes('@') ? { email } : undefined;\n\n    app.modal.show(ForgotPasswordModal, attrs);\n  }\n\n  /**\n   * Open the sign up modal, prefilling it with an email/username/password if\n   * the user has entered one.\n   */\n  signUp() {\n    const identification = this.identification();\n\n    const attrs = {\n      [identification.includes('@') ? 'email' : 'username']: identification,\n    };\n\n    app.modal.show(SignUpModal, attrs);\n  }\n\n  onready() {\n    this.$('[name=' + (this.identification() ? 'password' : 'identification') + ']').trigger('select');\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    app.session.login(this.loginParams(), { errorHandler: this.onerror.bind(this) }).then(() => window.location.reload(), this.loaded.bind(this));\n  }\n\n  loginParams(): LoginParams {\n    const data = {\n      identification: this.identification(),\n      password: this.password(),\n      remember: this.remember(),\n    };\n\n    return data;\n  }\n\n  onerror(error: RequestError) {\n    if (error.status === 401 && error.alert) {\n      error.alert.content = app.translator.trans('core.forum.log_in.invalid_login_message');\n      this.password('');\n    }\n\n    super.onerror(error);\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport Stream from '../../common/utils/Stream';\nimport Mithril from 'mithril';\nimport Discussion from '../../common/models/Discussion';\n\nexport interface IRenameDiscussionModalAttrs extends IInternalModalAttrs {\n  discussion: Discussion;\n  currentTitle: string;\n}\n\n/**\n * The 'RenameDiscussionModal' displays a modal dialog with an input to rename a discussion\n */\nexport default class RenameDiscussionModal<CustomAttrs extends IRenameDiscussionModalAttrs = IRenameDiscussionModalAttrs> extends Modal<CustomAttrs> {\n  discussion!: Discussion;\n  currentTitle!: string;\n  newTitle!: Stream<string>;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.discussion = this.attrs.discussion;\n    this.currentTitle = this.attrs.currentTitle;\n    this.newTitle = Stream(this.currentTitle);\n  }\n\n  className() {\n    return 'RenameDiscussionModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.rename_discussion.title');\n  }\n\n  content() {\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">\n          <div className=\"Form-group\">\n            <input className=\"FormControl\" bidi={this.newTitle} type=\"text\" />\n          </div>\n          <div className=\"Form-group\">\n            <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n              {app.translator.trans('core.forum.rename_discussion.submit_button')}\n            </Button>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  onsubmit(e: SubmitEvent): Promise<void> | void {\n    e.preventDefault();\n\n    this.loading = true;\n\n    const title = this.newTitle();\n    const currentTitle = this.currentTitle;\n\n    // If the title is different to what it was before, then save it. After the\n    // save has completed, update the post stream as there will be a new post\n    // indicating that the discussion was renamed.\n    if (title && title !== currentTitle) {\n      return this.discussion\n        .save({ title })\n        .then(() => {\n          if (app.viewingDiscussion(this.discussion)) {\n            app.current.get('stream').update();\n          }\n          m.redraw();\n          this.hide();\n        })\n        .catch(() => {\n          this.loading = false;\n          m.redraw();\n        });\n    } else {\n      this.hide();\n    }\n  }\n}\n","import app from '../../forum/app';\nimport DiscussionPage from '../components/DiscussionPage';\nimport ReplyComposer from '../components/ReplyComposer';\nimport LogInModal from '../components/LogInModal';\nimport Button from '../../common/components/Button';\nimport Separator from '../../common/components/Separator';\nimport RenameDiscussionModal from '../components/RenameDiscussionModal';\nimport ItemList from '../../common/utils/ItemList';\nimport extractText from '../../common/utils/extractText';\n\n/**\n * The `DiscussionControls` utility constructs a list of buttons for a\n * discussion which perform actions on it.\n */\nexport default {\n  /**\n   * Get a list of controls for a discussion.\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controls(discussion, context) {\n    const items = new ItemList();\n\n    ['user', 'moderation', 'destructive'].forEach((section) => {\n      const controls = this[section + 'Controls'](discussion, context).toArray();\n      if (controls.length) {\n        controls.forEach((item) => items.add(item.itemName, item));\n        items.add(section + 'Separator', <Separator />);\n      }\n    });\n\n    return items;\n  },\n\n  /**\n   * Get controls for a discussion pertaining to the current user (e.g. reply,\n   * follow).\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  userControls(discussion, context) {\n    const items = new ItemList();\n\n    // Only add a reply control if this is the discussion's controls dropdown\n    // for the discussion page itself. We don't want it to show up for\n    // discussions in the discussion list, etc.\n    if (context instanceof DiscussionPage) {\n      items.add(\n        'reply',\n        !app.session.user || discussion.canReply() ? (\n          <Button\n            icon=\"fas fa-reply\"\n            onclick={() => {\n              // If the user is not logged in, the promise rejects, and a login modal shows up.\n              // Since that's already handled, we dont need to show an error message in the console.\n              return this.replyAction\n                .bind(discussion)(true, false)\n                .catch(() => {});\n            }}\n          >\n            {app.translator.trans(\n              app.session.user ? 'core.forum.discussion_controls.reply_button' : 'core.forum.discussion_controls.log_in_to_reply_button'\n            )}\n          </Button>\n        ) : (\n          <Button\n            icon=\"fas fa-reply\"\n            className=\"disabled\"\n            title={extractText(app.translator.trans('core.forum.discussion_controls.cannot_reply_text'))}\n          >\n            {app.translator.trans('core.forum.discussion_controls.cannot_reply_button')}\n          </Button>\n        )\n      );\n    }\n\n    return items;\n  },\n\n  /**\n   * Get controls for a discussion pertaining to moderation (e.g. rename, lock).\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  moderationControls(discussion) {\n    const items = new ItemList();\n\n    if (discussion.canRename()) {\n      items.add(\n        'rename',\n        <Button icon=\"fas fa-pencil-alt\" onclick={this.renameAction.bind(discussion)}>\n          {app.translator.trans('core.forum.discussion_controls.rename_button')}\n        </Button>\n      );\n    }\n\n    return items;\n  },\n\n  /**\n   * Get controls for a discussion which are destructive (e.g. delete).\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  destructiveControls(discussion) {\n    const items = new ItemList();\n\n    if (!discussion.isHidden()) {\n      if (discussion.canHide()) {\n        items.add(\n          'hide',\n          <Button icon=\"far fa-trash-alt\" onclick={this.hideAction.bind(discussion)}>\n            {app.translator.trans('core.forum.discussion_controls.delete_button')}\n          </Button>\n        );\n      }\n    } else {\n      if (discussion.canHide()) {\n        items.add(\n          'restore',\n          <Button icon=\"fas fa-reply\" onclick={this.restoreAction.bind(discussion)}>\n            {app.translator.trans('core.forum.discussion_controls.restore_button')}\n          </Button>\n        );\n      }\n\n      if (discussion.canDelete()) {\n        items.add(\n          'delete',\n          <Button icon=\"fas fa-times\" onclick={this.deleteAction.bind(discussion)}>\n            {app.translator.trans('core.forum.discussion_controls.delete_forever_button')}\n          </Button>\n        );\n      }\n    }\n\n    return items;\n  },\n\n  /**\n   * Open the reply composer for the discussion. A promise will be returned,\n   * which resolves when the composer opens successfully. If the user is not\n   * logged in, they will be prompted. If they don't have permission to\n   * reply, the promise will be rejected.\n   *\n   * @param {boolean} goToLast Whether or not to scroll down to the last post if the discussion is being viewed.\n   * @param {boolean} forceRefresh Whether or not to force a reload of the composer component, even if it is already open for this discussion.\n   *\n   * @return {Promise<void>}\n   */\n  replyAction(goToLast, forceRefresh) {\n    return new Promise((resolve, reject) => {\n      if (app.session.user) {\n        if (this.canReply()) {\n          if (!app.composer.composingReplyTo(this) || forceRefresh) {\n            app.composer.load(ReplyComposer, {\n              user: app.session.user,\n              discussion: this,\n            });\n          }\n          app.composer.show();\n\n          if (goToLast && app.viewingDiscussion(this) && !app.composer.isFullScreen()) {\n            app.current.get('stream').goToNumber('reply');\n          }\n\n          return resolve(app.composer);\n        } else {\n          return reject();\n        }\n      }\n\n      app.modal.show(LogInModal);\n\n      return reject();\n    });\n  },\n\n  /**\n   * Hide a discussion.\n   *\n   * @return {Promise<void>}\n   */\n  hideAction() {\n    this.pushData({ attributes: { hiddenAt: new Date() }, relationships: { hiddenUser: app.session.user } });\n\n    return this.save({ isHidden: true });\n  },\n\n  /**\n   * Restore a discussion.\n   *\n   * @return {Promise<void>}\n   */\n  restoreAction() {\n    this.pushData({ attributes: { hiddenAt: null }, relationships: { hiddenUser: null } });\n\n    return this.save({ isHidden: false });\n  },\n\n  /**\n   * Delete the discussion after confirming with the user.\n   *\n   * @return {Promise<void>}\n   */\n  deleteAction() {\n    if (confirm(extractText(app.translator.trans('core.forum.discussion_controls.delete_confirmation')))) {\n      // If we're currently viewing the discussion that was deleted, go back\n      // to the previous page.\n      if (app.viewingDiscussion(this)) {\n        app.history.back();\n      }\n\n      return this.delete().then(() => app.discussions.removeDiscussion(this));\n    }\n  },\n\n  /**\n   * Rename the discussion.\n   */\n  renameAction() {\n    return app.modal.show(RenameDiscussionModal, {\n      currentTitle: this.title(),\n      discussion: this,\n    });\n  },\n};\n","/**\n * The `slidable` utility adds touch gestures to an element so that it can be\n * slid away to reveal controls underneath, and then released to activate those\n * controls.\n *\n * It relies on the element having children with particular CSS classes.\n *\n * The function returns a record with a `reset` proeprty. This is a function\n * which reverts the slider to its original position. This should be called,\n * for example, when a controls dropdown is closed.\n *\n * @param {HTMLElement | SVGElement | Element} element\n * @return {{ reset : () => void }}\n */\nexport default function slidable(element) {\n  const $element = $(element);\n  const threshold = 50;\n\n  let $underneathLeft;\n  let $underneathRight;\n\n  let startX;\n  let startY;\n  let couldBeSliding = false;\n  let isSliding = false;\n  let pos = 0;\n\n  /**\n   * Animate the slider to a new position.\n   *\n   * @param {number} newPos\n   * @param {Partial<JQueryAnimationOptions>} [options]\n   */\n  const animatePos = (newPos, options = {}) => {\n    // Since we can't animate the transform property with jQuery, we'll use a\n    // bit of a workaround. We set up the animation with a step function that\n    // will set the transform property, but then we animate an unused property\n    // (background-position-x) with jQuery.\n    options.duration ||= 'fast';\n    options.step = function (x) {\n      $(this).css('transform', 'translate(' + x + 'px, 0)');\n    };\n\n    $element.find('.Slidable-content').animate({ 'background-position-x': newPos }, options);\n  };\n\n  /**\n   * Revert the slider to its original position.\n   */\n  const reset = () => {\n    animatePos(0, {\n      complete: function () {\n        $element.removeClass('sliding');\n        $underneathLeft.hide();\n        $underneathRight.hide();\n        isSliding = false;\n      },\n    });\n  };\n\n  $element\n    .find('.Slidable-content')\n    .on('touchstart', function (e) {\n      // Update the references to the elements underneath the slider, provided\n      // they're not disabled.\n      $underneathLeft = $element.find('.Slidable-underneath--left:not(.disabled)');\n      $underneathRight = $element.find('.Slidable-underneath--right:not(.disabled)');\n\n      startX = e.originalEvent.targetTouches[0].clientX;\n      startY = e.originalEvent.targetTouches[0].clientY;\n\n      couldBeSliding = true;\n      pos = 0;\n    })\n\n    .on('touchmove', function (e) {\n      const newX = e.originalEvent.targetTouches[0].clientX;\n      const newY = e.originalEvent.targetTouches[0].clientY;\n\n      // Once the user moves their touch in a direction that's more up/down than\n      // left/right, we'll assume they're scrolling the page. But if they do\n      // move in a horizontal direction at first, then we'll lock their touch\n      // into the slider.\n      if (couldBeSliding && Math.abs(newX - startX) > Math.abs(newY - startY)) {\n        isSliding = true;\n      }\n      couldBeSliding = false;\n\n      if (isSliding) {\n        pos = newX - startX;\n\n        // If there are controls underneath the either side, then we'll show/hide\n        // them depending on the slider's position. We also make the controls\n        // icon get a bit bigger the further they slide.\n        const toggle = ($underneath, side) => {\n          if ($underneath.length) {\n            const active = side === 'left' ? pos > 0 : pos < 0;\n\n            if (active && $underneath.hasClass('Slidable-underneath--elastic')) {\n              pos -= pos * 0.5;\n            }\n            $underneath.toggle(active);\n\n            const scale = Math.max(0, Math.min(1, (Math.abs(pos) - 25) / threshold));\n            $underneath.find('.icon').css('transform', 'scale(' + scale + ')');\n          } else {\n            pos = Math[side === 'left' ? 'min' : 'max'](0, pos);\n          }\n        };\n\n        toggle($underneathLeft, 'left');\n        toggle($underneathRight, 'right');\n\n        $(this).css('transform', 'translate(' + pos + 'px, 0)');\n        $(this).css('background-position-x', pos + 'px');\n\n        $element.toggleClass('sliding', !!pos);\n\n        e.preventDefault();\n      }\n    })\n\n    .on('touchend', function () {\n      // If the user releases the touch and the slider is past the threshold\n      // position on either side, then we will activate the control for that\n      // side. We will also animate the slider's position all the way to the\n      // other side, or back to its original position, depending on whether or\n      // not the side is 'elastic'.\n      const activate = ($underneath) => {\n        $underneath.click();\n\n        if ($underneath.hasClass('Slidable-underneath--elastic')) {\n          reset();\n        } else {\n          animatePos((pos > 0 ? 1 : -1) * $element.width());\n        }\n      };\n\n      if ($underneathRight.length && pos < -threshold) {\n        activate($underneathRight);\n      } else if ($underneathLeft.length && pos > threshold) {\n        activate($underneathLeft);\n      } else {\n        reset();\n      }\n\n      couldBeSliding = false;\n      isSliding = false;\n    });\n\n  return { reset };\n}\n","const specialChars = /[.*+?^${}()|[\\]\\\\]/g;\n\n/**\n * Escapes the `RegExp` special characters in `input`.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n */\nexport default function escapeRegExp(input: string): string {\n  return input.replace(specialChars, '\\\\$&');\n}\n","import app from '../../forum/app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport Link from '../../common/components/Link';\nimport avatar from '../../common/helpers/avatar';\nimport listItems from '../../common/helpers/listItems';\nimport highlight from '../../common/helpers/highlight';\nimport icon from '../../common/helpers/icon';\nimport humanTime from '../../common/utils/humanTime';\nimport ItemList from '../../common/utils/ItemList';\nimport abbreviateNumber from '../../common/utils/abbreviateNumber';\nimport Dropdown from '../../common/components/Dropdown';\nimport TerminalPost from './TerminalPost';\nimport SubtreeRetainer from '../../common/utils/SubtreeRetainer';\nimport DiscussionControls from '../utils/DiscussionControls';\nimport slidable from '../utils/slidable';\nimport classList from '../../common/utils/classList';\nimport DiscussionPage from './DiscussionPage';\nimport escapeRegExp from '../../common/utils/escapeRegExp';\nimport Tooltip from '../../common/components/Tooltip';\nimport type Discussion from '../../common/models/Discussion';\nimport type Mithril from 'mithril';\nimport type { DiscussionListParams } from '../states/DiscussionListState';\n\nexport interface IDiscussionListItemAttrs extends ComponentAttrs {\n  discussion: Discussion;\n  params: DiscussionListParams;\n}\n\n/**\n * The `DiscussionListItem` component shows a single discussion in the\n * discussion list.\n */\nexport default class DiscussionListItem<CustomAttrs extends IDiscussionListItemAttrs = IDiscussionListItemAttrs> extends Component<CustomAttrs> {\n  /**\n   * Ensures that the discussion will not be redrawn\n   * unless new data comes in.\n   */\n  subtree!: SubtreeRetainer;\n\n  highlightRegExp?: RegExp;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.subtree = new SubtreeRetainer(\n      () => this.attrs.discussion.freshness,\n      () => {\n        const time = app.session.user && app.session.user.markedAllAsReadAt();\n        return time && time.getTime();\n      },\n      () => this.active()\n    );\n  }\n\n  elementAttrs() {\n    return {\n      className: classList('DiscussionListItem', {\n        active: this.active(),\n        'DiscussionListItem--hidden': this.attrs.discussion.isHidden(),\n        Slidable: 'ontouchstart' in window,\n      }),\n    };\n  }\n\n  view() {\n    const attrs = this.elementAttrs();\n\n    return <div {...attrs}>{this.viewItems().toArray()}</div>;\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    const discussion = this.attrs.discussion;\n    const controls = DiscussionControls.controls(discussion, this).toArray();\n\n    items.add('controls', this.controlsView(controls), 100);\n    items.add('slidableUnderneath', this.slidableUnderneathView(), 90);\n    items.add('content', this.contentView(), 80);\n\n    return items;\n  }\n\n  controlsView(controls: Mithril.ChildArray): Mithril.Children {\n    return (\n      <>\n        {!!controls.length && (\n          <Dropdown\n            icon=\"fas fa-ellipsis-v\"\n            className=\"DiscussionListItem-controls\"\n            buttonClassName=\"Button Button--icon Button--flat Slidable-underneath Slidable-underneath--right\"\n            accessibleToggleLabel={app.translator.trans('core.forum.discussion_controls.toggle_dropdown_accessible_label')}\n          >\n            {controls}\n          </Dropdown>\n        )}\n      </>\n    );\n  }\n\n  slidableUnderneathView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n    const isUnread = discussion.isUnread();\n\n    return (\n      <span\n        className={classList('Slidable-underneath Slidable-underneath--left Slidable-underneath--elastic', { disabled: !isUnread })}\n        onclick={this.markAsRead.bind(this)}\n      >\n        {icon('fas fa-check')}\n      </span>\n    );\n  }\n\n  contentView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n    const isUnread = discussion.isUnread();\n    const isRead = discussion.isRead();\n\n    return (\n      <div className={classList('DiscussionListItem-content', 'Slidable-content', { unread: isUnread, read: isRead })}>\n        {this.contentItems().toArray()}\n      </div>\n    );\n  }\n\n  contentItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('authorAvatar', this.authorAvatarView(), 100);\n    items.add('badges', this.badgesView(), 90);\n    items.add('main', this.mainView(), 80);\n    items.add('replyCount', this.replyCountItem(), 70);\n\n    return items;\n  }\n\n  authorAvatarView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n    const user = discussion.user();\n\n    return (\n      <Tooltip\n        text={app.translator.trans('core.forum.discussion_list.started_text', { user, ago: humanTime(discussion.createdAt()) })}\n        position=\"right\"\n      >\n        <Link className=\"DiscussionListItem-author\" href={user ? app.route.user(user) : '#'}>\n          {avatar(user || null, { title: '' })}\n        </Link>\n      </Tooltip>\n    );\n  }\n\n  badgesView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n\n    return <ul className=\"DiscussionListItem-badges badges\">{listItems(discussion.badges().toArray())}</ul>;\n  }\n\n  mainView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n    const jumpTo = this.getJumpTo();\n\n    return (\n      <Link href={app.route.discussion(discussion, jumpTo)} className=\"DiscussionListItem-main\">\n        {this.mainItems().toArray()}\n      </Link>\n    );\n  }\n\n  mainItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    const discussion = this.attrs.discussion;\n\n    items.add('title', <h2 className=\"DiscussionListItem-title\">{highlight(discussion.title(), this.highlightRegExp)}</h2>, 100);\n    items.add('info', <ul className=\"DiscussionListItem-info\">{listItems(this.infoItems().toArray())}</ul>, 90);\n\n    return items;\n  }\n\n  getJumpTo() {\n    const discussion = this.attrs.discussion;\n    let jumpTo = 0;\n\n    if (this.attrs.params.q) {\n      const post = discussion.mostRelevantPost();\n      if (post) {\n        jumpTo = post.number();\n      }\n\n      const phrase = escapeRegExp(this.attrs.params.q);\n      this.highlightRegExp = new RegExp(phrase + '|' + phrase.trim().replace(/\\s+/g, '|'), 'gi');\n    } else {\n      jumpTo = Math.min(discussion.lastPostNumber() ?? 0, (discussion.lastReadPostNumber() || 0) + 1);\n    }\n\n    return jumpTo;\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    // If we're on a touch device, set up the discussion row to be slidable.\n    // This allows the user to drag the row to either side of the screen to\n    // reveal controls.\n    if ('ontouchstart' in window) {\n      const slidableInstance = slidable(this.element);\n\n      this.$('.DiscussionListItem-controls').on('hidden.bs.dropdown', () => slidableInstance.reset());\n    }\n  }\n\n  onbeforeupdate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onbeforeupdate(vnode);\n\n    return this.subtree.needsRebuild();\n  }\n\n  /**\n   * Determine whether or not the discussion is currently being viewed.\n   */\n  active() {\n    return app.current.matches(DiscussionPage, { discussion: this.attrs.discussion });\n  }\n\n  /**\n   * Determine whether or not information about who started the discussion\n   * should be displayed instead of information about the most recent reply to\n   * the discussion.\n   */\n  showFirstPost() {\n    return ['newest', 'oldest'].includes(this.attrs.params.sort ?? '');\n  }\n\n  /**\n   * Determine whether or not the number of replies should be shown instead of\n   * the number of unread posts.\n   *\n   * @return {boolean}\n   */\n  showRepliesCount() {\n    return this.attrs.params.sort === 'replies';\n  }\n\n  /**\n   * Mark the discussion as read.\n   */\n  markAsRead() {\n    const discussion = this.attrs.discussion;\n\n    if (discussion.isUnread()) {\n      discussion.save({ lastReadPostNumber: discussion.lastPostNumber() });\n      m.redraw();\n    }\n  }\n\n  /**\n   * Build an item list of info for a discussion listing. By default this is\n   * just the first/last post indicator.\n   */\n  infoItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.attrs.params.q) {\n      const post = this.attrs.discussion.mostRelevantPost() || this.attrs.discussion.firstPost();\n\n      if (post && post.contentType() === 'comment') {\n        const excerpt = highlight(post.contentPlain() ?? '', this.highlightRegExp, 175);\n        items.add('excerpt', excerpt, -100);\n      }\n    } else {\n      items.add('terminalPost', <TerminalPost discussion={this.attrs.discussion} lastPost={!this.showFirstPost()} />);\n    }\n\n    return items;\n  }\n\n  replyCountItem() {\n    const discussion = this.attrs.discussion;\n    const showUnread = !this.showRepliesCount() && discussion.isUnread();\n\n    if (showUnread) {\n      return (\n        <button className=\"Button--ua-reset DiscussionListItem-count\" onclick={this.markAsRead.bind(this)}>\n          <span aria-hidden=\"true\">{abbreviateNumber(discussion.unreadCount())}</span>\n\n          <span className=\"visually-hidden\">\n            {app.translator.trans('core.forum.discussion_list.unread_replies_a11y_label', { count: discussion.replyCount() })}\n          </span>\n        </button>\n      );\n    }\n\n    return (\n      <span className=\"DiscussionListItem-count\">\n        <span aria-hidden=\"true\">{abbreviateNumber(discussion.replyCount())}</span>\n\n        <span className=\"visually-hidden\">\n          {app.translator.trans('core.forum.discussion_list.total_replies_a11y_label', { count: discussion.replyCount() })}\n        </span>\n      </span>\n    );\n  }\n}\n","import Component from '../Component';\n\n/**\n * The `Placeholder` component displays a muted text with some call to action,\n * usually used as an empty state.\n *\n * ### Attrs\n *\n * - `text`\n */\nexport default class Placeholder extends Component {\n  view() {\n    return (\n      <div className=\"Placeholder\">\n        <p>{this.attrs.text}</p>\n      </div>\n    );\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport DiscussionListItem from './DiscussionListItem';\nimport Button from '../../common/components/Button';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport Placeholder from '../../common/components/Placeholder';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `DiscussionList` component displays a list of discussions.\n *\n * ### Attrs\n *\n * - `state` A DiscussionListState object that represents the discussion lists's state.\n */\nexport default class DiscussionList extends Component {\n  view() {\n    /**\n     * @type {import('../states/DiscussionListState').default}\n     */\n    const state = this.attrs.state;\n\n    const params = state.getParams();\n    const isLoading = state.isInitialLoading() || state.isLoadingNext();\n\n    let loading;\n\n    if (isLoading) {\n      loading = <LoadingIndicator />;\n    } else if (state.hasNext()) {\n      loading = (\n        <Button className=\"Button\" onclick={state.loadNext.bind(state)}>\n          {app.translator.trans('core.forum.discussion_list.load_more_button')}\n        </Button>\n      );\n    }\n\n    if (state.isEmpty()) {\n      const text = app.translator.trans('core.forum.discussion_list.empty_text');\n      return (\n        <div className=\"DiscussionList\">\n          <Placeholder text={text} />\n        </div>\n      );\n    }\n\n    const pageSize = state.pageSize;\n\n    return (\n      <div className={classList('DiscussionList', { 'DiscussionList--searchResults': state.isSearchResults() })}>\n        <ul role=\"feed\" aria-busy={isLoading} className=\"DiscussionList-discussions\">\n          {state.getPages().map((pg, pageNum) => {\n            return pg.items.map((discussion, itemNum) => (\n              <li key={discussion.id()} data-id={discussion.id()} role=\"article\" aria-setsize=\"-1\" aria-posinset={pageNum * pageSize + itemNum}>\n                <DiscussionListItem discussion={discussion} params={params} />\n              </li>\n            ));\n          })}\n        </ul>\n        <div className=\"DiscussionList-loadMore\">{loading}</div>\n      </div>\n    );\n  }\n}\n","import app from '../../forum/app';\nimport DiscussionList from './DiscussionList';\nimport Component from '../../common/Component';\nimport DiscussionPage from './DiscussionPage';\n\nconst hotEdge = (e) => {\n  if (e.pageX < 10) app.pane.show();\n};\n\n/**\n * The `DiscussionListPane` component displays the list of previously viewed\n * discussions in a panel that can be displayed by moving the mouse to the left\n * edge of the screen, where it can also be pinned in place.\n *\n * ### Attrs\n *\n * - `state` A DiscussionListState object that represents the discussion lists's state.\n */\nexport default class DiscussionListPane extends Component {\n  view() {\n    if (!this.attrs.state.hasItems()) {\n      return;\n    }\n\n    return <aside className=\"DiscussionPage-list\">{this.enoughSpace() && <DiscussionList state={this.attrs.state} />}</aside>;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    const $list = $(vnode.dom);\n\n    // When the mouse enters and leaves the discussions pane, we want to show\n    // and hide the pane respectively. We also create a 10px 'hot edge' on the\n    // left of the screen to activate the pane.\n    const pane = app.pane;\n    $list.hover(pane.show.bind(pane), pane.onmouseleave.bind(pane));\n\n    $(document).on('mousemove', hotEdge);\n\n    // When coming from another discussion, scroll to the previous postition\n    // to prevent the discussion list jumping around.\n    if (app.previous.matches(DiscussionPage)) {\n      const top = app.cache.discussionListPaneScrollTop || 0;\n      $list.scrollTop(top);\n    } else {\n      // If the discussion we are viewing is listed in the discussion list, then\n      // we will make sure it is visible in the viewport – if it is not we will\n      // scroll the list down to it.\n      const $discussion = $list.find('.DiscussionListItem.active');\n      if ($discussion.length) {\n        const listTop = $list.offset().top;\n        const listBottom = listTop + $list.outerHeight();\n        const discussionTop = $discussion.offset().top;\n        const discussionBottom = discussionTop + $discussion.outerHeight();\n\n        if (discussionTop < listTop || discussionBottom > listBottom) {\n          $list.scrollTop($list.scrollTop() - listTop + discussionTop);\n        }\n      }\n    }\n  }\n\n  onremove(vnode) {\n    app.cache.discussionListPaneScrollTop = $(vnode.dom).scrollTop();\n    $(document).off('mousemove', hotEdge);\n  }\n\n  /**\n   * Are we on a device that's larger than we consider \"mobile\"?\n   *\n   * @returns {boolean}\n   */\n  enoughSpace() {\n    return !$('.App-navigation').is(':visible');\n  }\n}\n","/**\n * The `ScrollListener` class sets up a listener that handles window scroll\n * events.\n */\nexport default class ScrollListener {\n  /**\n   * @param {(top: number) => void} callback The callback to run when the scroll position\n   *     changes.\n   */\n  constructor(callback) {\n    this.callback = callback;\n    this.ticking = false;\n  }\n\n  /**\n   * On each animation frame, as long as the listener is active, run the\n   * `update` method.\n   *\n   * @protected\n   */\n  loop() {\n    // THROTTLE: If the callback is still running (or hasn't yet run), we ignore\n    // further scroll events.\n    if (this.ticking) return;\n\n    // Schedule the callback to be executed soon (TM), and stop throttling once\n    // the callback is done.\n    requestAnimationFrame(() => {\n      this.update();\n      this.ticking = false;\n    });\n\n    this.ticking = true;\n  }\n\n  /**\n   * Run the callback, whether there was a scroll event or not.\n   */\n  update() {\n    this.callback(window.pageYOffset);\n  }\n\n  /**\n   * Start listening to and handling the window's scroll position.\n   */\n  start() {\n    if (!this.active) {\n      window.addEventListener('scroll', (this.active = this.loop.bind(this)), { passive: true });\n    }\n  }\n\n  /**\n   * Stop listening to and handling the window's scroll position.\n   */\n  stop() {\n    window.removeEventListener('scroll', this.active);\n\n    this.active = null;\n  }\n}\n","import Component from '../../common/Component';\nimport avatar from '../../common/helpers/avatar';\n\n/**\n * The `LoadingPost` component shows a placeholder that looks like a post,\n * indicating that the post is loading.\n */\nexport default class LoadingPost extends Component {\n  view() {\n    return (\n      <div className=\"Post CommentPost LoadingPost\">\n        <header className=\"Post-header\">\n          {avatar(null, { className: 'PostUser-avatar' })}\n          <div className=\"fakeText\" />\n        </header>\n\n        <div className=\"Post-body\">\n          <div className=\"fakeText\" />\n          <div className=\"fakeText\" />\n          <div className=\"fakeText\" />\n        </div>\n      </div>\n    );\n  }\n}\n","import app from '../../common/app';\nimport type Mithril from 'mithril';\nimport User from '../models/User';\n\n/**\n * The `username` helper displays a user's username in a <span className=\"username\">\n * tag. If the user doesn't exist, the username will be displayed as [deleted].\n */\nexport default function username(user: User | null | undefined | false): Mithril.Vnode {\n  const name = (user && user.displayName()) || app.translator.trans('core.lib.username.deleted_text');\n\n  return <span className=\"username\">{name}</span>;\n}\n","/*global s9e*/\n\nimport Component from '../../common/Component';\n\n/**\n * The `ComposerPostPreview` component renders Markdown as HTML using the\n * TextFormatter library, polling a data source for changes every 50ms. This is\n * done to prevent expensive redraws on e.g. every single keystroke, while\n * still retaining the perception of live updates for the user.\n *\n * ### Attrs\n *\n * - `composer` The state of the composer controlling this preview.\n * - `className` A CSS class for the element surrounding the preview.\n * - `surround` A callback that can execute code before and after re-render, e.g. for scroll anchoring.\n */\nexport default class ComposerPostPreview extends Component {\n  static initAttrs(attrs) {\n    attrs.className = attrs.className || '';\n    attrs.surround = attrs.surround || ((preview) => preview());\n  }\n\n  view() {\n    return <div className={this.attrs.className} />;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    // Every 50ms, if the composer content has changed, then update the post's\n    // body with a preview.\n    let preview;\n    const updatePreview = () => {\n      // Since we're polling, the composer may have been closed in the meantime,\n      // so we bail in that case.\n      if (!this.attrs.composer.isVisible()) return;\n\n      const content = this.attrs.composer.fields.content();\n\n      if (preview === content) return;\n\n      preview = content;\n\n      this.attrs.surround(() => s9e.TextFormatter.preview(preview || '', vnode.dom));\n    };\n    updatePreview();\n\n    this.updateInterval = setInterval(updatePreview, 50);\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    clearInterval(this.updateInterval);\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport DiscussionControls from '../utils/DiscussionControls';\nimport ComposerPostPreview from './ComposerPostPreview';\nimport listItems from '../../common/helpers/listItems';\n\n/**\n * The `ReplyPlaceholder` component displays a placeholder for a reply, which,\n * when clicked, opens the reply composer.\n *\n * ### Attrs\n *\n * - `discussion`\n */\nexport default class ReplyPlaceholder extends Component {\n  view() {\n    if (app.composer.composingReplyTo(this.attrs.discussion)) {\n      return (\n        <article className=\"Post CommentPost editing\" aria-busy=\"true\">\n          <header className=\"Post-header\">\n            <div className=\"PostUser\">\n              <h3 className=\"PostUser-name\">\n                {avatar(app.session.user, { className: 'PostUser-avatar' })}\n                {username(app.session.user)}\n              </h3>\n              <ul className=\"PostUser-badges badges\">{listItems(app.session.user.badges().toArray())}</ul>\n            </div>\n          </header>\n          <ComposerPostPreview className=\"Post-body\" composer={app.composer} surround={this.anchorPreview.bind(this)} />\n        </article>\n      );\n    }\n\n    const reply = () => {\n      DiscussionControls.replyAction.call(this.attrs.discussion, true).catch(() => {});\n    };\n\n    return (\n      <button className=\"Post ReplyPlaceholder\" onclick={reply}>\n        <span className=\"Post-header\">\n          {avatar(app.session.user, { className: 'PostUser-avatar' })} {app.translator.trans('core.forum.post_stream.reply_placeholder')}\n        </span>\n      </button>\n    );\n  }\n\n  anchorPreview(preview) {\n    const anchorToBottom = $(window).scrollTop() + $(window).height() >= $(document).height();\n\n    preview();\n\n    if (anchorToBottom) {\n      $(window).scrollTop($(document).height());\n    }\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport ScrollListener from '../../common/utils/ScrollListener';\nimport PostLoading from './LoadingPost';\nimport ReplyPlaceholder from './ReplyPlaceholder';\nimport Button from '../../common/components/Button';\nimport ItemList from '../../common/utils/ItemList';\nimport extractText from '../../common/utils/extractText';\n\n/**\n * The `PostStream` component displays an infinitely-scrollable wall of posts in\n * a discussion. Posts that have not loaded will be displayed as placeholders.\n *\n * ### Attrs\n *\n * - `discussion`\n * - `stream`\n * - `targetPost`\n * - `onPositionChange`\n */\nexport default class PostStream extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.discussion = this.attrs.discussion;\n    this.stream = this.attrs.stream;\n\n    this.scrollListener = new ScrollListener(this.onscroll.bind(this));\n  }\n\n  view() {\n    let lastTime;\n\n    const viewingEnd = this.stream.viewingEnd();\n    const posts = this.stream.posts();\n    const postIds = this.discussion.postIds();\n\n    const postFadeIn = (vnode) => {\n      $(vnode.dom).addClass('fadeIn');\n      // 500 is the duration of the fadeIn CSS animation + 100ms,\n      // so the animation has time to complete\n      setTimeout(() => $(vnode.dom).removeClass('fadeIn'), 500);\n    };\n\n    const items = posts.map((post, i) => {\n      let content;\n      const attrs = { 'data-index': this.stream.visibleStart + i };\n\n      if (post) {\n        const time = post.createdAt();\n        const PostComponent = app.postComponents[post.contentType()];\n        content = !!PostComponent && <PostComponent post={post} />;\n\n        attrs.key = 'post' + post.id();\n        attrs.oncreate = postFadeIn;\n        attrs['data-time'] = time.toISOString();\n        attrs['data-number'] = post.number();\n        attrs['data-id'] = post.id();\n        attrs['data-type'] = post.contentType();\n\n        // If the post before this one was more than 4 days ago, we will\n        // display a 'time gap' indicating how long it has been in between\n        // the posts.\n        const dt = time - lastTime;\n\n        if (dt > 1000 * 60 * 60 * 24 * 4) {\n          content = [\n            <div className=\"PostStream-timeGap\">\n              <span>{app.translator.trans('core.forum.post_stream.time_lapsed_text', { period: dayjs().add(dt, 'ms').fromNow(true) })}</span>\n            </div>,\n            content,\n          ];\n        }\n\n        lastTime = time;\n      } else {\n        attrs.key = 'post' + postIds[this.stream.visibleStart + i];\n\n        content = <PostLoading />;\n      }\n\n      const postStreamElement = (\n        <div className=\"PostStream-item\" {...attrs}>\n          {content}\n        </div>\n      );\n\n      // If we're on the first post, call the afterFirstPostItems method and add any additional elements.\n      if (i === 0 && this.afterFirstPostItems().toArray().length > 0) {\n        // Using m.fragment to return multiple elements without an enclosing container\n        return m.fragment({ ...attrs }, [\n          postStreamElement,\n          <div className=\"PostStream-item PostStream-afterFirstPost\" key=\"afterFirstPost\">\n            {this.afterFirstPostItems().toArray()}\n          </div>,\n        ]);\n      }\n\n      return postStreamElement;\n    });\n\n    if (!viewingEnd && posts[this.stream.visibleEnd - this.stream.visibleStart - 1]) {\n      items.push(\n        <div className=\"PostStream-loadMore\" key=\"loadMore\">\n          <Button className=\"Button\" onclick={this.stream.loadNext.bind(this.stream)}>\n            {app.translator.trans('core.forum.post_stream.load_more_button')}\n          </Button>\n        </div>\n      );\n    }\n\n    // Allow extensions to add items to the end of the post stream.\n    if (viewingEnd) {\n      items.push(...this.endItems().toArray());\n    }\n\n    // If we're viewing the end of the discussion, the user can reply, and\n    // is not already doing so, then show a 'write a reply' placeholder.\n    if (viewingEnd && (!app.session.user || this.discussion.canReply())) {\n      items.push(\n        <div className=\"PostStream-item\" key=\"reply\" data-index={this.stream.count()} oncreate={postFadeIn}>\n          <ReplyPlaceholder discussion={this.discussion} />\n        </div>\n      );\n    }\n\n    return (\n      <div className=\"PostStream\" role=\"feed\" aria-live=\"off\" aria-busy={this.stream.pagesLoading ? 'true' : 'false'}>\n        {items}\n      </div>\n    );\n  }\n\n  /**\n   * @returns {ItemList<import('mithril').Children>}\n   */\n  afterFirstPostItems() {\n    const items = new ItemList();\n\n    return items;\n  }\n\n  /**\n   * @returns {ItemList<import('mithril').Children>}\n   */\n  endItems() {\n    const items = new ItemList();\n\n    return items;\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    this.triggerScroll();\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.triggerScroll();\n\n    // This is wrapped in setTimeout due to the following Mithril issue:\n    // https://github.com/lhorie/mithril.js/issues/637\n    setTimeout(() => this.scrollListener.start());\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    this.scrollListener.stop();\n    clearTimeout(this.calculatePositionTimeout);\n  }\n\n  /**\n   * Start scrolling, if appropriate, to a newly-targeted post.\n   */\n  triggerScroll() {\n    if (!this.stream.needsScroll) return;\n\n    const target = this.stream.targetPost;\n    this.stream.needsScroll = false;\n\n    if ('number' in target) {\n      this.scrollToNumber(target.number, this.stream.animateScroll);\n    } else if ('index' in target) {\n      this.scrollToIndex(target.index, this.stream.animateScroll, target.reply);\n    }\n  }\n\n  /**\n   *\n   * @param {number} top\n   */\n  onscroll(top = window.pageYOffset) {\n    if (this.stream.paused || this.stream.pagesLoading) return;\n\n    this.updateScrubber(top);\n\n    this.loadPostsIfNeeded(top);\n\n    // Throttle calculation of our position (start/end numbers of posts in the\n    // viewport) to 100ms.\n    clearTimeout(this.calculatePositionTimeout);\n    this.calculatePositionTimeout = setTimeout(this.calculatePosition.bind(this, top), 100);\n  }\n\n  /**\n   * Check if either extreme of the post stream is in the viewport,\n   * and if so, trigger loading the next/previous page.\n   *\n   * @param {number} top\n   */\n  loadPostsIfNeeded(top = window.pageYOffset) {\n    const marginTop = this.getMarginTop();\n    const viewportHeight = $(window).height() - marginTop;\n    const viewportTop = top + marginTop;\n    const loadAheadDistance = 300;\n\n    if (this.stream.visibleStart > 0) {\n      const $item = this.$('.PostStream-item[data-index=' + this.stream.visibleStart + ']');\n\n      if ($item.length && $item.offset().top > viewportTop - loadAheadDistance) {\n        this.stream.loadPrevious();\n      }\n    }\n\n    if (this.stream.visibleEnd < this.stream.count()) {\n      const $item = this.$('.PostStream-item[data-index=' + (this.stream.visibleEnd - 1) + ']');\n\n      if ($item.length && $item.offset().top + $item.outerHeight(true) < viewportTop + viewportHeight + loadAheadDistance) {\n        this.stream.loadNext();\n      }\n    }\n  }\n\n  updateScrubber(top = window.pageYOffset) {\n    const marginTop = this.getMarginTop();\n    const viewportHeight = $(window).height() - marginTop;\n    const viewportTop = top + marginTop;\n\n    // Before looping through all of the posts, we reset the scrollbar\n    // properties to a 'default' state. These values reflect what would be\n    // seen if the browser were scrolled right up to the top of the page,\n    // and the viewport had a height of 0.\n    const $items = this.$('.PostStream-item[data-index]');\n    let visible = 0;\n    let period = '';\n    let indexFromViewPort = null;\n\n    // Now loop through each of the items in the discussion. An 'item' is\n    // either a single post or a 'gap' of one or more posts that haven't\n    // been loaded yet.\n    $items.each(function () {\n      const $this = $(this);\n      const top = $this.offset().top;\n      const height = $this.outerHeight(true);\n\n      // If this item is above the top of the viewport, skip to the next\n      // one. If it's below the bottom of the viewport, break out of the\n      // loop.\n      if (top + height < viewportTop) {\n        return true;\n      }\n      if (top > viewportTop + viewportHeight) {\n        return false;\n      }\n\n      // Work out how many pixels of this item are visible inside the viewport.\n      // Then add the proportion of this item's total height to the index.\n      const visibleTop = Math.max(0, viewportTop - top);\n      const visibleBottom = Math.min(height, viewportTop + viewportHeight - top);\n      const visiblePost = visibleBottom - visibleTop;\n\n      // We take the index of the first item that passed the previous checks.\n      // It is the item that is first visible in the viewport.\n      if (indexFromViewPort === null) {\n        indexFromViewPort = parseFloat($this.data('index')) + visibleTop / height;\n      }\n\n      if (visiblePost > 0) {\n        visible += visiblePost / height;\n      }\n\n      // If this item has a time associated with it, then set the\n      // scrollbar's current period to a formatted version of this time.\n      const time = $this.data('time');\n      if (time) period = time;\n    });\n\n    // If indexFromViewPort is null, it means no posts are visible in the\n    // viewport. This can happen, when drafting a long reply post. In that case\n    // set the index to the last post.\n    this.stream.index = indexFromViewPort !== null ? indexFromViewPort + 1 : this.stream.count();\n    this.stream.visible = visible;\n    if (period) this.stream.description = dayjs(period).format(extractText(app.translator.trans('core.lib.datetime_formats.scrubber')));\n  }\n\n  /**\n   * Work out which posts (by number) are currently visible in the viewport, and\n   * fire an event with the information.\n   */\n  calculatePosition(top = window.pageYOffset) {\n    const marginTop = this.getMarginTop();\n    const $window = $(window);\n    const viewportHeight = $window.height() - marginTop;\n    const scrollTop = $window.scrollTop() + marginTop;\n    const viewportTop = top + marginTop;\n\n    let startNumber;\n    let endNumber;\n\n    this.$('.PostStream-item').each(function () {\n      const $item = $(this);\n      const top = $item.offset().top;\n      const height = $item.outerHeight(true);\n      const visibleTop = Math.max(0, viewportTop - top);\n\n      const threeQuartersVisible = visibleTop / height < 0.75;\n      const coversQuarterOfViewport = (height - visibleTop) / viewportHeight > 0.25;\n      if (startNumber === undefined && (threeQuartersVisible || coversQuarterOfViewport)) {\n        startNumber = $item.data('number');\n      }\n\n      if (top + height > scrollTop) {\n        if (top + height < scrollTop + viewportHeight) {\n          if ($item.data('number')) {\n            endNumber = $item.data('number');\n          }\n        } else return false;\n      }\n    });\n\n    if (startNumber) {\n      this.attrs.onPositionChange(startNumber || 1, endNumber, startNumber);\n    }\n  }\n\n  /**\n   * Get the distance from the top of the viewport to the point at which we\n   * would consider a post to be the first one visible.\n   *\n   * @return {number}\n   */\n  getMarginTop() {\n    const headerId = app.screen() === 'phone' ? '#app-navigation' : '#header';\n\n    return this.$() && $(headerId).outerHeight() + parseInt(this.$().css('margin-top'), 10);\n  }\n\n  /**\n   * Scroll down to a certain post by number and 'flash' it.\n   *\n   * @param {number} number\n   * @param {boolean} animate\n   * @return {JQueryDeferred}\n   */\n  scrollToNumber(number, animate) {\n    const $item = this.$(`.PostStream-item[data-number=${number}]`);\n\n    return this.scrollToItem($item, animate).then(this.flashItem.bind(this, $item));\n  }\n\n  /**\n   * Scroll down to a certain post by index.\n   *\n   * @param {number} index\n   * @param {boolean} animate\n   * @param {boolean} reply Whether or not to scroll to the reply placeholder.\n   * @return {JQueryDeferred}\n   */\n  scrollToIndex(index, animate, reply) {\n    const $item = reply ? $('.PostStream-item:last-child') : this.$(`.PostStream-item[data-index=${index}]`);\n\n    this.scrollToItem($item, animate, true, reply);\n\n    if (reply) {\n      this.flashItem($item);\n    }\n  }\n\n  /**\n   * Scroll down to the given post.\n   *\n   * @param {JQuery} $item\n   * @param {boolean} animate\n   * @param {boolean} force Whether or not to force scrolling to the item, even\n   *     if it is already in the viewport.\n   * @param {boolean} reply Whether or not to scroll to the reply placeholder.\n   * @return {JQueryDeferred}\n   */\n  scrollToItem($item, animate, force, reply) {\n    const $container = $('html, body').stop(true);\n    const index = $item.data('index');\n\n    if ($item.length) {\n      const itemTop = $item.offset().top - this.getMarginTop();\n      const itemBottom = $item.offset().top + $item.height();\n      const scrollTop = $(document).scrollTop();\n      const scrollBottom = scrollTop + $(window).height();\n\n      // If the item is already in the viewport, we may not need to scroll.\n      // If we're scrolling to the reply placeholder, we'll make sure its\n      // bottom will line up with the top of the composer.\n      if (force || itemTop < scrollTop || itemBottom > scrollBottom) {\n        const top = reply ? itemBottom - $(window).height() + app.composer.computedHeight() : $item.is(':first-child') ? 0 : itemTop;\n\n        if (!animate) {\n          $container.scrollTop(top);\n        } else if (top !== scrollTop) {\n          $container.animate({ scrollTop: top }, 'fast');\n        }\n      }\n    }\n\n    const updateScrubberHeight = () => {\n      // We manually set the index because we want to display the index of the\n      // exact post we've scrolled to, not just that of the first post within viewport.\n      this.updateScrubber();\n      if (index !== undefined) this.stream.index = index + 1;\n    };\n\n    // If we don't update this before the scroll, the scrubber will start\n    // at the top, and animate down, which can be confusing\n    updateScrubberHeight();\n    this.stream.forceUpdateScrubber = true;\n\n    return Promise.all([$container.promise(), this.stream.loadPromise]).then(() => {\n      m.redraw.sync();\n\n      // Rendering post contents will probably throw off our position.\n      // To counter this, we'll scroll either:\n      //   - To the reply placeholder (aligned with composer top)\n      //   - To the top of the page if we're on the first post\n      //   - To the top of a post (if that post exists)\n      // If the post does not currently exist, it's probably\n      // outside of the range we loaded in, so we won't adjust anything,\n      // as it will soon be rendered by the \"load more\" system.\n      let itemOffset;\n      if (reply) {\n        const $placeholder = $('.PostStream-item:last-child');\n        $(window).scrollTop($placeholder.offset().top + $placeholder.height() - $(window).height() + app.composer.computedHeight());\n      } else if (index === 0) {\n        $(window).scrollTop(0);\n      } else if ((itemOffset = $(`.PostStream-item[data-index=${index}]`).offset())) {\n        $(window).scrollTop(itemOffset.top - this.getMarginTop());\n      }\n\n      // We want to adjust this again after posts have been loaded in\n      // and position adjusted so that the scrubber's height is accurate.\n      updateScrubberHeight();\n\n      this.calculatePosition();\n      this.stream.paused = false;\n      // Check if we need to load more posts after scrolling.\n      this.loadPostsIfNeeded();\n    });\n  }\n\n  /**\n   * 'Flash' the given post, drawing the user's attention to it.\n   *\n   * @param {JQuery} $item\n   */\n  flashItem($item) {\n    // This might execute before the fadeIn class has been removed in PostStreamItem's\n    // oncreate, so we remove it just to be safe and avoid a double animation.\n    $item.removeClass('fadeIn');\n    $item.addClass('flash').on('animationend webkitAnimationEnd', (e) => {\n      $item.removeClass('flash');\n    });\n  }\n}\n","import app from '../../common/app';\n\n/**\n * The `formatNumber` utility localizes a number into a string with the\n * appropriate punctuation based on the provided locale otherwise will default to the users locale.\n *\n * @example\n * formatNumber(1234);\n * // 1,234\n */\nexport default function formatNumber(number: number, locale: string = app.data.locale): string {\n  return new Intl.NumberFormat(locale).format(number);\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport icon from '../../common/helpers/icon';\nimport formatNumber from '../../common/utils/formatNumber';\nimport ScrollListener from '../../common/utils/ScrollListener';\n\n/**\n * The `PostStreamScrubber` component displays a scrubber which can be used to\n * navigate/scrub through a post stream.\n *\n * ### Attrs\n *\n * - `stream`\n * - `className`\n */\nexport default class PostStreamScrubber extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.stream = this.attrs.stream;\n    this.handlers = {};\n\n    this.scrollListener = new ScrollListener(this.updateScrubberValues.bind(this, { fromScroll: true, forceHeightChange: true }));\n  }\n\n  view() {\n    const count = this.stream.count();\n\n    // Index is left blank for performance reasons, it is filled in in updateScubberValues\n    const viewing = app.translator.trans('core.forum.post_scrubber.viewing_text', {\n      count,\n      index: <span className=\"Scrubber-index\"></span>,\n      formattedCount: <span className=\"Scrubber-count\">{formatNumber(count)}</span>,\n    });\n\n    const unreadCount = this.stream.discussion.unreadCount();\n    const unreadPercent = count ? Math.min(count - this.stream.index, unreadCount) / count : 0;\n\n    function styleUnread(vnode) {\n      const $element = $(vnode.dom);\n      const newStyle = {\n        top: 100 - unreadPercent * 100 + '%',\n        height: unreadPercent * 100 + '%',\n        opacity: unreadPercent ? 1 : 0,\n      };\n\n      if (vnode.state.oldStyle) {\n        $element.stop(true).css(vnode.state.oldStyle).animate(newStyle);\n      } else {\n        $element.css(newStyle);\n      }\n\n      vnode.state.oldStyle = newStyle;\n    }\n    const classNames = ['PostStreamScrubber', 'Dropdown'];\n    if (this.attrs.className) classNames.push(this.attrs.className);\n\n    return (\n      <div className={classNames.join(' ')}>\n        <button className=\"Button Dropdown-toggle\" data-toggle=\"dropdown\">\n          {viewing} {icon('fas fa-sort')}\n        </button>\n\n        <div className=\"Dropdown-menu dropdown-menu\">\n          <div className=\"Scrubber\">\n            <a className=\"Scrubber-first\" onclick={this.goToFirst.bind(this)}>\n              {icon('fas fa-angle-double-up')} {this.firstPostLabel()}\n            </a>\n\n            <div className=\"Scrubber-scrollbar\">\n              <div className=\"Scrubber-before\" />\n              <div className=\"Scrubber-handle\">\n                <div className=\"Scrubber-bar\" />\n                <div className=\"Scrubber-info\">\n                  <strong>{viewing}</strong>\n                  <span className=\"Scrubber-description\"></span>\n                </div>\n              </div>\n              <div className=\"Scrubber-after\" />\n\n              <div className=\"Scrubber-unread\" oncreate={styleUnread} onupdate={styleUnread}>\n                {this.unreadLabel(unreadCount)}\n              </div>\n            </div>\n\n            <a className=\"Scrubber-last\" onclick={this.goToLast.bind(this)}>\n              {icon('fas fa-angle-double-down')} {this.lastPostLabel()}\n            </a>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  firstPostLabel() {\n    return app.translator.trans('core.forum.post_scrubber.original_post_link');\n  }\n\n  unreadLabel(unreadCount) {\n    return app.translator.trans('core.forum.post_scrubber.unread_text', { count: unreadCount });\n  }\n\n  lastPostLabel() {\n    return app.translator.trans('core.forum.post_scrubber.now_link');\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    if (this.stream.forceUpdateScrubber) {\n      this.stream.forceUpdateScrubber = false;\n      this.stream.loadPromise.then(() => this.updateScrubberValues({ animate: true, forceHeightChange: true }));\n    }\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    // Whenever the window is resized, adjust the height of the scrollbar\n    // so that it fills the height of the sidebar.\n    $(window)\n      .on('resize', (this.handlers.onresize = this.onresize.bind(this)))\n      .resize();\n\n    // When any part of the whole scrollbar is clicked, we want to jump to\n    // that position.\n    this.$('.Scrubber-scrollbar')\n      .bind('click', this.onclick.bind(this))\n\n      // Now we want to make the scrollbar handle draggable. Let's start by\n      // preventing default browser events from messing things up.\n      .bind('dragstart mousedown touchstart', (e) => e.preventDefault());\n\n    // When the mouse is pressed on the scrollbar handle, we capture some\n    // information about its current position. We will store this\n    // information in an object and pass it on to the document's\n    // mousemove/mouseup events later.\n    this.dragging = false;\n    this.mouseStart = 0;\n    this.indexStart = 0;\n\n    this.$('.Scrubber-handle')\n      .bind('mousedown touchstart', this.onmousedown.bind(this))\n\n      // Exempt the scrollbar handle from the 'jump to' click event.\n      .click((e) => e.stopPropagation());\n\n    // When the mouse moves and when it is released, we pass the\n    // information that we captured when the mouse was first pressed onto\n    // some event handlers. These handlers will move the scrollbar/stream-\n    // content as appropriate.\n    $(document)\n      .on('mousemove touchmove', (this.handlers.onmousemove = this.onmousemove.bind(this)))\n      .on('mouseup touchend', (this.handlers.onmouseup = this.onmouseup.bind(this)));\n\n    setTimeout(() => this.scrollListener.start());\n\n    this.stream.loadPromise.then(() => this.updateScrubberValues({ animate: false, forceHeightChange: true }));\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    this.scrollListener.stop();\n    $(window).off('resize', this.handlers.onresize);\n\n    $(document).off('mousemove touchmove', this.handlers.onmousemove).off('mouseup touchend', this.handlers.onmouseup);\n  }\n\n  /**\n   * Update the scrollbar's position to reflect the current values of the\n   * index/visible properties.\n   *\n   * @param {Partial<{fromScroll: boolean, forceHeightChange: boolean, animate: boolean}>} options\n   */\n  updateScrubberValues(options = {}) {\n    const index = this.stream.index;\n    const count = this.stream.count();\n    const visible = this.stream.visible || 1;\n    const percentPerPost = this.percentPerPost();\n\n    const $scrubber = this.$();\n    $scrubber.find('.Scrubber-index').text(formatNumber(this.stream.sanitizeIndex(Math.max(1, index))));\n    $scrubber.find('.Scrubber-description').text(this.stream.description);\n    $scrubber.toggleClass('disabled', this.stream.disabled());\n\n    const heights = {};\n    heights.before = Math.max(0, percentPerPost.index * Math.min(index - 1, count - visible));\n    heights.handle = Math.min(100 - heights.before, percentPerPost.visible * visible);\n    heights.after = 100 - heights.before - heights.handle;\n\n    // If the stream is paused, don't change height on scroll, as the viewport is being scrolled by the JS\n    // If a height change animation is already in progress, don't adjust height unless overriden\n    if ((options.fromScroll && this.stream.paused) || (this.adjustingHeight && !options.forceHeightChange)) return;\n\n    const func = options.animate ? 'animate' : 'css';\n    this.adjustingHeight = true;\n    const animationPromises = [];\n    for (const part in heights) {\n      const $part = $scrubber.find(`.Scrubber-${part}`);\n      animationPromises.push(\n        $part\n          .stop(true, true)\n          [func]({ height: heights[part] + '%' }, 'fast')\n          .promise()\n      );\n\n      // jQuery likes to put overflow:hidden, but because the scrollbar handle\n      // has a negative margin-left, we need to override.\n      if (func === 'animate') $part.css('overflow', 'visible');\n    }\n    Promise.all(animationPromises).then(() => (this.adjustingHeight = false));\n  }\n\n  /**\n   * Go to the first post in the discussion.\n   */\n  goToFirst() {\n    this.stream.goToFirst();\n    this.updateScrubberValues({ animate: true, forceHeightChange: true });\n  }\n\n  /**\n   * Go to the last post in the discussion.\n   */\n  goToLast() {\n    this.stream.goToLast();\n    this.updateScrubberValues({ animate: true, forceHeightChange: true });\n  }\n\n  onresize() {\n    // Adjust the height of the scrollbar so that it fills the height of\n    // the sidebar and doesn't overlap the footer.\n    const scrubber = this.$();\n    const scrollbar = this.$('.Scrubber-scrollbar');\n\n    scrollbar.css(\n      'max-height',\n      $(window).height() -\n        scrubber.offset().top +\n        $(window).scrollTop() -\n        parseInt($('#app').css('padding-bottom'), 10) -\n        (scrubber.outerHeight() - scrollbar.outerHeight())\n    );\n  }\n\n  onmousedown(e) {\n    e.redraw = false;\n    this.mouseStart = e.clientY || e.originalEvent.touches[0].clientY;\n    this.indexStart = this.stream.index;\n    this.dragging = true;\n    $('body').css('cursor', 'move');\n    this.$().toggleClass('dragging', this.dragging);\n  }\n\n  onmousemove(e) {\n    if (!this.dragging) return;\n\n    // Work out how much the mouse has moved by - first in pixels, then\n    // convert it to a percentage of the scrollbar's height, and then\n    // finally convert it into an index. Add this delta index onto\n    // the index at which the drag was started, and then scroll there.\n    const deltaPixels = (e.clientY || e.originalEvent.touches[0].clientY) - this.mouseStart;\n    const deltaPercent = (deltaPixels / this.$('.Scrubber-scrollbar').outerHeight()) * 100;\n    const deltaIndex = deltaPercent / this.percentPerPost().index || 0;\n    const newIndex = Math.min(this.indexStart + deltaIndex, this.stream.count() - 1);\n\n    this.stream.index = Math.max(0, newIndex);\n    this.updateScrubberValues();\n  }\n\n  onmouseup() {\n    this.$().toggleClass('dragging', this.dragging);\n    if (!this.dragging) return;\n\n    this.mouseStart = 0;\n    this.indexStart = 0;\n    this.dragging = false;\n    $('body').css('cursor', '');\n\n    this.$().removeClass('open');\n\n    // If the index we've landed on is in a gap, then tell the stream-\n    // content that we want to load those posts.\n    const intIndex = Math.floor(this.stream.index);\n    this.stream.goToIndex(intIndex);\n  }\n\n  onclick(e) {\n    // Calculate the index which we want to jump to based on the click position.\n\n    // 1. Get the offset of the click from the top of the scrollbar, as a\n    //    percentage of the scrollbar's height.\n    const $scrollbar = this.$('.Scrubber-scrollbar');\n    const offsetPixels = (e.pageY || e.originalEvent.touches[0].pageY) - $scrollbar.offset().top + $('body').scrollTop();\n    let offsetPercent = (offsetPixels / $scrollbar.outerHeight()) * 100;\n\n    // 2. We want the handle of the scrollbar to end up centered on the click\n    //    position. Thus, we calculate the height of the handle in percent and\n    //    use that to find a new offset percentage.\n    offsetPercent = offsetPercent - parseFloat($scrollbar.find('.Scrubber-handle')[0].style.height) / 2;\n\n    // 3. Now we can convert the percentage into an index, and tell the stream-\n    //    content component to jump to that index.\n    let offsetIndex = offsetPercent / this.percentPerPost().index;\n    offsetIndex = Math.max(0, Math.min(this.stream.count() - 1, offsetIndex));\n    this.stream.goToIndex(Math.floor(offsetIndex));\n    this.updateScrubberValues({ animate: true, forceHeightChange: true });\n\n    this.$().removeClass('open');\n  }\n\n  /**\n   * Get the percentage of the height of the scrubber that should be allocated\n   * to each post.\n   *\n   * @return {{ index: number, visible: number }}\n   * @property {Number} index The percent per post for posts on either side of\n   *     the visible part of the scrubber.\n   * @property {Number} visible The percent per post for the visible part of the\n   *     scrubber.\n   */\n  percentPerPost() {\n    const count = this.stream.count() || 1;\n    const visible = this.stream.visible || 1;\n\n    // To stop the handle of the scrollbar from getting too small when there\n    // are many posts, we define a minimum percentage height for the handle\n    // calculated from a 50 pixel limit. From this, we can calculate the\n    // minimum percentage per visible post. If this is greater than the actual\n    // percentage per post, then we need to adjust the 'before' percentage to\n    // account for it.\n    const minPercentVisible = (50 / this.$('.Scrubber-scrollbar').outerHeight()) * 100;\n    const percentPerVisiblePost = Math.max(100 / count, minPercentVisible / visible);\n    const percentPerPost = count === visible ? 0 : (100 - percentPerVisiblePost * visible) / (count - visible);\n\n    return {\n      index: percentPerPost,\n      visible: percentPerVisiblePost,\n    };\n  }\n}\n","import Dropdown, { IDropdownAttrs } from './Dropdown';\nimport Button from './Button';\nimport icon from '../helpers/icon';\nimport Mithril from 'mithril';\nimport classList from '../utils/classList';\n\nexport interface ISplitDropdownAttrs extends IDropdownAttrs {}\n\n/**\n * The `SplitDropdown` component is similar to `Dropdown`, but the first child\n * is displayed as its own button prior to the toggle button.\n */\nexport default class SplitDropdown extends Dropdown {\n  static initAttrs(attrs: ISplitDropdownAttrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = classList(attrs.className, 'Dropdown--split');\n    attrs.menuClassName = classList(attrs.menuClassName, 'Dropdown-menu--right');\n  }\n\n  getButton(children: Mithril.ChildArray): Mithril.Vnode<any, any> {\n    // Make a copy of the attrs of the first child component. We will assign\n    // these attrs to a new button, so that it has exactly the same behaviour as\n    // the first child.\n    const firstChild = this.getFirstChild(children);\n    const buttonAttrs = Object.assign({}, firstChild?.attrs);\n    buttonAttrs.className = classList(buttonAttrs.className, 'SplitDropdown-button Button', this.attrs.buttonClassName);\n\n    return (\n      <>\n        <Button {...buttonAttrs}>{firstChild.children}</Button>\n        <button\n          className={'Dropdown-toggle Button Button--icon ' + this.attrs.buttonClassName}\n          aria-haspopup=\"menu\"\n          aria-label={this.attrs.accessibleToggleLabel}\n          data-toggle=\"dropdown\"\n        >\n          {this.attrs.icon ? icon(this.attrs.icon, { className: 'Button-icon' }) : null}\n          {icon('fas fa-caret-down', { className: 'Button-caret' })}\n        </button>\n      </>\n    );\n  }\n\n  /**\n   * Get the first child. If the first child is an array, the first item in that\n   * array will be returned.\n   */\n  protected getFirstChild(children: Mithril.Children): Mithril.Vnode<any, any> {\n    let firstChild = children;\n\n    while (firstChild instanceof Array) firstChild = firstChild[0];\n\n    return firstChild as Mithril.Vnode<any, any>;\n  }\n}\n","/* eslint-disable no-undefined,no-param-reassign,no-shadow */\n\n/**\n * Throttle execution of a function. Especially useful for rate limiting\n * execution of handlers on events like resize and scroll.\n *\n * @param  {number}    delay -          A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param  {boolean}   [noTrailing] -   Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the\n *                                    throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time\n *                                    after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,\n *                                    the internal counter is reset).\n * @param  {Function}  callback -       A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n *                                    to `callback` when the throttled-function is executed.\n * @param  {boolean}   [debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),\n *                                    schedule `callback` to execute after `delay` ms.\n *\n * @returns {Function}  A new, throttled, function.\n */\nexport default function (delay, noTrailing, callback, debounceMode) {\n\t/*\n\t * After wrapper has stopped being called, this timeout ensures that\n\t * `callback` is executed at the proper times in `throttle` and `end`\n\t * debounce modes.\n\t */\n\tlet timeoutID;\n\tlet cancelled = false;\n\n\t// Keep track of the last time `callback` was executed.\n\tlet lastExec = 0;\n\n\t// Function to clear existing timeout\n\tfunction clearExistingTimeout() {\n\t\tif (timeoutID) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\t}\n\n\t// Function to cancel next exec\n\tfunction cancel() {\n\t\tclearExistingTimeout();\n\t\tcancelled = true;\n\t}\n\n\t// `noTrailing` defaults to falsy.\n\tif (typeof noTrailing !== 'boolean') {\n\t\tdebounceMode = callback;\n\t\tcallback = noTrailing;\n\t\tnoTrailing = undefined;\n\t}\n\n\t/*\n\t * The `wrapper` function encapsulates all of the throttling / debouncing\n\t * functionality and when executed will limit the rate at which `callback`\n\t * is executed.\n\t */\n\tfunction wrapper(...arguments_) {\n\t\tlet self = this;\n\t\tlet elapsed = Date.now() - lastExec;\n\n\t\tif (cancelled) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec() {\n\t\t\tlastExec = Date.now();\n\t\t\tcallback.apply(self, arguments_);\n\t\t}\n\n\t\t/*\n\t\t * If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t * to allow future `callback` executions.\n\t\t */\n\t\tfunction clear() {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif (debounceMode && !timeoutID) {\n\t\t\t/*\n\t\t\t * Since `wrapper` is being called for the first time and\n\t\t\t * `debounceMode` is true (at begin), execute `callback`.\n\t\t\t */\n\t\t\texec();\n\t\t}\n\n\t\tclearExistingTimeout();\n\n\t\tif (debounceMode === undefined && elapsed > delay) {\n\t\t\t/*\n\t\t\t * In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t * `callback`.\n\t\t\t */\n\t\t\texec();\n\t\t} else if (noTrailing !== true) {\n\t\t\t/*\n\t\t\t * In trailing throttle mode, since `delay` time has not been\n\t\t\t * exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t * recent execution.\n\t\t\t *\n\t\t\t * If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t * after `delay` ms.\n\t\t\t *\n\t\t\t * If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t * execute after `delay` ms.\n\t\t\t */\n\t\t\ttimeoutID = setTimeout(\n\t\t\t\tdebounceMode ? clear : exec,\n\t\t\t\tdebounceMode === undefined ? delay - elapsed : delay\n\t\t\t);\n\t\t}\n\t}\n\n\twrapper.cancel = cancel;\n\n\t// Return the wrapper function.\n\treturn wrapper;\n}\n","/* eslint-disable no-undefined */\n\nimport throttle from './throttle';\n\n/**\n * Debounce execution of a function. Debouncing, unlike throttling,\n * guarantees that a function is only executed a single time, either at the\n * very beginning of a series of calls, or at the very end.\n *\n * @param  {number}   delay -         A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param  {boolean}  [atBegin] -     Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds\n *                                  after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.\n *                                  (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).\n * @param  {Function} callback -      A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n *                                  to `callback` when the debounced-function is executed.\n *\n * @returns {Function} A new, debounced function.\n */\nexport default function (delay, atBegin, callback) {\n\treturn callback === undefined\n\t\t? throttle(delay, atBegin, false)\n\t\t: throttle(delay, callback, atBegin !== false);\n}\n","/**\n * The `anchorScroll` utility saves the scroll position relative to an element,\n * and then restores it after a callback has been run.\n *\n * This is useful if a redraw will change the page's content above the viewport.\n * Normally doing this will result in the content in the viewport being pushed\n * down or pulled up. By wrapping the redraw with this utility, the scroll\n * position can be anchor to an element that is in or below the viewport, so\n * the content in the viewport will stay the same.\n *\n * @param {string | HTMLElement | SVGElement | Element} element The element to anchor the scroll position to.\n * @param {() => void} callback The callback to run that will change page content.\n */\nexport default function anchorScroll(element, callback) {\n  const $window = $(window);\n  const relativeScroll = $(element).offset().top - $window.scrollTop();\n\n  callback();\n\n  $window.scrollTop($(element).offset().top - relativeScroll);\n}\n","import app from '../../forum/app';\nimport { throttle } from 'throttle-debounce';\nimport anchorScroll from '../../common/utils/anchorScroll';\nimport type Discussion from '../../common/models/Discussion';\nimport type Post from '../../common/models/Post';\n\nexport default class PostStreamState {\n  /**\n   * The number of posts to load per page.\n   */\n  static loadCount = 20;\n\n  /**\n   * The discussion to display the post stream for.\n   */\n  discussion: Discussion;\n\n  /**\n   * Whether or not the infinite-scrolling auto-load functionality is\n   * disabled.\n   */\n  paused = false;\n\n  loadPageTimeouts: Record<number, NodeJS.Timeout> = {};\n  pagesLoading = 0;\n\n  index = 0;\n  number = 1;\n\n  /**\n   * The number of posts that are currently visible in the viewport.\n   */\n  visible = 1;\n  visibleStart = 0;\n  visibleEnd = 0;\n\n  animateScroll = false;\n  needsScroll = false;\n  targetPost: { number: number } | { index: number; reply?: boolean } | null = null;\n\n  /**\n   * The description to render on the scrubber.\n   */\n  description = '';\n\n  /**\n   * When the page is scrolled, goToIndex is called, or the page is loaded,\n   * various listeners result in the scrubber being updated with a new\n   * position and values. However, if goToNumber is called, the scrubber\n   * will not be updated. Accordingly, we add logic to the scrubber's\n   * onupdate to update itself, but only when needed, as indicated by this\n   * property.\n   *\n   */\n  forceUpdateScrubber = false;\n\n  loadPromise: Promise<void> | null = null;\n\n  loadNext: () => void;\n  loadPrevious: () => void;\n\n  constructor(discussion: Discussion, includedPosts: Post[] = []) {\n    this.discussion = discussion;\n\n    this.loadNext = throttle(300, this._loadNext);\n    this.loadPrevious = throttle(300, this._loadPrevious);\n\n    this.show(includedPosts);\n  }\n\n  /**\n   * Update the stream so that it loads and includes the latest posts in the\n   * discussion, if the end is being viewed.\n   */\n  update() {\n    if (!this.viewingEnd()) return Promise.resolve();\n\n    this.visibleEnd = this.count();\n\n    return this.loadRange(this.visibleStart, this.visibleEnd);\n  }\n\n  /**\n   * Load and scroll up to the first post in the discussion.\n   */\n  goToFirst(): Promise<void> {\n    return this.goToIndex(0);\n  }\n\n  /**\n   * Load and scroll down to the last post in the discussion.\n   */\n  goToLast(): Promise<void> {\n    return this.goToIndex(this.count() - 1, true);\n  }\n\n  /**\n   * Load and scroll to a post with a certain number.\n   *\n   * @param number The post number to go to. If 'reply', go to the last post and scroll the reply preview into view.\n   */\n  goToNumber(number: number | 'reply', noAnimation = false): Promise<void> {\n    // If we want to go to the reply preview, then we will go to the end of the\n    // discussion and then scroll to the very bottom of the page.\n    if (number === 'reply') {\n      const resultPromise = this.goToLast();\n      this.targetPost = { ...(this.targetPost as { index: number }), reply: true };\n      return resultPromise;\n    }\n\n    this.paused = true;\n\n    this.loadPromise = this.loadNearNumber(number);\n\n    this.needsScroll = true;\n    this.targetPost = { number };\n    this.animateScroll = !noAnimation;\n    this.number = number;\n\n    // In this case, the redraw is only called after the response has been loaded\n    // because we need to know the indices of the post range before we can\n    // start scrolling to items. Calling redraw early causes issues.\n    // Since this is only used for external navigation to the post stream, the delay\n    // before the stream is moved is not an issue.\n    return this.loadPromise.then(() => m.redraw());\n  }\n\n  /**\n   * Load and scroll to a certain index within the discussion.\n   */\n  goToIndex(index: number, noAnimation = false): Promise<void> {\n    this.paused = true;\n\n    this.loadPromise = this.loadNearIndex(index);\n\n    this.needsScroll = true;\n    this.targetPost = { index };\n    this.animateScroll = !noAnimation;\n    this.index = index;\n\n    m.redraw();\n\n    return this.loadPromise;\n  }\n\n  /**\n   * Clear the stream and load posts near a certain number. Returns a promise.\n   * If the post with the given number is already loaded, the promise will be\n   * resolved immediately.\n   */\n  loadNearNumber(number: number): Promise<void> {\n    if (this.posts().some((post) => post && Number(post.number()) === Number(number))) {\n      return Promise.resolve();\n    }\n\n    this.reset();\n\n    return app.store\n      .find<Post[]>('posts', {\n        filter: { discussion: this.discussion.id() as string },\n        page: { near: number },\n      })\n      .then(this.show.bind(this));\n  }\n\n  /**\n   * Clear the stream and load posts near a certain index. A page of posts\n   * surrounding the given index will be loaded. Returns a promise. If the given\n   * index is already loaded, the promise will be resolved immediately.\n   */\n  loadNearIndex(index: number): Promise<void> {\n    if (index >= this.visibleStart && index < this.visibleEnd) {\n      return Promise.resolve();\n    }\n\n    const start = this.sanitizeIndex(index - PostStreamState.loadCount / 2);\n    const end = start + PostStreamState.loadCount;\n\n    this.reset(start, end);\n\n    return this.loadRange(start, end).then(this.show.bind(this));\n  }\n\n  /**\n   * Load the next page of posts.\n   */\n  _loadNext() {\n    const start = this.visibleEnd;\n    const end = (this.visibleEnd = this.sanitizeIndex(this.visibleEnd + PostStreamState.loadCount));\n\n    // Unload the posts which are two pages back from the page we're currently\n    // loading.\n    const twoPagesAway = start - PostStreamState.loadCount * 2;\n    if (twoPagesAway > this.visibleStart && twoPagesAway >= 0) {\n      this.visibleStart = twoPagesAway + PostStreamState.loadCount + 1;\n\n      if (this.loadPageTimeouts[twoPagesAway]) {\n        clearTimeout(this.loadPageTimeouts[twoPagesAway]);\n        delete this.loadPageTimeouts[twoPagesAway];\n        this.pagesLoading--;\n      }\n    }\n\n    this.loadPage(start, end);\n  }\n\n  /**\n   * Load the previous page of posts.\n   */\n  _loadPrevious() {\n    const end = this.visibleStart;\n    const start = (this.visibleStart = this.sanitizeIndex(this.visibleStart - PostStreamState.loadCount));\n\n    // Unload the posts which are two pages back from the page we're currently\n    // loading.\n    const twoPagesAway = start + PostStreamState.loadCount * 2;\n    if (twoPagesAway < this.visibleEnd && twoPagesAway <= this.count()) {\n      this.visibleEnd = twoPagesAway;\n\n      if (this.loadPageTimeouts[twoPagesAway]) {\n        clearTimeout(this.loadPageTimeouts[twoPagesAway]);\n        delete this.loadPageTimeouts[twoPagesAway];\n        this.pagesLoading--;\n      }\n    }\n\n    this.loadPage(start, end, true);\n  }\n\n  /**\n   * Load a page of posts into the stream and redraw.\n   */\n  loadPage(start: number, end: number, backwards = false) {\n    this.pagesLoading++;\n\n    const redraw = () => {\n      if (start < this.visibleStart || end > this.visibleEnd) return;\n\n      const anchorIndex = backwards ? this.visibleEnd - 1 : this.visibleStart;\n      anchorScroll(`.PostStream-item[data-index=\"${anchorIndex}\"]`, m.redraw.sync);\n    };\n    redraw();\n\n    this.loadPageTimeouts[start] = setTimeout(\n      () => {\n        this.loadRange(start, end).then(() => {\n          redraw();\n          this.pagesLoading--;\n        });\n        delete this.loadPageTimeouts[start];\n      },\n      this.pagesLoading - 1 ? 1000 : 0\n    );\n  }\n\n  /**\n   * Load and inject the specified range of posts into the stream, without\n   * clearing it.\n   */\n  loadRange(start: number, end: number): Promise<Post[]> {\n    const loadIds: string[] = [];\n    const loaded: Post[] = [];\n\n    this.discussion\n      .postIds()\n      .slice(start, end)\n      .forEach((id) => {\n        const post = app.store.getById<Post>('posts', id);\n\n        if (post && post.discussion() && typeof post.canEdit() !== 'undefined') {\n          loaded.push(post);\n        } else {\n          loadIds.push(id);\n        }\n      });\n\n    if (loadIds.length) {\n      return app.store.find<Post[]>('posts', loadIds).then((newPosts) => {\n        return loaded.concat(newPosts).sort((a, b) => a.number() - b.number());\n      });\n    }\n\n    return Promise.resolve(loaded);\n  }\n\n  /**\n   * Set up the stream with the given array of posts.\n   */\n  show(posts: Post[]) {\n    this.visibleStart = posts.length ? this.discussion.postIds().indexOf(posts[0].id() ?? '0') : 0;\n    this.visibleEnd = this.sanitizeIndex(this.visibleStart + posts.length);\n  }\n\n  /**\n   * Reset the stream so that a specific range of posts is displayed. If a range\n   * is not specified, the first page of posts will be displayed.\n   */\n  reset(start?: number, end?: number) {\n    this.visibleStart = start || 0;\n    this.visibleEnd = this.sanitizeIndex(end || PostStreamState.loadCount);\n  }\n\n  /**\n   * Get the visible page of posts.\n   */\n  posts(): (Post | null)[] {\n    return this.discussion\n      .postIds()\n      .slice(this.visibleStart, this.visibleEnd)\n      .map((id) => {\n        const post = app.store.getById<Post>('posts', id);\n\n        return post && post.discussion() && typeof post.canEdit() !== 'undefined' ? post : null;\n      });\n  }\n\n  /**\n   * Get the total number of posts in the discussion.\n   */\n  count(): number {\n    return this.discussion.postIds().length;\n  }\n\n  /**\n   * Check whether or not the scrubber should be disabled, i.e. if all of the\n   * posts are visible in the viewport.\n   */\n  disabled(): boolean {\n    return this.visible >= this.count();\n  }\n\n  /**\n   * Are we currently viewing the end of the discussion?\n   */\n  viewingEnd(): boolean {\n    // In some cases, such as if we've stickied a post, an event post\n    // may have been added / removed. This means that `this.visibleEnd`\n    // and`this.count()` will be out of sync by 1 post, but we are still\n    // \"viewing the end\" of the post stream, so we should still reload\n    // all posts up until the last one.\n    return Math.abs(this.count() - this.visibleEnd) <= 1;\n  }\n\n  /**\n   * Make sure that the given index is not outside of the possible range of\n   * indexes in the discussion.\n   */\n  sanitizeIndex(index: number) {\n    return Math.max(0, Math.min(this.count(), Math.floor(index)));\n  }\n}\n","import type Mithril from 'mithril';\n\nimport app from '../../forum/app';\nimport Page, { IPageAttrs } from '../../common/components/Page';\nimport ItemList from '../../common/utils/ItemList';\nimport DiscussionHero from './DiscussionHero';\nimport DiscussionListPane from './DiscussionListPane';\nimport PostStream from './PostStream';\nimport PostStreamScrubber from './PostStreamScrubber';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport SplitDropdown from '../../common/components/SplitDropdown';\nimport listItems from '../../common/helpers/listItems';\nimport DiscussionControls from '../utils/DiscussionControls';\nimport PostStreamState from '../states/PostStreamState';\nimport Discussion from '../../common/models/Discussion';\nimport Post from '../../common/models/Post';\nimport { ApiResponseSingle } from '../../common/Store';\n\nexport interface IDiscussionPageAttrs extends IPageAttrs {\n  id: string;\n  near?: number;\n}\n\n/**\n * The `DiscussionPage` component displays a whole discussion page, including\n * the discussion list pane, the hero, the posts, and the sidebar.\n */\nexport default class DiscussionPage<CustomAttrs extends IDiscussionPageAttrs = IDiscussionPageAttrs> extends Page<CustomAttrs> {\n  /**\n   * The discussion that is being viewed.\n   */\n  protected discussion: Discussion | null = null;\n\n  /**\n   * A public API for interacting with the post stream.\n   */\n  protected stream: PostStreamState | null = null;\n\n  /**\n   * The number of the first post that is currently visible in the viewport.\n   */\n  protected near: number = 0;\n\n  protected useBrowserScrollRestoration = true;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.load();\n\n    // If the discussion list has been loaded, then we'll enable the pane (and\n    // hide it by default). Also, if we've just come from another discussion\n    // page, then we don't want Mithril to redraw the whole page – if it did,\n    // then the pane would redraw which would be slow and would cause problems with\n    // event handlers.\n    // We will also enable the pane if the discussion list is empty but loading,\n    // because the DiscussionComposer refreshes the list and redirects to the new discussion at the same time.\n    if (app.discussions.hasItems() || app.discussions.isLoading()) {\n      app.pane?.enable();\n      app.pane?.hide();\n    }\n\n    this.bodyClass = 'App--discussion';\n  }\n\n  onremove(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onremove(vnode);\n\n    // If we are indeed navigating away from this discussion, then disable the\n    // discussion list pane. Also, if we're composing a reply to this\n    // discussion, minimize the composer – unless it's empty, in which case\n    // we'll just close it.\n    app.pane?.disable();\n\n    if (this.discussion && app.composer.composingReplyTo(this.discussion) && !app.composer?.fields?.content()) {\n      app.composer.hide();\n    } else {\n      app.composer.minimize();\n    }\n  }\n\n  view(): Mithril.Children {\n    return <div className=\"DiscussionPage\">{this.viewItems().toArray()}</div>;\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('pane', <DiscussionListPane state={app.discussions} />, 100);\n    items.add(\n      'discussions',\n      <div className=\"DiscussionPage-discussion\">{this.discussion ? this.pageContent().toArray() : this.loadingItems().toArray()}</div>,\n      90\n    );\n\n    return items;\n  }\n\n  /**\n   * List of components shown while the discussion is loading.\n   */\n  loadingItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('spinner', <LoadingIndicator />, 100);\n\n    return items;\n  }\n\n  /**\n   * Function that renders the `sidebarItems` ItemList.\n   */\n  sidebar(): Mithril.Children {\n    return (\n      <nav className=\"DiscussionPage-nav\">\n        <ul>{listItems(this.sidebarItems().toArray())}</ul>\n      </nav>\n    );\n  }\n\n  /**\n   * Renders the discussion's hero.\n   */\n  hero(): Mithril.Children {\n    return <DiscussionHero discussion={this.discussion} />;\n  }\n\n  /**\n   * List of items rendered as the main page content.\n   */\n  pageContent(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('hero', this.hero(), 100);\n    items.add('main', <div className=\"container\">{this.mainContent().toArray()}</div>, 10);\n\n    return items;\n  }\n\n  /**\n   * List of items rendered inside the main page content container.\n   */\n  mainContent(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('sidebar', this.sidebar(), 100);\n\n    items.add(\n      'poststream',\n      <div className=\"DiscussionPage-stream\">\n        <PostStream discussion={this.discussion} stream={this.stream} onPositionChange={this.positionChanged.bind(this)} />\n      </div>,\n      10\n    );\n\n    return items;\n  }\n\n  /**\n   * Load the discussion from the API or use the preloaded one.\n   */\n  load(): void {\n    const preloadedDiscussion = app.preloadedApiDocument<Discussion>();\n    if (preloadedDiscussion) {\n      // We must wrap this in a setTimeout because if we are mounting this\n      // component for the first time on page load, then any calls to m.redraw\n      // will be ineffective and thus any configs (scroll code) will be run\n      // before stuff is drawn to the page.\n      setTimeout(this.show.bind(this, preloadedDiscussion), 0);\n    } else {\n      const params = this.requestParams();\n\n      app.store.find<Discussion>('discussions', m.route.param('id'), params).then(this.show.bind(this));\n    }\n\n    m.redraw();\n  }\n\n  /**\n   * Get the parameters that should be passed in the API request to get the\n   * discussion.\n   */\n  requestParams(): Record<string, unknown> {\n    return {\n      bySlug: true,\n      page: { near: this.near },\n    };\n  }\n\n  /**\n   * Initialize the component to display the given discussion.\n   */\n  show(discussion: ApiResponseSingle<Discussion>): void {\n    app.history.push('discussion', discussion.title());\n    app.setTitle(discussion.title());\n    app.setTitleCount(0);\n\n    // When the API responds with a discussion, it will also include a number of\n    // posts. Some of these posts are included because they are on the first\n    // page of posts we want to display (determined by the `near` parameter) –\n    // others may be included because due to other relationships introduced by\n    // extensions. We need to distinguish the two so we don't end up displaying\n    // the wrong posts. We do so by filtering out the posts that don't have\n    // the 'discussion' relationship linked, then sorting and splicing.\n    let includedPosts: Post[] = [];\n    if (discussion.payload && discussion.payload.included) {\n      const discussionId = discussion.id();\n\n      includedPosts = discussion.payload.included\n        .filter(\n          (record) =>\n            record.type === 'posts' &&\n            record.relationships &&\n            record.relationships.discussion &&\n            !Array.isArray(record.relationships.discussion.data) &&\n            record.relationships.discussion.data.id === discussionId\n        )\n        // We can make this assertion because posts should be in the store,\n        // since they were in the discussion's payload.\n        .map((record) => app.store.getById<Post>('posts', record.id) as Post)\n        .sort((a: Post, b: Post) => a.number() - b.number())\n        .slice(0, 20);\n    }\n\n    // Set up the post stream for this discussion, along with the first page of\n    // posts we want to display. Tell the stream to scroll down and highlight\n    // the specific post that was routed to.\n    this.stream = new PostStreamState(discussion, includedPosts);\n    const rawNearParam = m.route.param('near');\n    const nearParam = rawNearParam === 'reply' ? 'reply' : parseInt(rawNearParam);\n    this.stream.goToNumber(nearParam || (includedPosts[0]?.number() ?? 0), true).then(() => {\n      this.discussion = discussion;\n\n      app.current.set('discussion', discussion);\n      app.current.set('stream', this.stream);\n    });\n  }\n\n  /**\n   * Build an item list for the contents of the sidebar.\n   */\n  sidebarItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.discussion) {\n      items.add(\n        'controls',\n        <SplitDropdown\n          icon=\"fas fa-ellipsis-v\"\n          className=\"App-primaryControl\"\n          buttonClassName=\"Button--primary\"\n          accessibleToggleLabel={app.translator.trans('core.forum.discussion_controls.toggle_dropdown_accessible_label')}\n        >\n          {DiscussionControls.controls(this.discussion, this).toArray()}\n        </SplitDropdown>,\n        100\n      );\n    }\n\n    items.add('scrubber', <PostStreamScrubber stream={this.stream} className=\"App-titleControl\" />, -100);\n\n    return items;\n  }\n\n  /**\n   * When the posts that are visible in the post stream change (i.e. the user\n   * scrolls up or down), then we update the URL and mark the posts as read.\n   */\n  positionChanged(startNumber: number, endNumber: number): void {\n    const discussion = this.discussion;\n\n    if (!discussion) return;\n\n    // Construct a URL to this discussion with the updated position, then\n    // replace it into the window's history and our own history stack.\n    const url = app.route.discussion(discussion, (this.near = startNumber));\n\n    window.history.replaceState(null, document.title, url);\n    app.history.push('discussion', discussion.title());\n\n    // If the user hasn't read past here before, then we'll update their read\n    // state and redraw.\n    if (app.session.user && endNumber > (discussion.lastReadPostNumber() || 0)) {\n      discussion.save({ lastReadPostNumber: endNumber });\n      m.redraw();\n    }\n  }\n}\n","import Component from '../../common/Component';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\n\n/**\n * The `HeaderPrimary` component displays primary header controls. On the\n * default skin, these are shown just to the right of the forum title.\n */\nexport default class HeaderPrimary extends Component {\n  view() {\n    return <ul className=\"Header-controls\">{listItems(this.items().toArray())}</ul>;\n  }\n\n  /**\n   * Build an item list for the controls.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  items() {\n    return new ItemList();\n  }\n}\n","import Button from './Button';\nimport Link from './Link';\n\n/**\n * The `LinkButton` component defines a `Button` which links to a route.\n *\n * ### Attrs\n *\n * All of the attrs accepted by `Button`, plus:\n *\n * - `active` Whether or not the page that this button links to is currently\n *   active.\n * - `href` The URL to link to. If the current URL `m.route()` matches this,\n *   the `active` prop will automatically be set to true.\n * - `force` Whether the page should be fully rerendered. Defaults to `true`.\n */\nexport default class LinkButton extends Button {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.active = this.isActive(attrs);\n    if (attrs.force === undefined) attrs.force = true;\n  }\n\n  view(vnode) {\n    const vdom = super.view(vnode);\n\n    vdom.tag = Link;\n    vdom.attrs.active = String(vdom.attrs.active);\n    delete vdom.attrs.type;\n\n    return vdom;\n  }\n\n  /**\n   * Determine whether a component with the given attrs is 'active'.\n   *\n   * @param {object} attrs\n   * @return {boolean}\n   */\n  static isActive(attrs) {\n    return typeof attrs.active !== 'undefined' ? attrs.active : m.route.get()?.split('?')[0] === attrs.href?.split('?')[0];\n  }\n}\n","import app from '../../forum/app';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport Dropdown, { IDropdownAttrs } from '../../common/components/Dropdown';\nimport LinkButton from '../../common/components/LinkButton';\nimport Button from '../../common/components/Button';\nimport ItemList from '../../common/utils/ItemList';\nimport Separator from '../../common/components/Separator';\nimport extractText from '../../common/utils/extractText';\nimport type Mithril from 'mithril';\n\nexport interface ISessionDropdownAttrs extends IDropdownAttrs {}\n\n/**\n * The `SessionDropdown` component shows a button with the current user's\n * avatar/name, with a dropdown of session controls.\n */\nexport default class SessionDropdown<CustomAttrs extends ISessionDropdownAttrs = ISessionDropdownAttrs> extends Dropdown<CustomAttrs> {\n  static initAttrs(attrs: ISessionDropdownAttrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = 'SessionDropdown';\n    attrs.buttonClassName = 'Button Button--user Button--flat';\n    attrs.menuClassName = 'Dropdown-menu--right';\n\n    attrs.accessibleToggleLabel = extractText(app.translator.trans('core.forum.header.session_dropdown_accessible_label'));\n  }\n\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    return super.view({ ...vnode, children: this.items().toArray() });\n  }\n\n  getButtonContent() {\n    const user = app.session.user;\n\n    return [avatar(user), ' ', <span className=\"Button-label\">{username(user)}</span>];\n  }\n\n  /**\n   * Build an item list for the contents of the dropdown menu.\n   */\n  items(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n    const user = app.session.user!;\n\n    items.add(\n      'profile',\n      <LinkButton icon=\"fas fa-user\" href={app.route.user(user)}>\n        {app.translator.trans('core.forum.header.profile_button')}\n      </LinkButton>,\n      100\n    );\n\n    items.add(\n      'settings',\n      <LinkButton icon=\"fas fa-cog\" href={app.route('settings')}>\n        {app.translator.trans('core.forum.header.settings_button')}\n      </LinkButton>,\n      50\n    );\n\n    if (app.forum.attribute('adminUrl')) {\n      items.add(\n        'administration',\n        <LinkButton icon=\"fas fa-wrench\" href={app.forum.attribute('adminUrl')} target=\"_blank\">\n          {app.translator.trans('core.forum.header.admin_button')}\n        </LinkButton>,\n        0\n      );\n    }\n\n    items.add('separator', <Separator />, -90);\n\n    items.add(\n      'logOut',\n      <Button icon=\"fas fa-sign-out-alt\" onclick={app.session.logout.bind(app.session)}>\n        {app.translator.trans('core.forum.header.log_out_button')}\n      </Button>,\n      -100\n    );\n\n    return items;\n  }\n}\n","import Dropdown, { IDropdownAttrs } from './Dropdown';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport type Component from '../Component';\nimport type Mithril from 'mithril';\n\n/**\n * Determines via a vnode is currently \"active\".\n * Due to changes in Mithril 2, attrs will not be instantiated until AFTER view()\n * is initially called on the parent component, so we can not always depend on the\n * active attr to determine which element should be displayed as the \"active child\".\n *\n * This is a temporary patch, and as so, is not exported / placed in utils.\n */\nfunction isActive(vnode: Mithril.Children): boolean {\n  if (!vnode || typeof vnode !== 'object' || vnode instanceof Array) return false;\n\n  const tag = vnode.tag;\n\n  // Allow non-selectable dividers/headers to be added.\n  if (typeof tag === 'string' && tag !== 'a' && tag !== 'button') return false;\n\n  if ((typeof tag === 'object' || typeof tag === 'function') && 'initAttrs' in tag) {\n    (tag as unknown as typeof Component).initAttrs(vnode.attrs);\n  }\n\n  return (typeof tag === 'object' || typeof tag === 'function') && 'isActive' in tag ? (tag as any).isActive(vnode.attrs) : vnode.attrs.active;\n}\n\nexport interface ISelectDropdownAttrs extends IDropdownAttrs {\n  defaultLabel: string;\n}\n\n/**\n * The `SelectDropdown` component is the same as a `Dropdown`, except the toggle\n * button's label is set as the label of the first child which has a truthy\n * `active` prop.\n */\nexport default class SelectDropdown<CustomAttrs extends ISelectDropdownAttrs = ISelectDropdownAttrs> extends Dropdown<CustomAttrs> {\n  static initAttrs(attrs: ISelectDropdownAttrs) {\n    attrs.caretIcon ??= 'fas fa-sort';\n\n    super.initAttrs(attrs);\n\n    attrs.className = classList(attrs.className, 'Dropdown--select');\n  }\n\n  getButtonContent(children: Mithril.ChildArray): Mithril.ChildArray {\n    const activeChild = children.find(isActive);\n    let label = (activeChild && typeof activeChild === 'object' && 'children' in activeChild && activeChild.children) || this.attrs.defaultLabel;\n\n    // @ts-ignore\n    if (Array.isArray(label)) label = label[0];\n\n    return [<span className=\"Button-label\">{label}</span>, this.attrs.caretIcon ? icon(this.attrs.caretIcon, { className: 'Button-caret' }) : null];\n  }\n}\n","import app from '../common/app';\nimport { FlarumRequestOptions } from './Application';\nimport { fireDeprecationWarning } from './helpers/fireDebugWarning';\nimport Store, { ApiPayloadSingle, ApiResponseSingle, MetaInformation } from './Store';\n\nexport interface ModelIdentifier {\n  type: string;\n  id: string;\n}\n\nexport interface ModelAttributes {\n  [key: string]: unknown;\n}\n\nexport interface ModelRelationships {\n  [relationship: string]: {\n    data: ModelIdentifier | ModelIdentifier[];\n  };\n}\n\nexport interface UnsavedModelData {\n  type?: string;\n  attributes?: ModelAttributes;\n  relationships?: ModelRelationships;\n}\n\nexport interface SavedModelData {\n  type: string;\n  id: string;\n  attributes?: ModelAttributes;\n  relationships?: ModelRelationships;\n}\n\nexport type ModelData = UnsavedModelData | SavedModelData;\n\nexport interface SaveRelationships {\n  [relationship: string]: null | Model | Model[];\n}\n\nexport interface SaveAttributes {\n  [key: string]: unknown;\n  relationships?: SaveRelationships;\n}\n\n/**\n * The `Model` class represents a local data resource. It provides methods to\n * persist changes via the API.\n */\nexport default abstract class Model {\n  /**\n   * The resource object from the API.\n   */\n  data: ModelData = {};\n\n  /**\n   * The time at which the model's data was last updated. Watching the value\n   * of this property is a fast way to retain/cache a subtree if data hasn't\n   * changed.\n   */\n  freshness: Date = new Date();\n\n  /**\n   * Whether or not the resource exists on the server.\n   */\n  exists: boolean = false;\n\n  /**\n   * The data store that this resource should be persisted to.\n   */\n  protected store: Store;\n\n  /**\n   * @param data A resource object from the API.\n   * @param store The data store that this model should be persisted to.\n   */\n  constructor(data: ModelData = {}, store = app.store) {\n    this.data = data;\n    this.store = store;\n  }\n\n  /**\n   * Get the model's ID.\n   *\n   * @final\n   */\n  id(): string | undefined {\n    return 'id' in this.data ? this.data.id : undefined;\n  }\n\n  /**\n   * Get one of the model's attributes.\n   *\n   * @final\n   */\n  attribute<T = unknown>(attribute: string): T {\n    return this.data?.attributes?.[attribute] as T;\n  }\n\n  /**\n   * Merge new data into this model locally.\n   *\n   * @param data A resource object to merge into this model\n   */\n  pushData(data: ModelData | { relationships?: SaveRelationships }): this {\n    if ('id' in data) {\n      (this.data as SavedModelData).id = data.id;\n    }\n\n    if ('type' in data) {\n      this.data.type = data.type;\n    }\n\n    if ('attributes' in data) {\n      this.data.attributes ||= {};\n\n      // @deprecated\n      // Filter out relationships that got in by accident.\n      for (const key in data.attributes) {\n        const val = data.attributes[key];\n        if (val && val instanceof Model) {\n          fireDeprecationWarning('Providing models as attributes to `Model.pushData()` or `Model.pushAttributes()` is deprecated.', '3249');\n          delete data.attributes[key];\n          data.relationships ||= {};\n          data.relationships[key] = { data: Model.getIdentifier(val) };\n        }\n      }\n\n      Object.assign(this.data.attributes, data.attributes);\n    }\n\n    if ('relationships' in data) {\n      const relationships = this.data.relationships ?? {};\n\n      // For every relationship field, we need to check if we've\n      // been handed a Model instance. If so, we will convert it to a\n      // relationship data object.\n      for (const r in data.relationships) {\n        const relationship = data.relationships[r];\n\n        if (relationship === null) {\n          delete relationships[r];\n          delete data.relationships[r];\n          continue;\n        }\n\n        let identifier: ModelRelationships[string];\n        if (relationship instanceof Model) {\n          identifier = { data: Model.getIdentifier(relationship) };\n        } else if (relationship instanceof Array) {\n          identifier = { data: relationship.map(Model.getIdentifier) };\n        } else {\n          identifier = relationship;\n        }\n\n        data.relationships[r] = identifier;\n        relationships[r] = identifier;\n      }\n\n      this.data.relationships = relationships;\n    }\n\n    // Now that we've updated the data, we can say that the model is fresh.\n    // This is an easy way to invalidate retained subtrees etc.\n    this.freshness = new Date();\n\n    return this;\n  }\n\n  /**\n   * Merge new attributes into this model locally.\n   *\n   * @param attributes The attributes to merge.\n   */\n  pushAttributes(attributes: ModelAttributes) {\n    this.pushData({ attributes });\n  }\n\n  /**\n   * Merge new attributes into this model, both locally and with persistence.\n   *\n   * @param attributes The attributes to save. If a 'relationships' key\n   *     exists, it will be extracted and relationships will also be saved.\n   */\n  save(\n    attributes: SaveAttributes,\n    options: Omit<FlarumRequestOptions<ApiPayloadSingle>, 'url'> & { meta?: MetaInformation } = {}\n  ): Promise<ApiResponseSingle<this>> {\n    const data: ModelData & { id?: string } = {\n      type: this.data.type,\n      attributes,\n    };\n\n    if ('id' in this.data) {\n      data.id = this.data.id;\n    }\n\n    // If a 'relationships' key exists, extract it from the attributes hash and\n    // set it on the top-level data object instead. We will be sending this data\n    // object to the API for persistence.\n    if (attributes.relationships) {\n      data.relationships = {};\n\n      for (const key in attributes.relationships) {\n        const model = attributes.relationships[key];\n\n        if (model === null) continue;\n\n        data.relationships[key] = {\n          data: model instanceof Array ? model.map(Model.getIdentifier) : Model.getIdentifier(model),\n        };\n      }\n\n      delete attributes.relationships;\n    }\n\n    // Before we update the model's data, we should make a copy of the model's\n    // old data so that we can revert back to it if something goes awry during\n    // persistence.\n    const oldData = this.copyData();\n\n    this.pushData(data);\n\n    const request = {\n      data,\n      meta: options.meta || undefined,\n    };\n\n    return app\n      .request<ApiPayloadSingle>({\n        method: this.exists ? 'PATCH' : 'POST',\n        url: app.forum.attribute('apiUrl') + this.apiEndpoint(),\n        body: request,\n        ...options,\n      })\n      .then(\n        // If everything went well, we'll make sure the store knows that this\n        // model exists now (if it didn't already), and we'll push the data that\n        // the API returned into the store.\n        (payload) => {\n          return this.store.pushPayload<this>(payload);\n        },\n\n        // If something went wrong, though... good thing we backed up our model's\n        // old data! We'll revert to that and let others handle the error.\n        (err: Error) => {\n          this.pushData(oldData);\n          m.redraw();\n          throw err;\n        }\n      );\n  }\n\n  /**\n   * Send a request to delete the resource.\n   *\n   * @param body Data to send along with the DELETE request.\n   */\n  delete(body: FlarumRequestOptions<void>['body'] = {}, options: Omit<FlarumRequestOptions<void>, 'url'> = {}): Promise<void> {\n    if (!this.exists) return Promise.resolve();\n\n    return app\n      .request({\n        method: 'DELETE',\n        url: app.forum.attribute('apiUrl') + this.apiEndpoint(),\n        body,\n        ...options,\n      })\n      .then(() => {\n        this.exists = false;\n\n        this.store.remove(this);\n      });\n  }\n\n  /**\n   * Construct a path to the API endpoint for this resource.\n   */\n  protected apiEndpoint(): string {\n    return '/' + this.data.type + ('id' in this.data ? '/' + this.data.id : '');\n  }\n\n  protected copyData(): ModelData {\n    return JSON.parse(JSON.stringify(this.data));\n  }\n\n  protected rawRelationship<M extends Model>(relationship: string): undefined | ModelIdentifier;\n  protected rawRelationship<M extends Model[]>(relationship: string): undefined | ModelIdentifier[];\n  protected rawRelationship<_M extends Model | Model[]>(relationship: string): undefined | ModelIdentifier | ModelIdentifier[] {\n    return this.data.relationships?.[relationship]?.data;\n  }\n\n  /**\n   * Generate a function which returns the value of the given attribute.\n   *\n   * @param transform A function to transform the attribute value\n   */\n  static attribute<T>(name: string): () => T;\n  static attribute<T, O = unknown>(name: string, transform: (attr: O) => T): () => T;\n  static attribute<T, O = unknown>(name: string, transform?: (attr: O) => T): () => T {\n    return function (this: Model) {\n      if (transform) {\n        return transform(this.attribute(name));\n      }\n\n      return this.attribute(name);\n    };\n  }\n\n  /**\n   * Generate a function which returns the value of the given has-one\n   * relationship.\n   *\n   * @return false if no information about the\n   *     relationship exists; undefined if the relationship exists but the model\n   *     has not been loaded; or the model if it has been loaded.\n   */\n  static hasOne<M extends Model>(name: string): () => M | false;\n  static hasOne<M extends Model | null>(name: string): () => M | null | false;\n  static hasOne<M extends Model>(name: string): () => M | false {\n    return function (this: Model) {\n      const relationshipData = this.data.relationships?.[name]?.data;\n\n      if (relationshipData && relationshipData instanceof Array) {\n        throw new Error(`Relationship ${name} on model ${this.data.type} is plural, so the hasOne method cannot be used to access it.`);\n      }\n\n      if (relationshipData) {\n        return this.store.getById<M>(relationshipData.type, relationshipData.id) as M;\n      }\n\n      return false;\n    };\n  }\n\n  /**\n   * Generate a function which returns the value of the given has-many\n   * relationship.\n   *\n   * @return false if no information about the relationship\n   *     exists; an array if it does, containing models if they have been\n   *     loaded, and undefined for those that have not.\n   */\n  static hasMany<M extends Model>(name: string): () => (M | undefined)[] | false {\n    return function (this: Model) {\n      const relationshipData = this.data.relationships?.[name]?.data;\n\n      if (relationshipData && !(relationshipData instanceof Array)) {\n        throw new Error(`Relationship ${name} on model ${this.data.type} is singular, so the hasMany method cannot be used to access it.`);\n      }\n\n      if (relationshipData) {\n        return relationshipData.map((data) => this.store.getById<M>(data.type, data.id));\n      }\n\n      return false;\n    };\n  }\n\n  /**\n   * Transform the given value into a Date object.\n   */\n  static transformDate(value: string): Date;\n  static transformDate(value: string | null): Date | null;\n  static transformDate(value: string | undefined): Date | undefined;\n  static transformDate(value: string | null | undefined): Date | null | undefined;\n  static transformDate(value: string | null | undefined): Date | null | undefined {\n    return value != null ? new Date(value) : value;\n  }\n\n  /**\n   * Get a resource identifier object for the given model.\n   */\n  protected static getIdentifier(model: Model): ModelIdentifier;\n  protected static getIdentifier(model?: Model): ModelIdentifier | null {\n    if (!model || !('id' in model.data)) return null;\n\n    return {\n      type: model.data.type,\n      id: model.data.id,\n    };\n  }\n}\n","import Model from '../Model';\n\n/**\n * The `computed` utility creates a function that will cache its output until\n * any of the dependent values are dirty.\n *\n * @param dependentKeys The keys of the dependent values.\n * @param compute The function which computes the value using the\n *     dependent values.\n */\nexport default function computed<T, M = Model>(...args: [...string[], (this: M, ...args: unknown[]) => T]): () => T {\n  const keys = args.slice(0, -1) as string[];\n  const compute = args.slice(-1)[0] as (this: M, ...args: unknown[]) => T;\n\n  const dependentValues: Record<string, unknown> = {};\n  let computedValue: T;\n\n  return function (this: M) {\n    let recompute = false;\n\n    // Read all of the dependent values. If any of them have changed since last\n    // time, then we'll want to recompute our output.\n    keys.forEach((key) => {\n      const attr = (this as Record<string, unknown | (() => unknown)>)[key];\n      const value = typeof attr === 'function' ? attr.call(this) : attr;\n\n      if (dependentValues[key] !== value) {\n        recompute = true;\n        dependentValues[key] = value;\n      }\n    });\n\n    if (recompute) {\n      computedValue = compute.apply(\n        this,\n        keys.map((key) => dependentValues[key])\n      );\n    }\n\n    return computedValue;\n  };\n}\n","/**\n * The `isDark` utility converts a hex color to rgb, and then calculates a YIQ\n * value in order to get the appropriate brightness value. See\n * https://www.w3.org/TR/AERT/#color-contrast for references.\n *\n * A YIQ value >= 128 corresponds to a light color according to the W3C\n * standards, but we use a custom threshold for each light and dark modes\n * to preserve design consistency.\n */\nexport default function isDark(hexcolor: string | null): boolean {\n  // return if hexcolor is undefined or shorter than 4 characters, shortest hex form is #333;\n  // decided against regex hex color validation for performance considerations\n  if (!hexcolor || hexcolor.length < 4) {\n    return false;\n  }\n\n  let hexnumbers = hexcolor.replace('#', '');\n\n  if (hexnumbers.length === 3) {\n    hexnumbers += hexnumbers;\n  }\n\n  const r = parseInt(hexnumbers.slice(0, 2), 16);\n  const g = parseInt(hexnumbers.slice(2, 4), 16);\n  const b = parseInt(hexnumbers.slice(4, 6), 16);\n  const yiq = (r * 299 + g * 587 + b * 114) / 1000;\n\n  const threshold = parseInt(getComputedStyle(document.body).getPropertyValue('--yiq-threshold').trim()) || 128;\n\n  return yiq < threshold;\n}\n","import isDark from '../utils/isDark';\n\nexport default function textContrastClass(hexcolor: string | null | undefined): string {\n  if (!hexcolor) return 'text-contrast--unchanged';\n\n  return isDark(hexcolor) ? 'text-contrast--light' : 'text-contrast--dark';\n}\n","type KeyboardEventHandler = (event: KeyboardEvent) => void;\ntype ShouldHandle = (event: KeyboardEvent) => boolean;\n\nenum Keys {\n  Enter = 13,\n  Escape = 27,\n  Space = 32,\n  ArrowUp = 38,\n  ArrowDown = 40,\n  ArrowLeft = 37,\n  ArrowRight = 39,\n  Tab = 9,\n  Backspace = 8,\n}\n\n/**\n * The `KeyboardNavigatable` class manages lists that can be navigated with the\n * keyboard, calling callbacks for each actions.\n *\n * This helper encapsulates the key binding logic, providing a simple fluent\n * API for use.\n */\nexport default class KeyboardNavigatable {\n  /**\n   * Callback to be executed for a specified input.\n   */\n  protected callbacks = new Map<number, KeyboardEventHandler>();\n\n  /**\n   * Callback that determines whether keyboard input should be handled.\n   * By default, always handle keyboard navigation.\n   */\n  protected whenCallback: ShouldHandle = (event: KeyboardEvent) => true;\n\n  /**\n   * Provide a callback to be executed when navigating upwards.\n   *\n   * This will be triggered by the Up key.\n   */\n  onUp(callback: KeyboardEventHandler): KeyboardNavigatable {\n    this.callbacks.set(Keys.ArrowUp, (e) => {\n      e.preventDefault();\n      callback(e);\n    });\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when navigating downwards.\n   *\n   * This will be triggered by the Down key.\n   */\n  onDown(callback: KeyboardEventHandler): KeyboardNavigatable {\n    this.callbacks.set(Keys.ArrowDown, (e) => {\n      e.preventDefault();\n      callback(e);\n    });\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when the current item is selected..\n   *\n   * This will be triggered by the Return key (and Tab key, if not disabled).\n   */\n  onSelect(callback: KeyboardEventHandler, ignoreTabPress: boolean = false): KeyboardNavigatable {\n    const handler: KeyboardEventHandler = (e) => {\n      e.preventDefault();\n      callback(e);\n    };\n\n    if (!ignoreTabPress) this.callbacks.set(Keys.Tab, handler);\n    this.callbacks.set(Keys.Enter, handler);\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when the current item is tabbed into.\n   *\n   * This will be triggered by the Tab key.\n   */\n  onTab(callback: KeyboardEventHandler): KeyboardNavigatable {\n    const handler: KeyboardEventHandler = (e) => {\n      e.preventDefault();\n      callback(e);\n    };\n\n    this.callbacks.set(9, handler);\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when the navigation is canceled.\n   *\n   * This will be triggered by the Escape key.\n   */\n  onCancel(callback: KeyboardEventHandler): KeyboardNavigatable {\n    this.callbacks.set(Keys.Escape, (e) => {\n      e.stopPropagation();\n      e.preventDefault();\n      callback(e);\n    });\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when previous input is removed.\n   *\n   * This will be triggered by the Backspace key.\n   */\n  onRemove(callback: KeyboardEventHandler): KeyboardNavigatable {\n    this.callbacks.set(Keys.Backspace, (e) => {\n      if (e instanceof KeyboardEvent && e.target instanceof HTMLInputElement && e.target.selectionStart === 0 && e.target.selectionEnd === 0) {\n        callback(e);\n        e.preventDefault();\n      }\n    });\n\n    return this;\n  }\n\n  /**\n   * Provide a callback that determines whether keyboard input should be handled.\n   */\n  when(callback: ShouldHandle): KeyboardNavigatable {\n    this.whenCallback = callback;\n\n    return this;\n  }\n\n  /**\n   * Set up the navigation key bindings on the given jQuery element.\n   */\n  bindTo($element: JQuery<HTMLElement>) {\n    // Handle navigation key events on the navigatable element.\n    $element[0].addEventListener('keydown', this.navigate.bind(this));\n  }\n\n  /**\n   * Interpret the given keyboard event as navigation commands.\n   */\n  navigate(event: KeyboardEvent) {\n    // This callback determines whether keyboard should be handled or ignored.\n    if (!this.whenCallback(event)) return;\n\n    const keyCallback = this.callbacks.get(event.which);\n    if (keyCallback) {\n      keyCallback(event);\n    }\n  }\n}\n","import Tooltip from './Tooltip';\nimport Component, { ComponentAttrs } from '../Component';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport textContrastClass from '../helpers/textContrastClass';\n\nexport interface IBadgeAttrs extends ComponentAttrs {\n  icon: string;\n  type?: string;\n  label?: string;\n  color?: string;\n}\n\n/**\n * The `Badge` component represents a user/discussion badge, indicating some\n * status (e.g. a discussion is stickied, a user is an admin).\n *\n * A badge may have the following special attrs:\n *\n * - `type` The type of badge this is. This will be used to give the badge a\n *   class name of `Badge--{type}`.\n * - `icon` The name of an icon to show inside the badge.\n * - `label`\n *\n * All other attrs will be assigned as attributes on the badge element.\n */\nexport default class Badge<CustomAttrs extends IBadgeAttrs = IBadgeAttrs> extends Component<CustomAttrs> {\n  view() {\n    const { type, icon: iconName, label, color, style = {}, ...attrs } = this.attrs;\n\n    const className = classList('Badge', [type && `Badge--${type}`], attrs.className, textContrastClass(color));\n\n    const iconChild = iconName ? icon(iconName, { className: 'Badge-icon' }) : m.trust('&nbsp;');\n\n    const newStyle = { ...style, '--badge-bg': color };\n\n    const badgeAttrs = {\n      ...attrs,\n      className,\n      style: newStyle,\n    };\n\n    const badgeNode = <div {...badgeAttrs}>{iconChild}</div>;\n\n    // If we don't have a tooltip label, don't render the tooltip component.\n    if (!label) return badgeNode;\n\n    return <Tooltip text={label}>{badgeNode}</Tooltip>;\n  }\n}\n","import app from '../../common/app';\nimport Model from '../Model';\nimport computed from '../utils/computed';\nimport ItemList from '../utils/ItemList';\nimport Badge from '../components/Badge';\nimport Mithril from 'mithril';\nimport Post from './Post';\nimport User from './User';\n\nexport default class Discussion extends Model {\n  title() {\n    return Model.attribute<string>('title').call(this);\n  }\n  slug() {\n    return Model.attribute<string>('slug').call(this);\n  }\n\n  createdAt() {\n    return Model.attribute<Date | undefined, string | undefined>('createdAt', Model.transformDate).call(this);\n  }\n  user() {\n    return Model.hasOne<User | null>('user').call(this);\n  }\n  firstPost() {\n    return Model.hasOne<Post | null>('firstPost').call(this);\n  }\n\n  lastPostedAt() {\n    return Model.attribute('lastPostedAt', Model.transformDate).call(this);\n  }\n  lastPostedUser() {\n    return Model.hasOne<User | null>('lastPostedUser').call(this);\n  }\n  lastPost() {\n    return Model.hasOne<Post | null>('lastPost').call(this);\n  }\n  lastPostNumber() {\n    return Model.attribute<number | null | undefined>('lastPostNumber').call(this);\n  }\n\n  commentCount() {\n    return Model.attribute<number | undefined>('commentCount').call(this);\n  }\n  replyCount() {\n    return computed<number, this>('commentCount', (commentCount) => Math.max(0, ((commentCount as number) ?? 0) - 1)).call(this);\n  }\n  posts() {\n    return Model.hasMany<Post>('posts').call(this);\n  }\n  mostRelevantPost() {\n    return Model.hasOne<Post | null>('mostRelevantPost').call(this);\n  }\n\n  lastReadAt() {\n    return Model.attribute('lastReadAt', Model.transformDate).call(this);\n  }\n  lastReadPostNumber() {\n    return Model.attribute<number | null | undefined>('lastReadPostNumber').call(this);\n  }\n  isUnread() {\n    return computed<boolean, this>('unreadCount', (unreadCount) => !!unreadCount).call(this);\n  }\n  isRead() {\n    return computed<boolean, this>('unreadCount', (unreadCount) => !!(app.session.user && !unreadCount)).call(this);\n  }\n\n  hiddenAt() {\n    return Model.attribute('hiddenAt', Model.transformDate).call(this);\n  }\n  hiddenUser() {\n    return Model.hasOne<User | null>('hiddenUser').call(this);\n  }\n  isHidden() {\n    return computed<boolean, this>('hiddenAt', (hiddenAt) => !!hiddenAt).call(this);\n  }\n\n  canReply() {\n    return Model.attribute<boolean | undefined>('canReply').call(this);\n  }\n  canRename() {\n    return Model.attribute<boolean | undefined>('canRename').call(this);\n  }\n  canHide() {\n    return Model.attribute<boolean | undefined>('canHide').call(this);\n  }\n  canDelete() {\n    return Model.attribute<boolean | undefined>('canDelete').call(this);\n  }\n\n  /**\n   * Remove a post from the discussion's posts relationship.\n   */\n  removePost(id: string): void {\n    const posts = this.rawRelationship<Post[]>('posts');\n\n    if (!posts) {\n      return;\n    }\n\n    posts.some((data, i) => {\n      if (id === data.id) {\n        posts.splice(i, 1);\n        return true;\n      }\n\n      return false;\n    });\n  }\n\n  /**\n   * Get the estimated number of unread posts in this discussion for the current\n   * user.\n   */\n  unreadCount(): number {\n    const user = app.session.user;\n\n    if (user && (user.markedAllAsReadAt()?.getTime() ?? 0) < this.lastPostedAt()?.getTime()!) {\n      const unreadCount = Math.max(0, (this.lastPostNumber() ?? 0) - (this.lastReadPostNumber() || 0));\n      // If posts have been deleted, it's possible that the unread count could exceed the\n      // actual post count. As such, we take the min of the two to ensure this isn't an issue.\n      return Math.min(unreadCount, this.commentCount() ?? 0);\n    }\n\n    return 0;\n  }\n\n  /**\n   * Get the Badge components that apply to this discussion.\n   */\n  badges(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.isHidden()) {\n      items.add('hidden', <Badge type=\"hidden\" icon=\"fas fa-trash\" label={app.translator.trans('core.lib.badge.hidden_tooltip')} />);\n    }\n\n    return items;\n  }\n\n  /**\n   * Get a list of all of the post IDs in this discussion.\n   */\n  postIds(): string[] {\n    return this.rawRelationship<Post[]>('posts')?.map((link) => link.id) ?? [];\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport listItems from '../../common/helpers/listItems';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport Discussion from '../../common/models/Discussion';\nimport ItemList from '../../common/utils/ItemList';\nimport Tooltip from '../../common/components/Tooltip';\n\n/**\n * The `NotificationList` component displays a list of the logged-in user's\n * notifications, grouped by discussion.\n */\nexport default class NotificationList extends Component {\n  view() {\n    const state = this.attrs.state;\n\n    return (\n      <div className=\"NotificationList\">\n        <div className=\"NotificationList-header\">\n          <h4 className=\"App-titleControl App-titleControl--text\">{app.translator.trans('core.forum.notifications.title')}</h4>\n\n          <div className=\"App-primaryControl\">{this.controlItems().toArray()}</div>\n        </div>\n\n        <div className=\"NotificationList-content\">{this.content(state)}</div>\n      </div>\n    );\n  }\n\n  controlItems() {\n    const items = new ItemList();\n    const state = this.attrs.state;\n\n    items.add(\n      'mark_all_as_read',\n      <Tooltip text={app.translator.trans('core.forum.notifications.mark_all_as_read_tooltip')}>\n        <Button\n          className=\"Button Button--link\"\n          data-container=\".NotificationList\"\n          icon=\"fas fa-check\"\n          title={app.translator.trans('core.forum.notifications.mark_all_as_read_tooltip')}\n          onclick={state.markAllAsRead.bind(state)}\n        />\n      </Tooltip>,\n      70\n    );\n\n    items.add(\n      'delete_all',\n      <Tooltip text={app.translator.trans('core.forum.notifications.delete_all_tooltip')}>\n        <Button\n          className=\"Button Button--link\"\n          data-container=\".NotificationList\"\n          icon=\"fas fa-trash-alt\"\n          title={app.translator.trans('core.forum.notifications.delete_all_tooltip')}\n          onclick={() => {\n            if (confirm(app.translator.trans('core.forum.notifications.delete_all_confirm'))) {\n              state.deleteAll.call(state);\n            }\n          }}\n        />\n      </Tooltip>,\n      50\n    );\n\n    return items;\n  }\n\n  content(state) {\n    if (state.isLoading()) {\n      return <LoadingIndicator className=\"LoadingIndicator--block\" />;\n    }\n\n    if (state.hasItems()) {\n      return state.getPages().map((page) => {\n        const groups = [];\n        const discussions = {};\n\n        page.items.forEach((notification) => {\n          const subject = notification.subject();\n\n          if (typeof subject === 'undefined') return;\n\n          // Get the discussion that this notification is related to. If it's not\n          // directly related to a discussion, it may be related to a post or\n          // other entity which is related to a discussion.\n          let discussion = null;\n          if (subject instanceof Discussion) discussion = subject;\n          else if (subject && subject.discussion) discussion = subject.discussion();\n\n          // If the notification is not related to a discussion directly or\n          // indirectly, then we will assign it to a neutral group.\n          const key = discussion ? discussion.id() : 0;\n          discussions[key] = discussions[key] || { discussion: discussion, notifications: [] };\n          discussions[key].notifications.push(notification);\n\n          if (groups.indexOf(discussions[key]) === -1) {\n            groups.push(discussions[key]);\n          }\n        });\n\n        return groups.map((group) => {\n          const badges = group.discussion && group.discussion.badges().toArray();\n\n          return (\n            <div className=\"NotificationGroup\">\n              {group.discussion ? (\n                <Link className=\"NotificationGroup-header\" href={app.route.discussion(group.discussion)}>\n                  {badges && !!badges.length && <ul className=\"NotificationGroup-badges badges\">{listItems(badges)}</ul>}\n                  <span>{group.discussion.title()}</span>\n                </Link>\n              ) : (\n                <div className=\"NotificationGroup-header\">{app.forum.attribute('title')}</div>\n              )}\n\n              <ul className=\"NotificationGroup-content\">\n                {group.notifications.map((notification) => {\n                  const NotificationComponent = app.notificationComponents[notification.contentType()];\n                  return (\n                    !!NotificationComponent && (\n                      <li>\n                        <NotificationComponent notification={notification} />\n                      </li>\n                    )\n                  );\n                })}\n              </ul>\n            </div>\n          );\n        });\n      });\n    }\n\n    return <div className=\"NotificationList-empty\">{app.translator.trans('core.forum.notifications.empty_text')}</div>;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.$notifications = this.$('.NotificationList-content');\n\n    // If we are on the notifications page, the window will be scrolling and not the $notifications element.\n    this.$scrollParent = this.inPanel() ? this.$notifications : $(window);\n\n    this.boundScrollHandler = this.scrollHandler.bind(this);\n    this.$scrollParent.on('scroll', this.boundScrollHandler);\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    this.$scrollParent.off('scroll', this.boundScrollHandler);\n  }\n\n  scrollHandler() {\n    const state = this.attrs.state;\n\n    // Whole-page scroll events are listened to on `window`, but we need to get the actual\n    // scrollHeight, scrollTop, and clientHeight from the document element.\n    const scrollParent = this.inPanel() ? this.$scrollParent[0] : document.documentElement;\n\n    // On very short screens, the scrollHeight + scrollTop might not reach the clientHeight\n    // by a fraction of a pixel, so we compensate for that.\n    const atBottom = Math.abs(scrollParent.scrollHeight - scrollParent.scrollTop - scrollParent.clientHeight) <= 1;\n\n    if (state.hasNext() && !state.isLoadingNext() && atBottom) {\n      state.loadNext();\n    }\n  }\n\n  /**\n   * If the NotificationList component isn't in a panel (e.g. on NotificationPage when mobile),\n   * we need to listen to scroll events on the window, and get scroll state from the body.\n   */\n  inPanel() {\n    return this.$notifications.css('overflow') === 'auto';\n  }\n}\n","import app from '../../forum/app';\nimport Dropdown, { IDropdownAttrs } from '../../common/components/Dropdown';\nimport icon from '../../common/helpers/icon';\nimport classList from '../../common/utils/classList';\nimport NotificationList from './NotificationList';\nimport extractText from '../../common/utils/extractText';\nimport type Mithril from 'mithril';\n\nexport interface INotificationsDropdown extends IDropdownAttrs {}\n\nexport default class NotificationsDropdown<CustomAttrs extends IDropdownAttrs = IDropdownAttrs> extends Dropdown<CustomAttrs> {\n  static initAttrs(attrs: INotificationsDropdown) {\n    attrs.className ||= 'NotificationsDropdown';\n    attrs.buttonClassName ||= 'Button Button--flat';\n    attrs.menuClassName ||= 'Dropdown-menu--right';\n    attrs.label ||= extractText(app.translator.trans('core.forum.notifications.tooltip'));\n    attrs.icon ||= 'fas fa-bell';\n\n    // For best a11y support, both `title` and `aria-label` should be used\n    attrs.accessibleToggleLabel ||= extractText(app.translator.trans('core.forum.notifications.toggle_dropdown_accessible_label'));\n\n    super.initAttrs(attrs);\n  }\n\n  getButton(children: Mithril.ChildArray): Mithril.Vnode<any, any> {\n    const newNotifications = this.getNewCount();\n\n    const vdom = super.getButton(children);\n\n    vdom.attrs.title = this.attrs.label;\n\n    vdom.attrs.className = classList(vdom.attrs.className, [newNotifications && 'new']);\n    vdom.attrs.onclick = this.onclick.bind(this);\n\n    return vdom;\n  }\n\n  getButtonContent(): Mithril.ChildArray {\n    const unread = this.getUnreadCount();\n\n    return [\n      this.attrs.icon ? icon(this.attrs.icon, { className: 'Button-icon' }) : null,\n      unread !== 0 && <span className=\"NotificationsDropdown-unread\">{unread}</span>,\n      <span className=\"Button-label\">{this.attrs.label}</span>,\n    ];\n  }\n\n  getMenu() {\n    return (\n      <div className={classList('Dropdown-menu', this.attrs.menuClassName)} onclick={this.menuClick.bind(this)}>\n        {this.showing && <NotificationList state={this.attrs.state} />}\n      </div>\n    );\n  }\n\n  onclick() {\n    if (app.drawer.isOpen()) {\n      this.goToRoute();\n    } else {\n      this.attrs.state.load();\n    }\n  }\n\n  goToRoute() {\n    m.route.set(app.route('notifications'));\n  }\n\n  getUnreadCount() {\n    return app.session.user!.unreadNotificationCount();\n  }\n\n  getNewCount() {\n    return app.session.user!.newNotificationCount();\n  }\n\n  menuClick(e: MouseEvent) {\n    // Don't close the notifications dropdown if the user is opening a link in a\n    // new tab or window.\n    if (e.shiftKey || e.metaKey || e.ctrlKey || e.button === 1) e.stopPropagation();\n  }\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n  try {\n    var info = gen[key](arg);\n    var value = info.value;\n  } catch (error) {\n    reject(error);\n    return;\n  }\n  if (info.done) {\n    resolve(value);\n  } else {\n    Promise.resolve(value).then(_next, _throw);\n  }\n}\nexport default function _asyncToGenerator(fn) {\n  return function () {\n    var self = this,\n      args = arguments;\n    return new Promise(function (resolve, reject) {\n      var gen = fn.apply(self, args);\n      function _next(value) {\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n      }\n      function _throw(err) {\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n      }\n      _next(undefined);\n    });\n  };\n}","import app from '../../forum/app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport Link from '../../common/components/Link';\nimport highlight from '../../common/helpers/highlight';\nimport Discussion from '../../common/models/Discussion';\nimport Post from '../../common/models/Post';\nimport type Mithril from 'mithril';\nimport ItemList from '../../common/utils/ItemList';\n\nexport interface DiscussionsSearchItemAttrs extends ComponentAttrs {\n  query: string;\n  discussion: Discussion;\n  mostRelevantPost: Post;\n}\n\nexport default class DiscussionsSearchItem extends Component<DiscussionsSearchItemAttrs> {\n  query!: string;\n  discussion!: Discussion;\n  mostRelevantPost!: Post | null | undefined;\n\n  oninit(vnode: Mithril.Vnode<DiscussionsSearchItemAttrs, this>) {\n    super.oninit(vnode);\n\n    this.query = this.attrs.query;\n    this.discussion = this.attrs.discussion;\n    this.mostRelevantPost = this.attrs.mostRelevantPost;\n  }\n\n  view() {\n    return (\n      <li className=\"DiscussionSearchResult\" data-index={'discussions' + this.discussion.id()}>\n        <Link href={app.route.discussion(this.discussion, (this.mostRelevantPost && this.mostRelevantPost.number()) || 0)}>\n          {this.viewItems().toArray()}\n        </Link>\n      </li>\n    );\n  }\n\n  discussionTitle() {\n    return this.discussion.title();\n  }\n\n  mostRelevantPostContent() {\n    return this.mostRelevantPost?.contentPlain();\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('discussion-title', <div className=\"DiscussionSearchResult-title\">{highlight(this.discussionTitle(), this.query)}</div>, 90);\n\n    !!this.mostRelevantPost &&\n      items.add(\n        'most-relevant',\n        <div className=\"DiscussionSearchResult-excerpt\">{highlight(this.mostRelevantPostContent() ?? '', this.query, 100)}</div>,\n        80\n      );\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport LinkButton from '../../common/components/LinkButton';\nimport { SearchSource } from './Search';\nimport type Mithril from 'mithril';\nimport Discussion from '../../common/models/Discussion';\nimport DiscussionsSearchItem from './DiscussionsSearchItem';\n\n/**\n * The `DiscussionsSearchSource` finds and displays discussion search results in\n * the search dropdown.\n */\nexport default class DiscussionsSearchSource implements SearchSource {\n  protected results = new Map<string, Discussion[]>();\n  queryString: string | null = null;\n\n  async search(query: string): Promise<void> {\n    query = query.toLowerCase();\n\n    this.results.set(query, []);\n\n    this.setQueryString(query);\n\n    const params = {\n      filter: { q: this.queryString || query },\n      page: { limit: this.limit() },\n      include: this.includes().join(','),\n    };\n\n    return app.store.find<Discussion[]>('discussions', params).then((results) => {\n      this.results.set(query, results);\n      m.redraw();\n    });\n  }\n\n  view(query: string): Array<Mithril.Vnode> {\n    query = query.toLowerCase();\n\n    this.setQueryString(query);\n\n    const results = (this.results.get(query) || []).map((discussion) => {\n      const mostRelevantPost = discussion.mostRelevantPost();\n\n      return <DiscussionsSearchItem query={query} discussion={discussion} mostRelevantPost={mostRelevantPost} />;\n    }) as Array<Mithril.Vnode>;\n\n    return [\n      <li className=\"Dropdown-header\">{app.translator.trans('core.forum.search.discussions_heading')}</li>,\n      <li>\n        <LinkButton icon=\"fas fa-search\" href={app.route('index', { q: this.queryString })}>\n          {app.translator.trans('core.forum.search.all_discussions_button', { query })}\n        </LinkButton>\n      </li>,\n      ...results,\n    ];\n  }\n\n  includes(): string[] {\n    return ['mostRelevantPost'];\n  }\n\n  limit(): number {\n    return 3;\n  }\n\n  queryMutators(): string[] {\n    return [];\n  }\n\n  setQueryString(query: string): void {\n    this.queryString = query + ' ' + this.queryMutators().join(' ');\n  }\n}\n","import type Mithril from 'mithril';\n\nimport app from '../../forum/app';\nimport highlight from '../../common/helpers/highlight';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport Link from '../../common/components/Link';\nimport { SearchSource } from './Search';\nimport User from '../../common/models/User';\n\n/**\n * The `UsersSearchSource` finds and displays user search results in the search\n * dropdown.\n */\nexport default class UsersSearchResults implements SearchSource {\n  protected results = new Map<string, User[]>();\n\n  async search(query: string): Promise<void> {\n    return app.store\n      .find<User[]>('users', {\n        filter: { q: query },\n        page: { limit: 5 },\n      })\n      .then((results) => {\n        this.results.set(query, results);\n        m.redraw();\n      });\n  }\n\n  view(query: string): Array<Mithril.Vnode> {\n    query = query.toLowerCase();\n\n    const results = (this.results.get(query) || [])\n      .concat(\n        app.store\n          .all<User>('users')\n          .filter((user) => [user.username(), user.displayName()].some((value) => value.toLowerCase().substr(0, query.length) === query))\n      )\n      .filter((e, i, arr) => arr.lastIndexOf(e) === i)\n      .sort((a, b) => a.displayName().localeCompare(b.displayName()));\n\n    if (!results.length) return [];\n\n    return [\n      <li className=\"Dropdown-header\">{app.translator.trans('core.forum.search.users_heading')}</li>,\n      ...results.map((user) => {\n        const name = username(user);\n\n        const children = [highlight(name.text as string, query)];\n\n        return (\n          <li className=\"UserSearchResult\" data-index={'users' + user.id()}>\n            <Link href={app.route.user(user)}>\n              {avatar(user)}\n              {{ ...name, text: undefined, children }}\n            </Link>\n          </li>\n        );\n      }),\n    ];\n  }\n}\n","import app from '../../forum/app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport ItemList from '../../common/utils/ItemList';\nimport classList from '../../common/utils/classList';\nimport extractText from '../../common/utils/extractText';\nimport KeyboardNavigatable from '../../common/utils/KeyboardNavigatable';\nimport icon from '../../common/helpers/icon';\nimport SearchState from '../states/SearchState';\nimport DiscussionsSearchSource from './DiscussionsSearchSource';\nimport UsersSearchSource from './UsersSearchSource';\nimport { fireDeprecationWarning } from '../../common/helpers/fireDebugWarning';\nimport type Mithril from 'mithril';\n\n/**\n * The `SearchSource` interface defines a section of search results in the\n * search dropdown.\n *\n * Search sources should be registered with the `Search` component class\n * by extending the `sourceItems` method. When the user types a\n * query, each search source will be prompted to load search results via the\n * `search` method. When the dropdown is redrawn, it will be constructed by\n * putting together the output from the `view` method of each source.\n */\nexport interface SearchSource {\n  /**\n   * Make a request to get results for the given query.\n   * The results will be updated internally in the search source, not exposed.\n   */\n  search(query: string): Promise<void>;\n\n  /**\n   * Get an array of virtual <li>s that list the search results for the given\n   * query.\n   */\n  view(query: string): Array<Mithril.Vnode>;\n}\n\nexport interface SearchAttrs extends ComponentAttrs {\n  /** The type of alert this is. Will be used to give the alert a class name of `Alert--{type}`. */\n  state: SearchState;\n}\n\n/**\n * The `Search` component displays a menu of as-you-type results from a variety\n * of sources.\n *\n * The search box will be 'activated' if the app's search state's\n * getInitialSearch() value is a truthy value. If this is the case, an 'x'\n * button will be shown next to the search field, and clicking it will clear the search.\n *\n * ATTRS:\n *\n * - state: SearchState instance.\n */\nexport default class Search<T extends SearchAttrs = SearchAttrs> extends Component<T, SearchState> {\n  /**\n   * The minimum query length before sources are searched.\n   */\n  protected static MIN_SEARCH_LEN = 3;\n\n  /**\n   * The instance of `SearchState` for this component.\n   */\n  protected searchState!: SearchState;\n\n  /**\n   * The instance of `SearchState` for this component.\n   *\n   * @deprecated Replace with`this.searchState` instead.\n   */\n  // TODO: [Flarum 2.0] Remove this.\n  // @ts-expect-error This is a get accessor, while superclass defines this as a property. This is needed to prevent breaking changes, however.\n  get state() {\n    fireDeprecationWarning('`state` property of the Search component is deprecated', '3212');\n    return this.searchState;\n  }\n  set state(state: SearchState) {\n    // Workaround to prevent triggering deprecation warnings due to Mithril\n    // setting state to undefined when creating components\n    state !== undefined && fireDeprecationWarning('`state` property of the Search component is deprecated', '3212');\n    this.searchState = state;\n  }\n\n  /**\n   * Whether or not the search input has focus.\n   */\n  protected hasFocus = false;\n\n  /**\n   * An array of SearchSources.\n   */\n  protected sources?: SearchSource[];\n\n  /**\n   * The number of sources that are still loading results.\n   */\n  protected loadingSources = 0;\n\n  /**\n   * The index of the currently-selected <li> in the results list. This can be\n   * a unique string (to account for the fact that an item's position may jump\n   * around as new results load), but otherwise it will be numeric (the\n   * sequential position within the list).\n   */\n  protected index: number = 0;\n\n  protected navigator!: KeyboardNavigatable;\n\n  protected searchTimeout?: number;\n\n  private updateMaxHeightHandler?: () => void;\n\n  oninit(vnode: Mithril.Vnode<T, this>) {\n    super.oninit(vnode);\n\n    this.searchState = this.attrs.state;\n  }\n\n  view() {\n    const currentSearch = this.searchState.getInitialSearch();\n\n    // Initialize search sources in the view rather than the constructor so\n    // that we have access to app.forum.\n    if (!this.sources) this.sources = this.sourceItems().toArray();\n\n    // Hide the search view if no sources were loaded\n    if (!this.sources.length) return <div></div>;\n\n    const searchLabel = extractText(app.translator.trans('core.forum.header.search_placeholder'));\n\n    const isActive = !!currentSearch;\n    const shouldShowResults = !!(this.searchState.getValue() && this.hasFocus);\n    const shouldShowClearButton = !!(!this.loadingSources && this.searchState.getValue());\n\n    return (\n      <div\n        role=\"search\"\n        aria-label={app.translator.trans('core.forum.header.search_role_label')}\n        className={classList('Search', {\n          open: this.searchState.getValue() && this.hasFocus,\n          focused: this.hasFocus,\n          active: isActive,\n          loading: !!this.loadingSources,\n        })}\n      >\n        <div className=\"Search-input\">\n          <input\n            aria-label={searchLabel}\n            className=\"FormControl\"\n            type=\"search\"\n            placeholder={searchLabel}\n            value={this.searchState.getValue()}\n            oninput={(e: InputEvent) => this.searchState.setValue((e?.target as HTMLInputElement)?.value)}\n            onfocus={() => (this.hasFocus = true)}\n            onblur={() => (this.hasFocus = false)}\n          />\n          {!!this.loadingSources && <LoadingIndicator size=\"small\" display=\"inline\" containerClassName=\"Button Button--icon Button--link\" />}\n          {shouldShowClearButton && (\n            <button\n              className=\"Search-clear Button Button--icon Button--link\"\n              onclick={this.clear.bind(this)}\n              aria-label={app.translator.trans('core.forum.header.search_clear_button_accessible_label')}\n              type=\"button\"\n            >\n              {icon('fas fa-times-circle')}\n            </button>\n          )}\n        </div>\n        <ul\n          className=\"Dropdown-menu Search-results\"\n          aria-hidden={!shouldShowResults || undefined}\n          aria-live={shouldShowResults ? 'polite' : undefined}\n        >\n          {shouldShowResults && this.sources.map((source) => source.view(this.searchState.getValue()))}\n        </ul>\n      </div>\n    );\n  }\n\n  updateMaxHeight() {\n    // Since extensions might add elements above the search box on mobile,\n    // we need to calculate and set the max height dynamically.\n    const resultsElementMargin = 14;\n    const maxHeight =\n      window.innerHeight - this.element.querySelector('.Search-input>.FormControl')!.getBoundingClientRect().bottom - resultsElementMargin;\n\n    this.element.querySelector<HTMLElement>('.Search-results')?.style?.setProperty('max-height', `${maxHeight}px`);\n  }\n\n  onupdate(vnode: Mithril.VnodeDOM<T, this>) {\n    super.onupdate(vnode);\n\n    // Highlight the item that is currently selected.\n    this.setIndex(this.getCurrentNumericIndex());\n\n    // If there are no sources, the search view is not shown.\n    if (!this.sources?.length) return;\n\n    this.updateMaxHeight();\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<T, this>) {\n    super.oncreate(vnode);\n\n    // If there are no sources, we shouldn't initialize logic for\n    // search elements, as they will not be shown.\n    if (!this.sources?.length) return;\n\n    const search = this;\n    const state = this.searchState;\n\n    // Highlight the item that is currently selected.\n    this.setIndex(this.getCurrentNumericIndex());\n\n    this.$('.Search-results')\n      .on('mousedown', (e) => e.preventDefault())\n      .on('click', () => this.$('input').trigger('blur'))\n\n      // Whenever the mouse is hovered over a search result, highlight it.\n      .on('mouseenter', '> li:not(.Dropdown-header)', function () {\n        search.setIndex(search.selectableItems().index(this));\n      });\n\n    const $input = this.$('input') as JQuery<HTMLInputElement>;\n\n    this.navigator = new KeyboardNavigatable();\n    this.navigator\n      .onUp(() => this.setIndex(this.getCurrentNumericIndex() - 1, true))\n      .onDown(() => this.setIndex(this.getCurrentNumericIndex() + 1, true))\n      .onSelect(this.selectResult.bind(this), true)\n      .onCancel(this.clear.bind(this))\n      .bindTo($input);\n\n    // Handle input key events on the search input, triggering results to load.\n    $input\n      .on('input focus', function () {\n        const query = this.value.toLowerCase();\n\n        if (!query) return;\n\n        if (search.searchTimeout) clearTimeout(search.searchTimeout);\n        search.searchTimeout = window.setTimeout(() => {\n          if (state.isCached(query)) return;\n\n          if (query.length >= (search.constructor as typeof Search).MIN_SEARCH_LEN) {\n            search.sources?.map((source) => {\n              if (!source.search) return;\n\n              search.loadingSources++;\n\n              source.search(query).then(() => {\n                search.loadingSources = Math.max(0, search.loadingSources - 1);\n                m.redraw();\n              });\n            });\n          }\n\n          state.cache(query);\n          m.redraw();\n        }, 250);\n      })\n\n      .on('focus', function () {\n        $(this)\n          .one('mouseup', (e) => e.preventDefault())\n          .trigger('select');\n      });\n\n    this.updateMaxHeightHandler = this.updateMaxHeight.bind(this);\n    window.addEventListener('resize', this.updateMaxHeightHandler);\n  }\n\n  onremove(vnode: Mithril.VnodeDOM<T, this>) {\n    super.onremove(vnode);\n\n    if (this.updateMaxHeightHandler) {\n      window.removeEventListener('resize', this.updateMaxHeightHandler);\n    }\n  }\n\n  /**\n   * Navigate to the currently selected search result and close the list.\n   */\n  selectResult() {\n    if (this.searchTimeout) clearTimeout(this.searchTimeout);\n\n    this.loadingSources = 0;\n\n    const selectedUrl = this.getItem(this.index).find('a').attr('href');\n    if (this.searchState.getValue() && selectedUrl) {\n      m.route.set(selectedUrl);\n    } else {\n      this.clear();\n    }\n\n    this.$('input').blur();\n  }\n\n  /**\n   * Clear the search\n   */\n  clear() {\n    this.searchState.clear();\n  }\n\n  /**\n   * Build an item list of SearchSources.\n   */\n  sourceItems(): ItemList<SearchSource> {\n    const items = new ItemList<SearchSource>();\n\n    if (app.forum.attribute('canViewForum')) items.add('discussions', new DiscussionsSearchSource());\n    if (app.forum.attribute('canSearchUsers')) items.add('users', new UsersSearchSource());\n\n    return items;\n  }\n\n  /**\n   * Get all of the search result items that are selectable.\n   */\n  selectableItems(): JQuery {\n    return this.$('.Search-results > li:not(.Dropdown-header)');\n  }\n\n  /**\n   * Get the position of the currently selected search result item.\n   * Returns zero if not found.\n   */\n  getCurrentNumericIndex(): number {\n    return Math.max(0, this.selectableItems().index(this.getItem(this.index)));\n  }\n\n  /**\n   * Get the <li> in the search results with the given index (numeric or named).\n   */\n  getItem(index: number): JQuery {\n    const $items = this.selectableItems();\n    let $item = $items.filter(`[data-index=\"${index}\"]`);\n\n    if (!$item.length) {\n      $item = $items.eq(index);\n    }\n\n    return $item;\n  }\n\n  /**\n   * Set the currently-selected search result item to the one with the given\n   * index.\n   */\n  setIndex(index: number, scrollToItem: boolean = false) {\n    const $items = this.selectableItems();\n    const $dropdown = $items.parent();\n\n    let fixedIndex = index;\n    if (index < 0) {\n      fixedIndex = $items.length - 1;\n    } else if (index >= $items.length) {\n      fixedIndex = 0;\n    }\n\n    const $item = $items.removeClass('active').eq(fixedIndex).addClass('active');\n\n    this.index = parseInt($item.attr('data-index') as string) || fixedIndex;\n\n    if (scrollToItem) {\n      const dropdownScroll = $dropdown.scrollTop()!;\n      const dropdownTop = $dropdown.offset()!.top;\n      const dropdownBottom = dropdownTop + $dropdown.outerHeight()!;\n      const itemTop = $item.offset()!.top;\n      const itemBottom = itemTop + $item.outerHeight()!;\n\n      let scrollTop;\n      if (itemTop < dropdownTop) {\n        scrollTop = dropdownScroll - dropdownTop + itemTop - parseInt($dropdown.css('padding-top'), 10);\n      } else if (itemBottom > dropdownBottom) {\n        scrollTop = dropdownScroll - dropdownBottom + itemBottom + parseInt($dropdown.css('padding-bottom'), 10);\n      }\n\n      if (typeof scrollTop !== 'undefined') {\n        $dropdown.stop(true).animate({ scrollTop }, 100);\n      }\n    }\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport Button from '../../common/components/Button';\nimport LogInModal from './LogInModal';\nimport SignUpModal from './SignUpModal';\nimport SessionDropdown from './SessionDropdown';\nimport SelectDropdown from '../../common/components/SelectDropdown';\nimport NotificationsDropdown from './NotificationsDropdown';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\nimport Search from '../components/Search';\n\n/**\n * The `HeaderSecondary` component displays secondary header controls, such as\n * the search box and the user menu. On the default skin, these are shown on the\n * right side of the header.\n */\nexport default class HeaderSecondary extends Component {\n  view() {\n    return <ul className=\"Header-controls\">{listItems(this.items().toArray())}</ul>;\n  }\n\n  /**\n   * Build an item list for the controls.\n   *\n   * @return {ItemList}\n   */\n  items() {\n    const items = new ItemList();\n\n    items.add('search', <Search state={app.search} />, 30);\n\n    if (app.forum.attribute('showLanguageSelector') && Object.keys(app.data.locales).length > 1) {\n      const locales = [];\n\n      for (const locale in app.data.locales) {\n        locales.push(\n          <Button\n            active={app.data.locale === locale}\n            icon={app.data.locale === locale ? 'fas fa-check' : true}\n            onclick={() => {\n              if (app.session.user) {\n                app.session.user.savePreferences({ locale }).then(() => window.location.reload());\n              } else {\n                document.cookie = `locale=${locale}; path=/; expires=Tue, 19 Jan 2038 03:14:07 GMT`;\n                window.location.reload();\n              }\n            }}\n          >\n            {app.data.locales[locale]}\n          </Button>\n        );\n      }\n\n      items.add(\n        'locale',\n        <SelectDropdown\n          buttonClassName=\"Button Button--link\"\n          accessibleToggleLabel={app.translator.trans('core.forum.header.locale_dropdown_accessible_label')}\n        >\n          {locales}\n        </SelectDropdown>,\n        20\n      );\n    }\n\n    if (app.session.user) {\n      items.add('notifications', <NotificationsDropdown state={app.notifications} />, 10);\n      items.add('session', <SessionDropdown />, 0);\n    } else {\n      if (app.forum.attribute('allowSignUp')) {\n        items.add(\n          'signUp',\n          <Button className=\"Button Button--link\" onclick={() => app.modal.show(SignUpModal)}>\n            {app.translator.trans('core.forum.header.sign_up_link')}\n          </Button>,\n          10\n        );\n      }\n\n      items.add(\n        'logIn',\n        <Button className=\"Button Button--link\" onclick={() => app.modal.show(LogInModal)}>\n          {app.translator.trans('core.forum.header.log_in_link')}\n        </Button>,\n        0\n      );\n    }\n\n    return items;\n  }\n}\n","import Button from '../../common/components/Button';\n\n/**\n * The `ComposerButton` component displays a button suitable for the composer\n * controls.\n */\nexport default class ComposerButton extends Button {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = attrs.className || 'Button Button--icon Button--link';\n  }\n}\n","import app from '../../forum/app';\nimport subclassOf from '../../common/utils/subclassOf';\nimport Stream from '../../common/utils/Stream';\nimport ReplyComposer from '../components/ReplyComposer';\n\nclass ComposerState {\n  constructor() {\n    /**\n     * The composer's current position.\n     *\n     * @type {ComposerState.Position}\n     */\n    this.position = ComposerState.Position.HIDDEN;\n\n    /**\n     * The composer's intended height, which can be modified by the user\n     * (by dragging the composer handle).\n     *\n     * @type {number}\n     */\n    this.height = null;\n\n    /**\n     * The dynamic component being shown inside the composer.\n     *\n     * @type {Object}\n     */\n    this.body = { attrs: {} };\n\n    /**\n     * A reference to the text editor that allows text manipulation.\n     *\n     * @type {import('../../common/utils/EditorDriverInterface')|null}\n     */\n    this.editor = null;\n\n    this.clear();\n  }\n\n  /**\n   * Load a content component into the composer.\n   *\n   * @param {typeof import('../components/ComposerBody').default} componentClass\n   */\n  load(componentClass, attrs) {\n    const body = { componentClass, attrs };\n\n    if (this.preventExit()) return;\n\n    // If we load a similar component into the composer, then Mithril will be\n    // able to diff the old/new contents and some DOM-related state from the\n    // old composer will remain. To prevent this from happening, we clear the\n    // component and force a redraw, so that the new component will be working\n    // on a blank slate.\n    if (this.isVisible()) {\n      this.clear();\n      m.redraw.sync();\n    }\n\n    this.body = body;\n  }\n\n  /**\n   * Clear the composer's content component.\n   */\n  clear() {\n    this.position = ComposerState.Position.HIDDEN;\n    this.body = { attrs: {} };\n    this.onExit = null;\n\n    this.fields = {\n      content: Stream(''),\n    };\n\n    if (this.editor) {\n      this.editor.destroy();\n    }\n    this.editor = null;\n  }\n\n  /**\n   * Show the composer.\n   */\n  show() {\n    if (this.position === ComposerState.Position.NORMAL || this.position === ComposerState.Position.FULLSCREEN) return;\n\n    this.position = ComposerState.Position.NORMAL;\n    m.redraw.sync();\n  }\n\n  /**\n   * Close the composer.\n   */\n  hide() {\n    this.clear();\n    m.redraw();\n  }\n\n  /**\n   * Confirm with the user so they don't lose their content, then close the\n   * composer.\n   */\n  close() {\n    if (this.preventExit()) return;\n\n    this.hide();\n  }\n\n  /**\n   * Minimize the composer. Has no effect if the composer is hidden.\n   */\n  minimize() {\n    if (!this.isVisible()) return;\n\n    this.position = ComposerState.Position.MINIMIZED;\n    m.redraw();\n  }\n\n  /**\n   * Take the composer into fullscreen mode. Has no effect if the composer is\n   * hidden.\n   */\n  fullScreen() {\n    if (!this.isVisible()) return;\n\n    this.position = ComposerState.Position.FULLSCREEN;\n    m.redraw();\n  }\n\n  /**\n   * Exit fullscreen mode.\n   */\n  exitFullScreen() {\n    if (this.position !== ComposerState.Position.FULLSCREEN) return;\n\n    this.position = ComposerState.Position.NORMAL;\n    m.redraw();\n  }\n\n  /**\n   * Determine whether the body matches the given component class and data.\n   *\n   * @param {object} type The component class to check against. Subclasses are accepted as well.\n   * @param {object} data\n   * @return {boolean}\n   */\n  bodyMatches(type, data = {}) {\n    // Fail early when the body is of a different type\n    if (!subclassOf(this.body.componentClass, type)) return false;\n\n    // Now that the type is known to be correct, we loop through the provided\n    // data to see whether it matches the data in the attributes for the body.\n    return Object.keys(data).every((key) => this.body.attrs[key] === data[key]);\n  }\n\n  /**\n   * Determine whether or not the Composer is visible.\n   *\n   * True when the composer is displayed on the screen and has a body component.\n   * It could be open in \"normal\" or full-screen mode, or even minimized.\n   *\n   * @returns {boolean}\n   */\n  isVisible() {\n    return this.position !== ComposerState.Position.HIDDEN;\n  }\n\n  /**\n   * Determine whether or not the Composer is covering the screen.\n   *\n   * This will be true if the Composer is in full-screen mode on desktop,\n   * or if we are on a mobile device, where we always consider the composer as full-screen..\n   *\n   * @return {boolean}\n   */\n  isFullScreen() {\n    return this.position === ComposerState.Position.FULLSCREEN || app.screen() === 'phone';\n  }\n\n  /**\n   * Check whether or not the user is currently composing a reply to a\n   * discussion.\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @return {boolean}\n   */\n  composingReplyTo(discussion) {\n    return this.isVisible() && this.bodyMatches(ReplyComposer, { discussion });\n  }\n\n  /**\n   * Confirm with the user that they want to close the composer and lose their\n   * content.\n   *\n   * @return {boolean} Whether or not the exit was cancelled.\n   */\n  preventExit() {\n    if (!this.isVisible()) return;\n    if (!this.onExit) return;\n\n    if (this.onExit.callback()) {\n      return !confirm(this.onExit.message);\n    }\n  }\n\n  /**\n   * Configure when / what to ask the user before closing the composer.\n   *\n   * The provided callback will be used to determine whether asking for\n   * confirmation is necessary. If the callback returns true at the time of\n   * closing, the provided text will be shown in a standard confirmation dialog.\n   *\n   * @param {() => boolean} callback\n   * @param {string} message\n   */\n  preventClosingWhen(callback, message) {\n    this.onExit = { callback, message };\n  }\n\n  /**\n   * Minimum height of the Composer.\n   * @returns {number}\n   */\n  minimumHeight() {\n    return 200;\n  }\n\n  /**\n   * Maxmimum height of the Composer.\n   * @returns {number}\n   */\n  maximumHeight() {\n    return $(window).height() - $('#header').outerHeight();\n  }\n\n  /**\n   * Computed the composer's current height, based on the intended height, and\n   * the composer's current state. This will be applied to the composer\n   * content's DOM element.\n   * @returns {number | string}\n   */\n  computedHeight() {\n    // If the composer is minimized, then we don't want to set a height; we'll\n    // let the CSS decide how high it is. If it's fullscreen, then we need to\n    // make it as high as the window.\n    if (this.position === ComposerState.Position.MINIMIZED) {\n      return '';\n    } else if (this.position === ComposerState.Position.FULLSCREEN) {\n      return $(window).height();\n    }\n\n    // Otherwise, if it's normal or hidden, then we use the intended height.\n    // We don't let the composer get too small or too big, though.\n    return Math.max(this.minimumHeight(), Math.min(this.height, this.maximumHeight()));\n  }\n}\n\nComposerState.Position = {\n  HIDDEN: 'hidden',\n  NORMAL: 'normal',\n  MINIMIZED: 'minimized',\n  FULLSCREEN: 'fullScreen',\n};\n\nexport default ComposerState;\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport ItemList from '../../common/utils/ItemList';\nimport ComposerButton from './ComposerButton';\nimport listItems from '../../common/helpers/listItems';\nimport classList from '../../common/utils/classList';\nimport ComposerState from '../states/ComposerState';\n\n/**\n * The `Composer` component displays the composer. It can be loaded with a\n * content component with `load` and then its position/state can be altered with\n * `show`, `hide`, `close`, `minimize`, `fullScreen`, and `exitFullScreen`.\n */\nexport default class Composer extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * The composer's \"state\".\n     *\n     * @type {ComposerState}\n     */\n    this.state = this.attrs.state;\n\n    /**\n     * Whether or not the composer currently has focus.\n     *\n     * @type {Boolean}\n     */\n    this.active = false;\n\n    // Store the initial position so that we can trigger animations correctly.\n    this.prevPosition = this.state.position;\n  }\n\n  view() {\n    const body = this.state.body;\n    const classes = {\n      normal: this.state.position === ComposerState.Position.NORMAL,\n      minimized: this.state.position === ComposerState.Position.MINIMIZED,\n      fullScreen: this.state.position === ComposerState.Position.FULLSCREEN,\n      active: this.active,\n      visible: this.state.isVisible(),\n    };\n\n    // Set up a handler so that clicks on the content will show the composer.\n    const showIfMinimized = this.state.position === ComposerState.Position.MINIMIZED ? this.state.show.bind(this.state) : undefined;\n\n    const ComposerBody = body.componentClass;\n\n    return (\n      <div className={'Composer ' + classList(classes)}>\n        <div className=\"Composer-handle\" oncreate={this.configHandle.bind(this)} />\n        <ul className=\"Composer-controls\">{listItems(this.controlItems().toArray())}</ul>\n        <div className=\"Composer-content\" onclick={showIfMinimized}>\n          {ComposerBody && <ComposerBody {...body.attrs} composer={this.state} disabled={classes.minimized} />}\n        </div>\n      </div>\n    );\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    if (this.state.position === this.prevPosition) {\n      // Set the height of the Composer element and its contents on each redraw,\n      // so that they do not lose it if their DOM elements are recreated.\n      this.updateHeight();\n    } else {\n      this.animatePositionChange();\n\n      this.prevPosition = this.state.position;\n    }\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.initializeHeight();\n    this.$().hide().css('bottom', -this.state.computedHeight());\n\n    // Whenever any of the inputs inside the composer are have focus, we want to\n    // add a class to the composer to draw attention to it.\n    this.$().on('focus blur', ':input,.TextEditor-editorContainer', (e) => {\n      this.active = e.type === 'focusin';\n      m.redraw();\n    });\n\n    // When the escape key is pressed on any inputs, close the composer.\n    this.$().on('keydown', ':input,.TextEditor-editorContainer', 'esc', () => this.state.close());\n\n    this.handlers = {};\n\n    $(window)\n      .on('resize', (this.handlers.onresize = this.updateHeight.bind(this)))\n      .resize();\n\n    $(document)\n      .on('mousemove', (this.handlers.onmousemove = this.onmousemove.bind(this)))\n      .on('mouseup', (this.handlers.onmouseup = this.onmouseup.bind(this)));\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    $(window).off('resize', this.handlers.onresize);\n\n    $(document).off('mousemove', this.handlers.onmousemove).off('mouseup', this.handlers.onmouseup);\n  }\n\n  /**\n   * Add the necessary event handlers to the composer's handle so that it can\n   * be used to resize the composer.\n   */\n  configHandle(vnode) {\n    const composer = this;\n\n    $(vnode.dom)\n      .css('cursor', 'row-resize')\n      .bind('dragstart mousedown', (e) => e.preventDefault())\n      .mousedown(function (e) {\n        composer.mouseStart = e.clientY;\n        composer.heightStart = composer.$().height();\n        composer.handle = $(this);\n        $('body').css('cursor', 'row-resize');\n      });\n  }\n\n  /**\n   * Resize the composer according to mouse movement.\n   *\n   * @param {MouseEvent} e\n   */\n  onmousemove(e) {\n    if (!this.handle) return;\n\n    // Work out how much the mouse has been moved, and set the height\n    // relative to the old one based on that. Then update the content's\n    // height so that it fills the height of the composer, and update the\n    // body's padding.\n    const deltaPixels = this.mouseStart - e.clientY;\n    this.changeHeight(this.heightStart + deltaPixels);\n\n    // Update the body's padding-bottom so that no content on the page will ever\n    // get permanently hidden behind the composer. If the user is already\n    // scrolled to the bottom of the page, then we will keep them scrolled to\n    // the bottom after the padding has been updated.\n    const scrollTop = $(window).scrollTop();\n    const anchorToBottom = scrollTop > 0 && scrollTop + $(window).height() >= $(document).height();\n    this.updateBodyPadding(anchorToBottom);\n  }\n\n  /**\n   * Finish resizing the composer when the mouse is released.\n   */\n  onmouseup() {\n    if (!this.handle) return;\n\n    this.handle = null;\n    $('body').css('cursor', '');\n  }\n\n  /**\n   * Draw focus to the first focusable content element (the text editor).\n   */\n  focus() {\n    this.$('.Composer-content :input:enabled:visible, .TextEditor-editor').first().focus();\n  }\n\n  /**\n   * Update the DOM to reflect the composer's current height. This involves\n   * setting the height of the composer's root element, and adjusting the height\n   * of any flexible elements inside the composer's body.\n   */\n  updateHeight() {\n    const height = this.state.computedHeight();\n    const $flexible = this.$('.Composer-flexible');\n\n    this.$().height(height);\n\n    if ($flexible.length) {\n      const headerHeight = $flexible.offset().top - this.$().offset().top;\n      const paddingBottom = parseInt($flexible.css('padding-bottom'), 10);\n      const footerHeight = this.$('.Composer-footer').outerHeight(true);\n\n      $flexible.height(this.$().outerHeight() - headerHeight - paddingBottom - footerHeight);\n    }\n  }\n\n  /**\n   * Update the amount of padding-bottom on the body so that the page's\n   * content will still be visible above the composer when the page is\n   * scrolled right to the bottom.\n   */\n  updateBodyPadding() {\n    const visible =\n      this.state.position !== ComposerState.Position.HIDDEN && this.state.position !== ComposerState.Position.MINIMIZED && app.screen() !== 'phone';\n\n    const paddingBottom = visible ? this.state.computedHeight() - parseInt($('#app').css('padding-bottom'), 10) : 0;\n\n    $('#content').css({ paddingBottom });\n  }\n\n  /**\n   * Trigger the right animation depending on the desired new position.\n   */\n  animatePositionChange() {\n    // When exiting full-screen mode: focus content\n    if (this.prevPosition === ComposerState.Position.FULLSCREEN && this.state.position === ComposerState.Position.NORMAL) {\n      this.focus();\n      return;\n    }\n\n    switch (this.state.position) {\n      case ComposerState.Position.HIDDEN:\n        return this.hide();\n      case ComposerState.Position.MINIMIZED:\n        return this.minimize();\n      case ComposerState.Position.FULLSCREEN:\n        return this.focus();\n      case ComposerState.Position.NORMAL:\n        return this.show();\n    }\n  }\n\n  /**\n   * Animate the Composer into the new position by changing the height.\n   */\n  animateHeightChange() {\n    const $composer = this.$().stop(true);\n    const oldHeight = $composer.outerHeight();\n    const scrollTop = $(window).scrollTop();\n\n    $composer.show();\n    this.updateHeight();\n\n    const newHeight = $composer.outerHeight();\n\n    if (this.prevPosition === ComposerState.Position.HIDDEN) {\n      $composer.css({ bottom: -newHeight, height: newHeight });\n    } else {\n      $composer.css({ height: oldHeight });\n    }\n\n    const animation = $composer.animate({ bottom: 0, height: newHeight }, 'fast').promise();\n\n    this.updateBodyPadding();\n    $(window).scrollTop(scrollTop);\n    return animation;\n  }\n\n  /**\n   * Show the Composer backdrop.\n   */\n  showBackdrop() {\n    this.$backdrop = $('<div/>').addClass('composer-backdrop').appendTo('body');\n  }\n\n  /**\n   * Hide the Composer backdrop.\n   */\n  hideBackdrop() {\n    if (this.$backdrop) this.$backdrop.remove();\n  }\n\n  /**\n   * Animate the composer sliding up from the bottom to take its normal height.\n   *\n   * @private\n   */\n  show() {\n    this.animateHeightChange().then(() => this.focus());\n\n    if (app.screen() === 'phone') {\n      // On safari fixed position doesn't properly work on mobile,\n      // So we use absolute and set the top value.\n      // https://github.com/flarum/core/issues/2652\n\n      // Due to another safari bug, `scrollTop` is unreliable when\n      // at the very bottom of the page AND opening the composer.\n      // So we fallback to a calculated version of scrollTop.\n      // https://github.com/flarum/core/issues/2683\n      const scrollElement = document.documentElement;\n      const topOfViewport = Math.min(scrollElement.scrollTop, scrollElement.scrollHeight - scrollElement.clientHeight);\n      this.$().css('top', $('.App').is('.mobile-safari') ? topOfViewport : 0);\n      this.showBackdrop();\n    }\n  }\n\n  /**\n   * Animate closing the composer.\n   *\n   * @private\n   */\n  hide() {\n    const $composer = this.$();\n\n    // Animate the composer sliding down off the bottom edge of the viewport.\n    // Only when the animation is completed, update other elements on the page.\n    $composer.stop(true).animate({ bottom: -$composer.height() }, 'fast', () => {\n      $composer.hide();\n      this.hideBackdrop();\n      this.updateBodyPadding();\n    });\n  }\n\n  /**\n   * Shrink the composer until only its title is visible.\n   *\n   * @private\n   */\n  minimize() {\n    this.animateHeightChange();\n\n    this.$().css('top', 'auto');\n    this.hideBackdrop();\n  }\n\n  /**\n   * Build an item list for the composer's controls.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controlItems() {\n    const items = new ItemList();\n\n    if (this.state.position === ComposerState.Position.FULLSCREEN) {\n      items.add(\n        'exitFullScreen',\n        <ComposerButton\n          icon=\"fas fa-compress\"\n          title={app.translator.trans('core.forum.composer.exit_full_screen_tooltip')}\n          onclick={this.state.exitFullScreen.bind(this.state)}\n        />\n      );\n    } else {\n      if (this.state.position !== ComposerState.Position.MINIMIZED) {\n        items.add(\n          'minimize',\n          <ComposerButton\n            icon=\"fas fa-minus minimize\"\n            title={app.translator.trans('core.forum.composer.minimize_tooltip')}\n            onclick={this.state.minimize.bind(this.state)}\n            itemClassName=\"App-backControl\"\n          />\n        );\n\n        items.add(\n          'fullScreen',\n          <ComposerButton\n            icon=\"fas fa-expand\"\n            title={app.translator.trans('core.forum.composer.full_screen_tooltip')}\n            onclick={this.state.fullScreen.bind(this.state)}\n          />\n        );\n      }\n\n      items.add(\n        'close',\n        <ComposerButton\n          icon=\"fas fa-times\"\n          title={app.translator.trans('core.forum.composer.close_tooltip')}\n          onclick={this.state.close.bind(this.state)}\n        />\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Initialize default Composer height.\n   */\n  initializeHeight() {\n    this.state.height = localStorage.getItem('composerHeight');\n\n    if (!this.state.height) {\n      this.state.height = this.defaultHeight();\n    }\n  }\n\n  /**\n   * Default height of the Composer in case none is saved.\n   * @returns {number}\n   */\n  defaultHeight() {\n    return this.$().height();\n  }\n\n  /**\n   * Save a new Composer height and update the DOM.\n   * @param {number} height\n   */\n  changeHeight(height) {\n    this.state.height = height;\n    this.updateHeight();\n\n    localStorage.setItem('composerHeight', this.state.height);\n  }\n}\n","import app from '../../forum/app';\nimport type NotificationModel from '../../common/models/Notification';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport avatar from '../../common/helpers/avatar';\nimport icon from '../../common/helpers/icon';\nimport humanTime from '../../common/helpers/humanTime';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport classList from '../../common/utils/classList';\nimport type Mithril from 'mithril';\n\nexport interface INotificationAttrs extends ComponentAttrs {\n  notification: NotificationModel;\n}\n\n// TODO [Flarum 2.0]: Remove `?.` from abstract function calls.\n\n/**\n * The `Notification` component abstract displays a single notification.\n * Subclasses should implement the `icon`, `href`, and `content` methods.\n */\nexport default abstract class Notification<CustomAttrs extends INotificationAttrs = INotificationAttrs> extends Component<CustomAttrs> {\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    const notification = this.attrs.notification;\n    const href = this.href?.() ?? '';\n\n    const fromUser = notification.fromUser();\n\n    return (\n      <Link\n        className={classList('Notification', `Notification--${notification.contentType()}`, [!notification.isRead() && 'unread'])}\n        href={href}\n        external={href.includes('://')}\n        onclick={this.markAsRead.bind(this)}\n      >\n        {avatar(fromUser || null)}\n        {icon(this.icon?.(), { className: 'Notification-icon' })}\n        <span className=\"Notification-title\">\n          <span className=\"Notification-content\">{this.content?.()}</span>\n          <span className=\"Notification-title-spring\" />\n          {humanTime(notification.createdAt())}\n        </span>\n        {!notification.isRead() && (\n          <Button\n            className=\"Notification-action Button Button--link\"\n            icon=\"fas fa-check\"\n            title={app.translator.trans('core.forum.notifications.mark_as_read_tooltip')}\n            onclick={(e: Event) => {\n              e.preventDefault();\n              e.stopPropagation();\n\n              this.markAsRead();\n            }}\n          />\n        )}\n        <div className=\"Notification-excerpt\">{this.excerpt?.()}</div>\n      </Link>\n    );\n  }\n\n  /**\n   * Get the name of the icon that should be displayed in the notification.\n   */\n  abstract icon(): string;\n\n  /**\n   * Get the URL that the notification should link to.\n   */\n  abstract href(): string;\n\n  /**\n   * Get the content of the notification.\n   */\n  abstract content(): Mithril.Children;\n\n  /**\n   * Get the excerpt of the notification.\n   */\n  abstract excerpt(): Mithril.Children;\n\n  /**\n   * Mark the notification as read.\n   */\n  markAsRead() {\n    if (this.attrs.notification.isRead()) return;\n\n    app.session.user?.pushAttributes({ unreadNotificationCount: (app.session.user.unreadNotificationCount() ?? 1) - 1 });\n\n    this.attrs.notification.save({ isRead: true });\n  }\n}\n","import type Discussion from '../../common/models/Discussion';\nimport app from '../../forum/app';\nimport Notification from './Notification';\n\ninterface DiscussionRenamedContent {\n  postNumber: number;\n}\n\n/**\n * The `DiscussionRenamedNotification` component displays a notification which\n * indicates that a discussion has had its title changed.\n */\nexport default class DiscussionRenamedNotification extends Notification {\n  icon() {\n    return 'fas fa-pencil-alt';\n  }\n\n  href() {\n    const notification = this.attrs.notification;\n    const discussion = notification.subject();\n\n    if (!discussion) {\n      return '#';\n    }\n\n    return app.route.discussion(discussion as Discussion, notification.content<DiscussionRenamedContent>().postNumber);\n  }\n\n  content() {\n    return app.translator.trans('core.forum.notifications.discussion_renamed_text', { user: this.attrs.notification.fromUser() });\n  }\n\n  excerpt() {\n    return null;\n  }\n}\n","import app from '../../forum/app';\nimport ComposerBody from './ComposerBody';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport icon from '../../common/helpers/icon';\n\nfunction minimizeComposerIfFullScreen(e) {\n  if (app.composer.isFullScreen()) {\n    app.composer.minimize();\n    e.stopPropagation();\n  }\n}\n\n/**\n * The `EditPostComposer` component displays the composer content for editing a\n * post. It sets the initial content to the content of the post that is being\n * edited, and adds a header control to indicate which post is being edited.\n *\n * ### Attrs\n *\n * - All of the attrs for ComposerBody\n * - `post`\n */\nexport default class EditPostComposer extends ComposerBody {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.submitLabel = attrs.submitLabel || app.translator.trans('core.forum.composer_edit.submit_button');\n    attrs.confirmExit = attrs.confirmExit || app.translator.trans('core.forum.composer_edit.discard_confirmation');\n    attrs.originalContent = attrs.originalContent || attrs.post.content();\n    attrs.user = attrs.user || attrs.post.user();\n\n    attrs.post.editedContent = attrs.originalContent;\n  }\n\n  headerItems() {\n    const items = super.headerItems();\n    const post = this.attrs.post;\n\n    items.add(\n      'title',\n      <h3>\n        {icon('fas fa-pencil-alt')}{' '}\n        <Link href={app.route.discussion(post.discussion(), post.number())} onclick={minimizeComposerIfFullScreen}>\n          {app.translator.trans('core.forum.composer_edit.post_link', { number: post.number(), discussion: post.discussion().title() })}\n        </Link>\n      </h3>\n    );\n\n    return items;\n  }\n\n  /**\n   * Jump to the preview when triggered by the text editor.\n   */\n  jumpToPreview(e) {\n    minimizeComposerIfFullScreen(e);\n\n    m.route.set(app.route.post(this.attrs.post));\n  }\n\n  /**\n   * Get the data to submit to the server when the post is saved.\n   *\n   * @return {Record<string, unknown>}\n   */\n  data() {\n    return {\n      content: this.composer.fields.content(),\n    };\n  }\n\n  onsubmit() {\n    const discussion = this.attrs.post.discussion();\n\n    this.loading = true;\n\n    const data = this.data();\n\n    this.attrs.post.save(data).then((post) => {\n      // If we're currently viewing the discussion which this edit was made\n      // in, then we can scroll to the post.\n      if (app.viewingDiscussion(discussion)) {\n        app.current.get('stream').goToNumber(post.number());\n      } else {\n        // Otherwise, we'll create an alert message to inform the user that\n        // their edit has been made, containing a button which will\n        // transition to their edited post when clicked.\n        const alert = app.alerts.show(\n          {\n            type: 'success',\n            controls: [\n              <Button\n                className=\"Button Button--link\"\n                onclick={() => {\n                  m.route.set(app.route.post(post));\n                  app.alerts.dismiss(alert);\n                }}\n              >\n                {app.translator.trans('core.forum.composer_edit.view_button')}\n              </Button>,\n            ],\n          },\n          app.translator.trans('core.forum.composer_edit.edited_message')\n        );\n      }\n\n      this.composer.hide();\n    }, this.loaded.bind(this));\n  }\n}\n","import app from '../../forum/app';\nimport EditPostComposer from '../components/EditPostComposer';\nimport Button from '../../common/components/Button';\nimport Separator from '../../common/components/Separator';\nimport ItemList from '../../common/utils/ItemList';\nimport extractText from '../../common/utils/extractText';\n\n/**\n * The `PostControls` utility constructs a list of buttons for a post which\n * perform actions on it.\n */\nexport default {\n  /**\n   * Get a list of controls for a post.\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}')}\n   */\n  controls(post, context) {\n    const items = new ItemList();\n\n    ['user', 'moderation', 'destructive'].forEach((section) => {\n      const controls = this[section + 'Controls'](post, context).toArray();\n      if (controls.length) {\n        controls.forEach((item) => items.add(item.itemName, item));\n        items.add(section + 'Separator', <Separator />);\n      }\n    });\n\n    return items;\n  },\n\n  /**\n   * Get controls for a post pertaining to the current user (e.g. report).\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}')}\n   * @protected\n   */\n  userControls(post, context) {\n    return new ItemList();\n  },\n\n  /**\n   * Get controls for a post pertaining to moderation (e.g. edit).\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}')}\n   * @protected\n   */\n  moderationControls(post, context) {\n    const items = new ItemList();\n\n    if (post.contentType() === 'comment' && post.canEdit()) {\n      if (!post.isHidden()) {\n        items.add(\n          'edit',\n          <Button icon=\"fas fa-pencil-alt\" onclick={this.editAction.bind(post)}>\n            {app.translator.trans('core.forum.post_controls.edit_button')}\n          </Button>\n        );\n      }\n    }\n\n    return items;\n  },\n\n  /**\n   * Get controls for a post that are destructive (e.g. delete).\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}')}\n   * @protected\n   */\n  destructiveControls(post, context) {\n    const items = new ItemList();\n\n    if (post.contentType() === 'comment' && !post.isHidden()) {\n      if (post.canHide()) {\n        items.add(\n          'hide',\n          <Button icon=\"far fa-trash-alt\" onclick={this.hideAction.bind(post)}>\n            {app.translator.trans('core.forum.post_controls.delete_button')}\n          </Button>\n        );\n      }\n    } else {\n      if (post.contentType() === 'comment' && post.canHide()) {\n        items.add(\n          'restore',\n          <Button icon=\"fas fa-reply\" onclick={this.restoreAction.bind(post)}>\n            {app.translator.trans('core.forum.post_controls.restore_button')}\n          </Button>\n        );\n      }\n      if (post.canDelete()) {\n        items.add(\n          'delete',\n          <Button icon=\"fas fa-times\" onclick={this.deleteAction.bind(post, context)}>\n            {app.translator.trans('core.forum.post_controls.delete_forever_button')}\n          </Button>\n        );\n      }\n    }\n\n    return items;\n  },\n\n  /**\n   * Open the composer to edit a post.\n   *\n   * @return {Promise<void>}\n   */\n  editAction() {\n    return new Promise((resolve) => {\n      app.composer.load(EditPostComposer, { post: this });\n      app.composer.show();\n\n      return resolve();\n    });\n  },\n\n  /**\n   * Hide a post.\n   *\n   * @return {Promise<void>}\n   */\n  hideAction() {\n    if (!confirm(extractText(app.translator.trans('core.forum.post_controls.hide_confirmation')))) return;\n    this.pushData({ attributes: { hiddenAt: new Date() }, relationships: { hiddenUser: app.session.user } });\n\n    return this.save({ isHidden: true }).then(() => m.redraw());\n  },\n\n  /**\n   * Restore a post.\n   *\n   * @return {Promise<void>}\n   */\n  restoreAction() {\n    this.pushData({ attributes: { hiddenAt: null }, relationships: { hiddenUser: null } });\n\n    return this.save({ isHidden: false }).then(() => m.redraw());\n  },\n\n  /**\n   * Delete a post.\n   *\n   * @return {Promise<void>}\n   */\n  deleteAction(context) {\n    if (!confirm(extractText(app.translator.trans('core.forum.post_controls.delete_confirmation')))) return;\n    if (context) context.loading = true;\n\n    return this.delete()\n      .then(() => {\n        const discussion = this.discussion();\n\n        discussion.removePost(this.id());\n\n        // If this was the last post in the discussion, then we will assume that\n        // the whole discussion was deleted too.\n        if (!discussion.postIds().length) {\n          app.discussions.removeDiscussion(discussion);\n\n          if (app.viewingDiscussion(discussion)) {\n            app.history.back();\n          }\n        }\n      })\n      .catch(() => {})\n      .then(() => {\n        if (context) context.loading = false;\n        m.redraw();\n      });\n  },\n};\n","import app from '../../forum/app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport SubtreeRetainer from '../../common/utils/SubtreeRetainer';\nimport Dropdown from '../../common/components/Dropdown';\nimport PostControls from '../utils/PostControls';\nimport listItems, { ModdedChildrenWithItemName } from '../../common/helpers/listItems';\nimport ItemList from '../../common/utils/ItemList';\nimport type PostModel from '../../common/models/Post';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport type Mithril from 'mithril';\n\nexport interface IPostAttrs extends ComponentAttrs {\n  post: PostModel;\n}\n\n/**\n * The `Post` component displays a single post. The basic post template just\n * includes a controls dropdown; subclasses must implement `content` and `attrs`\n * methods.\n */\nexport default abstract class Post<CustomAttrs extends IPostAttrs = IPostAttrs> extends Component<CustomAttrs> {\n  /**\n   * May be set by subclasses.\n   */\n  loading = false;\n\n  /**\n   * Ensures that the post will not be redrawn\n   * unless new data comes in.\n   */\n  subtree!: SubtreeRetainer;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.loading = false;\n\n    this.subtree = new SubtreeRetainer(\n      () => this.loading,\n      () => this.attrs.post.freshness,\n      () => {\n        const user = this.attrs.post.user();\n        return user && user.freshness;\n      }\n    );\n  }\n\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    const attrs = this.elementAttrs();\n\n    attrs.className = this.classes(attrs.className as string | undefined).join(' ');\n\n    const controls = PostControls.controls(this.attrs.post, this).toArray();\n    const footerItems = this.footerItems().toArray();\n\n    return (\n      <article {...attrs}>\n        <div>{this.viewItems(controls, footerItems).toArray()}</div>\n      </article>\n    );\n  }\n\n  viewItems(controls: Mithril.Children[], footerItems: ModdedChildrenWithItemName[]): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('content', this.loading ? <LoadingIndicator /> : this.content(), 100);\n\n    items.add(\n      'actions',\n      <aside className=\"Post-actions\">\n        <ul>\n          {listItems(this.actionItems().toArray())}\n          {!!controls.length && (\n            <li>\n              <Dropdown\n                className=\"Post-controls\"\n                buttonClassName=\"Button Button--icon Button--flat\"\n                menuClassName=\"Dropdown-menu--right\"\n                icon=\"fas fa-ellipsis-h\"\n                onshow={() => this.$('.Post-controls').addClass('open')}\n                onhide={() => this.$('.Post-controls').removeClass('open')}\n                accessibleToggleLabel={app.translator.trans('core.forum.post_controls.toggle_dropdown_accessible_label')}\n              >\n                {controls}\n              </Dropdown>\n            </li>\n          )}\n        </ul>\n      </aside>,\n      90\n    );\n\n    items.add('footer', <footer className=\"Post-footer\">{footerItems.length > 0 ? <ul>{listItems(footerItems)}</ul> : <ul></ul>}</footer>, 80);\n\n    return items;\n  }\n\n  onbeforeupdate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onbeforeupdate(vnode);\n\n    return this.subtree.needsRebuild();\n  }\n\n  onupdate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onupdate(vnode);\n\n    const $actions = this.$('.Post-actions');\n    const $controls = this.$('.Post-controls');\n\n    $actions.toggleClass('openWithin', $controls.hasClass('open'));\n  }\n\n  /**\n   * Get attributes for the post element.\n   */\n  elementAttrs(): Record<string, unknown> {\n    return {};\n  }\n\n  /**\n   * Get the post's content.\n   */\n  content(): Mithril.Children {\n    // TODO: [Flarum 2.0] return `null`\n    return [];\n  }\n\n  /**\n   * Get the post's classes.\n   */\n  classes(existing?: string): string[] {\n    let classes = (existing || '').split(' ').concat(['Post']);\n\n    const user = this.attrs.post.user();\n    const discussion = this.attrs.post.discussion();\n\n    if (this.loading) {\n      classes.push('Post--loading');\n    }\n\n    if (user && user === app.session.user) {\n      classes.push('Post--by-actor');\n    }\n\n    if (user && user === discussion.user()) {\n      classes.push('Post--by-start-user');\n    }\n\n    return classes;\n  }\n\n  /**\n   * Build an item list for the post's actions.\n   */\n  actionItems(): ItemList<Mithril.Children> {\n    return new ItemList();\n  }\n\n  /**\n   * Build an item list for the post's footer.\n   */\n  footerItems(): ItemList<ModdedChildrenWithItemName> {\n    return new ItemList<ModdedChildrenWithItemName>();\n  }\n}\n","import Badge, { IBadgeAttrs } from './Badge';\nimport Group from '../models/Group';\n\nexport interface IGroupAttrs extends IBadgeAttrs {\n  group?: Group;\n}\n\nexport default class GroupBadge<CustomAttrs extends IGroupAttrs = IGroupAttrs> extends Badge<CustomAttrs> {\n  static initAttrs(attrs: IGroupAttrs): void {\n    super.initAttrs(attrs);\n\n    if (attrs.group) {\n      attrs.icon = attrs.group.icon() || '';\n      attrs.color = attrs.group.color() || '';\n      attrs.label = typeof attrs.label === 'undefined' ? attrs.group.nameSingular() : attrs.label;\n      attrs.type = 'group--' + attrs.group.id();\n\n      delete attrs.group;\n    }\n  }\n}\n","import Model from '../Model';\n\nexport default class Group extends Model {\n  static ADMINISTRATOR_ID = '1';\n  static GUEST_ID = '2';\n  static MEMBER_ID = '3';\n\n  nameSingular() {\n    return Model.attribute<string>('nameSingular').call(this);\n  }\n  namePlural() {\n    return Model.attribute<string>('namePlural').call(this);\n  }\n\n  color() {\n    return Model.attribute<string | null>('color').call(this);\n  }\n  icon() {\n    return Model.attribute<string | null>('icon').call(this);\n  }\n\n  isHidden() {\n    return Model.attribute<boolean>('isHidden').call(this);\n  }\n}\n","import app from '../../common/app';\nimport Modal, { IInternalModalAttrs } from './Modal';\nimport Button from './Button';\nimport GroupBadge from './GroupBadge';\nimport Group from '../models/Group';\nimport extractText from '../utils/extractText';\nimport ItemList from '../utils/ItemList';\nimport Stream from '../utils/Stream';\nimport type Mithril from 'mithril';\nimport type User from '../models/User';\nimport type { SaveAttributes, SaveRelationships } from '../Model';\n\nexport interface IEditUserModalAttrs extends IInternalModalAttrs {\n  user: User;\n}\n\nexport default class EditUserModal<CustomAttrs extends IEditUserModalAttrs = IEditUserModalAttrs> extends Modal<CustomAttrs> {\n  protected username!: Stream<string>;\n  protected email!: Stream<string>;\n  protected isEmailConfirmed!: Stream<boolean>;\n  protected setPassword!: Stream<boolean>;\n  protected password!: Stream<string>;\n  protected groups: Record<string, Stream<boolean>> = {};\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    const user = this.attrs.user;\n\n    this.username = Stream(user.username() || '');\n    this.email = Stream(user.email() || '');\n    this.isEmailConfirmed = Stream(user.isEmailConfirmed() || false);\n    this.setPassword = Stream(false as boolean);\n    this.password = Stream(user.password() || '');\n\n    const userGroups = user.groups() || [];\n\n    app.store\n      .all<Group>('groups')\n      .filter((group) => ![Group.GUEST_ID, Group.MEMBER_ID].includes(group.id()!))\n      .forEach((group) => (this.groups[group.id()!] = Stream(userGroups.includes(group))));\n  }\n\n  className() {\n    return 'EditUserModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.lib.edit_user.title');\n  }\n\n  content() {\n    const fields = this.fields().toArray();\n    return (\n      <div className=\"Modal-body\">\n        {fields.length > 1 ? <div className=\"Form\">{this.fields().toArray()}</div> : app.translator.trans('core.lib.edit_user.nothing_available')}\n      </div>\n    );\n  }\n\n  fields() {\n    const items = new ItemList();\n\n    if (this.attrs.user.canEditCredentials()) {\n      items.add(\n        'username',\n        <div className=\"Form-group\">\n          <label>{app.translator.trans('core.lib.edit_user.username_heading')}</label>\n          <input\n            className=\"FormControl\"\n            placeholder={extractText(app.translator.trans('core.lib.edit_user.username_label'))}\n            bidi={this.username}\n            disabled={this.nonAdminEditingAdmin()}\n          />\n        </div>,\n        40\n      );\n\n      if (app.session.user !== this.attrs.user) {\n        items.add(\n          'email',\n          <div className=\"Form-group\">\n            <label>{app.translator.trans('core.lib.edit_user.email_heading')}</label>\n            <div>\n              <input\n                className=\"FormControl\"\n                placeholder={extractText(app.translator.trans('core.lib.edit_user.email_label'))}\n                bidi={this.email}\n                disabled={this.nonAdminEditingAdmin()}\n              />\n            </div>\n            {!this.isEmailConfirmed() && this.userIsAdmin(app.session.user) && (\n              <div>\n                <Button className=\"Button Button--block\" loading={this.loading} onclick={this.activate.bind(this)}>\n                  {app.translator.trans('core.lib.edit_user.activate_button')}\n                </Button>\n              </div>\n            )}\n          </div>,\n          30\n        );\n\n        items.add(\n          'password',\n          <div className=\"Form-group\">\n            <label>{app.translator.trans('core.lib.edit_user.password_heading')}</label>\n            <div>\n              <label className=\"checkbox\">\n                <input\n                  type=\"checkbox\"\n                  onchange={(e: KeyboardEvent) => {\n                    const target = e.target as HTMLInputElement;\n                    this.setPassword(target.checked);\n                    m.redraw.sync();\n                    if (target.checked) this.$('[name=password]').select();\n                    e.redraw = false;\n                  }}\n                  disabled={this.nonAdminEditingAdmin()}\n                />\n                {app.translator.trans('core.lib.edit_user.set_password_label')}\n              </label>\n              {this.setPassword() && (\n                <input\n                  className=\"FormControl\"\n                  type=\"password\"\n                  name=\"password\"\n                  placeholder={extractText(app.translator.trans('core.lib.edit_user.password_label'))}\n                  bidi={this.password}\n                  disabled={this.nonAdminEditingAdmin()}\n                />\n              )}\n            </div>\n          </div>,\n          20\n        );\n      }\n    }\n\n    if (this.attrs.user.canEditGroups()) {\n      items.add(\n        'groups',\n        <div className=\"Form-group EditUserModal-groups\">\n          <label>{app.translator.trans('core.lib.edit_user.groups_heading')}</label>\n          <div>\n            {Object.keys(this.groups)\n              .map((id) => app.store.getById<Group>('groups', id))\n              .filter(Boolean)\n              .map(\n                (group) =>\n                  // Necessary because filter(Boolean) doesn't narrow out falsy values.\n                  group && (\n                    <label className=\"checkbox\">\n                      <input\n                        type=\"checkbox\"\n                        bidi={this.groups[group.id()!]}\n                        disabled={\n                          group.id() === Group.ADMINISTRATOR_ID && (this.attrs.user === app.session.user || !this.userIsAdmin(app.session.user))\n                        }\n                      />\n                      <GroupBadge group={group} label={null} /> {group.nameSingular()}\n                    </label>\n                  )\n              )}\n          </div>\n        </div>,\n        10\n      );\n    }\n\n    items.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.lib.edit_user.submit_button')}\n        </Button>\n      </div>,\n      -10\n    );\n\n    return items;\n  }\n\n  activate() {\n    this.loading = true;\n    const data = {\n      username: this.username(),\n      isEmailConfirmed: true,\n    };\n    this.attrs.user\n      .save(data, { errorHandler: this.onerror.bind(this) })\n      .then(() => {\n        this.isEmailConfirmed(true);\n        this.loading = false;\n        m.redraw();\n      })\n      .catch(() => {\n        this.loading = false;\n        m.redraw();\n      });\n  }\n\n  data() {\n    const data: SaveAttributes = {};\n    const relationships: SaveRelationships = {};\n\n    if (this.attrs.user.canEditCredentials() && !this.nonAdminEditingAdmin()) {\n      data.username = this.username();\n\n      if (app.session.user !== this.attrs.user) {\n        data.email = this.email();\n      }\n\n      if (this.setPassword()) {\n        data.password = this.password();\n      }\n    }\n\n    if (this.attrs.user.canEditGroups()) {\n      relationships.groups = Object.keys(this.groups)\n        .filter((id) => this.groups[id]())\n        .map((id) => app.store.getById<Group>('groups', id))\n        .filter((g): g is Group => g instanceof Group);\n    }\n\n    data.relationships = relationships;\n\n    return data;\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    this.attrs.user\n      .save(this.data(), { errorHandler: this.onerror.bind(this) })\n      .then(this.hide.bind(this))\n      .catch(() => {\n        this.loading = false;\n        m.redraw();\n      });\n  }\n\n  nonAdminEditingAdmin(): boolean {\n    return this.userIsAdmin(this.attrs.user) && !this.userIsAdmin(app.session.user);\n  }\n\n  /**\n   * @internal\n   */\n  protected userIsAdmin(user: User | null): boolean {\n    return !!(user?.groups() || []).some((g) => g?.id() === Group.ADMINISTRATOR_ID);\n  }\n}\n","import Component from '../../common/Component';\n\n/**\n * The `AffixedSidebar` component uses Bootstrap's \"affix\" plugin to keep a\n * sidebar navigation at the top of the viewport when scrolling.\n *\n * ### Children\n *\n * The component must wrap an element that itself wraps an <ul> element, which\n * will be \"affixed\".\n *\n * @see https://getbootstrap.com/docs/3.4/javascript/#affix\n */\nexport default class AffixedSidebar extends Component {\n  view(vnode) {\n    return vnode.children[0];\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    // Register the affix plugin to execute on every window resize (and trigger)\n    this.boundOnresize = this.onresize.bind(this);\n    $(window).on('resize', this.boundOnresize).resize();\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    $(window).off('resize', this.boundOnresize);\n  }\n\n  onresize() {\n    const $sidebar = this.$();\n    const $header = $('#header');\n    const $footer = $('#footer');\n    const $affixElement = $sidebar.find('> ul');\n\n    $(window).off('.affix');\n    $affixElement.removeClass('affix affix-top affix-bottom').removeData('bs.affix');\n\n    // Don't affix the sidebar if it is taller than the viewport (otherwise\n    // there would be no way to scroll through its content).\n    if ($sidebar.outerHeight(true) > $(window).height() - $header.outerHeight(true)) return;\n\n    $affixElement.affix({\n      offset: {\n        top: () => $sidebar.offset().top - $header.outerHeight(true) - parseInt($sidebar.css('margin-top'), 10),\n        bottom: () => (this.bottom = $footer.outerHeight(true)),\n      },\n    });\n  }\n}\n","import app from '../../forum/app';\nimport Page, { IPageAttrs } from '../../common/components/Page';\nimport ItemList from '../../common/utils/ItemList';\nimport UserCard from './UserCard';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport SelectDropdown from '../../common/components/SelectDropdown';\nimport LinkButton from '../../common/components/LinkButton';\nimport Separator from '../../common/components/Separator';\nimport listItems from '../../common/helpers/listItems';\nimport AffixedSidebar from './AffixedSidebar';\nimport type User from '../../common/models/User';\nimport type Mithril from 'mithril';\n\nexport interface IUserPageAttrs extends IPageAttrs {}\n\n/**\n * The `UserPage` component shows a user's profile. It can be extended to show\n * content inside of the content area. See `ActivityPage` and `SettingsPage` for\n * examples.\n *\n * @abstract\n */\nexport default class UserPage<CustomAttrs extends IUserPageAttrs = IUserPageAttrs, CustomState = undefined> extends Page<CustomAttrs, CustomState> {\n  /**\n   * The user this page is for.\n   */\n  user: User | null = null;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.bodyClass = 'App--user';\n  }\n\n  /**\n   * Base view template for the user page.\n   */\n  view() {\n    return (\n      <div className=\"UserPage\">\n        {this.user\n          ? [\n              <UserCard\n                user={this.user}\n                className=\"Hero UserHero\"\n                editable={this.user.canEdit() || this.user === app.session.user}\n                controlsButtonClassName=\"Button\"\n              />,\n              <div className=\"container\">\n                <div className=\"sideNavContainer\">\n                  <AffixedSidebar>\n                    <nav className=\"sideNav UserPage-nav\">\n                      <ul>{listItems(this.sidebarItems().toArray())}</ul>\n                    </nav>\n                  </AffixedSidebar>\n                  <div className=\"sideNavOffset UserPage-content\">{this.content()}</div>\n                </div>\n              </div>,\n            ]\n          : [<LoadingIndicator display=\"block\" />]}\n      </div>\n    );\n  }\n\n  /**\n   * Get the content to display in the user page.\n   */\n  content(): Mithril.Children | void {}\n\n  /**\n   * Initialize the component with a user, and trigger the loading of their\n   * activity feed.\n   *\n   * @protected\n   */\n  show(user: User): void {\n    this.user = user;\n\n    app.current.set('user', user);\n\n    app.setTitle(user.displayName());\n\n    m.redraw();\n  }\n\n  /**\n   * Given a username, load the user's profile from the store, or make a request\n   * if we don't have it yet. Then initialize the profile page with that user.\n   */\n  loadUser(username: string) {\n    const lowercaseUsername = username.toLowerCase();\n\n    // Load the preloaded user object, if any, into the global app store\n    // We don't use the output of the method because it returns raw JSON\n    // instead of the parsed models\n    app.preloadedApiDocument();\n\n    app.store.all<User>('users').some((user) => {\n      if ((user.username().toLowerCase() === lowercaseUsername || user.id() === username) && user.joinTime()) {\n        this.show(user);\n        return true;\n      }\n\n      return false;\n    });\n\n    if (!this.user) {\n      app.store.find<User>('users', username, { bySlug: true }).then(this.show.bind(this));\n    }\n  }\n\n  /**\n   * Build an item list for the content of the sidebar.\n   */\n  sidebarItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'nav',\n      <SelectDropdown className=\"App-titleControl\" buttonClassName=\"Button\">\n        {this.navItems().toArray()}\n      </SelectDropdown>\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the navigation in the sidebar.\n   */\n  navItems() {\n    const items = new ItemList<Mithril.Children>();\n    const user = this.user!;\n    const isActor = app.session.user === user;\n\n    items.add(\n      'posts',\n      <LinkButton href={app.route('user.posts', { username: user.slug() })} icon=\"far fa-comment\">\n        {app.translator.trans('core.forum.user.posts_link')} <span className=\"Button-badge\">{user.commentCount()}</span>\n      </LinkButton>,\n      100\n    );\n\n    items.add(\n      'discussions',\n      <LinkButton href={app.route('user.discussions', { username: user.slug() })} icon=\"fas fa-bars\">\n        {app.translator.trans('core.forum.user.discussions_link')} <span className=\"Button-badge\">{user.discussionCount()}</span>\n      </LinkButton>,\n      90\n    );\n\n    if (isActor) {\n      items.add('separator', <Separator />, -90);\n      items.add(\n        'settings',\n        <LinkButton href={app.route('settings')} icon=\"fas fa-cog\">\n          {app.translator.trans('core.forum.user.settings_link')}\n        </LinkButton>,\n        -100\n      );\n    }\n\n    if (isActor || app.forum.attribute<boolean>('canModerateAccessTokens')) {\n      if (!isActor) {\n        items.add('security-separator', <Separator />, -90);\n      }\n\n      items.add(\n        'security',\n        <LinkButton href={app.route('user.security', { username: user.slug() })} icon=\"fas fa-shield-alt\">\n          {app.translator.trans('core.forum.user.security_link')}\n        </LinkButton>,\n        -100\n      );\n    }\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Button from '../../common/components/Button';\nimport Separator from '../../common/components/Separator';\nimport EditUserModal from '../../common/components/EditUserModal';\nimport UserPage from '../components/UserPage';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `UserControls` utility constructs a list of buttons for a user which\n * perform actions on it.\n */\nexport default {\n  /**\n   * Get a list of controls for a user.\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controls(user, context) {\n    const items = new ItemList();\n\n    ['user', 'moderation', 'destructive'].forEach((section) => {\n      const controls = this[section + 'Controls'](user, context).toArray();\n      if (controls.length) {\n        controls.forEach((item) => items.add(item.itemName, item));\n        items.add(section + 'Separator', <Separator />);\n      }\n    });\n\n    return items;\n  },\n\n  /**\n   * Get controls for a user pertaining to the current user (e.g. poke, follow).\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  userControls() {\n    return new ItemList();\n  },\n\n  /**\n   * Get controls for a user pertaining to moderation (e.g. suspend, edit).\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  moderationControls(user) {\n    const items = new ItemList();\n\n    if (user.canEdit() || user.canEditCredentials() || user.canEditGroups()) {\n      items.add(\n        'edit',\n        <Button icon=\"fas fa-pencil-alt\" onclick={this.editAction.bind(this, user)}>\n          {app.translator.trans('core.forum.user_controls.edit_button')}\n        </Button>\n      );\n    }\n\n    return items;\n  },\n\n  /**\n   * Get controls for a user which are destructive (e.g. delete).\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  destructiveControls(user) {\n    const items = new ItemList();\n\n    if (user.id() !== '1' && user.canDelete()) {\n      items.add(\n        'delete',\n        <Button icon=\"fas fa-times\" onclick={this.deleteAction.bind(this, user)}>\n          {app.translator.trans('core.forum.user_controls.delete_button')}\n        </Button>\n      );\n    }\n\n    return items;\n  },\n\n  /**\n   * Delete the user.\n   *\n   * @param {import('../../common/models/User').default} user\n   */\n  deleteAction(user) {\n    if (!confirm(app.translator.trans('core.forum.user_controls.delete_confirmation'))) {\n      return;\n    }\n\n    user\n      .delete()\n      .then(() => {\n        this.showDeletionAlert(user, 'success');\n        if (app.current.matches(UserPage, { user })) {\n          app.history.back();\n        } else {\n          window.location.reload();\n        }\n      })\n      .catch(() => this.showDeletionAlert(user, 'error'));\n  },\n\n  /**\n   * Show deletion alert of user.\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {string} type\n   */\n  showDeletionAlert(user, type) {\n    const message = {\n      success: 'core.forum.user_controls.delete_success_message',\n      error: 'core.forum.user_controls.delete_error_message',\n    }[type];\n\n    app.alerts.show(\n      { type },\n      app.translator.trans(message, {\n        user,\n        email: user.email(),\n      })\n    );\n  },\n\n  /**\n   * Edit the user.\n   *\n   * @param {import('../../common/models/User').default} user\n   */\n  editAction(user) {\n    app.modal.show(EditUserModal, { user });\n  },\n};\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport avatar from '../../common/helpers/avatar';\nimport icon from '../../common/helpers/icon';\nimport listItems from '../../common/helpers/listItems';\nimport ItemList from '../../common/utils/ItemList';\nimport classList from '../../common/utils/classList';\nimport Button from '../../common/components/Button';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\n\n/**\n * The `AvatarEditor` component displays a user's avatar along with a dropdown\n * menu which allows the user to upload/remove the avatar.\n *\n * ### Attrs\n *\n * - `className`\n * - `user`\n */\nexport default class AvatarEditor extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * Whether or not an avatar upload is in progress.\n     *\n     * @type {Boolean}\n     */\n    this.loading = false;\n\n    /**\n     * Whether or not an image has been dragged over the dropzone.\n     *\n     * @type {Boolean}\n     */\n    this.isDraggedOver = false;\n  }\n\n  view() {\n    const user = this.attrs.user;\n\n    return (\n      <div className={classList(['AvatarEditor', 'Dropdown', this.attrs.className, this.loading && 'loading', this.isDraggedOver && 'dragover'])}>\n        {avatar(user, { loading: 'eager' })}\n        <a\n          className={user.avatarUrl() ? 'Dropdown-toggle' : 'Dropdown-toggle AvatarEditor--noAvatar'}\n          title={app.translator.trans('core.forum.user.avatar_upload_tooltip')}\n          data-toggle=\"dropdown\"\n          onclick={this.quickUpload.bind(this)}\n          ondragover={this.enableDragover.bind(this)}\n          ondragenter={this.enableDragover.bind(this)}\n          ondragleave={this.disableDragover.bind(this)}\n          ondragend={this.disableDragover.bind(this)}\n          ondrop={this.dropUpload.bind(this)}\n        >\n          {this.loading ? (\n            <LoadingIndicator display=\"unset\" size=\"large\" />\n          ) : user.avatarUrl() ? (\n            icon('fas fa-pencil-alt')\n          ) : (\n            icon('fas fa-plus-circle')\n          )}\n        </a>\n        <ul className=\"Dropdown-menu Menu\">{listItems(this.controlItems().toArray())}</ul>\n      </div>\n    );\n  }\n\n  /**\n   * Get the items in the edit avatar dropdown menu.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controlItems() {\n    const items = new ItemList();\n\n    items.add(\n      'upload',\n      <Button icon=\"fas fa-upload\" onclick={this.openPicker.bind(this)}>\n        {app.translator.trans('core.forum.user.avatar_upload_button')}\n      </Button>\n    );\n\n    items.add(\n      'remove',\n      <Button icon=\"fas fa-times\" onclick={this.remove.bind(this)}>\n        {app.translator.trans('core.forum.user.avatar_remove_button')}\n      </Button>\n    );\n\n    return items;\n  }\n\n  /**\n   * Enable dragover style\n   *\n   * @param {DragEvent} e\n   */\n  enableDragover(e) {\n    e.preventDefault();\n    e.stopPropagation();\n    this.isDraggedOver = true;\n  }\n\n  /**\n   * Disable dragover style\n   *\n   * @param {DragEvent} e\n   */\n  disableDragover(e) {\n    e.preventDefault();\n    e.stopPropagation();\n    this.isDraggedOver = false;\n  }\n\n  /**\n   * Upload avatar when file is dropped into dropzone.\n   *\n   * @param {DragEvent} e\n   */\n  dropUpload(e) {\n    e.preventDefault();\n    e.stopPropagation();\n    this.isDraggedOver = false;\n    this.upload(e.dataTransfer.files[0]);\n  }\n\n  /**\n   * If the user doesn't have an avatar, there's no point in showing the\n   * controls dropdown, because only one option would be viable: uploading.\n   * Thus, when the avatar editor's dropdown toggle button is clicked, we prompt\n   * the user to upload an avatar immediately.\n   *\n   * @param {MouseEvent} e\n   */\n  quickUpload(e) {\n    if (!this.attrs.user.avatarUrl()) {\n      e.preventDefault();\n      e.stopPropagation();\n      this.openPicker();\n    }\n  }\n\n  /**\n   * Upload avatar using file picker\n   */\n  openPicker() {\n    if (this.loading) return;\n\n    // Create a hidden HTML input element and click on it so the user can select\n    // an avatar file. Once they have, we will upload it via the API.\n    const $input = $('<input type=\"file\" accept=\".jpg, .jpeg, .png, .bmp, .gif\">');\n\n    $input\n      .appendTo('body')\n      .hide()\n      .click()\n      .on('input', (e) => {\n        this.upload($(e.target)[0].files[0]);\n      });\n  }\n\n  /**\n   * Upload avatar\n   *\n   * @param {File} file\n   */\n  upload(file) {\n    if (this.loading) return;\n\n    const user = this.attrs.user;\n    const data = new FormData();\n    data.append('avatar', file);\n\n    this.loading = true;\n    m.redraw();\n\n    app\n      .request({\n        method: 'POST',\n        url: `${app.forum.attribute('apiUrl')}/users/${user.id()}/avatar`,\n        serialize: (raw) => raw,\n        body: data,\n      })\n      .then(this.success.bind(this), this.failure.bind(this));\n  }\n\n  /**\n   * Remove the user's avatar.\n   */\n  remove() {\n    const user = this.attrs.user;\n\n    this.loading = true;\n    m.redraw();\n\n    app\n      .request({\n        method: 'DELETE',\n        url: `${app.forum.attribute('apiUrl')}/users/${user.id()}/avatar`,\n      })\n      .then(this.success.bind(this), this.failure.bind(this));\n  }\n\n  /**\n   * After a successful upload/removal, push the updated user data into the\n   * store, and force a re-computation of the user's avatar color.\n   *\n   * @param {object} response\n   * @protected\n   */\n  success(response) {\n    app.store.pushPayload(response);\n    delete this.attrs.user.avatarColor;\n\n    this.loading = false;\n    m.redraw();\n  }\n\n  /**\n   * If avatar upload/removal fails, stop loading.\n   *\n   * @param {object} response\n   * @protected\n   */\n  failure(response) {\n    this.loading = false;\n    m.redraw();\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport humanTime from '../../common/utils/humanTime';\nimport ItemList from '../../common/utils/ItemList';\nimport UserControls from '../utils/UserControls';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport icon from '../../common/helpers/icon';\nimport Dropdown from '../../common/components/Dropdown';\nimport Link from '../../common/components/Link';\nimport AvatarEditor from './AvatarEditor';\nimport listItems from '../../common/helpers/listItems';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `UserCard` component displays a user's profile card. This is used both on\n * the `UserPage` (in the hero) and in discussions, shown when hovering over a\n * post author.\n *\n * ### Attrs\n *\n * - `user`\n * - `className`\n * - `editable`\n * - `controlsButtonClassName`\n */\nexport default class UserCard extends Component {\n  view() {\n    const user = this.attrs.user;\n    const controls = UserControls.controls(user, this).toArray();\n    const color = user.color();\n    const badges = user.badges().toArray();\n\n    return (\n      <div className={classList('UserCard', this.attrs.className)} style={color && { '--usercard-bg': color }}>\n        <div className=\"darkenBackground\">\n          <div className=\"container\">\n            {!!controls.length && (\n              <Dropdown\n                className=\"UserCard-controls App-primaryControl\"\n                menuClassName=\"Dropdown-menu--right\"\n                buttonClassName={this.attrs.controlsButtonClassName}\n                label={app.translator.trans('core.forum.user_controls.button')}\n                accessibleToggleLabel={app.translator.trans('core.forum.user_controls.toggle_dropdown_accessible_label')}\n                icon=\"fas fa-ellipsis-v\"\n              >\n                {controls}\n              </Dropdown>\n            )}\n\n            <div className=\"UserCard-profile\">\n              <h1 className=\"UserCard-identity\">\n                {this.attrs.editable ? (\n                  <>\n                    <AvatarEditor user={user} className=\"UserCard-avatar\" /> {username(user)}\n                  </>\n                ) : (\n                  <Link href={app.route.user(user)}>\n                    <div className=\"UserCard-avatar\">{avatar(user, { loading: 'eager' })}</div>\n                    {username(user)}\n                  </Link>\n                )}\n              </h1>\n\n              {!!badges.length && <ul className=\"UserCard-badges badges\">{listItems(badges)}</ul>}\n\n              <ul className=\"UserCard-info\">{listItems(this.infoItems().toArray())}</ul>\n            </div>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  /**\n   * Build an item list of tidbits of info to show on this user's profile.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  infoItems() {\n    const items = new ItemList();\n    const user = this.attrs.user;\n    const lastSeenAt = user.lastSeenAt();\n\n    if (lastSeenAt) {\n      const online = user.isOnline();\n\n      items.add(\n        'lastSeen',\n        <span className={classList('UserCard-lastSeen', { online })}>\n          {online\n            ? [icon('fas fa-circle'), ' ', app.translator.trans('core.forum.user.online_text')]\n            : [icon('far fa-clock'), ' ', humanTime(lastSeenAt)]}\n        </span>,\n        100\n      );\n    }\n\n    items.add('joined', app.translator.trans('core.forum.user.joined_date_text', { ago: humanTime(user.joinTime()) }), 90);\n\n    return items;\n  }\n}\n","import type Mithril from 'mithril';\nimport User from '../models/User';\nimport icon from './icon';\n\n/**\n * The `useronline` helper displays a green circle if the user is online.\n */\nexport default function userOnline(user: User): Mithril.Vnode<{}, {}> | null {\n  if (user.lastSeenAt() && user.isOnline()) {\n    return <span className=\"UserOnline\">{icon('fas fa-circle')}</span>;\n  }\n\n  return null;\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport Link from '../../common/components/Link';\nimport UserCard from './UserCard';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport userOnline from '../../common/helpers/userOnline';\nimport listItems from '../../common/helpers/listItems';\n\n/**\n * The `PostUser` component shows the avatar and username of a post's author.\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class PostUser extends Component {\n  view() {\n    const post = this.attrs.post;\n    const user = post.user();\n\n    if (!user) {\n      return (\n        <div className=\"PostUser\">\n          <h3 className=\"PostUser-name\">\n            {avatar(user, { className: 'PostUser-avatar' })} {username(user)}\n          </h3>\n        </div>\n      );\n    }\n\n    return (\n      <div className=\"PostUser\">\n        <h3 className=\"PostUser-name\">\n          <Link href={app.route.user(user)}>\n            {avatar(user, { className: 'PostUser-avatar' })}\n            {userOnline(user)}\n            {username(user)}\n          </Link>\n        </h3>\n        <ul className=\"PostUser-badges badges\">{listItems(user.badges().toArray())}</ul>\n\n        {!post.isHidden() && this.attrs.cardVisible && (\n          <UserCard user={user} className=\"UserCard--popover\" controlsButtonClassName=\"Button Button--icon Button--flat\" />\n        )}\n      </div>\n    );\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    let timeout;\n\n    this.$()\n      .on('mouseover', '.PostUser-name a, .UserCard', () => {\n        clearTimeout(timeout);\n        timeout = setTimeout(this.showCard.bind(this), 500);\n      })\n      .on('mouseout', '.PostUser-name a, .UserCard', () => {\n        clearTimeout(timeout);\n        timeout = setTimeout(this.hideCard.bind(this), 250);\n      });\n  }\n\n  /**\n   * Show the user card.\n   */\n  showCard() {\n    this.attrs.oncardshow();\n\n    setTimeout(() => this.$('.UserCard').addClass('in'));\n  }\n\n  /**\n   * Hide the user card.\n   */\n  hideCard() {\n    this.$('.UserCard')\n      .removeClass('in')\n      .one('transitionend webkitTransitionEnd oTransitionEnd', () => {\n        this.attrs.oncardhide();\n      });\n  }\n}\n","import dayjs from 'dayjs';\nimport type Mithril from 'mithril';\n\n/**\n * The `fullTime` helper displays a formatted time string wrapped in a <time>\n * tag.\n */\nexport default function fullTime(time: Date): Mithril.Vnode {\n  const d = dayjs(time);\n\n  const datetime = d.format();\n  const full = d.format('LLLL');\n\n  return (\n    <time pubdate datetime={datetime}>\n      {full}\n    </time>\n  );\n}\n","import Component, { ComponentAttrs } from '../Component';\nimport type Mithril from 'mithril';\nimport ItemList from '../utils/ItemList';\n\nexport interface IIPAddressAttrs extends ComponentAttrs {\n  ip: string | undefined | null;\n}\n\n/**\n * A component to wrap an IP address for display.\n * Designed to be customizable for different use cases.\n *\n * @example\n * <IPAddress ip=\"127.0.0.1\" />\n * @example\n * <IPAddress ip={post.data.attributes.ipAddress} />\n */\nexport default class IPAddress<CustomAttrs extends IIPAddressAttrs = IIPAddressAttrs> extends Component<CustomAttrs> {\n  ip!: string;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.ip = this.attrs.ip || '';\n  }\n\n  view() {\n    return <span className=\"IPAddress\">{this.viewItems().toArray()}</span>;\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('ip', <span>{this.ip}</span>, 100);\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport humanTime from '../../common/helpers/humanTime';\nimport fullTime from '../../common/helpers/fullTime';\nimport ItemList from '../../common/utils/ItemList';\nimport IPAddress from '../../common/components/IPAddress';\n\n/**\n * The `PostMeta` component displays the time of a post, and when clicked, shows\n * a dropdown containing more information about the post (number, full time,\n * permalink).\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class PostMeta extends Component {\n  view() {\n    return <div className=\"Dropdown PostMeta\">{this.viewItems().toArray()}</div>;\n  }\n\n  /**\n   * Get the permalink for the given post.\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @returns {string}\n   */\n  getPermalink(post) {\n    return app.forum.attribute('baseOrigin') + app.route.post(post);\n  }\n\n  /**\n   * When the dropdown menu is shown, select the contents of the permalink\n   * input so that the user can quickly copy the URL.\n   * @param {Event} e\n   */\n  selectPermalink(e) {\n    setTimeout(() => $(this.element).parent().find('.PostMeta-permalink').select());\n\n    e.redraw = false;\n  }\n\n  /**\n   * @returns {ItemList}\n   */\n  viewItems() {\n    const items = new ItemList();\n    const post = this.attrs.post;\n    const time = post.createdAt();\n\n    items.add(\n      'time',\n      <a className=\"Dropdown-toggle\" onclick={(e) => this.selectPermalink(e)} data-toggle=\"dropdown\">\n        {humanTime(time)}\n      </a>,\n      100\n    );\n\n    items.add('meta-dropdown', <div className=\"Dropdown-menu dropdown-menu\">{this.metaItems().toArray()}</div>, 90);\n\n    return items;\n  }\n\n  /**\n   * @returns {ItemList}\n   */\n  metaItems() {\n    const items = new ItemList();\n    const post = this.attrs.post;\n    const touch = 'ontouchstart' in document.documentElement;\n    const permalink = this.getPermalink(post);\n    const time = post.createdAt();\n\n    items.add(\n      'post-number',\n      <span className=\"PostMeta-number\">{app.translator.trans('core.forum.post.number_tooltip', { number: post.number() })} </span>,\n      100\n    );\n\n    items.add('post-time', <span className=\"PostMeta-time\">{fullTime(time)}</span>, 90);\n\n    items.add(\n      'post-ip',\n      <span className=\"PostMeta-ip\">\n        <IPAddress ip={post.data.attributes.ipAddress} />\n      </span>,\n      80\n    );\n\n    items.add(\n      'permalink',\n      touch ? (\n        <a className=\"Button PostMeta-permalink\" href={permalink}>\n          {permalink}\n        </a>\n      ) : (\n        <input className=\"FormControl PostMeta-permalink\" value={permalink} onclick={(e) => e.stopPropagation()} />\n      ),\n      0\n    );\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport humanTime from '../../common/utils/humanTime';\nimport Tooltip from '../../common/components/Tooltip';\n\n/**\n * The `PostEdited` component displays information about when and by whom a post\n * was edited.\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class PostEdited extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n  }\n\n  view() {\n    const post = this.attrs.post;\n    const editedUser = post.editedUser();\n    const editedInfo = app.translator.trans('core.forum.post.edited_tooltip', { user: editedUser, ago: humanTime(post.editedAt()) });\n\n    return (\n      <Tooltip text={editedInfo}>\n        <span className=\"PostEdited\">{app.translator.trans('core.forum.post.edited_text')}</span>\n      </Tooltip>\n    );\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n  }\n}\n","import app from '../../forum/app';\nimport Post from './Post';\nimport classList from '../../common/utils/classList';\nimport PostUser from './PostUser';\nimport PostMeta from './PostMeta';\nimport PostEdited from './PostEdited';\nimport EditPostComposer from './EditPostComposer';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\nimport Button from '../../common/components/Button';\nimport ComposerPostPreview from './ComposerPostPreview';\n\n/**\n * The `CommentPost` component displays a standard `comment`-typed post. This\n * includes a number of item lists (controls, header, and footer) surrounding\n * the post's HTML content.\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class CommentPost extends Post {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * If the post has been hidden, then this flag determines whether or not its\n     * content has been expanded.\n     *\n     * @type {Boolean}\n     */\n    this.revealContent = false;\n\n    /**\n     * Whether or not the user hover card inside of PostUser is visible.\n     * The property must be managed in CommentPost to be able to use it in the subtree check\n     *\n     * @type {Boolean}\n     */\n    this.cardVisible = false;\n\n    this.subtree.check(\n      () => this.cardVisible,\n      () => this.isEditing(),\n      () => this.revealContent\n    );\n  }\n\n  content() {\n    return super.content().concat(this.contentItems().toArray());\n  }\n\n  contentItems() {\n    const items = new ItemList();\n\n    items.add(\n      'header',\n      <header className=\"Post-header\">\n        <ul>{listItems(this.headerItems().toArray())}</ul>\n      </header>,\n      100\n    );\n\n    items.add('body', <div className=\"Post-body\">{this.bodyItems().toArray()}</div>, 90);\n\n    return items;\n  }\n\n  bodyItems() {\n    const items = new ItemList();\n\n    items.add(\n      'content',\n      this.isEditing() ? <ComposerPostPreview className=\"Post-preview\" composer={app.composer} /> : m.trust(this.attrs.post.contentHtml()),\n      100\n    );\n\n    return items;\n  }\n\n  refreshContent() {\n    const contentHtml = this.isEditing() ? '' : this.attrs.post.contentHtml();\n\n    // If the post content has changed since the last render, we'll run through\n    // all of the <script> tags in the content and evaluate them. This is\n    // necessary because TextFormatter outputs them for e.g. syntax highlighting.\n    if (this.contentHtml !== contentHtml) {\n      this.$('.Post-body script').each(function () {\n        const script = document.createElement('script');\n        script.textContent = this.textContent;\n        Array.from(this.attributes).forEach((attr) => script.setAttribute(attr.name, attr.value));\n        this.parentNode.replaceChild(script, this);\n      });\n    }\n\n    this.contentHtml = contentHtml;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.refreshContent();\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    this.refreshContent();\n  }\n\n  isEditing() {\n    return app.composer.bodyMatches(EditPostComposer, { post: this.attrs.post });\n  }\n\n  elementAttrs() {\n    const post = this.attrs.post;\n    const attrs = super.elementAttrs();\n\n    attrs.className = classList(attrs.className, 'CommentPost', {\n      'Post--renderFailed': post.renderFailed(),\n      'Post--hidden': post.isHidden(),\n      'Post--edited': post.isEdited(),\n      revealContent: this.revealContent,\n      editing: this.isEditing(),\n    });\n\n    if (this.isEditing()) attrs['aria-busy'] = 'true';\n\n    return attrs;\n  }\n\n  /**\n   * Toggle the visibility of a hidden post's content.\n   */\n  toggleContent() {\n    this.revealContent = !this.revealContent;\n  }\n\n  /**\n   * Build an item list for the post's header.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  headerItems() {\n    const items = new ItemList();\n    const post = this.attrs.post;\n\n    items.add(\n      'user',\n      <PostUser\n        post={post}\n        cardVisible={this.cardVisible}\n        oncardshow={() => {\n          this.cardVisible = true;\n          m.redraw();\n        }}\n        oncardhide={() => {\n          this.cardVisible = false;\n          m.redraw();\n        }}\n      />,\n      100\n    );\n    items.add('meta', <PostMeta post={post} />);\n\n    if (post.isEdited() && !post.isHidden()) {\n      items.add('edited', <PostEdited post={post} />);\n    }\n\n    // If the post is hidden, add a button that allows toggling the visibility\n    // of the post's content.\n    if (post.isHidden()) {\n      items.add(\n        'toggle',\n        <Button className=\"Button Button--default Button--more\" icon=\"fas fa-ellipsis-h\" onclick={this.toggleContent.bind(this)} />\n      );\n    }\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Post from './Post';\nimport { ucfirst } from '../../common/utils/string';\nimport usernameHelper from '../../common/helpers/username';\nimport icon from '../../common/helpers/icon';\nimport Link from '../../common/components/Link';\nimport humanTime from '../../common/helpers/humanTime';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `EventPost` component displays a post which indicating a discussion\n * event, like a discussion being renamed or stickied. Subclasses must implement\n * the `icon` and `description` methods.\n *\n * ### Attrs\n *\n * - All of the attrs for `Post`\n *\n * @abstract\n */\nexport default class EventPost extends Post {\n  elementAttrs() {\n    const attrs = super.elementAttrs();\n\n    attrs.className = classList(attrs.className, 'EventPost', ucfirst(this.attrs.post.contentType()) + 'Post');\n\n    return attrs;\n  }\n\n  content() {\n    const user = this.attrs.post.user();\n    const username = usernameHelper(user);\n    const data = Object.assign(this.descriptionData(), {\n      user,\n      username: user ? (\n        <Link className=\"EventPost-user\" href={app.route.user(user)}>\n          {username}\n        </Link>\n      ) : (\n        username\n      ),\n      time: humanTime(this.attrs.post.createdAt()),\n    });\n\n    return super\n      .content()\n      .concat([icon(this.icon(), { className: 'EventPost-icon' }), <div className=\"EventPost-info\">{this.description(data)}</div>]);\n  }\n\n  /**\n   * Get the name of the event icon.\n   *\n   * @return {string}\n   */\n  icon() {\n    return '';\n  }\n\n  /**\n   * Get the description text for the event.\n   *\n   * @param {Record<string, unknown>} data\n   * @return {import('mithril').Children} The description to render in the DOM\n   */\n  description(data) {\n    return app.translator.trans(this.descriptionKey(), data);\n  }\n\n  /**\n   * Get the translation key for the description of the event.\n   *\n   * @return {string}\n   */\n  descriptionKey() {\n    return '';\n  }\n\n  /**\n   * Get the translation data for the description of the event.\n   *\n   * @return {Record<string, unknown>}\n   */\n  descriptionData() {\n    return {};\n  }\n}\n","import app from '../../forum/app';\nimport EventPost from './EventPost';\nimport extractText from '../../common/utils/extractText';\nimport Tooltip from '../../common/components/Tooltip';\n\n/**\n * The `DiscussionRenamedPost` component displays a discussion event post\n * indicating that the discussion has been renamed.\n *\n * ### Attrs\n *\n * - All of the attrs for EventPost\n */\nexport default class DiscussionRenamedPost extends EventPost {\n  icon() {\n    return 'fas fa-pencil-alt';\n  }\n\n  description(data) {\n    const renamed = app.translator.trans('core.forum.post_stream.discussion_renamed_text', data);\n\n    return <span>{renamed}</span>;\n  }\n\n  descriptionData() {\n    const post = this.attrs.post;\n    const oldTitle = post.content()[0];\n    const newTitle = post.content()[1];\n\n    return {\n      new: (\n        <Tooltip text={extractText(app.translator.trans('core.forum.post_stream.discussion_renamed_old_tooltip', { old: oldTitle }))}>\n          <strong className=\"DiscussionRenamedPost-new\">{newTitle}</strong>\n        </Tooltip>\n      ),\n    };\n  }\n}\n","import app from '../app';\nimport Component from '../../common/Component';\nimport Button from '../../common/components/Button';\nimport type Mithril from 'mithril';\nimport ItemList from '../../common/utils/ItemList';\n\nexport interface IWelcomeHeroAttrs {}\n\nconst LOCAL_STORAGE_KEY = 'welcomeHidden';\n\n/**\n * The `WelcomeHero` component displays a hero that welcomes the user to the\n * forum.\n */\nexport default class WelcomeHero extends Component<IWelcomeHeroAttrs> {\n  /**\n   * @deprecated Extend the `isHidden` method instead.\n   */\n  hidden: boolean = false;\n\n  oninit(vnode: Mithril.Vnode<IWelcomeHeroAttrs, this>) {\n    super.oninit(vnode);\n  }\n\n  view(vnode: Mithril.Vnode<IWelcomeHeroAttrs, this>) {\n    if (this.isHidden()) return null;\n\n    return (\n      <header className=\"Hero WelcomeHero\">\n        <div className=\"container\">{this.viewItems().toArray()}</div>\n      </header>\n    );\n  }\n\n  /**\n   * Hide the welcome hero.\n   */\n  hide() {\n    localStorage.setItem(LOCAL_STORAGE_KEY, 'true');\n  }\n\n  /**\n   * Determines whether the welcome hero should be hidden.\n   *\n   * @returns if the welcome hero is hidden.\n   */\n  isHidden(): boolean {\n    if (!app.forum.attribute<string>('welcomeTitle')?.trim()) return true;\n    if (localStorage.getItem(LOCAL_STORAGE_KEY)) return true;\n    if (this.hidden) return true;\n\n    return false;\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    const slideUp = () => {\n      this.$().slideUp(this.hide.bind(this));\n    };\n\n    items.add(\n      'dismiss-button',\n      <Button\n        icon=\"fas fa-times\"\n        onclick={slideUp}\n        className=\"Hero-close Button Button--icon Button--link\"\n        aria-label={app.translator.trans('core.forum.welcome_hero.hide')}\n      />,\n      100\n    );\n\n    items.add('content', <div className=\"containerNarrow\">{this.contentItems().toArray()}</div>, 80);\n\n    return items;\n  }\n\n  contentItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('title', <h1 className=\"Hero-title\">{app.forum.attribute('welcomeTitle')}</h1>, 100);\n\n    items.add('subtitle', <div className=\"Hero-subtitle\">{m.trust(app.forum.attribute('welcomeMessage'))}</div>);\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport ComposerBody from './ComposerBody';\nimport extractText from '../../common/utils/extractText';\nimport Stream from '../../common/utils/Stream';\n\n/**\n * The `DiscussionComposer` component displays the composer content for starting\n * a new discussion. It adds a text field as a header control so the user can\n * enter the title of their discussion. It also overrides the `submit` and\n * `willExit` actions to account for the title.\n *\n * ### Attrs\n *\n * - All of the attrs for ComposerBody\n * - `titlePlaceholder`\n */\nexport default class DiscussionComposer extends ComposerBody {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.placeholder = attrs.placeholder || extractText(app.translator.trans('core.forum.composer_discussion.body_placeholder'));\n    attrs.submitLabel = attrs.submitLabel || app.translator.trans('core.forum.composer_discussion.submit_button');\n    attrs.confirmExit = attrs.confirmExit || extractText(app.translator.trans('core.forum.composer_discussion.discard_confirmation'));\n    attrs.titlePlaceholder = attrs.titlePlaceholder || extractText(app.translator.trans('core.forum.composer_discussion.title_placeholder'));\n    attrs.className = 'ComposerBody--discussion';\n  }\n\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.composer.fields.title = this.composer.fields.title || Stream('');\n\n    /**\n     * The value of the title input.\n     *\n     * @type {Function}\n     */\n    this.title = this.composer.fields.title;\n  }\n\n  headerItems() {\n    const items = super.headerItems();\n\n    items.add('title', <h3>{app.translator.trans('core.forum.composer_discussion.title')}</h3>, 100);\n\n    items.add(\n      'discussionTitle',\n      <h3>\n        <input\n          className=\"FormControl\"\n          bidi={this.title}\n          placeholder={this.attrs.titlePlaceholder}\n          disabled={!!this.attrs.disabled}\n          onkeydown={this.onkeydown.bind(this)}\n        />\n      </h3>\n    );\n\n    return items;\n  }\n\n  /**\n   * Handle the title input's keydown event. When the return key is pressed,\n   * move the focus to the start of the text editor.\n   *\n   * @param {KeyboardEvent} e\n   */\n  onkeydown(e) {\n    if (e.which === 13) {\n      // Return\n      e.preventDefault();\n      this.composer.editor.moveCursorTo(0);\n    }\n\n    e.redraw = false;\n  }\n\n  hasChanges() {\n    return this.title() || this.composer.fields.content();\n  }\n\n  /**\n   * Get the data to submit to the server when the discussion is saved.\n   *\n   * @return {Record<string, unknown>}\n   */\n  data() {\n    return {\n      title: this.title(),\n      content: this.composer.fields.content(),\n    };\n  }\n\n  onsubmit() {\n    this.loading = true;\n\n    const data = this.data();\n\n    app.store\n      .createRecord('discussions')\n      .save(data)\n      .then((discussion) => {\n        this.composer.hide();\n        app.discussions.refresh();\n        m.route.set(app.route.discussion(discussion));\n      }, this.loaded.bind(this));\n  }\n}\n","import app from '../../forum/app';\nimport Page, { IPageAttrs } from '../../common/components/Page';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\nimport DiscussionList from './DiscussionList';\nimport WelcomeHero from './WelcomeHero';\nimport DiscussionComposer from './DiscussionComposer';\nimport LogInModal from './LogInModal';\nimport DiscussionPage from './DiscussionPage';\nimport Dropdown from '../../common/components/Dropdown';\nimport Button from '../../common/components/Button';\nimport LinkButton from '../../common/components/LinkButton';\nimport SelectDropdown from '../../common/components/SelectDropdown';\nimport extractText from '../../common/utils/extractText';\nimport type Mithril from 'mithril';\nimport type Discussion from '../../common/models/Discussion';\n\nexport interface IIndexPageAttrs extends IPageAttrs {}\n\n/**\n * The `IndexPage` component displays the index page, including the welcome\n * hero, the sidebar, and the discussion list.\n */\nexport default class IndexPage<CustomAttrs extends IIndexPageAttrs = IIndexPageAttrs, CustomState = {}> extends Page<CustomAttrs, CustomState> {\n  static providesInitialSearch = true;\n  lastDiscussion?: Discussion;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    // If the user is returning from a discussion page, then take note of which\n    // discussion they have just visited. After the view is rendered, we will\n    // scroll down so that this discussion is in view.\n    if (app.previous.matches(DiscussionPage)) {\n      this.lastDiscussion = app.previous.get('discussion');\n    }\n\n    // If the user is coming from the discussion list, then they have either\n    // just switched one of the parameters (filter, sort, search) or they\n    // probably want to refresh the results. We will clear the discussion list\n    // cache so that results are reloaded.\n    if (app.previous.matches(IndexPage)) {\n      app.discussions.clear();\n    }\n\n    app.discussions.refreshParams(app.search.params(), (m.route.param('page') && Number(m.route.param('page'))) || 1);\n\n    app.history.push('index', extractText(app.translator.trans('core.forum.header.back_to_index_tooltip')));\n\n    this.bodyClass = 'App--index';\n    this.scrollTopOnCreate = false;\n  }\n\n  view() {\n    return (\n      <div className=\"IndexPage\">\n        {this.hero()}\n        <div className=\"container\">\n          <div className=\"sideNavContainer\">\n            <nav className=\"IndexPage-nav sideNav\">\n              <ul>{listItems(this.sidebarItems().toArray())}</ul>\n            </nav>\n            <div className=\"IndexPage-results sideNavOffset\">{this.contentItems().toArray()}</div>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  contentItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('toolbar', <div className=\"IndexPage-toolbar\">{this.toolbarItems().toArray()}</div>, 100);\n    items.add('discussionList', <DiscussionList state={app.discussions} />, 90);\n\n    return items;\n  }\n\n  toolbarItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('view', <ul className=\"IndexPage-toolbar-view\">{listItems(this.viewItems().toArray())}</ul>, 100);\n    items.add('action', <ul className=\"IndexPage-toolbar-action\">{listItems(this.actionItems().toArray())}</ul>, 90);\n\n    return items;\n  }\n\n  setTitle() {\n    app.setTitle(extractText(app.translator.trans('core.forum.index.meta_title_text')));\n    app.setTitleCount(0);\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    this.setTitle();\n\n    // Work out the difference between the height of this hero and that of the\n    // previous hero. Maintain the same scroll position relative to the bottom\n    // of the hero so that the sidebar doesn't jump around.\n    const oldHeroHeight = app.cache.heroHeight as number;\n    const heroHeight = (app.cache.heroHeight = this.$('.Hero').outerHeight() || 0);\n    const scrollTop = app.cache.scrollTop as number;\n\n    $('#app').css('min-height', ($(window).height() || 0) + heroHeight);\n\n    // Let browser handle scrolling on page reload.\n    if (app.previous.type == null) return;\n\n    // Only retain scroll position if we're coming from a discussion page.\n    // Otherwise, we've just changed the filter, so we should go to the top of the page.\n    if (this.lastDiscussion) {\n      $(window).scrollTop(scrollTop - oldHeroHeight + heroHeight);\n    } else {\n      $(window).scrollTop(0);\n    }\n\n    // If we've just returned from a discussion page, then the constructor will\n    // have set the `lastDiscussion` property. If this is the case, we want to\n    // scroll down to that discussion so that it's in view.\n    if (this.lastDiscussion) {\n      const $discussion = this.$(`li[data-id=\"${this.lastDiscussion.id()}\"] .DiscussionListItem`);\n\n      if ($discussion.length) {\n        const indexTop = $('#header').outerHeight() || 0;\n        const indexBottom = $(window).height() || 0;\n        const discussionOffset = $discussion.offset();\n        const discussionTop = (discussionOffset && discussionOffset.top) || 0;\n        const discussionBottom = discussionTop + ($discussion.outerHeight() || 0);\n\n        if (discussionTop < scrollTop + indexTop || discussionBottom > scrollTop + indexBottom) {\n          $(window).scrollTop(discussionTop - indexTop);\n        }\n      }\n    }\n  }\n\n  onbeforeremove(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onbeforeremove(vnode);\n\n    // Save the scroll position so we can restore it when we return to the\n    // discussion list.\n    app.cache.scrollTop = $(window).scrollTop();\n  }\n\n  onremove(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onremove(vnode);\n\n    $('#app').css('min-height', '');\n  }\n\n  /**\n   * Get the component to display as the hero.\n   */\n  hero() {\n    return <WelcomeHero />;\n  }\n\n  /**\n   * Build an item list for the sidebar of the index page. By default this is a\n   * \"New Discussion\" button, and then a DropdownSelect component containing a\n   * list of navigation items.\n   */\n  sidebarItems() {\n    const items = new ItemList<Mithril.Children>();\n    const canStartDiscussion = app.forum.attribute('canStartDiscussion') || !app.session.user;\n\n    items.add(\n      'newDiscussion',\n      <Button\n        icon=\"fas fa-edit\"\n        className=\"Button Button--primary IndexPage-newDiscussion\"\n        itemClassName=\"App-primaryControl\"\n        onclick={() => {\n          // If the user is not logged in, the promise rejects, and a login modal shows up.\n          // Since that's already handled, we dont need to show an error message in the console.\n          return this.newDiscussionAction().catch(() => {});\n        }}\n        disabled={!canStartDiscussion}\n      >\n        {app.translator.trans(`core.forum.index.${canStartDiscussion ? 'start_discussion_button' : 'cannot_start_discussion_button'}`)}\n      </Button>\n    );\n\n    items.add(\n      'nav',\n      <SelectDropdown\n        buttonClassName=\"Button\"\n        className=\"App-titleControl\"\n        accessibleToggleLabel={app.translator.trans('core.forum.index.toggle_sidenav_dropdown_accessible_label')}\n      >\n        {this.navItems().toArray()}\n      </SelectDropdown>\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the navigation in the sidebar of the index page. By\n   * default this is just the 'All Discussions' link.\n   */\n  navItems() {\n    const items = new ItemList<Mithril.Children>();\n    const params = app.search.stickyParams();\n\n    items.add(\n      'allDiscussions',\n      <LinkButton href={app.route('index', params)} icon=\"far fa-comments\">\n        {app.translator.trans('core.forum.index.all_discussions_link')}\n      </LinkButton>,\n      100\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the part of the toolbar which is concerned with how\n   * the results are displayed. By default this is just a select box to change\n   * the way discussions are sorted.\n   */\n  viewItems() {\n    const items = new ItemList<Mithril.Children>();\n    const sortMap = app.discussions.sortMap();\n\n    const sortOptions = Object.keys(sortMap).reduce((acc: any, sortId) => {\n      acc[sortId] = app.translator.trans(`core.forum.index_sort.${sortId}_button`);\n      return acc;\n    }, {});\n\n    items.add(\n      'sort',\n      <Dropdown\n        buttonClassName=\"Button\"\n        label={sortOptions[app.search.params().sort] || Object.keys(sortMap).map((key) => sortOptions[key])[0]}\n        accessibleToggleLabel={app.translator.trans('core.forum.index_sort.toggle_dropdown_accessible_label')}\n      >\n        {Object.keys(sortOptions).map((value) => {\n          const label = sortOptions[value];\n          const active = (app.search.params().sort || Object.keys(sortMap)[0]) === value;\n\n          return (\n            <Button icon={active ? 'fas fa-check' : true} onclick={app.search.changeSort.bind(app.search, value)} active={active}>\n              {label}\n            </Button>\n          );\n        })}\n      </Dropdown>\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the part of the toolbar which is about taking action\n   * on the results. By default this is just a \"mark all as read\" button.\n   */\n  actionItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'refresh',\n      <Button\n        title={app.translator.trans('core.forum.index.refresh_tooltip')}\n        icon=\"fas fa-sync\"\n        className=\"Button Button--icon\"\n        onclick={() => {\n          app.discussions.refresh();\n          if (app.session.user) {\n            app.store.find('users', app.session.user.id()!);\n            m.redraw();\n          }\n        }}\n      />\n    );\n\n    if (app.session.user) {\n      items.add(\n        'markAllAsRead',\n        <Button\n          title={app.translator.trans('core.forum.index.mark_all_as_read_tooltip')}\n          icon=\"fas fa-check\"\n          className=\"Button Button--icon\"\n          onclick={this.markAllAsRead.bind(this)}\n        />\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Open the composer for a new discussion or prompt the user to login.\n   */\n  newDiscussionAction(): Promise<unknown> {\n    return new Promise((resolve, reject) => {\n      if (app.session.user) {\n        app.composer.load(DiscussionComposer, { user: app.session.user });\n        app.composer.show();\n\n        return resolve(app.composer);\n      } else {\n        app.modal.show(LogInModal);\n\n        return reject();\n      }\n    });\n  }\n\n  /**\n   * Mark all discussions as read.\n   */\n  markAllAsRead() {\n    const confirmation = confirm(extractText(app.translator.trans('core.forum.index.mark_all_as_read_confirmation')));\n\n    if (confirmation) {\n      app.session.user?.save({ markedAllAsReadAt: new Date() });\n    }\n  }\n}\n","import app from '../../forum/app';\nimport UserPage, { IUserPageAttrs } from './UserPage';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport Placeholder from '../../common/components/Placeholder';\nimport CommentPost from './CommentPost';\nimport type Post from '../../common/models/Post';\nimport type Mithril from 'mithril';\nimport type User from '../../common/models/User';\n\n/**\n * The `PostsUserPage` component shows a user's activity feed inside of their\n * profile.\n */\nexport default class PostsUserPage extends UserPage {\n  /**\n   * Whether or not the activity feed is currently loading.\n   */\n  loading: boolean = true;\n\n  /**\n   * Whether or not there are any more activity items that can be loaded.\n   */\n  moreResults: boolean = false;\n\n  /**\n   * The Post models in the feed.\n   */\n  posts: Post[] = [];\n\n  /**\n   * The number of activity items to load per request.\n   */\n  loadLimit: number = 20;\n\n  oninit(vnode: Mithril.Vnode<IUserPageAttrs, this>) {\n    super.oninit(vnode);\n\n    this.loadUser(m.route.param('username'));\n  }\n\n  content() {\n    if (this.posts.length === 0 && !this.loading) {\n      return (\n        <div className=\"PostsUserPage\">\n          <Placeholder text={app.translator.trans('core.forum.user.posts_empty_text')} />\n        </div>\n      );\n    }\n\n    let footer;\n\n    if (this.loading) {\n      footer = <LoadingIndicator />;\n    } else if (this.moreResults) {\n      footer = (\n        <div className=\"PostsUserPage-loadMore\">\n          <Button className=\"Button\" onclick={this.loadMore.bind(this)}>\n            {app.translator.trans('core.forum.user.posts_load_more_button')}\n          </Button>\n        </div>\n      );\n    }\n\n    return (\n      <div className=\"PostsUserPage\">\n        <ul className=\"PostsUserPage-list\">\n          {this.posts.map((post) => (\n            <li>\n              <div className=\"PostsUserPage-discussion\">\n                {app.translator.trans('core.forum.user.in_discussion_text', {\n                  discussion: <Link href={app.route.post(post)}>{this.discussionTitle(post)}</Link>,\n                })}\n              </div>\n\n              <CommentPost post={post} />\n            </li>\n          ))}\n        </ul>\n        <div className=\"PostsUserPage-loadMore\">{footer}</div>\n      </div>\n    );\n  }\n\n  /**\n   * Initialize the component with a user, and trigger the loading of their\n   * activity feed.\n   */\n  show(user: User): void {\n    super.show(user);\n\n    this.refresh();\n  }\n\n  /**\n   * Clear and reload the user's activity feed.\n   */\n  refresh() {\n    this.loading = true;\n    this.posts = [];\n\n    m.redraw();\n\n    this.loadResults().then(this.parseResults.bind(this));\n  }\n\n  /**\n   * Load a new page of the user's activity feed.\n   *\n   * @protected\n   */\n  loadResults(offset = 0) {\n    return app.store.find<Post[]>('posts', {\n      filter: {\n        author: this.user!.username(),\n        type: 'comment',\n      },\n      page: { offset, limit: this.loadLimit },\n      sort: '-createdAt',\n    });\n  }\n\n  /**\n   * Load the next page of results.\n   */\n  loadMore() {\n    this.loading = true;\n    this.loadResults(this.posts.length).then(this.parseResults.bind(this));\n  }\n\n  /**\n   * Parse results and append them to the activity feed.\n   */\n  parseResults(results: Post[]): Post[] {\n    this.loading = false;\n\n    this.posts.push(...results);\n\n    this.moreResults = results.length >= this.loadLimit;\n    m.redraw();\n\n    return results;\n  }\n\n  discussionTitle(post: Post): string {\n    return post.discussion().title();\n  }\n}\n","import app from '../../common/app';\nimport Model from '../Model';\nimport { ApiQueryParamsPlural, ApiResponsePlural } from '../Store';\n\nexport interface Page<TModel> {\n  number: number;\n  items: TModel[];\n\n  hasPrev?: boolean;\n  hasNext?: boolean;\n}\n\nexport interface PaginationLocation {\n  page: number;\n  startIndex?: number;\n  endIndex?: number;\n}\n\nexport interface PaginatedListParams {\n  [key: string]: any;\n}\n\nexport interface PaginatedListRequestParams extends Omit<ApiQueryParamsPlural, 'include'> {\n  include?: string | string[];\n}\n\nexport default abstract class PaginatedListState<T extends Model, P extends PaginatedListParams = PaginatedListParams> {\n  protected location!: PaginationLocation;\n  protected pageSize: number;\n\n  protected pages: Page<T>[] = [];\n  protected params: P = {} as P;\n\n  protected initialLoading: boolean = false;\n  protected loadingPrev: boolean = false;\n  protected loadingNext: boolean = false;\n\n  protected constructor(params: P = {} as P, page: number = 1, pageSize: number = 20) {\n    this.params = params;\n\n    this.location = { page };\n    this.pageSize = pageSize;\n  }\n\n  abstract get type(): string;\n\n  public clear(): void {\n    this.pages = [];\n\n    m.redraw();\n  }\n\n  public loadPrev(): Promise<void> {\n    if (this.loadingPrev || this.getLocation().page === 1) return Promise.resolve();\n\n    this.loadingPrev = true;\n\n    const page: number = this.getPrevPageNumber();\n\n    return this.loadPage(page)\n      .then(this.parseResults.bind(this, page))\n      .finally(() => (this.loadingPrev = false));\n  }\n\n  public loadNext(): Promise<void> {\n    if (this.loadingNext) return Promise.resolve();\n\n    this.loadingNext = true;\n\n    const page: number = this.getNextPageNumber();\n\n    return this.loadPage(page)\n      .then(this.parseResults.bind(this, page))\n      .finally(() => (this.loadingNext = false));\n  }\n\n  protected parseResults(pg: number, results: ApiResponsePlural<T>): void {\n    const pageNum = Number(pg);\n\n    const links = results.payload?.links;\n    const page = {\n      number: pageNum,\n      items: results,\n      hasNext: !!links?.next,\n      hasPrev: !!links?.prev,\n    };\n\n    if (this.isEmpty() || pageNum > this.getNextPageNumber() - 1) {\n      this.pages.push(page);\n    } else {\n      this.pages.unshift(page);\n    }\n\n    this.location = { page: pageNum };\n\n    m.redraw();\n  }\n\n  /**\n   * Load a new page of results.\n   */\n  protected loadPage(page = 1): Promise<ApiResponsePlural<T>> {\n    const reqParams = this.requestParams();\n\n    const include = Array.isArray(reqParams.include) ? reqParams.include.join(',') : reqParams.include;\n\n    const params: ApiQueryParamsPlural = {\n      ...reqParams,\n      page: {\n        ...reqParams.page,\n        offset: this.pageSize * (page - 1),\n      },\n      include,\n    };\n\n    return app.store.find<T[]>(this.type, params);\n  }\n\n  /**\n   * Get the parameters that should be passed in the API request.\n   * Do not include page offset unless subclass overrides loadPage.\n   *\n   * @abstract\n   * @see loadPage\n   */\n  protected requestParams(): PaginatedListRequestParams {\n    return this.params;\n  }\n\n  /**\n   * Update the `this.params` object, calling `refresh` if they have changed.\n   * Use `requestParams` for converting `this.params` into API parameters\n   *\n   * @param newParams\n   * @param page\n   * @see requestParams\n   */\n  public refreshParams(newParams: P, page: number): Promise<void> {\n    if (this.isEmpty() || this.paramsChanged(newParams)) {\n      this.params = newParams;\n\n      return this.refresh(page);\n    }\n\n    return Promise.resolve();\n  }\n\n  public refresh(page: number = 1): Promise<void> {\n    this.initialLoading = true;\n    this.loadingPrev = false;\n    this.loadingNext = false;\n\n    this.clear();\n\n    this.location = { page };\n\n    return this.loadPage()\n      .then((results) => {\n        this.pages = [];\n        this.parseResults(this.location.page, results);\n      })\n      .finally(() => (this.initialLoading = false));\n  }\n\n  public getPages(): Page<T>[] {\n    return this.pages;\n  }\n  public getLocation(): PaginationLocation {\n    return this.location;\n  }\n\n  public isLoading(): boolean {\n    return this.initialLoading || this.loadingNext || this.loadingPrev;\n  }\n  public isInitialLoading(): boolean {\n    return this.initialLoading;\n  }\n  public isLoadingPrev(): boolean {\n    return this.loadingPrev;\n  }\n  public isLoadingNext(): boolean {\n    return this.loadingNext;\n  }\n\n  /**\n   * Returns true when the number of items across all loaded pages is not 0.\n   *\n   * @see isEmpty\n   */\n  public hasItems(): boolean {\n    return !!this.getAllItems().length;\n  }\n\n  /**\n   * Returns true when there aren't any items *and* the state has already done its initial loading.\n   * If you want to know whether there are items regardless of load state, use `hasItems()` instead\n   *\n   * @see hasItems\n   */\n  public isEmpty(): boolean {\n    return !this.isInitialLoading() && !this.hasItems();\n  }\n\n  public hasPrev(): boolean {\n    return !!this.pages[0]?.hasPrev;\n  }\n  public hasNext(): boolean {\n    return !!this.pages[this.pages.length - 1]?.hasNext;\n  }\n\n  /**\n   * Stored state parameters.\n   */\n  public getParams(): P {\n    return this.params;\n  }\n\n  protected getNextPageNumber(): number {\n    const pg = this.pages[this.pages.length - 1]?.number;\n\n    if (pg && !isNaN(pg)) {\n      return pg + 1;\n    } else {\n      return this.location.page;\n    }\n  }\n  protected getPrevPageNumber(): number {\n    const pg = this.pages[0]?.number;\n\n    if (pg && !isNaN(pg)) {\n      // If the calculated page number is less than 1,\n      // return 1 as the prev page (first possible page number)\n      return Math.max(pg - 1, 1);\n    } else {\n      return this.location.page;\n    }\n  }\n\n  protected paramsChanged(newParams: P): boolean {\n    return Object.keys(newParams).some((key) => this.getParams()[key] !== newParams[key]);\n  }\n\n  protected getAllItems(): T[] {\n    return this.getPages()\n      .map((pg) => pg.items)\n      .flat();\n  }\n}\n","export default class EventEmitter {\n  protected events: any = {};\n\n  public constructor() {\n    this.events = {};\n  }\n\n  public on(event: string, listener: Function): EventEmitter {\n    if (!this.events[event]) {\n      this.events[event] = [];\n    }\n\n    this.events[event].push(listener);\n\n    return this;\n  }\n\n  public emit(event: string, ...args: any[]): void {\n    if (this.events[event]) {\n      this.events[event].forEach((listener: Function) => listener(...args));\n    }\n  }\n}\n","import app from '../../forum/app';\nimport PaginatedListState, { Page, PaginatedListParams, PaginatedListRequestParams } from '../../common/states/PaginatedListState';\nimport Discussion from '../../common/models/Discussion';\nimport { ApiResponsePlural } from '../../common/Store';\nimport EventEmitter from '../../common/utils/EventEmitter';\n\nexport interface DiscussionListParams extends PaginatedListParams {\n  sort?: string;\n}\n\nconst globalEventEmitter = new EventEmitter();\n\nexport default class DiscussionListState<P extends DiscussionListParams = DiscussionListParams> extends PaginatedListState<Discussion, P> {\n  protected extraDiscussions: Discussion[] = [];\n  protected eventEmitter: EventEmitter;\n\n  constructor(params: P, page: number = 1) {\n    super(params, page, 20);\n\n    this.eventEmitter = globalEventEmitter.on('discussion.deleted', this.deleteDiscussion.bind(this));\n  }\n\n  get type(): string {\n    return 'discussions';\n  }\n\n  requestParams(): PaginatedListRequestParams {\n    const params = {\n      include: ['user', 'lastPostedUser'],\n      filter: this.params.filter || {},\n      sort: this.sortMap()[this.params.sort ?? ''],\n    };\n\n    if (this.params.q) {\n      params.filter.q = this.params.q;\n      params.include.push('mostRelevantPost', 'mostRelevantPost.user');\n    }\n\n    return params;\n  }\n\n  protected loadPage(page: number = 1): Promise<ApiResponsePlural<Discussion>> {\n    const preloadedDiscussions = app.preloadedApiDocument<Discussion[]>();\n\n    if (preloadedDiscussions) {\n      this.initialLoading = false;\n\n      return Promise.resolve(preloadedDiscussions);\n    }\n\n    return super.loadPage(page);\n  }\n\n  clear(): void {\n    super.clear();\n\n    this.extraDiscussions = [];\n  }\n\n  /**\n   * Get a map of sort keys (which appear in the URL, and are used for\n   * translation) to the API sort value that they represent.\n   */\n  sortMap() {\n    const map: any = {};\n\n    if (this.params.q) {\n      map.relevance = '';\n    }\n    map.latest = '-lastPostedAt';\n    map.top = '-commentCount';\n    map.newest = '-createdAt';\n    map.oldest = 'createdAt';\n\n    return map;\n  }\n\n  /**\n   * In the last request, has the user searched for a discussion?\n   */\n  isSearchResults(): boolean {\n    return !!this.params.q;\n  }\n\n  removeDiscussion(discussion: Discussion): void {\n    this.eventEmitter.emit('discussion.deleted', discussion);\n  }\n\n  deleteDiscussion(discussion: Discussion): void {\n    for (const page of this.pages) {\n      const index = page.items.indexOf(discussion);\n\n      if (index !== -1) {\n        page.items.splice(index, 1);\n        break;\n      }\n    }\n\n    const index = this.extraDiscussions.indexOf(discussion);\n\n    if (index !== -1) {\n      this.extraDiscussions.splice(index);\n    }\n\n    m.redraw();\n  }\n\n  /**\n   * Add a discussion to the top of the list.\n   */\n  addDiscussion(discussion: Discussion): void {\n    this.removeDiscussion(discussion);\n    this.extraDiscussions.unshift(discussion);\n\n    m.redraw();\n  }\n\n  protected getAllItems(): Discussion[] {\n    return this.extraDiscussions.concat(super.getAllItems());\n  }\n\n  public getPages(): Page<Discussion>[] {\n    const pages = super.getPages();\n\n    if (this.extraDiscussions.length) {\n      return [\n        {\n          number: -1,\n          items: this.extraDiscussions,\n        },\n        ...pages,\n      ];\n    }\n\n    return pages;\n  }\n}\n","import UserPage, { IUserPageAttrs } from './UserPage';\nimport DiscussionList from './DiscussionList';\nimport DiscussionListState from '../states/DiscussionListState';\nimport type Mithril from 'mithril';\nimport type User from '../../common/models/User';\n\n/**\n * The `DiscussionsUserPage` component shows a discussion list inside of a user\n * page.\n */\nexport default class DiscussionsUserPage extends UserPage<IUserPageAttrs, DiscussionListState> {\n  oninit(vnode: Mithril.Vnode<IUserPageAttrs, this>) {\n    super.oninit(vnode);\n\n    this.loadUser(m.route.param('username'));\n  }\n\n  show(user: User): void {\n    super.show(user);\n\n    this.state = new DiscussionListState({\n      filter: { author: user.username() },\n      sort: 'newest',\n    });\n\n    this.state.refresh();\n  }\n\n  content() {\n    return (\n      <div className=\"DiscussionsUserPage\">\n        <DiscussionList state={this.state} />\n      </div>\n    );\n  }\n}\n","/**\n * An event handler factory that makes it simpler to implement data binding\n * for component event listeners.\n *\n * The handler created by this factory passes the DOM element's attribute\n * identified by the first argument to the callback (usually a bidirectional\n * Mithril stream: https://mithril.js.org/stream.html#bidirectional-bindings).\n *\n * Replaces m.withAttr for Mithril 2.0.\n * @see https://mithril.js.org/archive/v0.2.5/mithril.withAttr.html\n */\nexport default (key: string, cb: Function) =>\n  function (this: Element) {\n    cb(this.getAttribute(key) || (this as any)[key]);\n  };\n","import Component, { ComponentAttrs } from '../Component';\nimport LoadingIndicator from './LoadingIndicator';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport withAttr from '../utils/withAttr';\nimport type Mithril from 'mithril';\n\nexport interface ICheckboxAttrs extends ComponentAttrs {\n  state?: boolean;\n  loading?: boolean;\n  disabled?: boolean;\n  onchange: (checked: boolean, component: Checkbox<this>) => void;\n}\n\n/**\n * The `Checkbox` component defines a checkbox input.\n *\n * ### Attrs\n *\n * - `state` Whether or not the checkbox is checked.\n * - `className` The class name for the root element.\n * - `disabled` Whether or not the checkbox is disabled.\n * - `loading` Whether or not the checkbox is loading.\n * - `onchange` A callback to run when the checkbox is checked/unchecked.\n * - `children` A text label to display next to the checkbox.\n */\nexport default class Checkbox<CustomAttrs extends ICheckboxAttrs = ICheckboxAttrs> extends Component<CustomAttrs> {\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    const className = classList([\n      'Checkbox',\n      this.attrs.state ? 'on' : 'off',\n      this.attrs.className,\n      this.attrs.loading && 'loading',\n      this.attrs.disabled && 'disabled',\n    ]);\n\n    return (\n      <label className={className}>\n        <input type=\"checkbox\" checked={this.attrs.state} disabled={this.attrs.disabled} onchange={withAttr('checked', this.onchange.bind(this))} />\n        <div className=\"Checkbox-display\" aria-hidden=\"true\">\n          {this.getDisplay()}\n        </div>\n        {vnode.children}\n      </label>\n    );\n  }\n\n  /**\n   * Get the template for the checkbox's display (tick/cross icon).\n   */\n  protected getDisplay(): Mithril.Children {\n    return this.attrs.loading ? <LoadingIndicator display=\"unset\" size=\"small\" /> : icon(this.attrs.state ? 'fas fa-check' : 'fas fa-times');\n  }\n\n  /**\n   * Run a callback when the state of the checkbox is changed.\n   */\n  protected onchange(checked: boolean): void {\n    if (this.attrs.onchange) this.attrs.onchange(checked, this);\n  }\n}\n","import classList from '../utils/classList';\nimport Checkbox, { ICheckboxAttrs } from './Checkbox';\n\n/**\n * The `Switch` component is a `Checkbox`, but with a switch display instead of\n * a tick/cross one.\n */\nexport default class Switch extends Checkbox {\n  static initAttrs(attrs: ICheckboxAttrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = classList(attrs.className, 'Checkbox--switch');\n  }\n\n  getDisplay() {\n    return !!this.attrs.loading && super.getDisplay();\n  }\n}\n","import Component from '../Component';\nimport listItems from '../helpers/listItems';\n\n/**\n * The `FieldSet` component defines a collection of fields, displayed in a list\n * underneath a title. Accepted properties are:\n *\n * - `className` The class name for the fieldset.\n * - `label` The title of this group of fields.\n *\n * The children should be an array of items to show in the fieldset.\n */\nexport default class FieldSet extends Component {\n  view(vnode) {\n    return (\n      <fieldset className={this.attrs.className}>\n        <legend>{this.attrs.label}</legend>\n        <ul>{listItems(vnode.children)}</ul>\n      </fieldset>\n    );\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport Checkbox from '../../common/components/Checkbox';\nimport icon from '../../common/helpers/icon';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `NotificationGrid` component displays a table of notification types and\n * methods, allowing the user to toggle each combination.\n *\n * ### Attrs\n *\n * - `user`\n */\nexport default class NotificationGrid extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * Information about the available notification methods.\n     *\n     * @type {({ name: string, icon: string, label: import('mithril').Children })[]}\n     */\n    this.methods = this.notificationMethods().toArray();\n\n    /**\n     * A map of which notification checkboxes are loading.\n     *\n     * @type {Record<string, boolean>}\n     */\n    this.loading = {};\n\n    /**\n     * Information about the available notification types.\n     *\n     * @type {({ name: string, icon: string, label: import('mithril').Children })[]}\n     */\n    this.types = this.notificationTypes().toArray();\n  }\n\n  view() {\n    const preferences = this.attrs.user.preferences();\n\n    return (\n      <table className=\"NotificationGrid\">\n        <thead>\n          <tr>\n            <td />\n            {this.methods.map((method) => (\n              <th className=\"NotificationGrid-groupToggle\" onclick={this.toggleMethod.bind(this, method.name)}>\n                {icon(method.icon)} {method.label}\n              </th>\n            ))}\n          </tr>\n        </thead>\n\n        <tbody>\n          {this.types.map((type) => (\n            <tr>\n              <td className=\"NotificationGrid-groupToggle\" onclick={this.toggleType.bind(this, type.name)}>\n                {icon(type.icon)} {type.label}\n              </td>\n              {this.methods.map((method) => {\n                const key = this.preferenceKey(type.name, method.name);\n\n                return (\n                  <td className=\"NotificationGrid-checkbox\">\n                    <Checkbox\n                      state={!!preferences[key]}\n                      loading={this.loading[key]}\n                      disabled={!(key in preferences)}\n                      onchange={this.toggle.bind(this, [key])}\n                    >\n                      <span className=\"sr-only\">\n                        {app.translator.trans('core.forum.settings.notification_checkbox_a11y_label_template', {\n                          description: type.label,\n                          method: method.label,\n                        })}\n                      </span>\n                    </Checkbox>\n                  </td>\n                );\n              })}\n            </tr>\n          ))}\n        </tbody>\n      </table>\n    );\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.$('thead .NotificationGrid-groupToggle').bind('mouseenter mouseleave', function (e) {\n      const i = parseInt($(this).index(), 10) + 1;\n      $(this)\n        .parents('table')\n        .find('td:nth-child(' + i + ')')\n        .toggleClass('highlighted', e.type === 'mouseenter');\n    });\n\n    this.$('tbody .NotificationGrid-groupToggle').bind('mouseenter mouseleave', function (e) {\n      $(this)\n        .parent()\n        .find('td')\n        .toggleClass('highlighted', e.type === 'mouseenter');\n    });\n  }\n\n  /**\n   * Toggle the state of the given preferences, based on the value of the first\n   * one.\n   *\n   * @param {string[]} keys\n   */\n  toggle(keys) {\n    const user = this.attrs.user;\n    const preferences = user.preferences();\n    const enabled = !preferences[keys[0]];\n\n    keys.forEach((key) => {\n      this.loading[key] = true;\n      preferences[key] = enabled;\n    });\n\n    m.redraw();\n\n    user.save({ preferences }).then(() => {\n      keys.forEach((key) => (this.loading[key] = false));\n\n      m.redraw();\n    });\n  }\n\n  /**\n   * Toggle all notification types for the given method.\n   *\n   * @param {string} method\n   */\n  toggleMethod(method) {\n    const keys = this.types.map((type) => this.preferenceKey(type.name, method)).filter((key) => key in this.attrs.user.preferences());\n\n    this.toggle(keys);\n  }\n\n  /**\n   * Toggle all notification methods for the given type.\n   *\n   * @param {string} type\n   */\n  toggleType(type) {\n    const keys = this.methods.map((method) => this.preferenceKey(type, method.name)).filter((key) => key in this.attrs.user.preferences());\n\n    this.toggle(keys);\n  }\n\n  /**\n   * Get the name of the preference key for the given notification type-method\n   * combination.\n   *\n   * @param {string} type\n   * @param {string} method\n   * @return {string}\n   */\n  preferenceKey(type, method) {\n    return 'notify_' + type + '_' + method;\n  }\n\n  /**\n   * Build an item list for the notification methods to display in the grid.\n   *\n   * Each notification method is an object which has the following properties:\n   *\n   * - `name` The name of the notification method.\n   * - `icon` The icon to display in the column header.\n   * - `label` The label to display in the column header.\n   *\n   * @return {ItemList<{ name: string, icon: string, label: import('mithril').Children }>}\n   */\n  notificationMethods() {\n    const items = new ItemList();\n\n    items.add('alert', {\n      name: 'alert',\n      icon: 'fas fa-bell',\n      label: app.translator.trans('core.forum.settings.notify_by_web_heading'),\n    });\n\n    items.add('email', {\n      name: 'email',\n      icon: 'far fa-envelope',\n      label: app.translator.trans('core.forum.settings.notify_by_email_heading'),\n    });\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the notification types to display in the grid.\n   *\n   * Each notification type is an object which has the following properties:\n   *\n   * - `name` The name of the notification type.\n   * - `icon` The icon to display in the notification grid row.\n   * - `label` The label to display in the notification grid row.\n   *\n   * @return {ItemList<{ name: string, icon: string, label: import('mithril').Children}>}\n   */\n  notificationTypes() {\n    const items = new ItemList();\n\n    items.add('discussionRenamed', {\n      name: 'discussionRenamed',\n      icon: 'fas fa-pencil-alt',\n      label: app.translator.trans('core.forum.settings.notify_discussion_renamed_label'),\n    });\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport Mithril from 'mithril';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `ChangePasswordModal` component shows a modal dialog which allows the\n * user to send themself a password reset email.\n */\nexport default class ChangePasswordModal<CustomAttrs extends IInternalModalAttrs = IInternalModalAttrs> extends Modal<CustomAttrs> {\n  className() {\n    return 'ChangePasswordModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.change_password.title');\n  }\n\n  content() {\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">{this.fields().toArray()}</div>\n      </div>\n    );\n  }\n\n  fields() {\n    const fields = new ItemList<Mithril.Children>();\n\n    fields.add('help', <p className=\"helpText\">{app.translator.trans('core.forum.change_password.text')}</p>);\n\n    fields.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.forum.change_password.send_button')}\n        </Button>\n      </div>\n    );\n\n    return fields;\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    app\n      .request({\n        method: 'POST',\n        url: app.forum.attribute('apiUrl') + '/forgot',\n        body: this.requestBody(),\n      })\n      .then(this.hide.bind(this), this.loaded.bind(this));\n  }\n\n  requestBody() {\n    return { email: app.session.user!.email() };\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport Stream from '../../common/utils/Stream';\nimport type Mithril from 'mithril';\nimport RequestError from '../../common/utils/RequestError';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `ChangeEmailModal` component shows a modal dialog which allows the user\n * to change their email address.\n */\nexport default class ChangeEmailModal<CustomAttrs extends IInternalModalAttrs = IInternalModalAttrs> extends Modal<CustomAttrs> {\n  /**\n   * The value of the email input.\n   */\n  email!: Stream<string>;\n\n  /**\n   * The value of the password input.\n   */\n  password!: Stream<string>;\n\n  /**\n   * Whether or not the email has been changed successfully.\n   */\n  success: boolean = false;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.email = Stream(app.session.user!.email() || '');\n    this.password = Stream('');\n  }\n\n  className() {\n    return 'ChangeEmailModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.change_email.title');\n  }\n\n  content() {\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">{this.fields().toArray()}</div>\n      </div>\n    );\n  }\n\n  fields(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.success) {\n      items.add(\n        'help',\n        <p className=\"helpText\">\n          {app.translator.trans('core.forum.change_email.confirmation_message', {\n            email: <strong>{this.email()}</strong>,\n          })}\n        </p>\n      );\n\n      items.add(\n        'dismiss',\n        <div className=\"Form-group\">\n          <Button className=\"Button Button--primary Button--block\" onclick={this.hide.bind(this)}>\n            {app.translator.trans('core.forum.change_email.dismiss_button')}\n          </Button>\n        </div>\n      );\n    } else {\n      items.add(\n        'email',\n        <div className=\"Form-group\">\n          <input\n            type=\"email\"\n            name=\"email\"\n            className=\"FormControl\"\n            placeholder={app.session.user!.email()}\n            bidi={this.email}\n            disabled={this.loading}\n          />\n        </div>\n      );\n\n      items.add(\n        'password',\n        <div className=\"Form-group\">\n          <input\n            type=\"password\"\n            name=\"password\"\n            className=\"FormControl\"\n            autocomplete=\"current-password\"\n            placeholder={app.translator.trans('core.forum.change_email.confirm_password_placeholder')}\n            bidi={this.password}\n            disabled={this.loading}\n          />\n        </div>\n      );\n\n      items.add(\n        'submit',\n        <div className=\"Form-group\">\n          <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n            {app.translator.trans('core.forum.change_email.submit_button')}\n          </Button>\n        </div>\n      );\n    }\n\n    return items;\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    // If the user hasn't actually entered a different email address, we don't\n    // need to do anything. Woot!\n    if (this.email() === app.session.user!.email()) {\n      this.hide();\n      return;\n    }\n\n    this.loading = true;\n    this.alertAttrs = null;\n\n    app.session\n      .user!.save(this.requestAttributes(), {\n        errorHandler: this.onerror.bind(this),\n        meta: { password: this.password() },\n      })\n      .then(() => {\n        this.success = true;\n      })\n      .catch(() => {})\n      .then(this.loaded.bind(this));\n  }\n\n  requestAttributes() {\n    return { email: this.email() };\n  }\n\n  onerror(error: RequestError) {\n    if (error.status === 401 && error.alert) {\n      error.alert.content = app.translator.trans('core.forum.change_email.incorrect_password_message');\n    }\n\n    super.onerror(error);\n  }\n}\n","import app from '../../forum/app';\nimport UserPage, { IUserPageAttrs } from './UserPage';\nimport ItemList from '../../common/utils/ItemList';\nimport Switch from '../../common/components/Switch';\nimport Button from '../../common/components/Button';\nimport FieldSet from '../../common/components/FieldSet';\nimport NotificationGrid from './NotificationGrid';\nimport ChangePasswordModal from './ChangePasswordModal';\nimport ChangeEmailModal from './ChangeEmailModal';\nimport listItems from '../../common/helpers/listItems';\nimport extractText from '../../common/utils/extractText';\nimport type Mithril from 'mithril';\n\n/**\n * The `SettingsPage` component displays the user's settings control panel, in\n * the context of their user profile.\n */\nexport default class SettingsPage<CustomAttrs extends IUserPageAttrs = IUserPageAttrs> extends UserPage<CustomAttrs> {\n  discloseOnlineLoading?: boolean;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.show(app.session.user!);\n\n    app.setTitle(extractText(app.translator.trans('core.forum.settings.title')));\n  }\n\n  content() {\n    return (\n      <div className=\"SettingsPage\">\n        <ul>{listItems(this.settingsItems().toArray())}</ul>\n      </div>\n    );\n  }\n\n  /**\n   * Build an item list for the user's settings controls.\n   */\n  settingsItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    ['account', 'notifications', 'privacy'].forEach((section, index) => {\n      const sectionItems = `${section}Items` as 'accountItems' | 'notificationsItems' | 'privacyItems';\n\n      items.add(\n        section,\n        <FieldSet className={`Settings-${section}`} label={app.translator.trans(`core.forum.settings.${section}_heading`)}>\n          {this[sectionItems]().toArray()}\n        </FieldSet>,\n        100 - index * 10\n      );\n    });\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's account settings.\n   */\n  accountItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'changePassword',\n      <Button className=\"Button\" onclick={() => app.modal.show(ChangePasswordModal)}>\n        {app.translator.trans('core.forum.settings.change_password_button')}\n      </Button>,\n      100\n    );\n\n    items.add(\n      'changeEmail',\n      <Button className=\"Button\" onclick={() => app.modal.show(ChangeEmailModal)}>\n        {app.translator.trans('core.forum.settings.change_email_button')}\n      </Button>,\n      90\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's notification settings.\n   */\n  notificationsItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('notificationGrid', <NotificationGrid user={this.user} />, 100);\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's privacy settings.\n   */\n  privacyItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'discloseOnline',\n      <Switch\n        state={this.user!.preferences()?.discloseOnline}\n        onchange={(value: boolean) => {\n          this.discloseOnlineLoading = true;\n\n          this.user!.savePreferences({ discloseOnline: value }).then(() => {\n            this.discloseOnlineLoading = false;\n            m.redraw();\n          });\n        }}\n        loading={this.discloseOnlineLoading}\n      >\n        {app.translator.trans('core.forum.settings.privacy_disclose_online_label')}\n      </Switch>,\n      100\n    );\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Page, { IPageAttrs } from '../../common/components/Page';\nimport NotificationList from './NotificationList';\nimport type Mithril from 'mithril';\nimport extractText from '../../common/utils/extractText';\n\n/**\n * The `NotificationsPage` component shows the notifications list. It is only\n * used on mobile devices where the notifications dropdown is within the drawer.\n */\nexport default class NotificationsPage<CustomAttrs extends IPageAttrs = IPageAttrs> extends Page<CustomAttrs> {\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    app.history.push('notifications', extractText(app.translator.trans('core.forum.notifications.title')));\n\n    app.notifications.load();\n\n    this.bodyClass = 'App--notifications';\n  }\n\n  view() {\n    return (\n      <div className=\"NotificationsPage\">\n        <NotificationList state={app.notifications}></NotificationList>\n      </div>\n    );\n  }\n}\n","import type Mithril from 'mithril';\nimport type { RouteResolver } from '../Application';\nimport type { default as Component, ComponentAttrs } from '../Component';\n\n/**\n * Generates a route resolver for a given component.\n *\n * In addition to regular route resolver functionality:\n * - It provide the current route name as an attr\n * - It sets a key on the component so a rerender will be triggered on route change.\n */\nexport default class DefaultResolver<\n  Attrs extends ComponentAttrs,\n  Comp extends Component<Attrs & { routeName: string }>,\n  RouteArgs extends Record<string, unknown> = {}\n> implements RouteResolver<Attrs, Comp, RouteArgs>\n{\n  component: new () => Comp;\n  routeName: string;\n\n  constructor(component: new () => Comp, routeName: string) {\n    this.component = component;\n    this.routeName = routeName;\n  }\n\n  /**\n   * When a route change results in a changed key, a full page\n   * rerender occurs. This method can be overriden in subclasses\n   * to prevent rerenders on some route changes.\n   */\n  makeKey(): string {\n    return this.routeName + JSON.stringify(m.route.param());\n  }\n\n  makeAttrs(vnode: Mithril.Vnode<Attrs, Comp>): Attrs & { routeName: string } {\n    return {\n      ...vnode.attrs,\n      routeName: this.routeName,\n    };\n  }\n\n  onmatch(args: RouteArgs, requestedPath: string, route: string): { new (): Comp } {\n    return this.component;\n  }\n\n  render(vnode: Mithril.Vnode<Attrs, Comp>): Mithril.Children {\n    return [{ ...vnode, attrs: this.makeAttrs(vnode), key: this.makeKey() }];\n  }\n}\n","import type Mithril from 'mithril';\n\nimport app from '../../forum/app';\nimport DefaultResolver from '../../common/resolvers/DefaultResolver';\nimport DiscussionPage, { IDiscussionPageAttrs } from '../components/DiscussionPage';\n\n/**\n * A custom route resolver for DiscussionPage that generates the same key to all posts\n * on the same discussion. It triggers a scroll when going from one post to another\n * in the same discussion.\n */\nexport default class DiscussionPageResolver<\n  Attrs extends IDiscussionPageAttrs = IDiscussionPageAttrs,\n  RouteArgs extends Record<string, unknown> = {}\n> extends DefaultResolver<Attrs, DiscussionPage<Attrs>, RouteArgs> {\n  static scrollToPostNumber: number | null = null;\n\n  /**\n   * Remove optional parts of a discussion's slug to keep the substring\n   * that bijectively maps to a discussion object. By default this just\n   * extracts the numerical ID from the slug. If a custom discussion\n   * slugging driver is used, this may need to be overriden.\n   * @param slug\n   */\n  canonicalizeDiscussionSlug(slug: string | undefined) {\n    if (!slug) return;\n    return slug.split('-')[0];\n  }\n\n  /**\n   * @inheritdoc\n   */\n  makeKey() {\n    const params = { ...m.route.param() };\n    if ('near' in params) {\n      delete params.near;\n    }\n    params.id = this.canonicalizeDiscussionSlug(params.id);\n    return this.routeName.replace('.near', '') + JSON.stringify(params);\n  }\n\n  onmatch(args: Attrs & RouteArgs, requestedPath: string, route: string) {\n    if (app.current.matches(DiscussionPage) && this.canonicalizeDiscussionSlug(args.id) === this.canonicalizeDiscussionSlug(m.route.param('id'))) {\n      // By default, the first post number of any discussion is 1\n      DiscussionPageResolver.scrollToPostNumber = args.near || 1;\n    }\n\n    return super.onmatch(args, requestedPath, route);\n  }\n\n  render(vnode: Mithril.Vnode<Attrs, DiscussionPage<Attrs>>) {\n    if (DiscussionPageResolver.scrollToPostNumber !== null) {\n      const number = DiscussionPageResolver.scrollToPostNumber;\n      // Scroll after a timeout to avoid clashes with the render.\n      setTimeout(() => app.current.get('stream').goToNumber(number));\n      DiscussionPageResolver.scrollToPostNumber = null;\n    }\n\n    return super.render(vnode);\n  }\n}\n","import Component, { ComponentAttrs } from '../Component';\nimport type Mithril from 'mithril';\nimport app from '../app';\n\nexport interface ILabelValueAttrs extends ComponentAttrs {\n  label: Mithril.Children;\n  value: Mithril.Children;\n}\n\n/**\n * A generic component for displaying a label and value inline.\n * Created to avoid reinventing the wheel.\n *\n * `label: value`\n */\nexport default class LabelValue<CustomAttrs extends ILabelValueAttrs = ILabelValueAttrs> extends Component<CustomAttrs> {\n  view(vnode: Mithril.Vnode<CustomAttrs, this>): Mithril.Children {\n    return (\n      <div className=\"LabelValue\">\n        <div className=\"LabelValue-label\">\n          {app.translator.trans('core.lib.data_segment.label', {\n            label: this.attrs.label,\n          })}\n        </div>\n        <div className=\"LabelValue-value\">{this.attrs.value}</div>\n      </div>\n    );\n  }\n}\n","import app from '../app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport icon from '../../common/helpers/icon';\nimport Button from '../../common/components/Button';\nimport humanTime from '../../common/helpers/humanTime';\nimport ItemList from '../../common/utils/ItemList';\nimport LabelValue from '../../common/components/LabelValue';\nimport extractText from '../../common/utils/extractText';\nimport classList from '../../common/utils/classList';\nimport Tooltip from '../../common/components/Tooltip';\nimport type Mithril from 'mithril';\nimport type AccessToken from '../../common/models/AccessToken';\nimport { NestedStringArray } from '@askvortsov/rich-icu-message-formatter';\nimport IPAddress from '../../common/components/IPAddress';\n\nexport interface IAccessTokensListAttrs extends ComponentAttrs {\n  tokens: AccessToken[];\n  type: 'session' | 'developer_token';\n  hideTokens?: boolean;\n  icon?: string;\n  ondelete?: (token: AccessToken) => void;\n}\n\nexport default class AccessTokensList<CustomAttrs extends IAccessTokensListAttrs = IAccessTokensListAttrs> extends Component<CustomAttrs> {\n  protected loading: Record<string, boolean | undefined> = {};\n  protected showingTokens: Record<string, boolean | undefined> = {};\n\n  view(vnode: Mithril.Vnode<CustomAttrs, this>): Mithril.Children {\n    return (\n      <div className=\"AccessTokensList\">\n        {this.attrs.tokens.length ? (\n          this.attrs.tokens.map(this.tokenView.bind(this))\n        ) : (\n          <div className=\"AccessTokensList--empty\">{app.translator.trans('core.forum.security.empty_text')}</div>\n        )}\n      </div>\n    );\n  }\n\n  tokenView(token: AccessToken): Mithril.Children {\n    return (\n      <div\n        className={classList('AccessTokensList-item', {\n          'AccessTokensList-item--active': token.isCurrent(),\n        })}\n        key={token.id()!}\n      >\n        {this.tokenViewItems(token).toArray()}\n      </div>\n    );\n  }\n\n  tokenViewItems(token: AccessToken): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('icon', <div className=\"AccessTokensList-item-icon\">{icon(this.attrs.icon || 'fas fa-key')}</div>, 50);\n\n    items.add('info', <div className=\"AccessTokensList-item-info\">{this.tokenInfoItems(token).toArray()}</div>, 40);\n\n    items.add('actions', <div className=\"AccessTokensList-item-actions\">{this.tokenActionItems(token).toArray()}</div>, 30);\n\n    return items;\n  }\n\n  tokenInfoItems(token: AccessToken) {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.attrs.type === 'session') {\n      items.add(\n        'title',\n        <div className=\"AccessTokensList-item-title\">\n          <span className=\"AccessTokensList-item-title-main\">{token.device()}</span>\n          {token.isCurrent() && [\n            ' — ',\n            <span className=\"AccessTokensList-item-title-sub\">{app.translator.trans('core.forum.security.current_active_session')}</span>,\n          ]}\n        </div>\n      );\n    } else {\n      items.add(\n        'title',\n        <div className=\"AccessTokensList-item-title\">\n          <span className=\"AccessTokensList-item-title-main\">{this.generateTokenTitle(token)}</span>\n        </div>\n      );\n    }\n\n    items.add(\n      'createdAt',\n      <div className=\"AccessTokensList-item-createdAt\">\n        <LabelValue label={app.translator.trans('core.forum.security.created')} value={humanTime(token.createdAt())} />\n      </div>\n    );\n\n    items.add(\n      'lastActivityAt',\n      <div className=\"AccessTokensList-item-lastActivityAt\">\n        <LabelValue\n          label={app.translator.trans('core.forum.security.last_activity')}\n          value={\n            token.lastActivityAt() ? (\n              <>\n                {humanTime(token.lastActivityAt())}\n                {token.lastIpAddress() && (\n                  <span>\n                    {' '}\n                    — <IPAddress ip={token.lastIpAddress()} />\n                  </span>\n                )}\n                {this.attrs.type === 'developer_token' && token.device() && (\n                  <>\n                    {' '}\n                    — <span className=\"AccessTokensList-item-title-sub\">{token.device()}</span>\n                  </>\n                )}\n              </>\n            ) : (\n              app.translator.trans('core.forum.security.never')\n            )\n          }\n        />\n      </div>\n    );\n\n    return items;\n  }\n\n  tokenActionItems(token: AccessToken) {\n    const items = new ItemList<Mithril.Children>();\n\n    const deleteKey = {\n      session: 'terminate_session',\n      developer_token: 'revoke_access_token',\n    }[this.attrs.type];\n\n    if (this.attrs.type === 'developer_token') {\n      const isHidden = !this.showingTokens[token.id()!];\n      const displayKey = isHidden ? 'show_access_token' : 'hide_access_token';\n\n      items.add(\n        'toggleDisplay',\n        <Button\n          className=\"Button Button--inverted\"\n          icon={isHidden ? 'fas fa-eye' : 'fas fa-eye-slash'}\n          onclick={() => {\n            this.showingTokens[token.id()!] = isHidden;\n            m.redraw();\n          }}\n        >\n          {app.translator.trans(`core.forum.security.${displayKey}`)}\n        </Button>\n      );\n    }\n\n    let revokeButton = (\n      <Button className=\"Button Button--danger\" disabled={token.isCurrent()} loading={!!this.loading[token.id()!]} onclick={() => this.revoke(token)}>\n        {app.translator.trans(`core.forum.security.${deleteKey}`)}\n      </Button>\n    );\n\n    if (token.isCurrent()) {\n      revokeButton = (\n        <Tooltip text={app.translator.trans('core.forum.security.cannot_terminate_current_session')}>\n          <div tabindex=\"0\">{revokeButton}</div>\n        </Tooltip>\n      );\n    }\n\n    items.add('revoke', revokeButton);\n\n    return items;\n  }\n\n  async revoke(token: AccessToken) {\n    if (!confirm(extractText(app.translator.trans('core.forum.security.revoke_access_token_confirmation')))) return;\n\n    this.loading[token.id()!] = true;\n\n    await token.delete();\n\n    this.loading[token.id()!] = false;\n    this.attrs.ondelete?.(token);\n\n    const key = this.attrs.type === 'session' ? 'session_terminated' : 'token_revoked';\n\n    app.alerts.show({ type: 'success' }, app.translator.trans(`core.forum.security.${key}`, { count: 1 }));\n    m.redraw();\n  }\n\n  generateTokenTitle(token: AccessToken): NestedStringArray {\n    const name = token.title() || app.translator.trans('core.forum.security.token_title_placeholder');\n    const value = this.tokenValueDisplay(token);\n\n    return app.translator.trans('core.forum.security.token_item_title', { title: name, token: value });\n  }\n\n  tokenValueDisplay(token: AccessToken): Mithril.Children {\n    const obfuscatedName = Array(12).fill('*').join('');\n    const value = this.showingTokens[token.id()!] ? token.token() : obfuscatedName;\n\n    return <code className=\"AccessTokensList-item-token\">{value}</code>;\n  }\n}\n","import app from '../app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport Stream from '../../common/utils/Stream';\nimport type AccessToken from '../../common/models/AccessToken';\nimport type { SaveAttributes } from '../../common/Model';\nimport type Mithril from 'mithril';\n\nexport interface INewAccessTokenModalAttrs extends IInternalModalAttrs {\n  onsuccess: (token: AccessToken) => void;\n}\n\nexport default class NewAccessTokenModal<CustomAttrs extends INewAccessTokenModalAttrs = INewAccessTokenModalAttrs> extends Modal<CustomAttrs> {\n  protected titleInput = Stream('');\n\n  className(): string {\n    return 'Modal--small NewAccessTokenModal';\n  }\n\n  title(): Mithril.Children {\n    return app.translator.trans('core.forum.security.new_access_token_modal.title');\n  }\n\n  content(): Mithril.Children {\n    const titleLabel = app.translator.trans('core.forum.security.new_access_token_modal.title_placeholder');\n\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">\n          <div className=\"Form-group\">\n            <input type=\"text\" className=\"FormControl\" bidi={this.titleInput} placeholder={titleLabel} aria-label={titleLabel} />\n          </div>\n          <div className=\"Form-group\">\n            <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n              {app.translator.trans('core.forum.security.new_access_token_modal.submit_button')}\n            </Button>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  submitData(): SaveAttributes {\n    return {\n      title: this.titleInput(),\n    };\n  }\n\n  onsubmit(e: SubmitEvent) {\n    super.onsubmit(e);\n    e.preventDefault();\n\n    this.loading = true;\n\n    app.store\n      .createRecord<AccessToken>('access-tokens')\n      .save(this.submitData())\n      .then((token) => {\n        this.attrs.onsuccess(token);\n        app.modal.close();\n      })\n      .finally(this.loaded.bind(this));\n  }\n}\n","import AccessToken from '../../common/models/AccessToken';\n\nexport default class UserSecurityPageState {\n  protected tokens: AccessToken[] | null = null;\n  public loadingTerminateSessions: boolean = false;\n  public loadingGlobalLogout: boolean = false;\n\n  public hasLoadedTokens(): boolean {\n    return this.tokens !== null;\n  }\n\n  public getTokens(): AccessToken[] | null {\n    return this.tokens;\n  }\n\n  public setTokens(tokens: AccessToken[]): void {\n    this.tokens = tokens;\n  }\n\n  public pushToken(token: AccessToken): void {\n    this.tokens?.push(token);\n  }\n\n  public removeToken(token: AccessToken): void {\n    this.tokens = this.tokens!.filter((t) => t !== token);\n  }\n\n  public getSessionTokens(): AccessToken[] {\n    return this.tokens?.filter((token) => token.isSessionToken()).sort((a, b) => (b.isCurrent() ? 1 : -1)) || [];\n  }\n\n  public getDeveloperTokens(): AccessToken[] | null {\n    return this.tokens?.filter((token) => !token.isSessionToken()) || null;\n  }\n\n  /**\n   * Look up session tokens other than the current one.\n   */\n  public getOtherSessionTokens(): AccessToken[] {\n    return this.tokens?.filter((token) => token.isSessionToken() && !token.isCurrent()) || [];\n  }\n\n  public hasOtherActiveSessions(): boolean {\n    return (this.getOtherSessionTokens() || []).length > 0;\n  }\n\n  public removeOtherSessionTokens() {\n    this.tokens = this.tokens!.filter((token) => !token.isSessionToken() || token.isCurrent());\n  }\n}\n","import app from '../../forum/app';\nimport UserPage, { IUserPageAttrs } from './UserPage';\nimport ItemList from '../../common/utils/ItemList';\nimport FieldSet from '../../common/components/FieldSet';\nimport listItems from '../../common/helpers/listItems';\nimport extractText from '../../common/utils/extractText';\nimport AccessTokensList from './AccessTokensList';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport Button from '../../common/components/Button';\nimport NewAccessTokenModal from './NewAccessTokenModal';\nimport { camelCaseToSnakeCase } from '../../common/utils/string';\nimport type AccessToken from '../../common/models/AccessToken';\nimport type Mithril from 'mithril';\nimport Tooltip from '../../common/components/Tooltip';\nimport UserSecurityPageState from '../states/UserSecurityPageState';\n\n/**\n * The `UserSecurityPage` component displays the user's security control panel, in\n * the context of their user profile.\n */\nexport default class UserSecurityPage<CustomAttrs extends IUserPageAttrs = IUserPageAttrs> extends UserPage<CustomAttrs, UserSecurityPageState> {\n  state = new UserSecurityPageState();\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    const routeUsername = m.route.param('username');\n\n    if (routeUsername !== app.session.user?.slug() && !app.forum.attribute<boolean>('canModerateAccessTokens')) {\n      m.route.set('/');\n    }\n\n    this.loadUser(routeUsername);\n\n    app.setTitle(extractText(app.translator.trans('core.forum.security.title')));\n\n    this.loadTokens();\n  }\n\n  content() {\n    return (\n      <div className=\"UserSecurityPage\">\n        <ul>{listItems(this.settingsItems().toArray())}</ul>\n      </div>\n    );\n  }\n\n  /**\n   * Build an item list for the user's settings controls.\n   */\n  settingsItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    if (\n      app.forum.attribute('canCreateAccessToken') ||\n      app.forum.attribute('canModerateAccessTokens') ||\n      (this.state.hasLoadedTokens() && this.state.getDeveloperTokens()?.length)\n    ) {\n      items.add(\n        'developerTokens',\n        <FieldSet className=\"UserSecurityPage-developerTokens\" label={app.translator.trans(`core.forum.security.developer_tokens_heading`)}>\n          {this.developerTokensItems().toArray()}\n        </FieldSet>\n      );\n    } else if (!this.state.hasLoadedTokens()) {\n      items.add('developerTokens', <LoadingIndicator />);\n    }\n\n    items.add(\n      'sessions',\n      <FieldSet className=\"UserSecurityPage-sessions\" label={app.translator.trans(`core.forum.security.sessions_heading`)}>\n        {this.sessionsItems().toArray()}\n      </FieldSet>\n    );\n\n    if (this.user!.id() === app.session.user!.id()) {\n      items.add(\n        'globalLogout',\n        <FieldSet className=\"UserSecurityPage-globalLogout\" label={app.translator.trans('core.forum.security.global_logout.heading')}>\n          <span className=\"helpText\">{app.translator.trans('core.forum.security.global_logout.help_text')}</span>\n          <Button\n            className=\"Button\"\n            icon=\"fas fa-sign-out-alt\"\n            onclick={this.globalLogout.bind(this)}\n            loading={this.state.loadingGlobalLogout}\n            disabled={this.state.loadingTerminateSessions}\n          >\n            {app.translator.trans('core.forum.security.global_logout.log_out_button')}\n          </Button>\n        </FieldSet>\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's access accessToken settings.\n   */\n  developerTokensItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'accessTokenList',\n      !this.state.hasLoadedTokens() ? (\n        <LoadingIndicator />\n      ) : (\n        <AccessTokensList\n          type=\"developer_token\"\n          ondelete={(token: AccessToken) => {\n            this.state.removeToken(token);\n            m.redraw();\n          }}\n          tokens={this.state.getDeveloperTokens()}\n          icon=\"fas fa-key\"\n          hideTokens={false}\n        />\n      )\n    );\n\n    if (this.user!.id() === app.session.user!.id()) {\n      items.add(\n        'newAccessToken',\n        <Button\n          className=\"Button\"\n          disabled={!app.forum.attribute<boolean>('canCreateAccessToken')}\n          onclick={() =>\n            app.modal.show(NewAccessTokenModal, {\n              onsuccess: (token: AccessToken) => {\n                this.state.pushToken(token);\n                m.redraw();\n              },\n            })\n          }\n        >\n          {app.translator.trans('core.forum.security.new_access_token_button')}\n        </Button>\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's access accessToken settings.\n   */\n  sessionsItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'sessionsList',\n      !this.state.hasLoadedTokens() ? (\n        <LoadingIndicator />\n      ) : (\n        <AccessTokensList\n          type=\"session\"\n          ondelete={(token: AccessToken) => {\n            this.state.removeToken(token);\n            m.redraw();\n          }}\n          tokens={this.state.getSessionTokens()}\n          icon=\"fas fa-laptop\"\n          hideTokens={true}\n        />\n      )\n    );\n\n    if (this.user!.id() === app.session.user!.id()) {\n      const isDisabled = !this.state.hasOtherActiveSessions();\n\n      let terminateAllOthersButton = (\n        <Button\n          className=\"Button\"\n          onclick={this.terminateAllOtherSessions.bind(this)}\n          loading={this.state.loadingTerminateSessions}\n          disabled={this.state.loadingGlobalLogout || isDisabled}\n        >\n          {app.translator.trans('core.forum.security.terminate_all_other_sessions')}\n        </Button>\n      );\n\n      if (isDisabled) {\n        terminateAllOthersButton = (\n          <Tooltip text={app.translator.trans('core.forum.security.cannot_terminate_current_session')}>\n            <span tabindex=\"0\">{terminateAllOthersButton}</span>\n          </Tooltip>\n        );\n      }\n\n      items.add('terminateAllOtherSessions', terminateAllOthersButton);\n    }\n\n    return items;\n  }\n\n  loadTokens() {\n    return app.store\n      .find<AccessToken[]>('access-tokens', {\n        filter: { user: this.user!.id()! },\n      })\n      .then((tokens) => {\n        this.state.setTokens(tokens);\n        m.redraw();\n      });\n  }\n\n  terminateAllOtherSessions() {\n    if (!confirm(extractText(app.translator.trans('core.forum.security.terminate_all_other_sessions_confirmation')))) return;\n\n    this.state.loadingTerminateSessions = true;\n\n    return app\n      .request({\n        method: 'DELETE',\n        url: app.forum.attribute('apiUrl') + '/sessions',\n      })\n      .then(() => {\n        // Count terminated sessions first.\n        const count = this.state.getOtherSessionTokens().length;\n\n        this.state.removeOtherSessionTokens();\n\n        app.alerts.show({ type: 'success' }, app.translator.trans('core.forum.security.session_terminated', { count }));\n      })\n      .catch(() => {\n        app.alerts.show({ type: 'error' }, app.translator.trans('core.forum.security.session_termination_failed'));\n      })\n      .finally(() => {\n        this.state.loadingTerminateSessions = false;\n        m.redraw();\n      });\n  }\n\n  globalLogout() {\n    this.state.loadingGlobalLogout = true;\n\n    return app\n      .request({\n        method: 'POST',\n        url: app.forum.attribute<string>('baseUrl') + '/global-logout',\n      })\n      .then(() => window.location.reload())\n      .finally(() => {\n        this.state.loadingGlobalLogout = false;\n        m.redraw();\n      });\n  }\n}\n","import ForumApplication from './ForumApplication';\nimport IndexPage from './components/IndexPage';\nimport DiscussionPage from './components/DiscussionPage';\nimport PostsUserPage from './components/PostsUserPage';\nimport DiscussionsUserPage from './components/DiscussionsUserPage';\nimport SettingsPage from './components/SettingsPage';\nimport NotificationsPage from './components/NotificationsPage';\nimport DiscussionPageResolver from './resolvers/DiscussionPageResolver';\nimport Discussion from '../common/models/Discussion';\nimport type Post from '../common/models/Post';\nimport type User from '../common/models/User';\nimport UserSecurityPage from './components/UserSecurityPage';\n\n/**\n * Helper functions to generate URLs to form pages.\n */\nexport interface ForumRoutes {\n  discussion: (discussion: Discussion, near?: number) => string;\n  post: (post: Post) => string;\n  user: (user: User) => string;\n}\n\n/**\n * The `routes` initializer defines the forum app's routes.\n */\nexport default function (app: ForumApplication) {\n  app.routes = {\n    index: { path: '/all', component: IndexPage },\n\n    discussion: { path: '/d/:id', component: DiscussionPage, resolverClass: DiscussionPageResolver },\n    'discussion.near': { path: '/d/:id/:near', component: DiscussionPage, resolverClass: DiscussionPageResolver },\n\n    user: { path: '/u/:username', component: PostsUserPage },\n    'user.posts': { path: '/u/:username', component: PostsUserPage },\n    'user.discussions': { path: '/u/:username/discussions', component: DiscussionsUserPage },\n\n    settings: { path: '/settings', component: SettingsPage },\n    'user.security': { path: '/u/:username/security', component: UserSecurityPage },\n    notifications: { path: '/notifications', component: NotificationsPage },\n  };\n}\n\nexport function makeRouteHelpers(app: ForumApplication) {\n  return {\n    /**\n     * Generate a URL to a discussion.\n     */\n    discussion: (discussion: Discussion, near?: number) => {\n      return app.route(near && near !== 1 ? 'discussion.near' : 'discussion', {\n        id: discussion.slug(),\n        near: near && near !== 1 ? near : undefined,\n      });\n    },\n\n    /**\n     * Generate a URL to a post.\n     */\n    post: (post: Post) => {\n      return app.route.discussion(post.discussion(), post.number());\n    },\n\n    /**\n     * Generate a URL to a user.\n     */\n    user: (user: User) => {\n      return app.route('user', {\n        username: user.slug(),\n      });\n    },\n  };\n}\n","import Alert from '../../common/components/Alert';\nimport Button from '../../common/components/Button';\nimport icon from '../../common/helpers/icon';\nimport Component from '../../common/Component';\n\n/**\n * Shows an alert if the user has not yet confirmed their email address.\n *\n * @param {import('../ForumApplication').default} app\n */\nexport default function alertEmailConfirmation(app) {\n  const user = app.session.user;\n\n  if (!user || user.isEmailConfirmed()) return;\n\n  class ResendButton extends Component {\n    oninit(vnode) {\n      super.oninit(vnode);\n\n      this.loading = false;\n      this.sent = false;\n    }\n\n    view() {\n      return (\n        <Button className=\"Button Button--link\" onclick={this.onclick.bind(this)} loading={this.loading} disabled={this.sent}>\n          {this.sent\n            ? [icon('fas fa-check'), ' ', app.translator.trans('core.forum.user_email_confirmation.sent_message')]\n            : app.translator.trans('core.forum.user_email_confirmation.resend_button')}\n        </Button>\n      );\n    }\n\n    onclick() {\n      this.loading = true;\n      m.redraw();\n\n      app\n        .request({\n          method: 'POST',\n          url: app.forum.attribute('apiUrl') + '/users/' + user.id() + '/send-confirmation',\n        })\n        .then(() => {\n          this.loading = false;\n          this.sent = true;\n          m.redraw();\n        })\n        .catch(() => {\n          this.loading = false;\n          m.redraw();\n        });\n    }\n  }\n\n  class ContainedAlert extends Alert {\n    view(vnode) {\n      const vdom = super.view(vnode);\n      return { ...vdom, children: [<div className=\"container\">{vdom.children}</div>] };\n    }\n  }\n\n  m.mount($('<div className=\"App-notices\"/>').insertBefore('#content')[0], {\n    view: () => (\n      <ContainedAlert dismissible={false} controls={[<ResendButton />]} className=\"Alert--emailConfirmation\">\n        {app.translator.trans('core.forum.user_email_confirmation.alert_message', { email: <strong>{user.email()}</strong> })}\n      </ContainedAlert>\n    ),\n  });\n}\n","const candidateSelectors = [\n  'input',\n  'select',\n  'textarea',\n  'a[href]',\n  'button',\n  '[tabindex]:not(slot)',\n  'audio[controls]',\n  'video[controls]',\n  '[contenteditable]:not([contenteditable=\"false\"])',\n  'details>summary:first-of-type',\n  'details',\n];\nconst candidateSelector = /* #__PURE__ */ candidateSelectors.join(',');\n\nconst NoElement = typeof Element === 'undefined';\n\nconst matches = NoElement\n  ? function () {}\n  : Element.prototype.matches ||\n    Element.prototype.msMatchesSelector ||\n    Element.prototype.webkitMatchesSelector;\n\nconst getRootNode =\n  !NoElement && Element.prototype.getRootNode\n    ? (element) => element.getRootNode()\n    : (element) => element.ownerDocument;\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nconst getCandidates = function (el, includeContainer, filter) {\n  let candidates = Array.prototype.slice.apply(\n    el.querySelectorAll(candidateSelector)\n  );\n  if (includeContainer && matches.call(el, candidateSelector)) {\n    candidates.unshift(el);\n  }\n  candidates = candidates.filter(filter);\n  return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidatesScope\n * @property {Element} scope contains inner candidates\n * @property {Element[]} candidates\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n *  if a function, implies shadow support is enabled and either returns the shadow root of an element\n *  or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidatesScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.<Element|CandidatesScope>}\n */\nconst getCandidatesIteratively = function (\n  elements,\n  includeContainer,\n  options\n) {\n  const candidates = [];\n  const elementsToCheck = Array.from(elements);\n  while (elementsToCheck.length) {\n    const element = elementsToCheck.shift();\n    if (element.tagName === 'SLOT') {\n      // add shadow dom slot scope (slot itself cannot be focusable)\n      const assigned = element.assignedElements();\n      const content = assigned.length ? assigned : element.children;\n      const nestedCandidates = getCandidatesIteratively(content, true, options);\n      if (options.flatten) {\n        candidates.push(...nestedCandidates);\n      } else {\n        candidates.push({\n          scope: element,\n          candidates: nestedCandidates,\n        });\n      }\n    } else {\n      // check candidate element\n      const validCandidate = matches.call(element, candidateSelector);\n      if (\n        validCandidate &&\n        options.filter(element) &&\n        (includeContainer || !elements.includes(element))\n      ) {\n        candidates.push(element);\n      }\n\n      // iterate over shadow content if possible\n      const shadowRoot =\n        element.shadowRoot ||\n        // check for an undisclosed shadow\n        (typeof options.getShadowRoot === 'function' &&\n          options.getShadowRoot(element));\n\n      const validShadowRoot =\n        !options.shadowRootFilter || options.shadowRootFilter(element);\n\n      if (shadowRoot && validShadowRoot) {\n        // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n        //  shadow exists, so look at light dom children as fallback BUT create a scope for any\n        //  child candidates found because they're likely slotted elements (elements that are\n        //  children of the web component element (which has the shadow), in the light dom, but\n        //  slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n        //  _after_ we return from this recursive call\n        const nestedCandidates = getCandidatesIteratively(\n          shadowRoot === true ? element.children : shadowRoot.children,\n          true,\n          options\n        );\n\n        if (options.flatten) {\n          candidates.push(...nestedCandidates);\n        } else {\n          candidates.push({\n            scope: element,\n            candidates: nestedCandidates,\n          });\n        }\n      } else {\n        // there's not shadow so just dig into the element's (light dom) children\n        //  __without__ giving the element special scope treatment\n        elementsToCheck.unshift(...element.children);\n      }\n    }\n  }\n  return candidates;\n};\n\nconst getTabindex = function (node, isScope) {\n  if (node.tabIndex < 0) {\n    // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n    // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n    // yet they are still part of the regular tab order; in FF, they get a default\n    // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n    // order, consider their tab index to be 0.\n    // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n    // so if they don't have a tabindex attribute specifically set, assume it's 0.\n    //\n    // isScope is positive for custom element with shadow root or slot that by default\n    // have tabIndex -1, but need to be sorted by document order in order for their\n    // content to be inserted in the correct position\n    if (\n      (isScope ||\n        /^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) ||\n        node.isContentEditable) &&\n      isNaN(parseInt(node.getAttribute('tabindex'), 10))\n    ) {\n      return 0;\n    }\n  }\n\n  return node.tabIndex;\n};\n\nconst sortOrderedTabbables = function (a, b) {\n  return a.tabIndex === b.tabIndex\n    ? a.documentOrder - b.documentOrder\n    : a.tabIndex - b.tabIndex;\n};\n\nconst isInput = function (node) {\n  return node.tagName === 'INPUT';\n};\n\nconst isHiddenInput = function (node) {\n  return isInput(node) && node.type === 'hidden';\n};\n\nconst isDetailsWithSummary = function (node) {\n  const r =\n    node.tagName === 'DETAILS' &&\n    Array.prototype.slice\n      .apply(node.children)\n      .some((child) => child.tagName === 'SUMMARY');\n  return r;\n};\n\nconst getCheckedRadio = function (nodes, form) {\n  for (let i = 0; i < nodes.length; i++) {\n    if (nodes[i].checked && nodes[i].form === form) {\n      return nodes[i];\n    }\n  }\n};\n\nconst isTabbableRadio = function (node) {\n  if (!node.name) {\n    return true;\n  }\n  const radioScope = node.form || getRootNode(node);\n  const queryRadios = function (name) {\n    return radioScope.querySelectorAll(\n      'input[type=\"radio\"][name=\"' + name + '\"]'\n    );\n  };\n\n  let radioSet;\n  if (\n    typeof window !== 'undefined' &&\n    typeof window.CSS !== 'undefined' &&\n    typeof window.CSS.escape === 'function'\n  ) {\n    radioSet = queryRadios(window.CSS.escape(node.name));\n  } else {\n    try {\n      radioSet = queryRadios(node.name);\n    } catch (err) {\n      // eslint-disable-next-line no-console\n      console.error(\n        'Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s',\n        err.message\n      );\n      return false;\n    }\n  }\n\n  const checked = getCheckedRadio(radioSet, node.form);\n  return !checked || checked === node;\n};\n\nconst isRadio = function (node) {\n  return isInput(node) && node.type === 'radio';\n};\n\nconst isNonTabbableRadio = function (node) {\n  return isRadio(node) && !isTabbableRadio(node);\n};\n\nconst isZeroArea = function (node) {\n  const { width, height } = node.getBoundingClientRect();\n  return width === 0 && height === 0;\n};\nconst isHidden = function (node, { displayCheck, getShadowRoot }) {\n  // NOTE: visibility will be `undefined` if node is detached from the document\n  //  (see notes about this further down), which means we will consider it visible\n  //  (this is legacy behavior from a very long way back)\n  // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n  //  _visibility_ check, not a _display_ check\n  if (getComputedStyle(node).visibility === 'hidden') {\n    return true;\n  }\n\n  const isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n  const nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n  if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n    return true;\n  }\n\n  // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n  //  (but NOT _the_ document; see second 'If' comment below for more).\n  // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n  //  is attached, and the one we need to check if it's in the document or not (because the\n  //  shadow, and all nodes it contains, is never considered in the document since shadows\n  //  behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n  //  is hidden, or is not in the document itself but is detached, it will affect the shadow's\n  //  visibility, including all the nodes it contains). The host could be any normal node,\n  //  or a custom element (i.e. web component). Either way, that's the one that is considered\n  //  part of the document, not the shadow root, nor any of its children (i.e. the node being\n  //  tested).\n  // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n  //  document (per the docs) and while it's a Document-type object, that document does not\n  //  appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n  //  to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n  //  using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n  //  node is actually detached.\n  const nodeRootHost = getRootNode(node).host;\n  const nodeIsAttached =\n    nodeRootHost?.ownerDocument.contains(nodeRootHost) ||\n    node.ownerDocument.contains(node);\n\n  if (!displayCheck || displayCheck === 'full') {\n    if (typeof getShadowRoot === 'function') {\n      // figure out if we should consider the node to be in an undisclosed shadow and use the\n      //  'non-zero-area' fallback\n      const originalNode = node;\n      while (node) {\n        const parentElement = node.parentElement;\n        const rootNode = getRootNode(node);\n        if (\n          parentElement &&\n          !parentElement.shadowRoot &&\n          getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n        ) {\n          // node has an undisclosed shadow which means we can only treat it as a black box, so we\n          //  fall back to a non-zero-area test\n          return isZeroArea(node);\n        } else if (node.assignedSlot) {\n          // iterate up slot\n          node = node.assignedSlot;\n        } else if (!parentElement && rootNode !== node.ownerDocument) {\n          // cross shadow boundary\n          node = rootNode.host;\n        } else {\n          // iterate up normal dom\n          node = parentElement;\n        }\n      }\n\n      node = originalNode;\n    }\n    // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n    //  (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n    //  it might be a falsy value, which means shadow DOM support is disabled\n\n    // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n    //  now we can just test to see if it would normally be visible or not, provided it's\n    //  attached to the main document.\n    // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n    //  `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n    if (nodeIsAttached) {\n      // this works wherever the node is: if there's at least one client rect, it's\n      //  somehow displayed; it also covers the CSS 'display: contents' case where the\n      //  node itself is hidden in place of its contents; and there's no need to search\n      //  up the hierarchy either\n      return !node.getClientRects().length;\n    }\n\n    // Else, the node isn't attached to the document, which means the `getClientRects()`\n    //  API will __always__ return zero rects (this can happen, for example, if React\n    //  is used to render nodes onto a detached tree, as confirmed in this thread:\n    //  https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n    //\n    // It also means that even window.getComputedStyle(node).display will return `undefined`\n    //  because styles are only computed for nodes that are in the document.\n    //\n    // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n    //  somehow. Though it was never stated officially, anyone who has ever used tabbable\n    //  APIs on nodes in detached containers has actually implicitly used tabbable in what\n    //  was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n    //  considering __everything__ to be visible because of the innability to determine styles.\n  } else if (displayCheck === 'non-zero-area') {\n    // NOTE: Even though this tests that the node's client rect is non-zero to determine\n    //  whether it's displayed, and that a detached node will __always__ have a zero-area\n    //  client rect, we don't special-case for whether the node is attached or not. In\n    //  this mode, we do want to consider nodes that have a zero area to be hidden at all\n    //  times, and that includes attached or not.\n    return isZeroArea(node);\n  }\n\n  // visible, as far as we can tell, or per current `displayCheck` mode\n  return false;\n};\n\n// form fields (nested) inside a disabled fieldset are not focusable/tabbable\n//  unless they are in the _first_ <legend> element of the top-most disabled\n//  fieldset\nconst isDisabledFromFieldset = function (node) {\n  if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n    let parentNode = node.parentElement;\n    // check if `node` is contained in a disabled <fieldset>\n    while (parentNode) {\n      if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n        // look for the first <legend> among the children of the disabled <fieldset>\n        for (let i = 0; i < parentNode.children.length; i++) {\n          const child = parentNode.children.item(i);\n          // when the first <legend> (in document order) is found\n          if (child.tagName === 'LEGEND') {\n            // if its parent <fieldset> is not nested in another disabled <fieldset>,\n            // return whether `node` is a descendant of its first <legend>\n            return matches.call(parentNode, 'fieldset[disabled] *')\n              ? true\n              : !child.contains(node);\n          }\n        }\n        // the disabled <fieldset> containing `node` has no <legend>\n        return true;\n      }\n      parentNode = parentNode.parentElement;\n    }\n  }\n\n  // else, node's tabbable/focusable state should not be affected by a fieldset's\n  //  enabled/disabled state\n  return false;\n};\n\nconst isNodeMatchingSelectorFocusable = function (options, node) {\n  if (\n    node.disabled ||\n    isHiddenInput(node) ||\n    isHidden(node, options) ||\n    // For a details element with a summary, the summary element gets the focus\n    isDetailsWithSummary(node) ||\n    isDisabledFromFieldset(node)\n  ) {\n    return false;\n  }\n  return true;\n};\n\nconst isNodeMatchingSelectorTabbable = function (options, node) {\n  if (\n    isNonTabbableRadio(node) ||\n    getTabindex(node) < 0 ||\n    !isNodeMatchingSelectorFocusable(options, node)\n  ) {\n    return false;\n  }\n  return true;\n};\n\nconst isValidShadowRootTabbable = function (shadowHostNode) {\n  const tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n  if (isNaN(tabIndex) || tabIndex >= 0) {\n    return true;\n  }\n  // If a custom element has an explicit negative tabindex,\n  // browsers will not allow tab targeting said element's children.\n  return false;\n};\n\n/**\n * @param {Array.<Element|CandidatesScope>} candidates\n * @returns Element[]\n */\nconst sortByOrder = function (candidates) {\n  const regularTabbables = [];\n  const orderedTabbables = [];\n  candidates.forEach(function (item, i) {\n    const isScope = !!item.scope;\n    const element = isScope ? item.scope : item;\n    const candidateTabindex = getTabindex(element, isScope);\n    const elements = isScope ? sortByOrder(item.candidates) : element;\n    if (candidateTabindex === 0) {\n      isScope\n        ? regularTabbables.push(...elements)\n        : regularTabbables.push(element);\n    } else {\n      orderedTabbables.push({\n        documentOrder: i,\n        tabIndex: candidateTabindex,\n        item: item,\n        isScope: isScope,\n        content: elements,\n      });\n    }\n  });\n\n  return orderedTabbables\n    .sort(sortOrderedTabbables)\n    .reduce((acc, sortable) => {\n      sortable.isScope\n        ? acc.push(...sortable.content)\n        : acc.push(sortable.content);\n      return acc;\n    }, [])\n    .concat(regularTabbables);\n};\n\nconst tabbable = function (el, options) {\n  options = options || {};\n\n  let candidates;\n  if (options.getShadowRoot) {\n    candidates = getCandidatesIteratively([el], options.includeContainer, {\n      filter: isNodeMatchingSelectorTabbable.bind(null, options),\n      flatten: false,\n      getShadowRoot: options.getShadowRoot,\n      shadowRootFilter: isValidShadowRootTabbable,\n    });\n  } else {\n    candidates = getCandidates(\n      el,\n      options.includeContainer,\n      isNodeMatchingSelectorTabbable.bind(null, options)\n    );\n  }\n  return sortByOrder(candidates);\n};\n\nconst focusable = function (el, options) {\n  options = options || {};\n\n  let candidates;\n  if (options.getShadowRoot) {\n    candidates = getCandidatesIteratively([el], options.includeContainer, {\n      filter: isNodeMatchingSelectorFocusable.bind(null, options),\n      flatten: true,\n      getShadowRoot: options.getShadowRoot,\n    });\n  } else {\n    candidates = getCandidates(\n      el,\n      options.includeContainer,\n      isNodeMatchingSelectorFocusable.bind(null, options)\n    );\n  }\n\n  return candidates;\n};\n\nconst isTabbable = function (node, options) {\n  options = options || {};\n  if (!node) {\n    throw new Error('No node provided');\n  }\n  if (matches.call(node, candidateSelector) === false) {\n    return false;\n  }\n  return isNodeMatchingSelectorTabbable(options, node);\n};\n\nconst focusableCandidateSelector = /* #__PURE__ */ candidateSelectors\n  .concat('iframe')\n  .join(',');\n\nconst isFocusable = function (node, options) {\n  options = options || {};\n  if (!node) {\n    throw new Error('No node provided');\n  }\n  if (matches.call(node, focusableCandidateSelector) === false) {\n    return false;\n  }\n  return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { tabbable, focusable, isTabbable, isFocusable };\n","import { tabbable, focusable, isFocusable, isTabbable } from 'tabbable';\n\nconst activeFocusTraps = (function () {\n  const trapQueue = [];\n  return {\n    activateTrap(trap) {\n      if (trapQueue.length > 0) {\n        const activeTrap = trapQueue[trapQueue.length - 1];\n        if (activeTrap !== trap) {\n          activeTrap.pause();\n        }\n      }\n\n      const trapIndex = trapQueue.indexOf(trap);\n      if (trapIndex === -1) {\n        trapQueue.push(trap);\n      } else {\n        // move this existing trap to the front of the queue\n        trapQueue.splice(trapIndex, 1);\n        trapQueue.push(trap);\n      }\n    },\n\n    deactivateTrap(trap) {\n      const trapIndex = trapQueue.indexOf(trap);\n      if (trapIndex !== -1) {\n        trapQueue.splice(trapIndex, 1);\n      }\n\n      if (trapQueue.length > 0) {\n        trapQueue[trapQueue.length - 1].unpause();\n      }\n    },\n  };\n})();\n\nconst isSelectableInput = function (node) {\n  return (\n    node.tagName &&\n    node.tagName.toLowerCase() === 'input' &&\n    typeof node.select === 'function'\n  );\n};\n\nconst isEscapeEvent = function (e) {\n  return e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27;\n};\n\nconst isTabEvent = function (e) {\n  return e.key === 'Tab' || e.keyCode === 9;\n};\n\nconst delay = function (fn) {\n  return setTimeout(fn, 0);\n};\n\n// Array.find/findIndex() are not supported on IE; this replicates enough\n//  of Array.findIndex() for our needs\nconst findIndex = function (arr, fn) {\n  let idx = -1;\n\n  arr.every(function (value, i) {\n    if (fn(value)) {\n      idx = i;\n      return false; // break\n    }\n\n    return true; // next\n  });\n\n  return idx;\n};\n\n/**\n * Get an option's value when it could be a plain value, or a handler that provides\n *  the value.\n * @param {*} value Option's value to check.\n * @param {...*} [params] Any parameters to pass to the handler, if `value` is a function.\n * @returns {*} The `value`, or the handler's returned value.\n */\nconst valueOrHandler = function (value, ...params) {\n  return typeof value === 'function' ? value(...params) : value;\n};\n\nconst getActualTarget = function (event) {\n  // NOTE: If the trap is _inside_ a shadow DOM, event.target will always be the\n  //  shadow host. However, event.target.composedPath() will be an array of\n  //  nodes \"clicked\" from inner-most (the actual element inside the shadow) to\n  //  outer-most (the host HTML document). If we have access to composedPath(),\n  //  then use its first element; otherwise, fall back to event.target (and\n  //  this only works for an _open_ shadow DOM; otherwise,\n  //  composedPath()[0] === event.target always).\n  return event.target.shadowRoot && typeof event.composedPath === 'function'\n    ? event.composedPath()[0]\n    : event.target;\n};\n\nconst createFocusTrap = function (elements, userOptions) {\n  // SSR: a live trap shouldn't be created in this type of environment so this\n  //  should be safe code to execute if the `document` option isn't specified\n  const doc = userOptions?.document || document;\n\n  const config = {\n    returnFocusOnDeactivate: true,\n    escapeDeactivates: true,\n    delayInitialFocus: true,\n    ...userOptions,\n  };\n\n  const state = {\n    // containers given to createFocusTrap()\n    // @type {Array<HTMLElement>}\n    containers: [],\n\n    // list of objects identifying tabbable nodes in `containers` in the trap\n    // NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap\n    //  is active, but the trap should never get to a state where there isn't at least one group\n    //  with at least one tabbable node in it (that would lead to an error condition that would\n    //  result in an error being thrown)\n    // @type {Array<{\n    //   container: HTMLElement,\n    //   tabbableNodes: Array<HTMLElement>, // empty if none\n    //   focusableNodes: Array<HTMLElement>, // empty if none\n    //   firstTabbableNode: HTMLElement|null,\n    //   lastTabbableNode: HTMLElement|null,\n    //   nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined\n    // }>}\n    containerGroups: [], // same order/length as `containers` list\n\n    // references to objects in `containerGroups`, but only those that actually have\n    //  tabbable nodes in them\n    // NOTE: same order as `containers` and `containerGroups`, but __not necessarily__\n    //  the same length\n    tabbableGroups: [],\n\n    nodeFocusedBeforeActivation: null,\n    mostRecentlyFocusedNode: null,\n    active: false,\n    paused: false,\n\n    // timer ID for when delayInitialFocus is true and initial focus in this trap\n    //  has been delayed during activation\n    delayInitialFocusTimer: undefined,\n  };\n\n  let trap; // eslint-disable-line prefer-const -- some private functions reference it, and its methods reference private functions, so we must declare here and define later\n\n  /**\n   * Gets a configuration option value.\n   * @param {Object|undefined} configOverrideOptions If true, and option is defined in this set,\n   *  value will be taken from this object. Otherwise, value will be taken from base configuration.\n   * @param {string} optionName Name of the option whose value is sought.\n   * @param {string|undefined} [configOptionName] Name of option to use __instead of__ `optionName`\n   *  IIF `configOverrideOptions` is not defined. Otherwise, `optionName` is used.\n   */\n  const getOption = (configOverrideOptions, optionName, configOptionName) => {\n    return configOverrideOptions &&\n      configOverrideOptions[optionName] !== undefined\n      ? configOverrideOptions[optionName]\n      : config[configOptionName || optionName];\n  };\n\n  /**\n   * Finds the index of the container that contains the element.\n   * @param {HTMLElement} element\n   * @returns {number} Index of the container in either `state.containers` or\n   *  `state.containerGroups` (the order/length of these lists are the same); -1\n   *  if the element isn't found.\n   */\n  const findContainerIndex = function (element) {\n    // NOTE: search `containerGroups` because it's possible a group contains no tabbable\n    //  nodes, but still contains focusable nodes (e.g. if they all have `tabindex=-1`)\n    //  and we still need to find the element in there\n    return state.containerGroups.findIndex(\n      ({ container, tabbableNodes }) =>\n        container.contains(element) ||\n        // fall back to explicit tabbable search which will take into consideration any\n        //  web components if the `tabbableOptions.getShadowRoot` option was used for\n        //  the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't\n        //  look inside web components even if open)\n        tabbableNodes.find((node) => node === element)\n    );\n  };\n\n  /**\n   * Gets the node for the given option, which is expected to be an option that\n   *  can be either a DOM node, a string that is a selector to get a node, `false`\n   *  (if a node is explicitly NOT given), or a function that returns any of these\n   *  values.\n   * @param {string} optionName\n   * @returns {undefined | false | HTMLElement | SVGElement} Returns\n   *  `undefined` if the option is not specified; `false` if the option\n   *  resolved to `false` (node explicitly not given); otherwise, the resolved\n   *  DOM node.\n   * @throws {Error} If the option is set, not `false`, and is not, or does not\n   *  resolve to a node.\n   */\n  const getNodeForOption = function (optionName, ...params) {\n    let optionValue = config[optionName];\n\n    if (typeof optionValue === 'function') {\n      optionValue = optionValue(...params);\n    }\n\n    if (optionValue === true) {\n      optionValue = undefined; // use default value\n    }\n\n    if (!optionValue) {\n      if (optionValue === undefined || optionValue === false) {\n        return optionValue;\n      }\n      // else, empty string (invalid), null (invalid), 0 (invalid)\n\n      throw new Error(\n        `\\`${optionName}\\` was specified but was not a node, or did not return a node`\n      );\n    }\n\n    let node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point\n\n    if (typeof optionValue === 'string') {\n      node = doc.querySelector(optionValue); // resolve to node, or null if fails\n      if (!node) {\n        throw new Error(\n          `\\`${optionName}\\` as selector refers to no known node`\n        );\n      }\n    }\n\n    return node;\n  };\n\n  const getInitialFocusNode = function () {\n    let node = getNodeForOption('initialFocus');\n\n    // false explicitly indicates we want no initialFocus at all\n    if (node === false) {\n      return false;\n    }\n\n    if (node === undefined) {\n      // option not specified: use fallback options\n      if (findContainerIndex(doc.activeElement) >= 0) {\n        node = doc.activeElement;\n      } else {\n        const firstTabbableGroup = state.tabbableGroups[0];\n        const firstTabbableNode =\n          firstTabbableGroup && firstTabbableGroup.firstTabbableNode;\n\n        // NOTE: `fallbackFocus` option function cannot return `false` (not supported)\n        node = firstTabbableNode || getNodeForOption('fallbackFocus');\n      }\n    }\n\n    if (!node) {\n      throw new Error(\n        'Your focus-trap needs to have at least one focusable element'\n      );\n    }\n\n    return node;\n  };\n\n  const updateTabbableNodes = function () {\n    state.containerGroups = state.containers.map((container) => {\n      const tabbableNodes = tabbable(container, config.tabbableOptions);\n\n      // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes\n      //  are a superset of tabbable nodes\n      const focusableNodes = focusable(container, config.tabbableOptions);\n\n      return {\n        container,\n        tabbableNodes,\n        focusableNodes,\n        firstTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[0] : null,\n        lastTabbableNode:\n          tabbableNodes.length > 0\n            ? tabbableNodes[tabbableNodes.length - 1]\n            : null,\n\n        /**\n         * Finds the __tabbable__ node that follows the given node in the specified direction,\n         *  in this container, if any.\n         * @param {HTMLElement} node\n         * @param {boolean} [forward] True if going in forward tab order; false if going\n         *  in reverse.\n         * @returns {HTMLElement|undefined} The next tabbable node, if any.\n         */\n        nextTabbableNode(node, forward = true) {\n          // NOTE: If tabindex is positive (in order to manipulate the tab order separate\n          //  from the DOM order), this __will not work__ because the list of focusableNodes,\n          //  while it contains tabbable nodes, does not sort its nodes in any order other\n          //  than DOM order, because it can't: Where would you place focusable (but not\n          //  tabbable) nodes in that order? They have no order, because they aren't tabbale...\n          // Support for positive tabindex is already broken and hard to manage (possibly\n          //  not supportable, TBD), so this isn't going to make things worse than they\n          //  already are, and at least makes things better for the majority of cases where\n          //  tabindex is either 0/unset or negative.\n          // FYI, positive tabindex issue: https://github.com/focus-trap/focus-trap/issues/375\n          const nodeIdx = focusableNodes.findIndex((n) => n === node);\n          if (nodeIdx < 0) {\n            return undefined;\n          }\n\n          if (forward) {\n            return focusableNodes\n              .slice(nodeIdx + 1)\n              .find((n) => isTabbable(n, config.tabbableOptions));\n          }\n\n          return focusableNodes\n            .slice(0, nodeIdx)\n            .reverse()\n            .find((n) => isTabbable(n, config.tabbableOptions));\n        },\n      };\n    });\n\n    state.tabbableGroups = state.containerGroups.filter(\n      (group) => group.tabbableNodes.length > 0\n    );\n\n    // throw if no groups have tabbable nodes and we don't have a fallback focus node either\n    if (\n      state.tabbableGroups.length <= 0 &&\n      !getNodeForOption('fallbackFocus') // returning false not supported for this option\n    ) {\n      throw new Error(\n        'Your focus-trap must have at least one container with at least one tabbable node in it at all times'\n      );\n    }\n  };\n\n  const tryFocus = function (node) {\n    if (node === false) {\n      return;\n    }\n\n    if (node === doc.activeElement) {\n      return;\n    }\n\n    if (!node || !node.focus) {\n      tryFocus(getInitialFocusNode());\n      return;\n    }\n\n    node.focus({ preventScroll: !!config.preventScroll });\n    state.mostRecentlyFocusedNode = node;\n\n    if (isSelectableInput(node)) {\n      node.select();\n    }\n  };\n\n  const getReturnFocusNode = function (previousActiveElement) {\n    const node = getNodeForOption('setReturnFocus', previousActiveElement);\n    return node ? node : node === false ? false : previousActiveElement;\n  };\n\n  // This needs to be done on mousedown and touchstart instead of click\n  // so that it precedes the focus event.\n  const checkPointerDown = function (e) {\n    const target = getActualTarget(e);\n\n    if (findContainerIndex(target) >= 0) {\n      // allow the click since it ocurred inside the trap\n      return;\n    }\n\n    if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n      // immediately deactivate the trap\n      trap.deactivate({\n        // if, on deactivation, we should return focus to the node originally-focused\n        //  when the trap was activated (or the configured `setReturnFocus` node),\n        //  then assume it's also OK to return focus to the outside node that was\n        //  just clicked, causing deactivation, as long as that node is focusable;\n        //  if it isn't focusable, then return focus to the original node focused\n        //  on activation (or the configured `setReturnFocus` node)\n        // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,\n        //  which will result in the outside click setting focus to the node\n        //  that was clicked, whether it's focusable or not; by setting\n        //  `returnFocus: true`, we'll attempt to re-focus the node originally-focused\n        //  on activation (or the configured `setReturnFocus` node)\n        returnFocus:\n          config.returnFocusOnDeactivate &&\n          !isFocusable(target, config.tabbableOptions),\n      });\n      return;\n    }\n\n    // This is needed for mobile devices.\n    // (If we'll only let `click` events through,\n    // then on mobile they will be blocked anyways if `touchstart` is blocked.)\n    if (valueOrHandler(config.allowOutsideClick, e)) {\n      // allow the click outside the trap to take place\n      return;\n    }\n\n    // otherwise, prevent the click\n    e.preventDefault();\n  };\n\n  // In case focus escapes the trap for some strange reason, pull it back in.\n  const checkFocusIn = function (e) {\n    const target = getActualTarget(e);\n    const targetContained = findContainerIndex(target) >= 0;\n\n    // In Firefox when you Tab out of an iframe the Document is briefly focused.\n    if (targetContained || target instanceof Document) {\n      if (targetContained) {\n        state.mostRecentlyFocusedNode = target;\n      }\n    } else {\n      // escaped! pull it back in to where it just left\n      e.stopImmediatePropagation();\n      tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());\n    }\n  };\n\n  // Hijack Tab events on the first and last focusable nodes of the trap,\n  // in order to prevent focus from escaping. If it escapes for even a\n  // moment it can end up scrolling the page and causing confusion so we\n  // kind of need to capture the action at the keydown phase.\n  const checkTab = function (e) {\n    const target = getActualTarget(e);\n    updateTabbableNodes();\n\n    let destinationNode = null;\n\n    if (state.tabbableGroups.length > 0) {\n      // make sure the target is actually contained in a group\n      // NOTE: the target may also be the container itself if it's focusable\n      //  with tabIndex='-1' and was given initial focus\n      const containerIndex = findContainerIndex(target);\n      const containerGroup =\n        containerIndex >= 0 ? state.containerGroups[containerIndex] : undefined;\n\n      if (containerIndex < 0) {\n        // target not found in any group: quite possible focus has escaped the trap,\n        //  so bring it back in to...\n        if (e.shiftKey) {\n          // ...the last node in the last group\n          destinationNode =\n            state.tabbableGroups[state.tabbableGroups.length - 1]\n              .lastTabbableNode;\n        } else {\n          // ...the first node in the first group\n          destinationNode = state.tabbableGroups[0].firstTabbableNode;\n        }\n      } else if (e.shiftKey) {\n        // REVERSE\n\n        // is the target the first tabbable node in a group?\n        let startOfGroupIndex = findIndex(\n          state.tabbableGroups,\n          ({ firstTabbableNode }) => target === firstTabbableNode\n        );\n\n        if (\n          startOfGroupIndex < 0 &&\n          (containerGroup.container === target ||\n            (isFocusable(target, config.tabbableOptions) &&\n              !isTabbable(target, config.tabbableOptions) &&\n              !containerGroup.nextTabbableNode(target, false)))\n        ) {\n          // an exception case where the target is either the container itself, or\n          //  a non-tabbable node that was given focus (i.e. tabindex is negative\n          //  and user clicked on it or node was programmatically given focus)\n          //  and is not followed by any other tabbable node, in which\n          //  case, we should handle shift+tab as if focus were on the container's\n          //  first tabbable node, and go to the last tabbable node of the LAST group\n          startOfGroupIndex = containerIndex;\n        }\n\n        if (startOfGroupIndex >= 0) {\n          // YES: then shift+tab should go to the last tabbable node in the\n          //  previous group (and wrap around to the last tabbable node of\n          //  the LAST group if it's the first tabbable node of the FIRST group)\n          const destinationGroupIndex =\n            startOfGroupIndex === 0\n              ? state.tabbableGroups.length - 1\n              : startOfGroupIndex - 1;\n\n          const destinationGroup = state.tabbableGroups[destinationGroupIndex];\n          destinationNode = destinationGroup.lastTabbableNode;\n        }\n      } else {\n        // FORWARD\n\n        // is the target the last tabbable node in a group?\n        let lastOfGroupIndex = findIndex(\n          state.tabbableGroups,\n          ({ lastTabbableNode }) => target === lastTabbableNode\n        );\n\n        if (\n          lastOfGroupIndex < 0 &&\n          (containerGroup.container === target ||\n            (isFocusable(target, config.tabbableOptions) &&\n              !isTabbable(target, config.tabbableOptions) &&\n              !containerGroup.nextTabbableNode(target)))\n        ) {\n          // an exception case where the target is the container itself, or\n          //  a non-tabbable node that was given focus (i.e. tabindex is negative\n          //  and user clicked on it or node was programmatically given focus)\n          //  and is not followed by any other tabbable node, in which\n          //  case, we should handle tab as if focus were on the container's\n          //  last tabbable node, and go to the first tabbable node of the FIRST group\n          lastOfGroupIndex = containerIndex;\n        }\n\n        if (lastOfGroupIndex >= 0) {\n          // YES: then tab should go to the first tabbable node in the next\n          //  group (and wrap around to the first tabbable node of the FIRST\n          //  group if it's the last tabbable node of the LAST group)\n          const destinationGroupIndex =\n            lastOfGroupIndex === state.tabbableGroups.length - 1\n              ? 0\n              : lastOfGroupIndex + 1;\n\n          const destinationGroup = state.tabbableGroups[destinationGroupIndex];\n          destinationNode = destinationGroup.firstTabbableNode;\n        }\n      }\n    } else {\n      // NOTE: the fallbackFocus option does not support returning false to opt-out\n      destinationNode = getNodeForOption('fallbackFocus');\n    }\n\n    if (destinationNode) {\n      e.preventDefault();\n      tryFocus(destinationNode);\n    }\n    // else, let the browser take care of [shift+]tab and move the focus\n  };\n\n  const checkKey = function (e) {\n    if (\n      isEscapeEvent(e) &&\n      valueOrHandler(config.escapeDeactivates, e) !== false\n    ) {\n      e.preventDefault();\n      trap.deactivate();\n      return;\n    }\n\n    if (isTabEvent(e)) {\n      checkTab(e);\n      return;\n    }\n  };\n\n  const checkClick = function (e) {\n    const target = getActualTarget(e);\n\n    if (findContainerIndex(target) >= 0) {\n      return;\n    }\n\n    if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n      return;\n    }\n\n    if (valueOrHandler(config.allowOutsideClick, e)) {\n      return;\n    }\n\n    e.preventDefault();\n    e.stopImmediatePropagation();\n  };\n\n  //\n  // EVENT LISTENERS\n  //\n\n  const addListeners = function () {\n    if (!state.active) {\n      return;\n    }\n\n    // There can be only one listening focus trap at a time\n    activeFocusTraps.activateTrap(trap);\n\n    // Delay ensures that the focused element doesn't capture the event\n    // that caused the focus trap activation.\n    state.delayInitialFocusTimer = config.delayInitialFocus\n      ? delay(function () {\n          tryFocus(getInitialFocusNode());\n        })\n      : tryFocus(getInitialFocusNode());\n\n    doc.addEventListener('focusin', checkFocusIn, true);\n    doc.addEventListener('mousedown', checkPointerDown, {\n      capture: true,\n      passive: false,\n    });\n    doc.addEventListener('touchstart', checkPointerDown, {\n      capture: true,\n      passive: false,\n    });\n    doc.addEventListener('click', checkClick, {\n      capture: true,\n      passive: false,\n    });\n    doc.addEventListener('keydown', checkKey, {\n      capture: true,\n      passive: false,\n    });\n\n    return trap;\n  };\n\n  const removeListeners = function () {\n    if (!state.active) {\n      return;\n    }\n\n    doc.removeEventListener('focusin', checkFocusIn, true);\n    doc.removeEventListener('mousedown', checkPointerDown, true);\n    doc.removeEventListener('touchstart', checkPointerDown, true);\n    doc.removeEventListener('click', checkClick, true);\n    doc.removeEventListener('keydown', checkKey, true);\n\n    return trap;\n  };\n\n  //\n  // TRAP DEFINITION\n  //\n\n  trap = {\n    get active() {\n      return state.active;\n    },\n\n    get paused() {\n      return state.paused;\n    },\n\n    activate(activateOptions) {\n      if (state.active) {\n        return this;\n      }\n\n      const onActivate = getOption(activateOptions, 'onActivate');\n      const onPostActivate = getOption(activateOptions, 'onPostActivate');\n      const checkCanFocusTrap = getOption(activateOptions, 'checkCanFocusTrap');\n\n      if (!checkCanFocusTrap) {\n        updateTabbableNodes();\n      }\n\n      state.active = true;\n      state.paused = false;\n      state.nodeFocusedBeforeActivation = doc.activeElement;\n\n      if (onActivate) {\n        onActivate();\n      }\n\n      const finishActivation = () => {\n        if (checkCanFocusTrap) {\n          updateTabbableNodes();\n        }\n        addListeners();\n        if (onPostActivate) {\n          onPostActivate();\n        }\n      };\n\n      if (checkCanFocusTrap) {\n        checkCanFocusTrap(state.containers.concat()).then(\n          finishActivation,\n          finishActivation\n        );\n        return this;\n      }\n\n      finishActivation();\n      return this;\n    },\n\n    deactivate(deactivateOptions) {\n      if (!state.active) {\n        return this;\n      }\n\n      const options = {\n        onDeactivate: config.onDeactivate,\n        onPostDeactivate: config.onPostDeactivate,\n        checkCanReturnFocus: config.checkCanReturnFocus,\n        ...deactivateOptions,\n      };\n\n      clearTimeout(state.delayInitialFocusTimer); // noop if undefined\n      state.delayInitialFocusTimer = undefined;\n\n      removeListeners();\n      state.active = false;\n      state.paused = false;\n\n      activeFocusTraps.deactivateTrap(trap);\n\n      const onDeactivate = getOption(options, 'onDeactivate');\n      const onPostDeactivate = getOption(options, 'onPostDeactivate');\n      const checkCanReturnFocus = getOption(options, 'checkCanReturnFocus');\n      const returnFocus = getOption(\n        options,\n        'returnFocus',\n        'returnFocusOnDeactivate'\n      );\n\n      if (onDeactivate) {\n        onDeactivate();\n      }\n\n      const finishDeactivation = () => {\n        delay(() => {\n          if (returnFocus) {\n            tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));\n          }\n          if (onPostDeactivate) {\n            onPostDeactivate();\n          }\n        });\n      };\n\n      if (returnFocus && checkCanReturnFocus) {\n        checkCanReturnFocus(\n          getReturnFocusNode(state.nodeFocusedBeforeActivation)\n        ).then(finishDeactivation, finishDeactivation);\n        return this;\n      }\n\n      finishDeactivation();\n      return this;\n    },\n\n    pause() {\n      if (state.paused || !state.active) {\n        return this;\n      }\n\n      state.paused = true;\n      removeListeners();\n\n      return this;\n    },\n\n    unpause() {\n      if (!state.paused || !state.active) {\n        return this;\n      }\n\n      state.paused = false;\n      updateTabbableNodes();\n      addListeners();\n\n      return this;\n    },\n\n    updateContainerElements(containerElements) {\n      const elementsAsArray = [].concat(containerElements).filter(Boolean);\n\n      state.containers = elementsAsArray.map((element) =>\n        typeof element === 'string' ? doc.querySelector(element) : element\n      );\n\n      if (state.active) {\n        updateTabbableNodes();\n      }\n\n      return this;\n    },\n  };\n\n  // initialize container elements\n  trap.updateContainerElements(elements);\n\n  return trap;\n};\n\nexport { createFocusTrap };\n","import { createFocusTrap as _createFocusTrap } from 'focus-trap';\n\n/**\n * Creates a focus trap for the given element with the given options.\n * \n * This function applies some default options that are different to the library.\n * Your own options still override these custom defaults:\n * \n * ```json\n * {\n     escapeDeactivates: false,\n * }\n * ```\n * \n * @param element The element to be the focus trap, or a selector that will be used to find the element.\n * \n * @see https://github.com/focus-trap/focus-trap#readme - Library documentation\n */\nfunction createFocusTrap(...args: Parameters<typeof _createFocusTrap>): ReturnType<typeof _createFocusTrap> {\n  args[1] = {\n    escapeDeactivates: false,\n    ...args[1],\n  };\n\n  return _createFocusTrap(...args);\n}\n\nexport * from 'focus-trap';\nexport { createFocusTrap };\n","function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n// Older browsers don't support event options, feature detect it.\n\n// Adopted and modified solution from Bohdan Didukh (2017)\n// https://stackoverflow.com/questions/41594997/ios-10-safari-prevent-scrolling-behind-a-fixed-overlay-and-maintain-scroll-posi\n\nvar hasPassiveEvents = false;\nif (typeof window !== 'undefined') {\n  var passiveTestOptions = {\n    get passive() {\n      hasPassiveEvents = true;\n      return undefined;\n    }\n  };\n  window.addEventListener('testPassive', null, passiveTestOptions);\n  window.removeEventListener('testPassive', null, passiveTestOptions);\n}\n\nvar isIosDevice = typeof window !== 'undefined' && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === 'MacIntel' && window.navigator.maxTouchPoints > 1);\n\n\nvar locks = [];\nvar documentListenerAdded = false;\nvar initialClientY = -1;\nvar previousBodyOverflowSetting = void 0;\nvar previousBodyPosition = void 0;\nvar previousBodyPaddingRight = void 0;\n\n// returns true if `el` should be allowed to receive touchmove events.\nvar allowTouchMove = function allowTouchMove(el) {\n  return locks.some(function (lock) {\n    if (lock.options.allowTouchMove && lock.options.allowTouchMove(el)) {\n      return true;\n    }\n\n    return false;\n  });\n};\n\nvar preventDefault = function preventDefault(rawEvent) {\n  var e = rawEvent || window.event;\n\n  // For the case whereby consumers adds a touchmove event listener to document.\n  // Recall that we do document.addEventListener('touchmove', preventDefault, { passive: false })\n  // in disableBodyScroll - so if we provide this opportunity to allowTouchMove, then\n  // the touchmove event on document will break.\n  if (allowTouchMove(e.target)) {\n    return true;\n  }\n\n  // Do not prevent if the event has more than one touch (usually meaning this is a multi touch gesture like pinch to zoom).\n  if (e.touches.length > 1) return true;\n\n  if (e.preventDefault) e.preventDefault();\n\n  return false;\n};\n\nvar setOverflowHidden = function setOverflowHidden(options) {\n  // If previousBodyPaddingRight is already set, don't set it again.\n  if (previousBodyPaddingRight === undefined) {\n    var _reserveScrollBarGap = !!options && options.reserveScrollBarGap === true;\n    var scrollBarGap = window.innerWidth - document.documentElement.clientWidth;\n\n    if (_reserveScrollBarGap && scrollBarGap > 0) {\n      var computedBodyPaddingRight = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'), 10);\n      previousBodyPaddingRight = document.body.style.paddingRight;\n      document.body.style.paddingRight = computedBodyPaddingRight + scrollBarGap + 'px';\n    }\n  }\n\n  // If previousBodyOverflowSetting is already set, don't set it again.\n  if (previousBodyOverflowSetting === undefined) {\n    previousBodyOverflowSetting = document.body.style.overflow;\n    document.body.style.overflow = 'hidden';\n  }\n};\n\nvar restoreOverflowSetting = function restoreOverflowSetting() {\n  if (previousBodyPaddingRight !== undefined) {\n    document.body.style.paddingRight = previousBodyPaddingRight;\n\n    // Restore previousBodyPaddingRight to undefined so setOverflowHidden knows it\n    // can be set again.\n    previousBodyPaddingRight = undefined;\n  }\n\n  if (previousBodyOverflowSetting !== undefined) {\n    document.body.style.overflow = previousBodyOverflowSetting;\n\n    // Restore previousBodyOverflowSetting to undefined\n    // so setOverflowHidden knows it can be set again.\n    previousBodyOverflowSetting = undefined;\n  }\n};\n\nvar setPositionFixed = function setPositionFixed() {\n  return window.requestAnimationFrame(function () {\n    // If previousBodyPosition is already set, don't set it again.\n    if (previousBodyPosition === undefined) {\n      previousBodyPosition = {\n        position: document.body.style.position,\n        top: document.body.style.top,\n        left: document.body.style.left\n      };\n\n      // Update the dom inside an animation frame \n      var _window = window,\n          scrollY = _window.scrollY,\n          scrollX = _window.scrollX,\n          innerHeight = _window.innerHeight;\n\n      document.body.style.position = 'fixed';\n      document.body.style.top = -scrollY;\n      document.body.style.left = -scrollX;\n\n      setTimeout(function () {\n        return window.requestAnimationFrame(function () {\n          // Attempt to check if the bottom bar appeared due to the position change\n          var bottomBarHeight = innerHeight - window.innerHeight;\n          if (bottomBarHeight && scrollY >= innerHeight) {\n            // Move the content further up so that the bottom bar doesn't hide it\n            document.body.style.top = -(scrollY + bottomBarHeight);\n          }\n        });\n      }, 300);\n    }\n  });\n};\n\nvar restorePositionSetting = function restorePositionSetting() {\n  if (previousBodyPosition !== undefined) {\n    // Convert the position from \"px\" to Int\n    var y = -parseInt(document.body.style.top, 10);\n    var x = -parseInt(document.body.style.left, 10);\n\n    // Restore styles\n    document.body.style.position = previousBodyPosition.position;\n    document.body.style.top = previousBodyPosition.top;\n    document.body.style.left = previousBodyPosition.left;\n\n    // Restore scroll\n    window.scrollTo(x, y);\n\n    previousBodyPosition = undefined;\n  }\n};\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#Problems_and_solutions\nvar isTargetElementTotallyScrolled = function isTargetElementTotallyScrolled(targetElement) {\n  return targetElement ? targetElement.scrollHeight - targetElement.scrollTop <= targetElement.clientHeight : false;\n};\n\nvar handleScroll = function handleScroll(event, targetElement) {\n  var clientY = event.targetTouches[0].clientY - initialClientY;\n\n  if (allowTouchMove(event.target)) {\n    return false;\n  }\n\n  if (targetElement && targetElement.scrollTop === 0 && clientY > 0) {\n    // element is at the top of its scroll.\n    return preventDefault(event);\n  }\n\n  if (isTargetElementTotallyScrolled(targetElement) && clientY < 0) {\n    // element is at the bottom of its scroll.\n    return preventDefault(event);\n  }\n\n  event.stopPropagation();\n  return true;\n};\n\nexport var disableBodyScroll = function disableBodyScroll(targetElement, options) {\n  // targetElement must be provided\n  if (!targetElement) {\n    // eslint-disable-next-line no-console\n    console.error('disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.');\n    return;\n  }\n\n  // disableBodyScroll must not have been called on this targetElement before\n  if (locks.some(function (lock) {\n    return lock.targetElement === targetElement;\n  })) {\n    return;\n  }\n\n  var lock = {\n    targetElement: targetElement,\n    options: options || {}\n  };\n\n  locks = [].concat(_toConsumableArray(locks), [lock]);\n\n  if (isIosDevice) {\n    setPositionFixed();\n  } else {\n    setOverflowHidden(options);\n  }\n\n  if (isIosDevice) {\n    targetElement.ontouchstart = function (event) {\n      if (event.targetTouches.length === 1) {\n        // detect single touch.\n        initialClientY = event.targetTouches[0].clientY;\n      }\n    };\n    targetElement.ontouchmove = function (event) {\n      if (event.targetTouches.length === 1) {\n        // detect single touch.\n        handleScroll(event, targetElement);\n      }\n    };\n\n    if (!documentListenerAdded) {\n      document.addEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);\n      documentListenerAdded = true;\n    }\n  }\n};\n\nexport var clearAllBodyScrollLocks = function clearAllBodyScrollLocks() {\n  if (isIosDevice) {\n    // Clear all locks ontouchstart/ontouchmove handlers, and the references.\n    locks.forEach(function (lock) {\n      lock.targetElement.ontouchstart = null;\n      lock.targetElement.ontouchmove = null;\n    });\n\n    if (documentListenerAdded) {\n      document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);\n      documentListenerAdded = false;\n    }\n\n    // Reset initial clientY.\n    initialClientY = -1;\n  }\n\n  if (isIosDevice) {\n    restorePositionSetting();\n  } else {\n    restoreOverflowSetting();\n  }\n\n  locks = [];\n};\n\nexport var enableBodyScroll = function enableBodyScroll(targetElement) {\n  if (!targetElement) {\n    // eslint-disable-next-line no-console\n    console.error('enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.');\n    return;\n  }\n\n  locks = locks.filter(function (lock) {\n    return lock.targetElement !== targetElement;\n  });\n\n  if (isIosDevice) {\n    targetElement.ontouchstart = null;\n    targetElement.ontouchmove = null;\n\n    if (documentListenerAdded && locks.length === 0) {\n      document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);\n      documentListenerAdded = false;\n    }\n  }\n\n  if (isIosDevice) {\n    restorePositionSetting();\n  } else {\n    restoreOverflowSetting();\n  }\n};\n\n","/* \n * Copyright 2019, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {parseCases} from './utilities.js';\n\nlet pluralFormatter;\n\nlet keyCounter = 0;\n\n// All the special keywords that can be used in `plural` blocks for the various branches\nconst ONE   = 'one';\nconst OTHER = 'other';\n\n/**\n * @private\n * @param {String} caseBody\n * @param {Number} value\n * @return {Object} {caseBody: string, numberValues: object}\n */\nfunction replaceNumberSign(caseBody, value) {\n\tlet i = 0;\n\tlet output = '';\n\tlet numBraces = 0;\n\tconst numberValues = {};\n\n\twhile (i < caseBody.length) {\n\t\tif (caseBody[i] === '#' && !numBraces) {\n\t\t\tlet keyParam = `__hashToken${keyCounter++}`;\n\t\t\toutput += `{${keyParam}, number}`;\n\t\t\tnumberValues[keyParam] = value;\n\t\t}\n\t\telse {\n\t\t\toutput += caseBody[i];\n\t\t}\n\n\t\tif (caseBody[i] === '{') {\n\t\t\tnumBraces++;\n\t\t}\n\t\telse if (caseBody[i] === '}') {\n\t\t\tnumBraces--;\n\t\t}\n\n\t\ti++;\n\t}\n\n\treturn {\n\t\tcaseBody: output,\n\t\tnumberValues\n\t};\n}\n\n/**\n * Handler for `plural` statements within ICU message syntax strings.  Returns\n * a formatted string for the branch that closely matches the current value.\n * \n * See https://formatjs.io/docs/core-concepts/icu-syntax#plural-format for more\n * details on how the `plural` statement works.\n * \n * @param {String} value\n * @param {String} matches\n * @param {String} locale\n * @param {String} values\n * @param {Function} format\n * @return {String}\n */\nexport default function pluralTypeHandler(value, matches = '', locale, values, format) {\n\tconst { args, cases } = parseCases(matches);\n\n\tlet intValue = parseInt(value);\n\n\targs.forEach((arg) => {\n\t\tif (arg.startsWith('offset:')) {\n\t\t\tintValue -= parseInt(arg.slice('offset:'.length));\n\t\t}\n\t});\n\n\tconst keywordPossibilities = [];\n\n\tif ('PluralRules' in Intl) {\n\t\t// Effectively memoize because instantiation of `Int.*` objects is expensive.\n\t\tif (pluralFormatter === undefined || pluralFormatter.resolvedOptions().locale !== locale) {\n\t\t\tpluralFormatter = new Intl.PluralRules(locale);\n\t\t}\n\n\t\tconst pluralKeyword = pluralFormatter.select(intValue);\n\n\t\t// Other is always added last with least priority, so we don't want to add it here.\n\t\tif (pluralKeyword !== OTHER) {\n\t\t\tkeywordPossibilities.push(pluralKeyword);\n\t\t}\n\t}\n\tif (intValue === 1) {\n\t\tkeywordPossibilities.push(ONE);\n\t}\n\tkeywordPossibilities.push(`=${intValue}`, OTHER);\n\n\tfor (let i = 0; i < keywordPossibilities.length; i++) {\n\t\tconst keyword = keywordPossibilities[i];\n\t\tif (keyword in cases) {\n\t\t\tconst { caseBody, numberValues } = replaceNumberSign(cases[keyword], intValue);\n\t\t\treturn format(caseBody, {\n\t\t\t\t...values,\n\t\t\t\t...numberValues\n\t\t\t});\n\t\t}\n\t}\n\n\treturn value;\n}\n","import Component from '../Component';\n\nimport { createFocusTrap, FocusTrap } from '../utils/focusTrap';\n\nimport { disableBodyScroll, clearAllBodyScrollLocks } from 'body-scroll-lock';\n\nimport type ModalManagerState from '../states/ModalManagerState';\nimport type Mithril from 'mithril';\n\ninterface IModalManagerAttrs {\n  state: ModalManagerState;\n}\n\n/**\n * The `ModalManager` component manages one or more modal dialogs. Stacking modals\n * is supported. Multiple dialogs can be shown at once; loading a new component\n * into the ModalManager will overwrite the previous one.\n */\nexport default class ModalManager extends Component<IModalManagerAttrs> {\n  // Current focus trap\n  protected focusTrap: FocusTrap | undefined;\n\n  // Keep track of the last set focus trap\n  protected lastSetFocusTrap: number | undefined;\n\n  // Keep track if there's an modal closing\n  protected modalClosing: boolean = false;\n\n  protected keyUpListener: null | ((e: KeyboardEvent) => void) = null;\n\n  view(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): Mithril.Children {\n    return (\n      <>\n        {this.attrs.state.modalList.map((modal, i) => {\n          const Tag = modal?.componentClass;\n\n          return (\n            <div\n              key={modal.key}\n              className=\"ModalManager modal\"\n              data-modal-key={modal.key}\n              data-modal-number={i}\n              role=\"dialog\"\n              aria-modal=\"true\"\n              style={{ '--modal-number': i }}\n              aria-hidden={this.attrs.state.modal !== modal && 'true'}\n            >\n              {!!Tag && [\n                <Tag\n                  key={modal.key}\n                  {...modal.attrs}\n                  animateShow={this.animateShow.bind(this)}\n                  animateHide={this.animateHide.bind(this)}\n                  state={this.attrs.state}\n                />,\n                /* This backdrop is invisible and used for outside clicks to close the modal. */\n                <div key={modal.key} className=\"ModalManager-invisibleBackdrop\" onclick={this.handlePossibleBackdropClick.bind(this)} />,\n              ]}\n            </div>\n          );\n        })}\n\n        {this.attrs.state.backdropShown && (\n          <div\n            className=\"Modal-backdrop backdrop\"\n            ontransitionend={this.onBackdropTransitionEnd.bind(this)}\n            data-showing={!!this.attrs.state.modalList.length}\n            style={{ '--modal-count': this.attrs.state.modalList.length }}\n          />\n        )}\n      </>\n    );\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): void {\n    super.oncreate(vnode);\n\n    this.keyUpListener = this.handleEscPress.bind(this);\n    document.body.addEventListener('keyup', this.keyUpListener);\n  }\n\n  onbeforeremove(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): void {\n    super.onbeforeremove(vnode);\n\n    this.keyUpListener && document.body.removeEventListener('keyup', this.keyUpListener);\n    this.keyUpListener = null;\n  }\n\n  onupdate(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): void {\n    super.onupdate(vnode);\n\n    requestAnimationFrame(() => {\n      try {\n        // Main content should gain or lose `aria-hidden` when modals are shown/removed\n        // See: http://web-accessibility.carnegiemuseums.org/code/dialogs/\n\n        if (!this.attrs.state.isModalOpen()) {\n          document.getElementById('app')?.setAttribute('aria-hidden', 'false');\n          this.focusTrap!.deactivate?.();\n          clearAllBodyScrollLocks();\n\n          return;\n        }\n\n        document.getElementById('app')?.setAttribute('aria-hidden', 'true');\n\n        // Get current dialog key\n        const dialogKey = this.attrs.state.modal!.key;\n\n        // Deactivate focus trap if there's a new dialog/closed\n        if (this.focusTrap && this.lastSetFocusTrap !== dialogKey) {\n          this.focusTrap!.deactivate?.();\n\n          clearAllBodyScrollLocks();\n        }\n\n        // Activate focus trap if there's a new dialog which is not trapped yet\n        if (this.activeDialogElement && this.lastSetFocusTrap !== dialogKey) {\n          this.focusTrap = createFocusTrap(this.activeDialogElement as HTMLElement, { allowOutsideClick: true });\n          this.focusTrap!.activate?.();\n\n          disableBodyScroll(this.activeDialogManagerElement!, { reserveScrollBarGap: true });\n        }\n\n        // Update key of current opened modal\n        this.lastSetFocusTrap = dialogKey;\n      } catch {\n        // We can expect errors to occur here due to the nature of mithril rendering\n      }\n    });\n  }\n\n  /**\n   * Get current active dialog\n   */\n  private get activeDialogElement(): HTMLElement {\n    return document.body.querySelector(`.ModalManager[data-modal-key=\"${this.attrs.state.modal?.key}\"] .Modal`) as HTMLElement;\n  }\n\n  /**\n   * Get current active dialog\n   */\n  private get activeDialogManagerElement(): HTMLElement {\n    return document.body.querySelector(`.ModalManager[data-modal-key=\"${this.attrs.state.modal?.key}\"]`) as HTMLElement;\n  }\n\n  animateShow(readyCallback: () => void = () => {}): void {\n    if (!this.attrs.state.modal) return;\n\n    this.activeDialogElement.addEventListener(\n      'transitionend',\n      () => {\n        readyCallback();\n      },\n      { once: true }\n    );\n\n    requestAnimationFrame(() => {\n      this.activeDialogElement.classList.add('in');\n    });\n  }\n\n  animateHide(closedCallback: () => void = () => {}): void {\n    if (this.modalClosing) return;\n    this.modalClosing = true;\n\n    const afterModalClosedCallback = () => {\n      this.modalClosing = false;\n\n      // Close the dialog\n      this.attrs.state.close();\n\n      closedCallback();\n    };\n\n    this.activeDialogElement.addEventListener('transitionend', afterModalClosedCallback, { once: true });\n\n    this.activeDialogElement.classList.remove('in');\n    this.activeDialogElement.classList.add('out');\n  }\n\n  protected handleEscPress(e: KeyboardEvent): void {\n    if (!this.attrs.state.modal) return;\n\n    const dismissibleState = this.attrs.state.modal.componentClass.dismissibleOptions;\n\n    // Close the dialog if the escape key was pressed\n    // Check if closing via escape key is enabled\n    if (e.key === 'Escape' && dismissibleState.viaEscKey) {\n      e.preventDefault();\n\n      this.animateHide();\n    }\n  }\n\n  protected handlePossibleBackdropClick(e: MouseEvent): void {\n    if (!this.attrs.state.modal || !this.attrs.state.modal.componentClass.dismissibleOptions.viaBackdropClick) return;\n\n    this.animateHide();\n  }\n\n  protected onBackdropTransitionEnd(e: TransitionEvent) {\n    if (e.propertyName === 'opacity') {\n      const backdrop = e.currentTarget as HTMLDivElement;\n\n      if (backdrop.getAttribute('data-showing') === null) {\n        // Backdrop is fading out\n        this.attrs.state.backdropShown = false;\n        m.redraw();\n      }\n    }\n  }\n}\n","import Component, { ComponentAttrs } from '../Component';\nimport AlertManagerState from '../states/AlertManagerState';\nimport type Mithril from 'mithril';\n\nexport interface IAlertManagerAttrs extends ComponentAttrs {\n  state: AlertManagerState;\n}\n\n/**\n * The `AlertManager` component provides an area in which `Alert` components can\n * be shown and dismissed.\n */\nexport default class AlertManager<CustomAttrs extends IAlertManagerAttrs = IAlertManagerAttrs> extends Component<CustomAttrs, AlertManagerState> {\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.state = this.attrs.state;\n  }\n\n  view() {\n    const activeAlerts = this.state.getActiveAlerts();\n\n    return (\n      <div className=\"AlertManager\">\n        {Object.keys(activeAlerts)\n          .map(Number)\n          .map((key) => {\n            const alert = activeAlerts[key];\n            const urgent = alert.attrs.type === 'error';\n\n            return (\n              <div className=\"AlertManager-alert\" role=\"alert\" aria-live={urgent ? 'assertive' : 'polite'}>\n                <alert.componentClass {...alert.attrs} ondismiss={this.state.dismiss.bind(this.state, key)}>\n                  {alert.children}\n                </alert.componentClass>\n              </div>\n            );\n          })}\n      </div>\n    );\n  }\n}\n","import type RequestError from '../utils/RequestError';\nimport Modal, { IInternalModalAttrs } from './Modal';\n\nexport interface IRequestErrorModalAttrs extends IInternalModalAttrs {\n  error: RequestError;\n  formattedError: string[];\n}\n\nexport default class RequestErrorModal<CustomAttrs extends IRequestErrorModalAttrs = IRequestErrorModalAttrs> extends Modal<CustomAttrs> {\n  className() {\n    return 'RequestErrorModal Modal--large';\n  }\n\n  title() {\n    return !!this.attrs.error.xhr && `${this.attrs.error.xhr.status} ${this.attrs.error.xhr.statusText}`;\n  }\n\n  content() {\n    const { error, formattedError } = this.attrs;\n\n    let responseText;\n\n    // If the error is already formatted, just add line endings;\n    // else try to parse it as JSON and stringify it with indentation\n    if (formattedError.length) {\n      responseText = formattedError.join('\\n\\n');\n    } else if (error.response) {\n      responseText = JSON.stringify(error.response, null, 2);\n    } else {\n      responseText = error.responseText;\n    }\n\n    return (\n      <div className=\"Modal-body\">\n        <pre>\n          {this.attrs.error.options.method} {this.attrs.error.options.url}\n          <br />\n          <br />\n          {responseText}\n        </pre>\n      </div>\n    );\n  }\n}\n","/* \n * Copyright 2017, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Flattens an array of arrays of infinite depth into a single-dimension array.\n * \n * > This is now natively in JavaScript as the `flat` method on an Array\n * > instance.  [Check MDN for which browsers have access to this feature](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat).\n * > If you can't use `flat`, then this method will do the job 🙂\n * \n * @param {Array} array\n * @return {Array} Flattened array.\n */\nexport function flatten(array) {\n\n\treturn array.reduce((accumulator, value) => {\n\t\treturn accumulator.concat(Array.isArray(value) ? flatten(value) : value);\n\t}, []);\n}\n\n/**\n * Creates an array of numbers from the starting value (inclusive) to the end\n * (exclusive), with an optional step (the gap between values).\n * \n * @param {Number} start\n *   The value to start at, the first item in the returned array.\n * @param {Number} end\n *   The value to end with, the last item in the returned array.\n * @param {Number} [step=1]\n *   The increment/gap between values, defaults to 1.\n * @return {Array} An array encompassing the given range.\n */\nexport function range(start, end, step = 1) {\n\n\treturn Array.apply(0, Array(Math.ceil((end - start) / step))).map((empty, index) => index * step + start);\n}\n\n/**\n * Remove and return the first item from `array` that matches the predicate\n * function.\n * \n * @param {Array} array\n * @param {Function} predicate\n *   Invoked with the array item.\n * @return {Object} The matching item, or `null` if no match was found.\n */\nexport function remove(array, predicate) {\n\n\treturn array.find((item, index) => {\n\t\tif (predicate(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\treturn item;\n\t\t}\n\t});\n}\n","/**\n * A higher-order function to apply [memoization](https://en.wikipedia.org/wiki/Memoization).\n * \n * If memoizing a recursive function, then memoize and define the function at\n * the same time so you can make a call to the memoized function, eg:\n * \n * ```javascript\n * const myFunction = memoize(() => myFunction());\n * ```\n * \n * @param {Function} func\n * @return {Function} \n */\nexport function memoize(func) {\n\tconst cache = {};\n\treturn function(...args) {\n\t\tlet key = args.length ? args\n\t\t\t.map(arg =>\n\t\t\t\targ === null ? 'null' :\n\t\t\t\targ === undefined ? 'undefined' :\n\t\t\t\ttypeof arg === 'function' ? arg.toString() :\n\t\t\t\targ instanceof Date ? arg.toISOString() :\n\t\t\t\tJSON.stringify(arg)\n\t\t\t)\n\t\t\t.join('|') :\n\t\t\t'_(no-args)_';\n\t\tif (Object.prototype.hasOwnProperty.call(cache, key)) {\n\t\t\treturn cache[key];\n\t\t}\n\t\tlet result = func(...args);\n\t\tcache[key] = result;\n\t\treturn result;\n\t};\n}\n","/* \n * Copyright 2019, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Most branch-based type handlers are based around \"cases\".\n * For example, `select` and `plural` compare compare a value\n * to \"case keys\" to choose a subtranslation.\n * \n * This util splits \"matches\" portions provided to the aforementioned\n * handlers into case strings, and extracts any prepended arguments\n * (for example, `plural` supports an `offset:n` argument used for\n * populating the magic `#` variable).\n * \n * @param {String} string\n * @return {Object} The `cases` key points to a map of all cases.\n *                  The `arguments` key points to a list of prepended arguments.\n */\nexport function parseCases(string) {\n\tconst isWhitespace = ch => /\\s/.test(ch);\n\n\tconst args = [];\n\tconst cases = {};\n\n\tlet currTermStart = 0;\n\tlet latestTerm = null;\n\tlet inTerm = false;\n\n\tlet i = 0;\n\twhile (i < string.length) {\n\t\t// Term ended\n\t\tif (inTerm && (isWhitespace(string[i]) || string[i] === '{')) {\n\t\t\tinTerm = false;\n\t\t\tlatestTerm = string.slice(currTermStart, i);\n\n\t\t\t// We want to process the opening char again so the case will be properly registered.\n\t\t\tif (string[i] === '{') {\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\n\t\t// New term\n\t\telse if (!inTerm && !isWhitespace(string[i])) {\n\t\t\tconst caseBody = string[i] === '{';\n\n\t\t\t// If there's a previous term, we can either handle a whole\n\t\t\t// case, or add that as an argument.\n\t\t\tif (latestTerm && caseBody) {\n\t\t\t\tconst branchEndIndex = findClosingBracket(string, i);\n\n\t\t\t\tif (branchEndIndex === -1) {\n\t\t\t\t\tthrow new Error(`Unbalanced curly braces in string: \"${string}\"`);\n\t\t\t\t}\n\n\t\t\t\tcases[latestTerm] = string.slice(i + 1, branchEndIndex);  // Don't include the braces\n\n\t\t\t\ti = branchEndIndex; // Will be moved up where needed at end of loop.\n\t\t\t\tlatestTerm = null;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (latestTerm) {\n\t\t\t\t\targs.push(latestTerm);\n\t\t\t\t\tlatestTerm = null;\n\t\t\t\t}\n\n\t\t\t\tinTerm = true;\n\t\t\t\tcurrTermStart = i;\n\t\t\t}\n\t\t}\n\t\ti++;\n\t}\n\n\tif (inTerm) {\n\t\tlatestTerm = string.slice(currTermStart);\n\t}\n\n\tif (latestTerm) {\n\t\targs.push(latestTerm);\n\t}\n\n\treturn {\n\t\targs,\n\t\tcases\n\t};\n}\n\n/**\n * Finds the index of the matching closing curly bracket, including through\n * strings that could have nested brackets.\n * \n * @param {String} string\n * @param {Number} fromIndex\n * @return {Number} The index of the matching closing bracket, or -1 if no\n *   closing bracket could be found.\n */\nexport function findClosingBracket(string, fromIndex) {\n\tlet depth = 0;\n\tfor (let i = fromIndex + 1; i < string.length; i++) {\n\t\tlet char = string.charAt(i);\n\t\tif (char === '}') {\n\t\t\tif (depth === 0) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t\tdepth--;\n\t\t}\n\t\telse if (char === '{') {\n\t\t\tdepth++;\n\t\t}\n\t}\n\treturn -1;\n}\n\n/**\n * Split a `{key, type, format}` block into those 3 parts, taking into account\n * nested message syntax that can exist in the `format` part.\n * \n * @param {String} block\n * @return {Array}\n *   An array with `key`, `type`, and `format` items in that order, if present\n *   in the formatted argument block.\n */\nexport function splitFormattedArgument(block) {\n\treturn split(block.slice(1, -1), ',', 3);\n}\n\n/**\n * Like `String.prototype.split()` but where the limit parameter causes the\n * remainder of the string to be grouped together in a final entry.\n * \n * @private\n * @param {String} string\n * @param {String} separator\n * @param {Number} limit\n * @param {Array} [accumulator=[]]\n * @return {Array}\n */\nfunction split(string, separator, limit, accumulator = []) {\n\tif (!string) {\n\t\treturn accumulator;\n\t}\n\tif (limit === 1) {\n\t\taccumulator.push(string);\n\t\treturn accumulator;\n\t}\n\tlet indexOfDelimiter = string.indexOf(separator);\n\tif (indexOfDelimiter === -1) {\n\t\taccumulator.push(string);\n\t\treturn accumulator;\n\t}\n\tlet head = string.substring(0, indexOfDelimiter).trim();\n\tlet tail = string.substring(indexOfDelimiter + separator.length + 1).trim();\n\taccumulator.push(head);\n\treturn split(tail, separator, limit - 1, accumulator);\n}\n","/* \n * Copyright 2019, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {parseCases} from './utilities.js';\n\nconst OTHER = 'other';\n\n/**\n * Handler for `select` statements within ICU message syntax strings.  Returns\n * a formatted string for the branch that closely matches the current value.\n * \n * See https://formatjs.io/docs/core-concepts/icu-syntax#select-format for more\n * details on how the `select` statement works.\n * \n * @param {String} value\n * @param {String} matches\n * @param {String} locale\n * @param {String} values\n * @param {Function} format\n * @return {String}\n */\nexport default function selectTypeHandler(value, matches = '', locale, values, format) {\n\tconst { cases } = parseCases(matches);\n\n\tif (value in cases) {\n\t\treturn format(cases[value], values);\n\t}\n\telse if (OTHER in cases) {\n\t\treturn format(cases[OTHER], values);\n\t}\n\n\treturn value;\n}\n","import { unEscapeHtml } from './utilities';\n\nexport default function defaultRichHandler(tag, values, contents) {\n\treturn `<${tag}>${unEscapeHtml(contents)}</${tag}>`;\n}\n","import { MessageFormatter } from '@ultraq/icu-message-formatter';\nimport { flatten } from '@ultraq/array-utils';\n\nimport defaultRichHandler from './defaultRichHandler';\nimport { replaceRichTags, sanitizeValues } from './utilities';\n\nexport default class RichMessageFormatter extends MessageFormatter {\n\tconstructor(locale, typeHandlers = {}, richHandler = null) {\n\t\tsuper(locale, typeHandlers);\n\t\tthis.richHandler = richHandler ? richHandler : defaultRichHandler;\n\t}\n\n\trich(message, values = {}) {\n\t\tconst cleanedValues = sanitizeValues(values);\n\n\t\tconst formatted = flatten(this.process(message, cleanedValues));\n\n\t\t// TODO\n\t\t// Should be a symbol but isn't because of conversion issues.\n\t\t// We use a random string instead. \n\t\tlet sym = Math.random().toString(36) + Math.random().toString(36) + Math.random().toString(36);\n\t\tconst fakeValues = Object.fromEntries(Object.entries(values).map(([key, _value]) => [key, sym]));\n\t\tconst formattedFake = flatten(this.process(message, fakeValues));\n\t\tconst replaceFake = replaceRichTags(formattedFake, fakeValues, () => sym);\n\t\tconst originalTemplateSegmentIndices = replaceFake.map((v, i) => v === sym ? null: i).filter(i => i !== null);\n\n\t\treturn replaceRichTags(formatted, cleanedValues, this.richHandler, originalTemplateSegmentIndices);\n\t}\n}\n","/* \n * Copyright 2019, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {findClosingBracket, splitFormattedArgument} from './utilities.js';\n\nimport {flatten} from '@ultraq/array-utils';\nimport {memoize} from '@ultraq/function-utils';\n\n/**\n * The main class for formatting messages.\n * \n * @author Emanuel Rabina\n */\nexport default class MessageFormatter {\n\n\t/**\n\t * Creates a new formatter that can work using any of the custom type handlers\n\t * you register.\n\t * \n\t * @param {String} locale\n\t * @param {Object} [typeHandlers={}]\n\t *   Optional object where the keys are the names of the types to register,\n\t *   their values being the functions that will return a nicely formatted\n\t *   string for the data and locale they are given.\n\t */\n\tconstructor(locale, typeHandlers = {}) {\n\n\t\tthis.locale = locale;\n\t\tthis.typeHandlers = typeHandlers;\n\t}\n\n\t/**\n\t * Formats an ICU message syntax string using `values` for placeholder data\n\t * and any currently-registered type handlers.\n\t * \n\t * @param {String} message\n\t * @param {Object} [values={}]\n\t * @return {String}\n\t */\n\tformat = memoize((message, values = {}) => {\n\n\t\treturn flatten(this.process(message, values)).join('');\n\t})\n\n\t/**\n\t * Process an ICU message syntax string using `values` for placeholder data\n\t * and any currently-registered type handlers.  The result of this method is\n\t * an array of the component parts after they have been processed in turn by\n\t * their own type handlers.  This raw output is useful for other renderers,\n\t * eg: React where components can be used instead of being forced to return\n\t * raw strings.\n\t * \n\t * This method is used by {@link MessageFormatter#format} where it acts as a\n\t * string renderer.\n\t * \n\t * @param {String} message\n\t * @param {Object} [values={}]\n\t * @return {Array}\n\t */\n\tprocess(message, values = {}) {\n\n\t\tif (!message) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet blockStartIndex = message.indexOf('{');\n\t\tif (blockStartIndex !== -1) {\n\t\t\tlet blockEndIndex = findClosingBracket(message, blockStartIndex);\n\t\t\tif (blockEndIndex !== -1) {\n\t\t\t\tlet block = message.substring(blockStartIndex, blockEndIndex + 1);\n\t\t\t\tif (block) {\n\t\t\t\t\tlet result = [];\n\t\t\t\t\tlet head = message.substring(0, blockStartIndex);\n\t\t\t\t\tif (head) {\n\t\t\t\t\t\tresult.push(head);\n\t\t\t\t\t}\n\t\t\t\t\tlet [key, type, format] = splitFormattedArgument(block);\n\t\t\t\t\tlet body = values[key];\n\t\t\t\t\tif (body === null || body === undefined) {\n\t\t\t\t\t\tbody = '';\n\t\t\t\t\t}\n\t\t\t\t\tlet typeHandler = type && this.typeHandlers[type];\n\t\t\t\t\tresult.push(typeHandler ?\n\t\t\t\t\t\ttypeHandler(body, format, this.locale, values, this.process.bind(this)) :\n\t\t\t\t\t\tbody);\n\t\t\t\t\tlet tail = message.substring(blockEndIndex + 1);\n\t\t\t\t\tif (tail) {\n\t\t\t\t\t\tresult.push(this.process(tail, values));\n\t\t\t\t\t}\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new Error(`Unbalanced curly braces in string: \"${message}\"`);\n\t\t\t}\n\t\t}\n\t\treturn [message];\n\t}\n}\n","import { unEscapeHtml } from './utilities';\n\nexport default function mithrilRichHandler(tag, values, contents) {\n\tconst vnode = values[tag] || m(tag);\n\tlet children = unEscapeHtml(m.fragment(contents).children);\n\treturn { ...vnode, children };\n}\n","import { RichMessageFormatter, mithrilRichHandler } from '@askvortsov/rich-icu-message-formatter';\nimport { pluralTypeHandler, selectTypeHandler } from '@ultraq/icu-message-formatter';\nimport username from './helpers/username';\nimport User from './models/User';\nimport extract from './utils/extract';\n\ntype Translations = Record<string, string>;\ntype TranslatorParameters = Record<string, unknown>;\n\nexport default class Translator {\n  /**\n   * A map of translation keys to their translated values.\n   */\n  translations: Translations = {};\n\n  /**\n   * The underlying ICU MessageFormatter util.\n   */\n  protected formatter = new RichMessageFormatter(null, this.formatterTypeHandlers(), mithrilRichHandler);\n\n  /**\n   * Sets the formatter's locale to the provided value.\n   */\n  setLocale(locale: string) {\n    this.formatter.locale = locale;\n  }\n\n  /**\n   * Returns the formatter's current locale.\n   */\n  getLocale() {\n    return this.formatter.locale;\n  }\n\n  addTranslations(translations: Translations) {\n    Object.assign(this.translations, translations);\n  }\n\n  /**\n   * An extensible entrypoint for extenders to register type handlers for translations.\n   */\n  protected formatterTypeHandlers() {\n    return {\n      plural: pluralTypeHandler,\n      select: selectTypeHandler,\n    };\n  }\n\n  /**\n   * A temporary system to preprocess parameters.\n   * Should not be used by extensions.\n   * TODO: An extender will be added in v1.x.\n   *\n   * @internal\n   */\n  protected preprocessParameters(parameters: TranslatorParameters) {\n    // If we've been given a user model as one of the input parameters, then\n    // we'll extract the username and use that for the translation. In the\n    // future there should be a hook here to inspect the user and change the\n    // translation key. This will allow a gender property to determine which\n    // translation key is used.\n\n    if ('user' in parameters) {\n      const user = extract(parameters, 'user') as User;\n\n      if (!parameters.username) parameters.username = username(user);\n    }\n\n    return parameters;\n  }\n\n  trans(id: string, parameters: TranslatorParameters = {}) {\n    const translation = this.translations[id];\n\n    if (translation) {\n      parameters = this.preprocessParameters(parameters);\n      return this.formatter.rich(translation, parameters);\n    }\n\n    return id;\n  }\n}\n","import app from '../common/app';\nimport { FlarumRequestOptions } from './Application';\nimport { fireDeprecationWarning } from './helpers/fireDebugWarning';\nimport Model, { ModelData, SavedModelData } from './Model';\n\nexport interface MetaInformation {\n  [key: string]: any;\n}\n\nexport interface ApiQueryParamsSingle {\n  fields?: string[];\n  include?: string;\n  bySlug?: boolean;\n  meta?: MetaInformation;\n}\n\nexport interface ApiQueryParamsPlural {\n  fields?: string[];\n  include?: string;\n  filter?:\n    | {\n        q: string;\n      }\n    | Record<string, string>;\n  page?: {\n    near?: number;\n    offset?: number;\n    number?: number;\n    limit?: number;\n    size?: number;\n  };\n  sort?: string;\n  meta?: MetaInformation;\n}\n\nexport type ApiQueryParams = ApiQueryParamsPlural | ApiQueryParamsSingle;\n\nexport interface ApiPayloadSingle {\n  data: SavedModelData;\n  included?: SavedModelData[];\n  meta?: MetaInformation;\n}\n\nexport interface ApiPayloadPlural {\n  data: SavedModelData[];\n  included?: SavedModelData[];\n  links?: {\n    first: string;\n    next?: string;\n    prev?: string;\n  };\n  meta?: MetaInformation;\n}\n\nexport type ApiPayload = ApiPayloadSingle | ApiPayloadPlural;\n\nexport type ApiResponseSingle<M extends Model> = M & { payload: ApiPayloadSingle };\nexport type ApiResponsePlural<M extends Model> = M[] & { payload: ApiPayloadPlural };\nexport type ApiResponse<M extends Model> = ApiResponseSingle<M> | ApiResponsePlural<M>;\n\ninterface ApiQueryRequestOptions<ResponseType> extends Omit<FlarumRequestOptions<ResponseType>, 'url'> {}\n\ninterface StoreData {\n  [type: string]: Partial<Record<string, Model>>;\n}\n\nexport function payloadIsPlural(payload: ApiPayload): payload is ApiPayloadPlural {\n  return Array.isArray((payload as ApiPayloadPlural).data);\n}\n\n/**\n * The `Store` class defines a local data store, and provides methods to\n * retrieve data from the API.\n */\nexport default class Store {\n  /**\n   * The local data store. A tree of resource types to IDs, such that\n   * accessing data[type][id] will return the model for that type/ID.\n   */\n  protected data: StoreData = {};\n\n  /**\n   * The model registry. A map of resource types to the model class that\n   * should be used to represent resources of that type.\n   */\n  models: Record<string, { new (): Model }>;\n\n  constructor(models: Record<string, { new (): Model }>) {\n    this.models = models;\n  }\n\n  /**\n   * Push resources contained within an API payload into the store.\n   *\n   * @return The model(s) representing the resource(s) contained\n   *     within the 'data' key of the payload.\n   */\n  pushPayload<M extends Model>(payload: ApiPayloadSingle): ApiResponseSingle<M>;\n  pushPayload<Ms extends Model[]>(payload: ApiPayloadPlural): ApiResponsePlural<Ms[number]>;\n  pushPayload<M extends Model | Model[]>(payload: ApiPayload): ApiResponse<FlatArray<M, 1>> {\n    if (payload.included) payload.included.map(this.pushObject.bind(this));\n\n    const models = payload.data instanceof Array ? payload.data.map((o) => this.pushObject(o, false)) : this.pushObject(payload.data, false);\n    const result = models as ApiResponse<FlatArray<M, 1>>;\n\n    // Attach the original payload to the model that we give back. This is\n    // useful to consumers as it allows them to access meta information\n    // associated with their request.\n    result.payload = payload;\n\n    return result;\n  }\n\n  /**\n   * Create a model to represent a resource object (or update an existing one),\n   * and push it into the store.\n   *\n   * @param data The resource object\n   * @return The model, or null if no model class has been\n   *     registered for this resource type.\n   */\n  pushObject<M extends Model>(data: SavedModelData): M | null;\n  pushObject<M extends Model>(data: SavedModelData, allowUnregistered: false): M;\n  pushObject<M extends Model>(data: SavedModelData, allowUnregistered = true): M | null {\n    if (!this.models[data.type]) {\n      if (!allowUnregistered) {\n        setTimeout(() =>\n          fireDeprecationWarning(`Pushing object of type \\`${data.type}\\` not allowed, as type not yet registered in the store.`, '3206')\n        );\n      }\n\n      return null;\n    }\n\n    const type = (this.data[data.type] = this.data[data.type] || {});\n\n    // Necessary for TS to narrow correctly.\n    const curr = type[data.id] as M;\n    const instance = curr ? curr.pushData(data) : this.createRecord<M>(data.type, data);\n\n    type[data.id] = instance;\n    instance.exists = true;\n\n    return instance;\n  }\n\n  /**\n   * Make a request to the API to find record(s) of a specific type.\n   */\n  async find<M extends Model>(type: string, params?: ApiQueryParamsSingle): Promise<ApiResponseSingle<M>>;\n  async find<Ms extends Model[]>(type: string, params?: ApiQueryParamsPlural): Promise<ApiResponsePlural<Ms[number]>>;\n  async find<M extends Model>(\n    type: string,\n    id: string,\n    params?: ApiQueryParamsSingle,\n    options?: ApiQueryRequestOptions<ApiPayloadSingle>\n  ): Promise<ApiResponseSingle<M>>;\n  async find<Ms extends Model[]>(\n    type: string,\n    ids: string[],\n    params?: ApiQueryParamsPlural,\n    options?: ApiQueryRequestOptions<ApiPayloadPlural>\n  ): Promise<ApiResponsePlural<Ms[number]>>;\n  async find<M extends Model | Model[]>(\n    type: string,\n    idOrParams: undefined | string | string[] | ApiQueryParams,\n    query: ApiQueryParams = {},\n    options: ApiQueryRequestOptions<M extends Array<infer _T> ? ApiPayloadPlural : ApiPayloadSingle> = {}\n  ): Promise<ApiResponse<FlatArray<M, 1>>> {\n    let params = query;\n    let url = app.forum.attribute('apiUrl') + '/' + type;\n\n    if (idOrParams instanceof Array) {\n      url += '?filter[id]=' + idOrParams.join(',');\n    } else if (typeof idOrParams === 'object') {\n      params = idOrParams;\n    } else if (idOrParams) {\n      url += '/' + idOrParams;\n    }\n\n    return app\n      .request<M extends Array<infer _T> ? ApiPayloadPlural : ApiPayloadSingle>({\n        method: 'GET',\n        url,\n        params,\n        ...options,\n      })\n      .then((payload) => {\n        if (payloadIsPlural(payload)) {\n          return this.pushPayload<FlatArray<M, 1>[]>(payload);\n        } else {\n          return this.pushPayload<FlatArray<M, 1>>(payload);\n        }\n      });\n  }\n\n  /**\n   * Get a record from the store by ID.\n   */\n  getById<M extends Model>(type: string, id: string): M | undefined {\n    return this.data?.[type]?.[id] as M;\n  }\n\n  /**\n   * Get a record from the store by the value of a model attribute.\n   *\n   * @param type The resource type.\n   * @param key The name of the method on the model.\n   * @param value The value of the model attribute.\n   */\n  getBy<M extends Model, T = unknown>(type: string, key: keyof M, value: T): M | undefined {\n    // @ts-expect-error No way to do this safely, unfortunately.\n    return this.all(type).filter((model) => model[key]() === value)[0] as M;\n  }\n\n  /**\n   * Get all loaded records of a specific type.\n   */\n  all<M extends Model>(type: string): M[] {\n    const records = this.data[type];\n\n    return records ? (Object.values(records) as M[]) : [];\n  }\n\n  /**\n   * Remove the given model from the store.\n   */\n  remove(model: Model): void {\n    delete this.data[model.data.type as string][model.id() as string];\n  }\n\n  /**\n   * Create a new record of the given type.\n   *\n   * @param type The resource type\n   * @param data Any data to initialize the model with\n   */\n  createRecord<M extends Model>(type: string, data: ModelData = {}): M {\n    data.type = data.type || type;\n\n    // @ts-expect-error this will complain about initializing abstract models,\n    // but we can safely assume that all models registered with the store are\n    // not abstract.\n    return new this.models[type](data, this);\n  }\n}\n","import app from '../common/app';\nimport User from './models/User';\nimport { FlarumRequestOptions } from './Application';\n\nexport type LoginParams = {\n  /**\n   * The username/email\n   */\n  identification: string;\n  password: string;\n  remember: boolean;\n};\n\n/**\n * The `Session` class defines the current user session. It stores a reference\n * to the current authenticated user, and provides methods to log in/out.\n */\nexport default class Session {\n  /**\n   * The current authenticated user.\n   */\n  user: User | null;\n\n  /**\n   * The CSRF token.\n   */\n  csrfToken: string;\n\n  constructor(user: User | null, csrfToken: string) {\n    this.user = user;\n    this.csrfToken = csrfToken;\n  }\n\n  /**\n   * Attempt to log in a user.\n   */\n  login(body: LoginParams, options: Omit<FlarumRequestOptions<any>, 'url' | 'body' | 'method'> = {}) {\n    return app.request({\n      method: 'POST',\n      url: `${app.forum.attribute('baseUrl')}/login`,\n      body,\n      ...options,\n    });\n  }\n\n  /**\n   * Log the user out.\n   */\n  logout() {\n    window.location.href = `${app.forum.attribute('baseUrl')}/logout?token=${this.csrfToken}`;\n  }\n}\n","import { createFocusTrap } from './focusTrap';\n\n/**\n * The `Drawer` class controls the page's drawer. The drawer is the area the\n * slides out from the left on mobile devices; it contains the header and the\n * footer.\n */\nexport default class Drawer {\n  /**\n   * @type {import('./focusTrap').FocusTrap}\n   */\n  focusTrap;\n\n  /**\n   * @type {HTMLDivElement}\n   */\n  appElement;\n\n  constructor() {\n    // Set up an event handler so that whenever the content area is tapped,\n    // the drawer will close.\n    document.getElementById('content').addEventListener('click', (e) => {\n      if (this.isOpen()) {\n        e.preventDefault();\n        this.hide();\n      }\n    });\n\n    this.appElement = document.getElementById('app');\n    // Despite the `focus-trap` documentation, both `clickOutsideDeactivates`\n    // and `allowOutsideClick` are necessary so that inputs in modals triggered\n    // from the drawer's nav components can be interacted with.\n    this.focusTrap = createFocusTrap('#drawer', { allowOutsideClick: true, clickOutsideDeactivates: true });\n    this.drawerAvailableMediaQuery = window.matchMedia(\n      `(max-width: ${getComputedStyle(document.documentElement).getPropertyValue('--screen-phone-max')})`\n    );\n  }\n\n  /**\n   * Handler for the `resize` event on `window`.\n   *\n   * This is used to close the drawer when the viewport is widened past the `phone` size.\n   * At this point, the drawer turns into the standard header that we see on desktop, but\n   * the drawer is still registered as 'open' internally.\n   *\n   * This causes issues with the focus trap, resulting in focus becoming trapped within\n   * the header on desktop viewports.\n   *\n   * @internal\n   */\n  resizeHandler = ((e) => {\n    if (!e.matches && this.isOpen()) {\n      // Drawer is open but we've made window bigger, so hide it.\n      this.hide();\n    }\n  }).bind(this);\n\n  /**\n   * @internal\n   * @type {MediaQueryList}\n   */\n  drawerAvailableMediaQuery;\n\n  /**\n   * Check whether or not the drawer is currently open.\n   *\n   * @return {boolean}\n   */\n  isOpen() {\n    return this.appElement.classList.contains('drawerOpen');\n  }\n\n  /**\n   * Hide the drawer.\n   */\n  hide() {\n    /**\n     * As part of hiding the drawer, this function also ensures that the drawer\n     * correctly animates out, while ensuring it is not part of the navigation\n     * tree while off-screen.\n     *\n     * More info: https://github.com/flarum/core/pull/2666#discussion_r595381014\n     */\n\n    this.focusTrap.deactivate();\n    this.drawerAvailableMediaQuery.removeListener(this.resizeHandler);\n\n    if (!this.isOpen()) return;\n\n    const $drawer = $('#drawer');\n\n    // Used to prevent `visibility: hidden` from breaking the exit animation\n    $drawer.css('visibility', 'visible').one('transitionend', () => $drawer.css('visibility', ''));\n\n    this.appElement.classList.remove('drawerOpen');\n\n    this.$backdrop?.remove?.();\n  }\n\n  /**\n   * Show the drawer.\n   */\n  show() {\n    this.appElement.classList.add('drawerOpen');\n\n    this.drawerAvailableMediaQuery.addListener(this.resizeHandler);\n\n    this.$backdrop = $('<div/>').addClass('drawer-backdrop fade').appendTo('body').on('click', this.hide.bind(this));\n\n    requestAnimationFrame(() => {\n      this.$backdrop.addClass('in');\n\n      this.focusTrap.activate();\n    });\n  }\n}\n","import type { FlarumGenericRoute, RouteResolver } from '../Application';\nimport type Component from '../Component';\nimport DefaultResolver from '../resolvers/DefaultResolver';\n\n/**\n * The `mapRoutes` utility converts a map of named application routes into a\n * format that can be understood by Mithril, and wraps them in route resolvers\n * to provide each route with the current route name.\n *\n * @see https://mithril.js.org/route.html#signature\n */\nexport default function mapRoutes(routes: Record<string, FlarumGenericRoute>, basePath: string = '') {\n  const map: Record<\n    string,\n    RouteResolver<Record<string, unknown>, Component<{ routeName: string; [key: string]: unknown }>, Record<string, unknown>>\n  > = {};\n\n  for (const routeName in routes) {\n    const route = routes[routeName];\n\n    if ('resolver' in route) {\n      map[basePath + route.path] = route.resolver;\n    } else if ('component' in route) {\n      const resolverClass = 'resolverClass' in route ? route.resolverClass! : DefaultResolver;\n      map[basePath + route.path] = new resolverClass(route.component, routeName);\n    } else {\n      throw new Error(`Either a resolver or a component must be provided for the route [${routeName}]`);\n    }\n  }\n\n  return map;\n}\n","import type Mithril from 'mithril';\nimport type { AlertAttrs } from '../components/Alert';\n\nexport type InternalFlarumRequestOptions<ResponseType> = Mithril.RequestOptions<ResponseType> & {\n  url: string;\n};\n\nexport default class RequestError<ResponseType = string> {\n  status: number;\n  options: InternalFlarumRequestOptions<ResponseType>;\n  xhr: XMLHttpRequest;\n\n  responseText: string | null;\n  response: {\n    [key: string]: unknown;\n    errors?: {\n      detail?: string;\n      code?: string;\n      [key: string]: unknown;\n    }[];\n  } | null;\n\n  alert: AlertAttrs | null;\n\n  constructor(status: number, responseText: string | null, options: InternalFlarumRequestOptions<ResponseType>, xhr: XMLHttpRequest) {\n    this.status = status;\n    this.responseText = responseText;\n    this.options = options;\n    this.xhr = xhr;\n\n    try {\n      this.response = JSON.parse(responseText ?? 'null');\n    } catch (e) {\n      this.response = null;\n    }\n\n    this.alert = null;\n  }\n}\n","import humanTime from './humanTime';\n\nfunction updateHumanTimes() {\n  $('[data-humantime]').each(function () {\n    const $this = $(this);\n    const ago = humanTime($this.attr('datetime'));\n\n    $this.html(ago);\n  });\n}\n\n/**\n * The `liveHumanTimes` initializer sets up a loop every 1 second to update\n * timestamps rendered with the `humanTime` helper.\n */\nexport default function liveHumanTimes() {\n  setInterval(updateHumanTimes, 10000);\n}\n","/**\n * Extend an object's method by running its output through a mutating callback\n * every time it is called.\n *\n * The callback accepts the method's return value and should perform any\n * mutations directly on this value. For this reason, this function will not be\n * effective on methods which return scalar values (numbers, strings, booleans).\n *\n * Care should be taken to extend the correct object – in most cases, a class'\n * prototype will be the desired target of extension, not the class itself.\n *\n * @example <caption>Example usage of extending one method.</caption>\n * extend(Discussion.prototype, 'badges', function(badges) {\n *   // do something with `badges`\n * });\n *\n * @example <caption>Example usage of extending multiple methods.</caption>\n * extend(IndexPage.prototype, ['oncreate', 'onupdate'], function(vnode) {\n *   // something that needs to be run on creation and update\n * });\n *\n * @param object The object that owns the method\n * @param methods The name or names of the method(s) to extend\n * @param callback A callback which mutates the method's output\n */\nexport function extend<T extends Record<string, any>, K extends KeyOfType<T, Function>>(\n  object: T,\n  methods: K | K[],\n  callback: (this: T, val: ReturnType<T[K]>, ...args: Parameters<T[K]>) => void\n) {\n  const allMethods = Array.isArray(methods) ? methods : [methods];\n\n  allMethods.forEach((method: K) => {\n    const original: Function | undefined = object[method];\n\n    object[method] = function (this: T, ...args: Parameters<T[K]>) {\n      const value = original ? original.apply(this, args) : undefined;\n\n      callback.apply(this, [value, ...args]);\n\n      return value;\n    } as T[K];\n\n    Object.assign(object[method], original);\n  });\n}\n\n/**\n * Override an object's method by replacing it with a new function, so that the\n * new function will be run every time the object's method is called.\n *\n * The replacement function accepts the original method as its first argument,\n * which is like a call to `super`. Any arguments passed to the original method\n * are also passed to the replacement.\n *\n * Care should be taken to extend the correct object – in most cases, a class'\n * prototype will be the desired target of extension, not the class itself.\n *\n * @example <caption>Example usage of overriding one method.</caption>\n * override(Discussion.prototype, 'badges', function(original) {\n *   const badges = original();\n *   // do something with badges\n *   return badges;\n * });\n *\n * @example <caption>Example usage of overriding multiple methods.</caption>\n * extend(Discussion.prototype, ['oncreate', 'onupdate'], function(original, vnode) {\n *   // something that needs to be run on creation and update\n * });\n *\n * @param object The object that owns the method\n * @param methods The name or names of the method(s) to override\n * @param newMethod The method to replace it with\n */\nexport function override<T extends Record<any, any>, K extends KeyOfType<T, Function>>(\n  object: T,\n  methods: K | K[],\n  newMethod: (this: T, orig: T[K], ...args: Parameters<T[K]>) => void\n) {\n  const allMethods = Array.isArray(methods) ? methods : [methods];\n\n  allMethods.forEach((method) => {\n    const original: Function = object[method];\n\n    object[method] = function (this: T, ...args: Parameters<T[K]>) {\n      return newMethod.apply(this, [original.bind(this), ...args]);\n    } as T[K];\n\n    Object.assign(object[method], original);\n  });\n}\n","import Model from '../Model';\n\nexport default class Forum extends Model {\n  apiEndpoint() {\n    return '/';\n  }\n}\n","type RGB = { r: number; g: number; b: number };\n\nfunction hsvToRgb(h: number, s: number, v: number): RGB {\n  let r!: number;\n  let g!: number;\n  let b!: number;\n\n  const i = Math.floor(h * 6);\n  const f = h * 6 - i;\n  const p = v * (1 - s);\n  const q = v * (1 - f * s);\n  const t = v * (1 - (1 - f) * s);\n\n  switch (i % 6) {\n    case 0:\n      r = v;\n      g = t;\n      b = p;\n      break;\n    case 1:\n      r = q;\n      g = v;\n      b = p;\n      break;\n    case 2:\n      r = p;\n      g = v;\n      b = t;\n      break;\n    case 3:\n      r = p;\n      g = q;\n      b = v;\n      break;\n    case 4:\n      r = t;\n      g = p;\n      b = v;\n      break;\n    case 5:\n      r = v;\n      g = p;\n      b = q;\n      break;\n  }\n\n  return {\n    r: Math.floor(r * 255),\n    g: Math.floor(g * 255),\n    b: Math.floor(b * 255),\n  };\n}\n\n/**\n * Convert the given string to a unique color.\n */\nexport default function stringToColor(string: string): string {\n  let num = 0;\n\n  // Convert the username into a number based on the ASCII value of each\n  // character.\n  for (let i = 0; i < string.length; i++) {\n    num += string.charCodeAt(i);\n  }\n\n  // Construct a color using the remainder of that number divided by 360, and\n  // some predefined saturation and value values.\n  const hue = num % 360;\n  const rgb = hsvToRgb(hue / 360, 0.3, 0.9);\n\n  return '' + rgb.r.toString(16) + rgb.g.toString(16) + rgb.b.toString(16);\n}\n","import ColorThief, { Color } from 'color-thief-browser';\n\nimport Model from '../Model';\nimport stringToColor from '../utils/stringToColor';\nimport ItemList from '../utils/ItemList';\nimport computed from '../utils/computed';\nimport GroupBadge from '../components/GroupBadge';\nimport Mithril from 'mithril';\nimport Group from './Group';\n\nexport default class User extends Model {\n  username() {\n    return Model.attribute<string>('username').call(this);\n  }\n  slug() {\n    return Model.attribute<string>('slug').call(this);\n  }\n  displayName() {\n    return Model.attribute<string>('displayName').call(this);\n  }\n\n  email() {\n    return Model.attribute<string | undefined>('email').call(this);\n  }\n  isEmailConfirmed() {\n    return Model.attribute<boolean | undefined>('isEmailConfirmed').call(this);\n  }\n\n  password() {\n    return Model.attribute<string | undefined>('password').call(this);\n  }\n\n  avatarUrl() {\n    return Model.attribute<string | null>('avatarUrl').call(this);\n  }\n\n  preferences() {\n    return Model.attribute<Record<string, any> | null | undefined>('preferences').call(this);\n  }\n\n  groups() {\n    return Model.hasMany<Group>('groups').call(this);\n  }\n\n  isAdmin() {\n    return Model.attribute<boolean | undefined>('isAdmin').call(this);\n  }\n\n  joinTime() {\n    return Model.attribute('joinTime', Model.transformDate).call(this);\n  }\n\n  lastSeenAt() {\n    return Model.attribute('lastSeenAt', Model.transformDate).call(this);\n  }\n\n  markedAllAsReadAt() {\n    return Model.attribute('markedAllAsReadAt', Model.transformDate).call(this);\n  }\n\n  unreadNotificationCount() {\n    return Model.attribute<number | undefined>('unreadNotificationCount').call(this);\n  }\n  newNotificationCount() {\n    return Model.attribute<number | undefined>('newNotificationCount').call(this);\n  }\n\n  discussionCount() {\n    return Model.attribute<number | undefined>('discussionCount').call(this);\n  }\n  commentCount() {\n    return Model.attribute<number | undefined>('commentCount').call(this);\n  }\n\n  canEdit() {\n    return Model.attribute<boolean | undefined>('canEdit').call(this);\n  }\n  canEditCredentials() {\n    return Model.attribute<boolean | undefined>('canEditCredentials').call(this);\n  }\n  canEditGroups() {\n    return Model.attribute<boolean | undefined>('canEditGroups').call(this);\n  }\n  canDelete() {\n    return Model.attribute<boolean | undefined>('canDelete').call(this);\n  }\n\n  color() {\n    return computed<string, User>('displayName', 'avatarUrl', 'avatarColor', (displayName, avatarUrl, avatarColor) => {\n      // If we've already calculated and cached the dominant color of the user's\n      // avatar, then we can return that in RGB format. If we haven't, we'll want\n      // to calculate it. Unless the user doesn't have an avatar, in which case\n      // we generate a color from their display name.\n      if (avatarColor) {\n        return `rgb(${(avatarColor as Color).join(', ')})`;\n      } else if (avatarUrl) {\n        this.calculateAvatarColor();\n        return '';\n      }\n\n      return '#' + stringToColor(displayName as string);\n    }).call(this);\n  }\n\n  protected avatarColor: Color | null = null;\n\n  /**\n   * Check whether or not the user has been seen in the last 5 minutes.\n   */\n  isOnline(): boolean {\n    return dayjs().subtract(5, 'minutes').isBefore(this.lastSeenAt());\n  }\n\n  /**\n   * Get the Badge components that apply to this user.\n   */\n  badges(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n    const groups = this.groups();\n\n    if (groups) {\n      groups.forEach((group) => {\n        items.add(`group${group?.id()}`, <GroupBadge group={group} />);\n      });\n    }\n\n    return items;\n  }\n\n  /**\n   * Calculate the dominant color of the user's avatar. The dominant color will\n   * be set to the `avatarColor` property once it has been calculated.\n   */\n  protected calculateAvatarColor() {\n    const image = new Image();\n    const user = this;\n\n    image.addEventListener('load', function (this: HTMLImageElement) {\n      try {\n        const colorThief = new ColorThief();\n        user.avatarColor = colorThief.getColor(this);\n      } catch (e) {\n        // Completely white avatars throw errors due to a glitch in color thief\n        // See https://github.com/lokesh/color-thief/issues/40\n        if (e instanceof TypeError) {\n          user.avatarColor = [255, 255, 255];\n        } else {\n          throw e;\n        }\n      }\n      user.freshness = new Date();\n      m.redraw();\n    });\n    image.crossOrigin = 'anonymous';\n    image.src = this.avatarUrl() ?? '';\n  }\n\n  /**\n   * Update the user's preferences.\n   */\n  savePreferences(newPreferences: Record<string, unknown>): Promise<this> {\n    const preferences = this.preferences();\n\n    Object.assign(preferences ?? {}, newPreferences);\n\n    return this.save({ preferences });\n  }\n}\n","import Model from '../Model';\nimport computed from '../utils/computed';\nimport { getPlainContent } from '../utils/string';\nimport Discussion from './Discussion';\nimport User from './User';\n\nexport default class Post extends Model {\n  number() {\n    return Model.attribute<number>('number').call(this);\n  }\n  discussion() {\n    return Model.hasOne<Discussion>('discussion').call(this) as Discussion;\n  }\n\n  createdAt() {\n    return Model.attribute<Date, string>('createdAt', Model.transformDate).call(this);\n  }\n  user() {\n    return Model.hasOne<User>('user').call(this);\n  }\n\n  contentType() {\n    return Model.attribute<string | null>('contentType').call(this);\n  }\n  content() {\n    return Model.attribute<string | null | undefined>('content').call(this);\n  }\n  contentHtml() {\n    return Model.attribute<string | null | undefined>('contentHtml').call(this);\n  }\n  renderFailed() {\n    return Model.attribute<boolean | undefined>('renderFailed').call(this);\n  }\n  contentPlain() {\n    return computed<string | null | undefined>('contentHtml', (content) => {\n      if (typeof content === 'string') {\n        return getPlainContent(content);\n      }\n\n      return content as null | undefined;\n    }).call(this);\n  }\n\n  editedAt() {\n    return Model.attribute('editedAt', Model.transformDate).call(this);\n  }\n  editedUser() {\n    return Model.hasOne<User | null>('editedUser').call(this);\n  }\n  isEdited() {\n    return computed<boolean>('editedAt', (editedAt) => !!editedAt).call(this);\n  }\n\n  hiddenAt() {\n    return Model.attribute('hiddenAt', Model.transformDate).call(this);\n  }\n  hiddenUser() {\n    return Model.hasOne<User | null>('hiddenUser').call(this);\n  }\n  isHidden() {\n    return computed<boolean>('hiddenAt', (hiddenAt) => !!hiddenAt).call(this);\n  }\n\n  canEdit() {\n    return Model.attribute<boolean | undefined>('canEdit').call(this);\n  }\n  canHide() {\n    return Model.attribute<boolean | undefined>('canHide').call(this);\n  }\n  canDelete() {\n    return Model.attribute<boolean | undefined>('canDelete').call(this);\n  }\n}\n","import Model from '../Model';\nimport User from './User';\n\nexport default class Notification extends Model {\n  contentType() {\n    return Model.attribute<string>('contentType').call(this);\n  }\n  content<T = unknown>() {\n    return Model.attribute<T>('content').call(this);\n  }\n  createdAt() {\n    return Model.attribute<Date, string>('createdAt', Model.transformDate).call(this);\n  }\n\n  isRead() {\n    return Model.attribute<boolean>('isRead').call(this);\n  }\n\n  user() {\n    return Model.hasOne<User>('user').call(this);\n  }\n  fromUser() {\n    return Model.hasOne<User | null>('fromUser').call(this);\n  }\n  subject() {\n    return Model.hasOne<Model | null>('subject').call(this);\n  }\n}\n","import type Component from '../Component';\nimport Modal, { IDismissibleOptions } from '../components/Modal';\n\n/**\n * Ideally, `show` would take a higher-kinded generic, ala:\n *  `show<Attrs, C>(componentClass: C<Attrs>, attrs: Attrs): void`\n * Unfortunately, TypeScript does not support this:\n * https://github.com/Microsoft/TypeScript/issues/1213\n * Therefore, we have to use this ugly, messy workaround.\n */\ntype UnsafeModalClass = ComponentClass<any, Modal> & { get dismissibleOptions(): IDismissibleOptions; component: typeof Component.component };\n\ntype ModalItem = {\n  componentClass: UnsafeModalClass;\n  attrs?: Record<string, unknown>;\n  key: number;\n};\n\n/**\n * Class used to manage modal state.\n *\n * Accessible on the `app` object via `app.modal` property.\n */\nexport default class ModalManagerState {\n  /**\n   * @internal\n   */\n  modal: ModalItem | null = null;\n\n  /**\n   * @internal\n   */\n  modalList: ModalItem[] = [];\n\n  /**\n   * @internal\n   */\n  backdropShown: boolean = false;\n\n  /**\n   * Used to force re-initialization of modals if a modal\n   * is replaced by another of the same type.\n   */\n  private key = 0;\n\n  /**\n   * Shows a modal dialog.\n   *\n   * If `stackModal` is `true`, the modal will be shown on top of the current modal.\n   *\n   * If a value for `stackModal` is not provided, opening a new modal will close\n   * any others currently being shown for backwards compatibility.\n   *\n   * @example <caption>Show a modal</caption>\n   * app.modal.show(MyCoolModal, { attr: 'value' });\n   *\n   * @example <caption>Show a modal from a lifecycle method (`oncreate`, `view`, etc.)</caption>\n   * // This \"hack\" is needed due to quirks with nested redraws in Mithril.\n   * setTimeout(() => app.modal.show(MyCoolModal, { attr: 'value' }), 0);\n   *\n   * @example <caption>Stacking modals</caption>\n   * app.modal.show(MyCoolStackedModal, { attr: 'value' }, true);\n   */\n  show(componentClass: UnsafeModalClass, attrs: Record<string, unknown> = {}, stackModal: boolean = false): void {\n    if (!(componentClass.prototype instanceof Modal)) {\n      // This is duplicated so that if the error is caught, an error message still shows up in the debug console.\n      const invalidModalWarning = 'The ModalManager can only show Modals.';\n      console.error(invalidModalWarning);\n      throw new Error(invalidModalWarning);\n    }\n\n    this.backdropShown = true;\n    m.redraw.sync();\n\n    // We use requestAnimationFrame here, since we need to wait for the backdrop to be added\n    // to the DOM before actually adding the modal to the modal list.\n    //\n    // This is because we use RAF inside the ModalManager onupdate lifecycle hook, and if we\n    // skip this RAF call, the hook will attempt to add a focus trap as well as lock scroll\n    // onto the newly added modal before it's in the DOM, creating an extra scrollbar.\n    requestAnimationFrame(() => {\n      // Set current modal\n      this.modal = { componentClass, attrs, key: this.key++ };\n\n      // We want to stack this modal\n      if (stackModal) {\n        // Remember previously opened modal and add new modal to the modal list\n        this.modalList.push(this.modal);\n      } else {\n        // Override last modals\n        this.modalList = [this.modal];\n      }\n\n      m.redraw();\n    });\n  }\n\n  /**\n   * Closes the topmost currently open dialog, if one is open.\n   */\n  close(): void {\n    if (!this.modal) return;\n\n    // If there are two modals, remove the most recent one\n    if (this.modalList.length > 1) {\n      // Remove last modal from list\n      this.modalList.pop();\n\n      // Open last modal from list\n      this.modal = this.modalList[this.modalList.length - 1];\n    } else {\n      // Reset state\n      this.modal = null;\n      this.modalList = [];\n    }\n\n    m.redraw();\n  }\n\n  /**\n   * Checks if a modal is currently open.\n   *\n   * @return `true` if a modal dialog is currently open, otherwise `false`.\n   */\n  isModalOpen(): boolean {\n    return !!this.modal;\n  }\n}\n","import type Mithril from 'mithril';\nimport Alert, { AlertAttrs } from '../components/Alert';\n\n/**\n * Returned by `AlertManagerState.show`. Used to dismiss alerts.\n */\nexport type AlertIdentifier = number;\n\nexport type AlertArray = { [id: AlertIdentifier]: AlertState };\n\nexport interface AlertState {\n  componentClass: typeof Alert;\n  attrs: AlertAttrs;\n  children: Mithril.Children;\n}\n\nexport default class AlertManagerState {\n  protected activeAlerts: AlertArray = {};\n  protected alertId: AlertIdentifier = 0;\n\n  getActiveAlerts() {\n    return this.activeAlerts;\n  }\n\n  /**\n   * Show an Alert in the alerts area.\n   *\n   * @return The alert's ID, which can be used to dismiss the alert.\n   */\n  show(children: Mithril.Children): AlertIdentifier;\n  show(attrs: AlertAttrs, children: Mithril.Children): AlertIdentifier;\n  show(componentClass: typeof Alert, attrs: AlertAttrs, children: Mithril.Children): AlertIdentifier;\n\n  show(arg1: any, arg2?: any, arg3?: any) {\n    // Assigns variables as per the above signatures\n    let componentClass = Alert;\n    let attrs: AlertAttrs = {};\n    let children: Mithril.Children;\n\n    if (arguments.length == 1) {\n      children = arg1 as Mithril.Children;\n    } else if (arguments.length == 2) {\n      attrs = arg1 as AlertAttrs;\n      children = arg2 as Mithril.Children;\n    } else if (arguments.length == 3) {\n      componentClass = arg1 as typeof Alert;\n      attrs = arg2 as AlertAttrs;\n      children = arg3;\n    }\n\n    this.activeAlerts[++this.alertId] = { children, attrs, componentClass };\n    m.redraw();\n\n    return this.alertId;\n  }\n\n  /**\n   * Dismiss an alert.\n   */\n  dismiss(key: AlertIdentifier | null): void {\n    if (!key || !(key in this.activeAlerts)) return;\n\n    delete this.activeAlerts[key];\n    m.redraw();\n  }\n\n  /**\n   * Clear all alerts.\n   */\n  clear(): void {\n    this.activeAlerts = {};\n    m.redraw();\n  }\n}\n","import app from '../app';\n\n/**\n * Fire a Flarum error which is shown in the JS console for everyone and in an alert for the admin.\n *\n * @param userTitle: a user friendly title of the error, should be localized.\n * @param consoleTitle: an error title that goes in the console, doesn't have to be localized.\n * @param error: the error.\n */\nexport default function fireApplicationError(userTitle: string, consoleTitle: string, error: any) {\n  console.group(`%c${consoleTitle}`, 'background-color: #d83e3e; color: #ffffff; font-weight: bold;');\n  console.error(error);\n  console.groupEnd();\n\n  if (app.session?.user?.isAdmin()) {\n    app.alerts.show({ type: 'error' }, `${userTitle}`);\n  }\n}\n","import Model from '../Model';\n\nexport default class AccessToken extends Model {\n  token() {\n    return Model.attribute<string | undefined>('token').call(this);\n  }\n  userId() {\n    return Model.attribute<string>('userId').call(this);\n  }\n  title() {\n    return Model.attribute<string | null>('title').call(this);\n  }\n  type() {\n    return Model.attribute<string>('type').call(this);\n  }\n  createdAt() {\n    return Model.attribute<Date, string>('createdAt', Model.transformDate).call(this);\n  }\n  lastActivityAt() {\n    return Model.attribute<Date, string>('lastActivityAt', Model.transformDate).call(this);\n  }\n  lastIpAddress() {\n    return Model.attribute<string>('lastIpAddress').call(this);\n  }\n  device() {\n    return Model.attribute<string>('device').call(this);\n  }\n  isCurrent() {\n    return Model.attribute<boolean>('isCurrent').call(this);\n  }\n  isSessionToken() {\n    return Model.attribute<boolean>('isSessionToken').call(this);\n  }\n}\n","import app from '../common/app';\n\nimport ItemList from './utils/ItemList';\nimport Button from './components/Button';\nimport ModalManager from './components/ModalManager';\nimport AlertManager from './components/AlertManager';\nimport RequestErrorModal from './components/RequestErrorModal';\nimport Translator from './Translator';\nimport Store, { ApiPayload, ApiResponse, ApiResponsePlural, ApiResponseSingle, payloadIsPlural } from './Store';\nimport Session from './Session';\nimport extract from './utils/extract';\nimport extractText from './utils/extractText';\nimport Drawer from './utils/Drawer';\nimport mapRoutes from './utils/mapRoutes';\nimport RequestError, { InternalFlarumRequestOptions } from './utils/RequestError';\nimport ScrollListener from './utils/ScrollListener';\nimport liveHumanTimes from './utils/liveHumanTimes';\n// @ts-expect-error We need to explicitly use the prefix to distinguish between the extend folder.\nimport { extend } from './extend.ts';\n\nimport Forum from './models/Forum';\nimport User from './models/User';\nimport Discussion from './models/Discussion';\nimport Post from './models/Post';\nimport Group from './models/Group';\nimport Notification from './models/Notification';\nimport PageState from './states/PageState';\nimport ModalManagerState from './states/ModalManagerState';\nimport AlertManagerState from './states/AlertManagerState';\n\nimport type DefaultResolver from './resolvers/DefaultResolver';\nimport type Mithril from 'mithril';\nimport type Component from './Component';\nimport type { ComponentAttrs } from './Component';\nimport Model, { SavedModelData } from './Model';\nimport fireApplicationError from './helpers/fireApplicationError';\nimport IHistory from './IHistory';\nimport IExtender from './extenders/IExtender';\nimport AccessToken from './models/AccessToken';\n\nexport type FlarumScreens = 'phone' | 'tablet' | 'desktop' | 'desktop-hd';\n\nexport type FlarumGenericRoute = RouteItem<any, any, any>;\n\nexport interface FlarumRequestOptions<ResponseType> extends Omit<Mithril.RequestOptions<ResponseType>, 'extract'> {\n  errorHandler?: (error: RequestError) => void;\n  url: string;\n  // TODO: [Flarum 2.0] Remove deprecated option\n  /**\n   * Manipulate the response text before it is parsed into JSON.\n   *\n   * @deprecated Please use `modifyText` instead.\n   */\n  extract?: (responseText: string) => string;\n  /**\n   * Manipulate the response text before it is parsed into JSON.\n   *\n   * This overrides any `extract` method provided.\n   */\n  modifyText?: (responseText: string) => string;\n}\n\n/**\n * A valid route definition.\n */\nexport type RouteItem<\n  Attrs extends ComponentAttrs,\n  Comp extends Component<Attrs & { routeName: string }>,\n  RouteArgs extends Record<string, unknown> = {}\n> = {\n  /**\n   * The path for your route.\n   *\n   * This might be a specific URL path (e.g.,`/myPage`), or it might\n   * contain a variable used by a resolver (e.g., `/myPage/:id`).\n   *\n   * @see https://docs.flarum.org/extend/frontend-pages.html#route-resolvers-advanced\n   */\n  path: `/${string}`;\n} & (\n  | {\n      /**\n       * The component to render when this route matches.\n       */\n      component: new () => Comp;\n      /**\n       * A custom resolver class.\n       *\n       * This should be the class itself, and **not** an instance of the\n       * class.\n       */\n      resolverClass?: new (component: new () => Comp, routeName: string) => DefaultResolver<Attrs, Comp, RouteArgs>;\n    }\n  | {\n      /**\n       * An instance of a route resolver.\n       */\n      resolver: RouteResolver<Attrs, Comp, RouteArgs>;\n    }\n);\n\nexport interface RouteResolver<\n  Attrs extends ComponentAttrs,\n  Comp extends Component<Attrs & { routeName: string }>,\n  RouteArgs extends Record<string, unknown> = {}\n> {\n  /**\n   * A method which selects which component to render based on\n   * conditional logic.\n   *\n   * Returns the component class, and **not** a Vnode or JSX\n   * expression.\n   *\n   * @see https://mithril.js.org/route.html#routeresolveronmatch\n   */\n  onmatch(this: this, args: RouteArgs, requestedPath: string, route: string): { new (): Comp };\n  /**\n   * A function which renders the provided component.\n   *\n   * If not specified, the route will default to rendering the\n   * component on its own, inside of a fragment.\n   *\n   * Returns a Mithril Vnode or other children.\n   *\n   * @see https://mithril.js.org/route.html#routeresolverrender\n   */\n  render?(this: this, vnode: Mithril.Vnode<Attrs, Comp>): Mithril.Children;\n}\n\nexport interface ApplicationData {\n  apiDocument: ApiPayload | null;\n  locale: string;\n  locales: Record<string, string>;\n  resources: SavedModelData[];\n  session: { userId: number; csrfToken: string };\n  [key: string]: unknown;\n}\n\n/**\n * The `App` class provides a container for an application, as well as various\n * utilities for the rest of the app to use.\n */\nexport default class Application {\n  /**\n   * The forum model for this application.\n   */\n  forum!: Forum;\n\n  /**\n   * A map of routes, keyed by a unique route name. Each route is an object\n   * containing the following properties:\n   *\n   * - `path` The path that the route is accessed at.\n   * - `component` The Mithril component to render when this route is active.\n   *\n   * @example\n   * app.routes.discussion = { path: '/d/:id', component: DiscussionPage };\n   */\n  routes: Record<string, FlarumGenericRoute> = {};\n\n  /**\n   * An ordered list of initializers to bootstrap the application.\n   */\n  initializers: ItemList<(app: this) => void> = new ItemList();\n\n  /**\n   * The app's session.\n   *\n   * Stores info about the current user.\n   */\n  session!: Session;\n\n  /**\n   * The app's translator.\n   */\n  translator: Translator = new Translator();\n\n  /**\n   * The app's data store.\n   */\n  store: Store = new Store({\n    'access-tokens': AccessToken,\n    forums: Forum,\n    users: User,\n    discussions: Discussion,\n    posts: Post,\n    groups: Group,\n    notifications: Notification,\n  });\n\n  /**\n   * A local cache that can be used to store data at the application level, so\n   * that is persists between different routes.\n   */\n  cache: Record<string, unknown> = {};\n\n  /**\n   * Whether or not the app has been booted.\n   */\n  booted: boolean = false;\n\n  /**\n   * The page the app is currently on.\n   *\n   * This object holds information about the type of page we are currently\n   * visiting, and sometimes additional arbitrary page state that may be\n   * relevant to lower-level components.\n   */\n  current: PageState = new PageState(null);\n\n  /**\n   * The page the app was on before the current page.\n   *\n   * Once the application navigates to another page, the object previously\n   * assigned to this.current will be moved to this.previous, while this.current\n   * is re-initialized.\n   */\n  previous: PageState = new PageState(null);\n\n  /**\n   * An object that manages modal state.\n   */\n  modal: ModalManagerState = new ModalManagerState();\n\n  /**\n   * An object that manages the state of active alerts.\n   */\n  alerts: AlertManagerState = new AlertManagerState();\n\n  /**\n   * An object that manages the state of the navigation drawer.\n   */\n  drawer!: Drawer;\n\n  history: IHistory | null = null;\n  pane: any = null;\n\n  data!: ApplicationData;\n\n  refs: Record<string, string> = {\n    fontawesome: 'https://fontawesome.com/v5/search?o=r&m=free',\n  };\n\n  private _title: string = '';\n  private _titleCount: number = 0;\n\n  private set title(val: string) {\n    this._title = val;\n  }\n\n  get title() {\n    return this._title;\n  }\n\n  private set titleCount(val: number) {\n    this._titleCount = val;\n  }\n\n  get titleCount() {\n    return this._titleCount;\n  }\n\n  /**\n   * The key for an Alert that was shown as a result of an AJAX request error.\n   * If present, it will be dismissed on the next successful request.\n   */\n  private requestErrorAlert: number | null = null;\n\n  initialRoute!: string;\n\n  public load(payload: Application['data']) {\n    this.data = payload;\n    this.translator.setLocale(payload.locale);\n  }\n\n  public boot() {\n    const caughtInitializationErrors: CallableFunction[] = [];\n\n    this.initializers.toArray().forEach((initializer) => {\n      try {\n        initializer(this);\n      } catch (e) {\n        const extension = initializer.itemName.includes('/')\n          ? initializer.itemName.replace(/(\\/flarum-ext-)|(\\/flarum-)/g, '-')\n          : initializer.itemName;\n\n        caughtInitializationErrors.push(() =>\n          fireApplicationError(\n            extractText(app.translator.trans('core.lib.error.extension_initialiation_failed_message', { extension })),\n            `${extension} failed to initialize`,\n            e\n          )\n        );\n      }\n    });\n\n    this.store.pushPayload({ data: this.data.resources });\n\n    this.forum = this.store.getById('forums', '1')!;\n\n    this.session = new Session(this.store.getById<User>('users', String(this.data.session.userId)) ?? null, this.data.session.csrfToken);\n\n    this.mount();\n\n    this.initialRoute = window.location.href;\n\n    caughtInitializationErrors.forEach((handler) => handler());\n  }\n\n  public bootExtensions(extensions: Record<string, { extend?: IExtender[] }>) {\n    Object.keys(extensions).forEach((name) => {\n      const extension = extensions[name];\n\n      // If an extension doesn't define extenders, there's nothing more to do here.\n      if (!extension.extend) return;\n\n      const extenders = extension.extend.flat(Infinity);\n\n      for (const extender of extenders) {\n        extender.extend(this, { name, exports: extension });\n      }\n    });\n  }\n\n  protected mount(basePath: string = '') {\n    // An object with a callable view property is used in order to pass arguments to the component; see https://mithril.js.org/mount.html\n    m.mount(document.getElementById('modal')!, { view: () => <ModalManager state={this.modal} /> });\n    m.mount(document.getElementById('alerts')!, { view: () => <AlertManager state={this.alerts} /> });\n\n    this.drawer = new Drawer();\n\n    m.route(document.getElementById('content')!, basePath + '/', mapRoutes(this.routes, basePath));\n\n    const appEl = document.getElementById('app')!;\n    const appHeaderEl = document.querySelector('.App-header')!;\n\n    // Add a class to the body which indicates that the page has been scrolled\n    // down. When this happens, we'll add classes to the header and app body\n    // which will set the navbar's position to fixed. We don't want to always\n    // have it fixed, as that could overlap with custom headers.\n    const scrollListener = new ScrollListener((top: number) => {\n      const offset = appEl.getBoundingClientRect().top + document.body.scrollTop;\n\n      appEl.classList.toggle('affix', top >= offset);\n      appEl.classList.toggle('scrolled', top > offset);\n\n      appHeaderEl.classList.toggle('navbar-fixed-top', top >= offset);\n    });\n\n    scrollListener.start();\n    scrollListener.update();\n\n    document.body.classList.add('ontouchstart' in window ? 'touch' : 'no-touch');\n\n    liveHumanTimes();\n  }\n\n  /**\n   * Get the API response document that has been preloaded into the application.\n   */\n  preloadedApiDocument<M extends Model>(): ApiResponseSingle<M> | null;\n  preloadedApiDocument<Ms extends Model[]>(): ApiResponsePlural<Ms[number]> | null;\n  preloadedApiDocument<M extends Model | Model[]>(): ApiResponse<FlatArray<M, 1>> | null {\n    // If the URL has changed, the preloaded Api document is invalid.\n    if (this.data.apiDocument && window.location.href === this.initialRoute) {\n      const results = payloadIsPlural(this.data.apiDocument)\n        ? this.store.pushPayload<FlatArray<M, 1>[]>(this.data.apiDocument)\n        : this.store.pushPayload<FlatArray<M, 1>>(this.data.apiDocument);\n\n      this.data.apiDocument = null;\n\n      return results;\n    }\n\n    return null;\n  }\n\n  /**\n   * Determine the current screen mode, based on our media queries.\n   */\n  screen(): FlarumScreens {\n    const styles = getComputedStyle(document.documentElement);\n    return styles.getPropertyValue('--flarum-screen') as ReturnType<Application['screen']>;\n  }\n\n  /**\n   * Set the `<title>` of the page.\n   *\n   * @param title New page title\n   */\n  setTitle(title: string): void {\n    this.title = title;\n    this.updateTitle();\n  }\n\n  /**\n   * Set a number to display in the `<title>` of the page.\n   *\n   * @param count Number to display in title\n   */\n  setTitleCount(count: number): void {\n    this.titleCount = count;\n    this.updateTitle();\n  }\n\n  updateTitle(): void {\n    const count = this.titleCount ? `(${this.titleCount}) ` : '';\n    const onHomepage = m.route.get() === this.forum.attribute('basePath') + '/';\n\n    const params = {\n      pageTitle: this.title,\n      forumName: this.forum.attribute('title'),\n      // Until we add page numbers to the frontend, this is constant at 1\n      // so that the page number portion doesn't show up in the URL.\n      pageNumber: 1,\n    };\n\n    let title =\n      onHomepage || !this.title\n        ? extractText(app.translator.trans('core.lib.meta_titles.without_page_title', params))\n        : extractText(app.translator.trans('core.lib.meta_titles.with_page_title', params));\n\n    title = count + title;\n\n    // We pass the title through a DOMParser to allow HTML entities\n    // to be rendered correctly, while still preventing XSS attacks\n    // from user input by using a script-disabled environment.\n    // https://github.com/flarum/framework/issues/3514\n    // https://github.com/flarum/framework/pull/3684\n    // This is only a temporary solution for 1.x,\n    // and the actual source of the issue will be fixed in 2.x\n    // Actual source of the issue: https://github.com/flarum/framework/issues/3685\n    const parser = new DOMParser();\n    document.title = parser.parseFromString(title, 'text/html').body.innerText;\n  }\n\n  protected transformRequestOptions<ResponseType>(flarumOptions: FlarumRequestOptions<ResponseType>): InternalFlarumRequestOptions<ResponseType> {\n    const { background, deserialize, extract, modifyText, ...tmpOptions } = { ...flarumOptions };\n\n    // Unless specified otherwise, requests should run asynchronously in the\n    // background, so that they don't prevent redraws from occurring.\n    const defaultBackground = true;\n\n    // When we deserialize JSON data, if for some reason the server has provided\n    // a dud response, we don't want the application to crash. We'll show an\n    // error message to the user instead.\n\n    const defaultDeserialize = (response: string) => response as ResponseType;\n\n    // When extracting the data from the response, we can check the server\n    // response code and show an error message to the user if something's gone\n    // awry.\n    const originalExtract = modifyText || extract;\n\n    const options: InternalFlarumRequestOptions<ResponseType> = {\n      background: background ?? defaultBackground,\n      deserialize: deserialize ?? defaultDeserialize,\n      ...tmpOptions,\n    };\n\n    extend(options, 'config', (_: undefined, xhr: XMLHttpRequest) => {\n      xhr.setRequestHeader('X-CSRF-Token', this.session.csrfToken!);\n    });\n\n    // If the method is something like PATCH or DELETE, which not all servers\n    // and clients support, then we'll send it as a POST request with the\n    // intended method specified in the X-HTTP-Method-Override header.\n    if (options.method && !['GET', 'POST'].includes(options.method)) {\n      const method = options.method;\n\n      extend(options, 'config', (_: undefined, xhr: XMLHttpRequest) => {\n        xhr.setRequestHeader('X-HTTP-Method-Override', method);\n      });\n\n      options.method = 'POST';\n    }\n\n    options.extract = (xhr: XMLHttpRequest) => {\n      let responseText;\n\n      if (originalExtract) {\n        responseText = originalExtract(xhr.responseText);\n      } else {\n        responseText = xhr.responseText;\n      }\n\n      const status = xhr.status;\n\n      if (status < 200 || status > 299) {\n        throw new RequestError<ResponseType>(status, `${responseText}`, options, xhr);\n      }\n\n      if (xhr.getResponseHeader) {\n        const csrfToken = xhr.getResponseHeader('X-CSRF-Token');\n        if (csrfToken) app.session.csrfToken = csrfToken;\n      }\n\n      try {\n        if (responseText === '') {\n          return null;\n        }\n\n        return JSON.parse(responseText);\n      } catch (e) {\n        throw new RequestError<ResponseType>(500, `${responseText}`, options, xhr);\n      }\n    };\n\n    return options;\n  }\n\n  /**\n   * Make an AJAX request, handling any low-level errors that may occur.\n   *\n   * @see https://mithril.js.org/request.html\n   */\n  request<ResponseType>(originalOptions: FlarumRequestOptions<ResponseType>): Promise<ResponseType> {\n    const options = this.transformRequestOptions(originalOptions);\n\n    if (this.requestErrorAlert) this.alerts.dismiss(this.requestErrorAlert);\n\n    return m.request(options).catch((e) => this.requestErrorCatch(e, originalOptions.errorHandler));\n  }\n\n  /**\n   * By default, show an error alert, and log the error to the console.\n   */\n  protected requestErrorCatch<ResponseType>(error: RequestError, customErrorHandler: FlarumRequestOptions<ResponseType>['errorHandler']) {\n    // the details property is decoded to transform escaped characters such as '\\n'\n    const formattedErrors = error.response?.errors?.map((e) => decodeURI(e.detail ?? '')) ?? [];\n\n    let content;\n    switch (error.status) {\n      case 422:\n        content = formattedErrors\n          .map((detail) => [detail, <br />])\n          .flat()\n          .slice(0, -1);\n        break;\n\n      case 401:\n      case 403:\n        content = app.translator.trans('core.lib.error.permission_denied_message');\n        break;\n\n      case 404:\n      case 410:\n        content = app.translator.trans('core.lib.error.not_found_message');\n        break;\n\n      case 413:\n        content = app.translator.trans('core.lib.error.payload_too_large_message');\n        break;\n\n      case 429:\n        content = app.translator.trans('core.lib.error.rate_limit_exceeded_message');\n        break;\n\n      default:\n        if (this.requestWasCrossOrigin(error)) {\n          content = app.translator.trans('core.lib.error.generic_cross_origin_message');\n        } else {\n          content = app.translator.trans('core.lib.error.generic_message');\n        }\n    }\n\n    const isDebug: boolean = app.forum.attribute('debug');\n\n    error.alert = {\n      type: 'error',\n      content,\n      controls: isDebug && [\n        <Button className=\"Button Button--link\" onclick={this.showDebug.bind(this, error, formattedErrors)}>\n          {app.translator.trans('core.lib.debug_button')}\n        </Button>,\n      ],\n    };\n\n    if (customErrorHandler) {\n      customErrorHandler(error);\n    } else {\n      this.requestErrorDefaultHandler(error, isDebug, formattedErrors);\n    }\n\n    return Promise.reject(error);\n  }\n\n  /**\n   * Used to modify the error message shown on the page to help troubleshooting.\n   * While not certain, a failing cross-origin request likely indicates a missing redirect to Flarum canonical URL.\n   * Because XHR errors do not expose CORS information, we can only compare the requested URL origin to the page origin.\n   *\n   * @param error\n   * @protected\n   */\n  protected requestWasCrossOrigin(error: RequestError): boolean {\n    return new URL(error.options.url, document.baseURI).origin !== window.location.origin;\n  }\n\n  protected requestErrorDefaultHandler(e: unknown, isDebug: boolean, formattedErrors: string[]): void {\n    if (e instanceof RequestError) {\n      if (isDebug && e.xhr) {\n        const { method, url } = e.options;\n        const { status = '' } = e.xhr;\n\n        console.group(`${method} ${url} ${status}`);\n\n        if (formattedErrors.length) {\n          console.error(...formattedErrors);\n        } else {\n          console.error(e);\n        }\n\n        console.groupEnd();\n      }\n\n      if (e.alert) {\n        this.requestErrorAlert = this.alerts.show(e.alert, e.alert.content);\n      }\n    } else {\n      throw e;\n    }\n  }\n\n  private showDebug(error: RequestError, formattedError: string[]) {\n    if (this.requestErrorAlert !== null) this.alerts.dismiss(this.requestErrorAlert);\n\n    this.modal.show(RequestErrorModal, { error, formattedError });\n  }\n\n  /**\n   * Construct a URL to the route with the given name.\n   */\n  route(name: string, params: Record<string, unknown> = {}): string {\n    const route = this.routes[name];\n\n    if (!route) throw new Error(`Route '${name}' does not exist`);\n\n    const url = route.path.replace(/:([^\\/]+)/g, (m, key) => `${extract(params, key)}`);\n\n    // Remove falsy values in params to avoid having urls like '/?sort&q'\n    for (const key in params) {\n      if (params.hasOwnProperty(key) && !params[key]) delete params[key];\n    }\n\n    const queryString = m.buildQueryString(params as any);\n    const prefix = m.route.prefix === '' ? this.forum.attribute('basePath') : '';\n\n    return prefix + url + (queryString ? '?' + queryString : '');\n  }\n}\n","import app from '../../common/app';\nimport Component from '../Component';\nimport Button from './Button';\nimport LinkButton from './LinkButton';\nimport type Mithril from 'mithril';\nimport classList from '../utils/classList';\n\n/**\n * The `Navigation` component displays a set of navigation buttons. Typically\n * this is just a back button which pops the app's History. If the user is on\n * the root page and there is no history to pop, then in some instances it may\n * show a button that toggles the app's drawer.\n *\n * If the app has a pane, it will also include a 'pin' button which toggles the\n * pinned state of the pane.\n *\n * Accepts the following attrs:\n *\n * - `className` The name of a class to set on the root element.\n * - `drawer` Whether or not to show a button to toggle the app's drawer if\n *   there is no more history to pop.\n */\nexport default class Navigation extends Component {\n  view() {\n    const { history, pane } = app;\n\n    return (\n      <div\n        className={classList('Navigation ButtonGroup', this.attrs.className)}\n        onmouseenter={pane && pane.show.bind(pane)}\n        onmouseleave={pane && pane.onmouseleave.bind(pane)}\n      >\n        {history?.canGoBack() ? [this.getBackButton(), this.getPaneButton()] : this.getDrawerButton()}\n      </div>\n    );\n  }\n\n  /**\n   * Get the back button.\n   */\n  protected getBackButton(): Mithril.Children {\n    const { history } = app;\n    const previous = history?.getPrevious();\n\n    return (\n      <LinkButton\n        className=\"Button Navigation-back Button--icon\"\n        href={history?.backUrl()}\n        icon=\"fas fa-chevron-left\"\n        aria-label={previous?.title}\n        onclick={(e: MouseEvent) => {\n          if (e.shiftKey || e.ctrlKey || e.metaKey || e.which === 2) return;\n          e.preventDefault();\n          history?.back();\n        }}\n      />\n    );\n  }\n\n  /**\n   * Get the pane pinned toggle button.\n   */\n  protected getPaneButton(): Mithril.Children {\n    const { pane } = app;\n\n    if (!pane || !pane.active) return null;\n\n    return (\n      <Button\n        className={classList('Button Button--icon Navigation-pin', { active: pane.pinned })}\n        onclick={pane.togglePinned.bind(pane)}\n        icon=\"fas fa-thumbtack\"\n      />\n    );\n  }\n\n  /**\n   * Get the drawer toggle button.\n   */\n  protected getDrawerButton(): Mithril.Children {\n    if (!this.attrs.drawer) return null;\n\n    const { drawer } = app;\n    const user = app.session.user;\n\n    return (\n      <Button\n        className={classList('Button Button--icon Navigation-drawer', { new: user?.newNotificationCount() })}\n        onclick={(e: MouseEvent) => {\n          e.stopPropagation();\n          drawer.show();\n        }}\n        icon=\"fas fa-bars\"\n        aria-label={app.translator.trans('core.lib.nav.drawer_button')}\n      />\n    );\n  }\n}\n","import app from '../../forum/app';\nimport PaginatedListState from '../../common/states/PaginatedListState';\nimport Notification from '../../common/models/Notification';\n\nexport default class NotificationListState extends PaginatedListState<Notification> {\n  constructor() {\n    super({}, 1, 20);\n  }\n\n  get type(): string {\n    return 'notifications';\n  }\n\n  /**\n   * Load the next page of notification results.\n   */\n  load(): Promise<void> {\n    if (app.session.user?.newNotificationCount()) {\n      this.pages = [];\n      this.location = { page: 1 };\n    }\n\n    if (this.pages.length > 0) {\n      return Promise.resolve();\n    }\n\n    app.session.user?.pushAttributes({ newNotificationCount: 0 });\n\n    return super.loadNext();\n  }\n\n  /**\n   * Mark all of the notifications as read.\n   */\n  markAllAsRead() {\n    if (this.pages.length === 0) return;\n\n    app.session.user?.pushAttributes({ unreadNotificationCount: 0 });\n\n    this.pages.forEach((page) => {\n      page.items.forEach((notification) => notification.pushAttributes({ isRead: true }));\n    });\n\n    return app.request({\n      url: app.forum.attribute('apiUrl') + '/notifications/read',\n      method: 'POST',\n    });\n  }\n\n  /**\n   * Delete all of the notifications for this user.\n   */\n  deleteAll() {\n    if (this.pages.length === 0) return;\n\n    app.session.user?.pushAttributes({ unreadNotificationCount: 0 });\n\n    this.pages = [];\n\n    return app.request({\n      url: app.forum.attribute('apiUrl') + '/notifications',\n      method: 'DELETE',\n    });\n  }\n}\n","export default class SearchState {\n  protected cachedSearches: Set<string>;\n  protected value: string = '';\n\n  constructor(cachedSearches: string[] = []) {\n    this.cachedSearches = new Set(cachedSearches);\n  }\n\n  /**\n   * If we are displaying the full results of a search (not just a preview),\n   * this value should return the query that prompted that search.\n   *\n   * In this generic class, full page searching is not supported.\n   * This method should be implemented by subclasses that do support it.\n   *\n   * @see Search\n   */\n  getInitialSearch(): string {\n    return '';\n  }\n\n  getValue(): string {\n    return this.value;\n  }\n\n  setValue(value: string) {\n    this.value = value;\n  }\n\n  /**\n   * Clear the search value.\n   */\n  clear() {\n    this.setValue('');\n  }\n\n  /**\n   * Mark that we have already searched for this query so that we don't\n   * have to ping the endpoint again.\n   */\n  cache(query: string) {\n    this.cachedSearches.add(query);\n  }\n\n  /**\n   * Check if this query has been searched before.\n   */\n  isCached(query: string): boolean {\n    return this.cachedSearches.has(query);\n  }\n}\n","import app from '../../forum/app';\nimport setRouteWithForcedRefresh from '../../common/utils/setRouteWithForcedRefresh';\nimport SearchState from './SearchState';\n\ntype SearchParams = Record<string, string>;\n\nexport default class GlobalSearchState extends SearchState {\n  private initialValueSet = false;\n\n  constructor(cachedSearches = []) {\n    super(cachedSearches);\n  }\n\n  getValue(): string {\n    // If we are on a search results page, we should initialize the value\n    // from the current search, if one is present.\n    // We can't do this in the constructor, as this class is instantiated\n    // before pages are rendered, and we need app.current.\n    if (!this.initialValueSet && this.currPageProvidesSearch()) {\n      this.intializeValue();\n    }\n\n    return super.getValue();\n  }\n\n  protected intializeValue() {\n    this.setValue(this.getInitialSearch());\n    this.initialValueSet = true;\n  }\n\n  protected currPageProvidesSearch(): boolean {\n    return app.current.type && app.current.type.providesInitialSearch;\n  }\n\n  /**\n   * @inheritdoc\n   */\n  getInitialSearch(): string {\n    return this.currPageProvidesSearch() ? this.params().q : '';\n  }\n\n  /**\n   * Clear the search input and the current controller's active search.\n   */\n  clear() {\n    super.clear();\n\n    if (this.getInitialSearch()) {\n      this.clearInitialSearch();\n    } else {\n      m.redraw();\n    }\n  }\n\n  /**\n   * Redirect to the index page without a search filter. This is called when the\n   * 'x' is clicked in the search box in the header.\n   */\n  protected clearInitialSearch() {\n    const { q, ...params } = this.params();\n\n    setRouteWithForcedRefresh(app.route(app.current.get('routeName'), params));\n  }\n\n  /**\n   * Get URL parameters that stick between filter changes.\n   *\n   * This can be used to generate a link that clears filters.\n   */\n  stickyParams(): SearchParams {\n    return {\n      sort: m.route.param('sort'),\n      q: m.route.param('q'),\n    };\n  }\n\n  /**\n   * Get parameters to be used in the current page.\n   */\n  params(): SearchParams {\n    const params = this.stickyParams();\n\n    params.filter = m.route.param('filter');\n\n    return params;\n  }\n\n  /**\n   * Redirect to the index page using the given sort parameter.\n   */\n  changeSort(sort: string) {\n    const params = this.params();\n\n    if (sort === Object.keys(app.discussions.sortMap())[0]) {\n      delete params.sort;\n    } else {\n      params.sort = sort;\n    }\n\n    setRouteWithForcedRefresh(app.route(app.current.get('routeName'), params));\n  }\n}\n","/**\n * @see https://stackoverflow.com/a/31732310\n */\nexport default function isSafariMobile(): boolean {\n  return (\n    'ontouchstart' in window &&\n    navigator.vendor != null &&\n    navigator.vendor.includes('Apple') &&\n    navigator.userAgent != null &&\n    !navigator.userAgent.includes('CriOS') &&\n    !navigator.userAgent.includes('FxiOS')\n  );\n}\n","import app from './app';\n\nimport History from './utils/History';\nimport Pane from './utils/Pane';\nimport DiscussionPage from './components/DiscussionPage';\nimport SignUpModal from './components/SignUpModal';\nimport HeaderPrimary from './components/HeaderPrimary';\nimport HeaderSecondary from './components/HeaderSecondary';\nimport Composer from './components/Composer';\nimport DiscussionRenamedNotification from './components/DiscussionRenamedNotification';\nimport CommentPost from './components/CommentPost';\nimport DiscussionRenamedPost from './components/DiscussionRenamedPost';\nimport routes, { ForumRoutes, makeRouteHelpers } from './routes';\nimport alertEmailConfirmation from './utils/alertEmailConfirmation';\nimport Application, { ApplicationData } from '../common/Application';\nimport Navigation from '../common/components/Navigation';\nimport NotificationListState from './states/NotificationListState';\nimport GlobalSearchState from './states/GlobalSearchState';\nimport DiscussionListState from './states/DiscussionListState';\nimport ComposerState from './states/ComposerState';\nimport isSafariMobile from './utils/isSafariMobile';\n\nimport type Notification from './components/Notification';\nimport type Post from './components/Post';\nimport type Discussion from '../common/models/Discussion';\nimport type NotificationModel from '../common/models/Notification';\nimport type PostModel from '../common/models/Post';\nimport extractText from '../common/utils/extractText';\n\nexport interface ForumApplicationData extends ApplicationData {}\n\nexport default class ForumApplication extends Application {\n  /**\n   * A map of notification types to their components.\n   */\n  notificationComponents: Record<string, ComponentClass<{ notification: NotificationModel }, Notification<{ notification: NotificationModel }>>> = {\n    discussionRenamed: DiscussionRenamedNotification,\n  };\n\n  /**\n   * A map of post types to their components.\n   */\n  postComponents: Record<string, ComponentClass<{ post: PostModel }, Post<{ post: PostModel }>>> = {\n    comment: CommentPost,\n    discussionRenamed: DiscussionRenamedPost,\n  };\n\n  /**\n   * An object which controls the state of the page's side pane.\n   */\n  pane: Pane | null = null;\n\n  /**\n   * The app's history stack, which keeps track of which routes the user visits\n   * so that they can easily navigate back to the previous route.\n   */\n  history: History = new History();\n\n  /**\n   * An object which controls the state of the user's notifications.\n   */\n  notifications: NotificationListState = new NotificationListState();\n\n  /**\n   * An object which stores previously searched queries and provides convenient\n   * tools for retrieving and managing search values.\n   */\n  search: GlobalSearchState = new GlobalSearchState();\n\n  /**\n   * An object which controls the state of the composer.\n   */\n  composer: ComposerState = new ComposerState();\n\n  /**\n   * An object which controls the state of the cached discussion list, which\n   * is used in the index page and the slideout pane.\n   */\n  discussions: DiscussionListState = new DiscussionListState({});\n\n  route: typeof Application.prototype.route & ForumRoutes;\n\n  data!: ForumApplicationData;\n\n  constructor() {\n    super();\n\n    routes(this);\n\n    this.route = Object.assign((Object.getPrototypeOf(Object.getPrototypeOf(this)) as Application).route.bind(this), makeRouteHelpers(this));\n  }\n\n  /**\n   * @inheritdoc\n   */\n  mount() {\n    // Get the configured default route and update that route's path to be '/'.\n    // Push the homepage as the first route, so that the user will always be\n    // able to click on the 'back' button to go home, regardless of which page\n    // they started on.\n    const defaultRoute = this.forum.attribute('defaultRoute');\n    let defaultAction = 'index';\n\n    for (const i in this.routes) {\n      if (this.routes[i].path === defaultRoute) defaultAction = i;\n    }\n\n    this.routes[defaultAction].path = '/';\n    this.history.push(defaultAction, extractText(this.translator.trans('core.forum.header.back_to_index_tooltip')), '/');\n\n    this.pane = new Pane(document.getElementById('app'));\n\n    m.route.prefix = '';\n    super.mount(this.forum.attribute('basePath'));\n\n    // We mount navigation and header components after the page, so components\n    // like the back button can access the updated state when rendering.\n    m.mount(document.getElementById('app-navigation')!, { view: () => <Navigation className=\"App-backControl\" drawer /> });\n    m.mount(document.getElementById('header-navigation')!, Navigation);\n    m.mount(document.getElementById('header-primary')!, HeaderPrimary);\n    m.mount(document.getElementById('header-secondary')!, HeaderSecondary);\n    m.mount(document.getElementById('composer')!, { view: () => <Composer state={this.composer} /> });\n\n    alertEmailConfirmation(this);\n\n    // Route the home link back home when clicked. We do not want it to register\n    // if the user is opening it in a new tab, however.\n    document.getElementById('home-link')!.addEventListener('click', (e) => {\n      if (e.ctrlKey || e.metaKey || e.button === 1) return;\n      e.preventDefault();\n      app.history.home();\n\n      // Reload the current user so that their unread notification count is refreshed.\n      const userId = app.session.user?.id();\n      if (userId) {\n        app.store.find('users', userId);\n        m.redraw();\n      }\n    });\n\n    if (isSafariMobile()) {\n      $(() => {\n        $('.App').addClass('mobile-safari');\n      });\n    }\n  }\n\n  /**\n   * Check whether or not the user is currently viewing a discussion.\n   */\n  public viewingDiscussion(discussion: Discussion): boolean {\n    return this.current.matches(DiscussionPage, { discussion });\n  }\n\n  /**\n   * Callback for when an external authenticator (social login) action has\n   * completed.\n   *\n   * If the payload indicates that the user has been logged in, then the page\n   * will be reloaded. Otherwise, a SignUpModal will be opened, prefilled\n   * with the provided details.\n   */\n  public authenticationComplete(payload: Record<string, unknown>): void {\n    if (payload.loggedIn) {\n      window.location.reload();\n    } else {\n      this.modal.show(SignUpModal, payload);\n    }\n  }\n}\n","import Forum from './ForumApplication';\n\nconst app = new Forum();\n\n// @ts-expect-error We need to do this for backwards compatibility purposes.\nwindow.app = app;\n\nexport default app;\n","import IExtender, { IExtensionModule } from './IExtender';\nimport Application from '../Application';\nimport ActualModel from '../Model';\n\nexport default class Model implements IExtender {\n  private readonly model: { new (): ActualModel };\n  private callbacks: Array<() => void> = [];\n\n  public constructor(model: { new (): ActualModel }) {\n    this.model = model;\n  }\n\n  public attribute<T, O = unknown>(name: string, transform: ((attr: O) => T) | null = null): Model {\n    this.callbacks.push(() => {\n      this.model.prototype[name] = transform ? ActualModel.attribute<T, O>(name, transform) : ActualModel.attribute<T>(name);\n    });\n\n    return this;\n  }\n\n  public hasOne<M extends ActualModel>(name: string): Model {\n    this.callbacks.push(() => {\n      this.model.prototype[name] = ActualModel.hasOne<M>(name);\n    });\n\n    return this;\n  }\n\n  public hasMany<M extends ActualModel>(name: string): Model {\n    this.callbacks.push(() => {\n      this.model.prototype[name] = ActualModel.hasMany<M>(name);\n    });\n\n    return this;\n  }\n\n  extend(app: Application, extension: IExtensionModule): void {\n    for (const callback of this.callbacks) {\n      callback.call(this);\n    }\n  }\n}\n","import IExtender, { IExtensionModule } from './IExtender';\nimport Application from '../Application';\nimport ForumApplication from '../../forum/ForumApplication';\n\nexport default class PostTypes implements IExtender {\n  private postComponents: Record<string, any> = {};\n\n  /**\n   * Register a new post component type.\n   * Usually used for event posts.\n   *\n   * @param name The name of the post type.\n   * @param component The component class to render the post.\n   */\n  add(name: string, component: any): PostTypes {\n    this.postComponents[name] = component;\n\n    return this;\n  }\n\n  extend(app: Application, extension: IExtensionModule): void {\n    Object.assign((app as unknown as ForumApplication).postComponents, this.postComponents);\n  }\n}\n","import Application, { FlarumGenericRoute } from '../Application';\nimport IExtender, { IExtensionModule } from './IExtender';\n\ntype HelperRoute = (...args: any) => string;\n\nexport default class Routes implements IExtender {\n  private routes: Record<string, FlarumGenericRoute> = {};\n  private helpers: Record<string, HelperRoute> = {};\n\n  /**\n   * Add a mithril route to the application.\n   *\n   * @param name The name of the route.\n   * @param path The path of the route.\n   * @param component must extend `Page` component.\n   */\n  add(name: string, path: `/${string}`, component: any): Routes {\n    this.routes[name] = { path, component };\n\n    return this;\n  }\n\n  helper(name: string, callback: HelperRoute): Routes {\n    this.helpers[name] = callback;\n\n    return this;\n  }\n\n  extend(app: Application, extension: IExtensionModule) {\n    Object.assign(app.routes, this.routes);\n    Object.assign(app.route, this.helpers);\n  }\n}\n","import Application from '../Application';\nimport IExtender, { IExtensionModule } from './IExtender';\nimport Model from '../Model';\n\nexport default class Store implements IExtender {\n  private readonly models: { [type: string]: { new (): Model } } = {};\n\n  public add(type: string, model: { new (): Model }): Store {\n    this.models[type] = model;\n\n    return this;\n  }\n\n  extend(app: Application, extension: IExtensionModule): void {\n    for (const type in this.models) {\n      if (app.store.models[type]) {\n        throw new Error(`The model type \"${type}\" has already been registered with the class \"${app.store.models[type].name}\".`);\n      }\n\n      app.store.models[type] = this.models[type];\n    }\n  }\n}\n","import Model from './Model';\nimport PostTypes from './PostTypes';\nimport Routes from './Routes';\nimport Store from './Store';\n\nexport default {\n  Model,\n  PostTypes,\n  Routes,\n  Store,\n};\n","import { fireDeprecationWarning } from '../helpers/fireDebugWarning';\n\nconst deprecatedNotice = 'The `evented` util is deprecated and no longer supported.';\nconst deprecationIssueId = '2547';\n\n/**\n * The `evented` mixin provides methods allowing an object to trigger events,\n * running externally registered event handlers.\n *\n * @deprecated v1.2, to be removed in v2.0\n */\nexport default {\n  /**\n   * Arrays of registered event handlers, grouped by the event name.\n   *\n   * @type {Record<string, unknown>}\n   * @protected\n   *\n   * @deprecated\n   */\n  handlers: null,\n\n  /**\n   * Get all of the registered handlers for an event.\n   *\n   * @param {string} event The name of the event.\n   * @return {Function[]}\n   * @protected\n   *\n   * @deprecated\n   */\n  getHandlers(event) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    this.handlers = this.handlers || {};\n\n    this.handlers[event] = this.handlers[event] || [];\n\n    return this.handlers[event];\n  },\n\n  /**\n   * Trigger an event.\n   *\n   * @param {string} event The name of the event.\n   * @param {any[]} args Arguments to pass to event handlers.\n   *\n   * @deprecated\n   */\n  trigger(event, ...args) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    this.getHandlers(event).forEach((handler) => handler.apply(this, args));\n  },\n\n  /**\n   * Register an event handler.\n   *\n   * @param {string} event The name of the event.\n   * @param {Function} handler The function to handle the event.\n   *\n   * @deprecated\n   */\n  on(event, handler) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    this.getHandlers(event).push(handler);\n  },\n\n  /**\n   * Register an event handler so that it will run only once, and then\n   * unregister itself.\n   *\n   * @param {string} event The name of the event.\n   * @param {Function} handler The function to handle the event.\n   *\n   * @deprecated\n   */\n  one(event, handler) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    const wrapper = function () {\n      handler.apply(this, arguments);\n\n      this.off(event, wrapper);\n    };\n\n    this.getHandlers(event).push(wrapper);\n  },\n\n  /**\n   * Unregister an event handler.\n   *\n   * @param {string} event The name of the event.\n   * @param {Function} handler The function that handles the event.\n   *\n   * @deprecated\n   */\n  off(event, handler) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    const handlers = this.getHandlers(event);\n    const index = handlers.indexOf(handler);\n\n    if (index !== -1) {\n      handlers.splice(index, 1);\n    }\n  },\n};\n","/*\n * Original Copyright GitHub, Inc. Licensed under the MIT License.\n * See license text at https://github.com/github/markdown-toolbar-element/blob/master/LICENSE.\n */\n\nimport insertText, { SelectionRange } from './insertText';\n\ninterface StyleArgs {\n  prefix: string;\n  suffix: string;\n  blockPrefix: string;\n  blockSuffix: string;\n  multiline: boolean;\n  replaceNext: string;\n  prefixSpace: boolean;\n  scanFor: string;\n  surroundWithNewlines: boolean;\n  orderedList: boolean;\n  unorderedList: boolean;\n  trimFirst: boolean;\n}\n\nconst defaults: StyleArgs = {\n  prefix: '',\n  suffix: '',\n  blockPrefix: '',\n  blockSuffix: '',\n  multiline: false,\n  replaceNext: '',\n  prefixSpace: false,\n  scanFor: '',\n  surroundWithNewlines: false,\n  orderedList: false,\n  unorderedList: false,\n  trimFirst: false,\n};\n\nexport default function styleSelectedText(textarea: HTMLTextAreaElement, styleArgs: StyleArgs) {\n  // Next 2 lines are added\n  textarea.focus();\n  styleArgs = Object.assign({}, defaults, styleArgs);\n  // Prev 2 lines are added\n  const text = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n\n  let result;\n  if (styleArgs.orderedList || styleArgs.unorderedList) {\n    result = listStyle(textarea, styleArgs);\n  } else if (styleArgs.multiline && isMultipleLines(text)) {\n    result = multilineStyle(textarea, styleArgs);\n  } else {\n    result = blockStyle(textarea, styleArgs);\n  }\n\n  insertText(textarea, result);\n}\n\nfunction isMultipleLines(string: string): boolean {\n  return string.trim().split('\\n').length > 1;\n}\n\nfunction repeat(string: string, n: number): string {\n  return Array(n + 1).join(string);\n}\n\nfunction wordSelectionStart(text: string, i: number): number {\n  let index = i;\n  while (text[index] && text[index - 1] != null && !text[index - 1].match(/\\s/)) {\n    index--;\n  }\n  return index;\n}\n\nfunction wordSelectionEnd(text: string, i: number, multiline: boolean): number {\n  let index = i;\n  const breakpoint = multiline ? /\\n/ : /\\s/;\n  while (text[index] && !text[index].match(breakpoint)) {\n    index++;\n  }\n  return index;\n}\n\nfunction expandSelectionToLine(textarea: HTMLTextAreaElement) {\n  const lines = textarea.value.split('\\n');\n  let counter = 0;\n  for (let index = 0; index < lines.length; index++) {\n    const lineLength = lines[index].length + 1;\n    if (textarea.selectionStart >= counter && textarea.selectionStart < counter + lineLength) {\n      textarea.selectionStart = counter;\n    }\n    if (textarea.selectionEnd >= counter && textarea.selectionEnd < counter + lineLength) {\n      textarea.selectionEnd = counter + lineLength - 1;\n    }\n    counter += lineLength;\n  }\n}\n\nfunction expandSelectedText(textarea: HTMLTextAreaElement, prefixToUse: string, suffixToUse: string, multiline = false): string {\n  if (textarea.selectionStart === textarea.selectionEnd) {\n    textarea.selectionStart = wordSelectionStart(textarea.value, textarea.selectionStart);\n    textarea.selectionEnd = wordSelectionEnd(textarea.value, textarea.selectionEnd, multiline);\n  } else {\n    const expandedSelectionStart = textarea.selectionStart - prefixToUse.length;\n    const expandedSelectionEnd = textarea.selectionEnd + suffixToUse.length;\n    const beginsWithPrefix = textarea.value.slice(expandedSelectionStart, textarea.selectionStart) === prefixToUse;\n    const endsWithSuffix = textarea.value.slice(textarea.selectionEnd, expandedSelectionEnd) === suffixToUse;\n    if (beginsWithPrefix && endsWithSuffix) {\n      textarea.selectionStart = expandedSelectionStart;\n      textarea.selectionEnd = expandedSelectionEnd;\n    }\n  }\n  return textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n}\n\ninterface Newlines {\n  newlinesToAppend: string;\n  newlinesToPrepend: string;\n}\n\nfunction newlinesToSurroundSelectedText(textarea: HTMLTextAreaElement): Newlines {\n  const beforeSelection = textarea.value.slice(0, textarea.selectionStart);\n  const afterSelection = textarea.value.slice(textarea.selectionEnd);\n\n  const breaksBefore = beforeSelection.match(/\\n*$/);\n  const breaksAfter = afterSelection.match(/^\\n*/);\n  const newlinesBeforeSelection = breaksBefore ? breaksBefore[0].length : 0;\n  const newlinesAfterSelection = breaksAfter ? breaksAfter[0].length : 0;\n\n  let newlinesToAppend;\n  let newlinesToPrepend;\n\n  if (beforeSelection.match(/\\S/) && newlinesBeforeSelection < 2) {\n    newlinesToAppend = repeat('\\n', 2 - newlinesBeforeSelection);\n  }\n\n  if (afterSelection.match(/\\S/) && newlinesAfterSelection < 2) {\n    newlinesToPrepend = repeat('\\n', 2 - newlinesAfterSelection);\n  }\n\n  if (newlinesToAppend == null) {\n    newlinesToAppend = '';\n  }\n\n  if (newlinesToPrepend == null) {\n    newlinesToPrepend = '';\n  }\n\n  return { newlinesToAppend, newlinesToPrepend };\n}\n\nfunction blockStyle(textarea: HTMLTextAreaElement, arg: StyleArgs): SelectionRange {\n  let newlinesToAppend;\n  let newlinesToPrepend;\n\n  const { prefix, suffix, blockPrefix, blockSuffix, replaceNext, prefixSpace, scanFor, surroundWithNewlines } = arg;\n  const originalSelectionStart = textarea.selectionStart;\n  const originalSelectionEnd = textarea.selectionEnd;\n\n  let selectedText = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n  let prefixToUse = isMultipleLines(selectedText) && blockPrefix.length > 0 ? `${blockPrefix}\\n` : prefix;\n  // CHANGED\n  let suffixToUse = isMultipleLines(selectedText) && blockSuffix.length > 0 ? `\\n${blockSuffix}` : prefixToUse === prefix ? suffix : '';\n  // END CHANGED\n\n  if (prefixSpace) {\n    const beforeSelection = textarea.value[textarea.selectionStart - 1];\n    if (textarea.selectionStart !== 0 && beforeSelection != null && !beforeSelection.match(/\\s/)) {\n      prefixToUse = ` ${prefixToUse}`;\n    }\n  }\n  selectedText = expandSelectedText(textarea, prefixToUse, suffixToUse, arg.multiline);\n  let selectionStart = textarea.selectionStart;\n  let selectionEnd = textarea.selectionEnd;\n  const hasReplaceNext = replaceNext.length > 0 && suffixToUse.indexOf(replaceNext) > -1 && selectedText.length > 0;\n  if (surroundWithNewlines) {\n    const ref = newlinesToSurroundSelectedText(textarea);\n    newlinesToAppend = ref.newlinesToAppend;\n    newlinesToPrepend = ref.newlinesToPrepend;\n    prefixToUse = newlinesToAppend + prefix;\n    suffixToUse += newlinesToPrepend;\n  }\n\n  if (selectedText.startsWith(prefixToUse) && selectedText.endsWith(suffixToUse)) {\n    const replacementText = selectedText.slice(prefixToUse.length, selectedText.length - suffixToUse.length);\n    if (originalSelectionStart === originalSelectionEnd) {\n      let position = originalSelectionStart - prefixToUse.length;\n      position = Math.max(position, selectionStart);\n      position = Math.min(position, selectionStart + replacementText.length);\n      selectionStart = selectionEnd = position;\n    } else {\n      selectionEnd = selectionStart + replacementText.length;\n    }\n    return { text: replacementText, selectionStart, selectionEnd };\n  } else if (!hasReplaceNext) {\n    let replacementText = prefixToUse + selectedText + suffixToUse;\n    selectionStart = originalSelectionStart + prefixToUse.length;\n    selectionEnd = originalSelectionEnd + prefixToUse.length;\n    const whitespaceEdges = selectedText.match(/^\\s*|\\s*$/g);\n    if (arg.trimFirst && whitespaceEdges) {\n      const leadingWhitespace = whitespaceEdges[0] || '';\n      const trailingWhitespace = whitespaceEdges[1] || '';\n      replacementText = leadingWhitespace + prefixToUse + selectedText.trim() + suffixToUse + trailingWhitespace;\n      selectionStart += leadingWhitespace.length;\n      selectionEnd -= trailingWhitespace.length;\n    }\n    return { text: replacementText, selectionStart, selectionEnd };\n  } else if (scanFor.length > 0 && selectedText.match(scanFor)) {\n    suffixToUse = suffixToUse.replace(replaceNext, selectedText);\n    const replacementText = prefixToUse + suffixToUse;\n    selectionStart = selectionEnd = selectionStart + prefixToUse.length;\n    return { text: replacementText, selectionStart, selectionEnd };\n  } else {\n    const replacementText = prefixToUse + selectedText + suffixToUse;\n    selectionStart = selectionStart + prefixToUse.length + selectedText.length + suffixToUse.indexOf(replaceNext);\n    selectionEnd = selectionStart + replaceNext.length;\n    return { text: replacementText, selectionStart, selectionEnd };\n  }\n}\n\nfunction multilineStyle(textarea: HTMLTextAreaElement, arg: StyleArgs) {\n  const { prefix, suffix, blockPrefix, blockSuffix, surroundWithNewlines } = arg;\n  let text = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n  let selectionStart = textarea.selectionStart;\n  let selectionEnd = textarea.selectionEnd;\n  const lines = text.split('\\n');\n  // CHANGED\n  let prefixToUse = blockPrefix.length > 0 ? blockPrefix : prefix;\n  let suffixToUse = blockSuffix.length > 0 ? blockSuffix : prefixToUse == prefix ? suffix : '';\n  const undoStyle = lines.every((line) => line.startsWith(prefixToUse) && line.endsWith(suffixToUse));\n  // END CHANGED\n\n  if (undoStyle) {\n    text = lines.map((line) => line.slice(prefixToUse.length, line.length - suffixToUse.length)).join('\\n');\n    selectionEnd = selectionStart + text.length;\n  } else {\n    // CHANGED\n    text = lines.map((line) => prefixToUse + line + suffixToUse).join('\\n');\n    if (surroundWithNewlines || suffixToUse === '') {\n      // END CHANGED\n      const { newlinesToAppend, newlinesToPrepend } = newlinesToSurroundSelectedText(textarea);\n      selectionStart += newlinesToAppend.length;\n      selectionEnd = selectionStart + text.length;\n      text = newlinesToAppend + text + newlinesToPrepend;\n    }\n  }\n\n  return { text, selectionStart, selectionEnd };\n}\n\ninterface UndoResult {\n  text: string;\n  processed: boolean;\n}\nfunction undoOrderedListStyle(text: string): UndoResult {\n  const lines = text.split('\\n');\n  const orderedListRegex = /^\\d+\\.\\s+/;\n  const shouldUndoOrderedList = lines.every((line) => orderedListRegex.test(line));\n  let result = lines;\n  if (shouldUndoOrderedList) {\n    result = lines.map((line) => line.replace(orderedListRegex, ''));\n  }\n\n  return {\n    text: result.join('\\n'),\n    processed: shouldUndoOrderedList,\n  };\n}\n\nfunction undoUnorderedListStyle(text: string): UndoResult {\n  const lines = text.split('\\n');\n  const unorderedListPrefix = '- ';\n  const shouldUndoUnorderedList = lines.every((line) => line.startsWith(unorderedListPrefix));\n  let result = lines;\n  if (shouldUndoUnorderedList) {\n    result = lines.map((line) => line.slice(unorderedListPrefix.length, line.length));\n  }\n\n  return {\n    text: result.join('\\n'),\n    processed: shouldUndoUnorderedList,\n  };\n}\n\nfunction makePrefix(index: number, unorderedList: boolean): string {\n  if (unorderedList) {\n    return '- ';\n  } else {\n    return `${index + 1}. `;\n  }\n}\n\nfunction clearExistingListStyle(style: StyleArgs, selectedText: string): [UndoResult, UndoResult, string] {\n  let undoResultOpositeList: UndoResult;\n  let undoResult: UndoResult;\n  let pristineText;\n  if (style.orderedList) {\n    undoResult = undoOrderedListStyle(selectedText);\n    undoResultOpositeList = undoUnorderedListStyle(undoResult.text);\n    pristineText = undoResultOpositeList.text;\n  } else {\n    undoResult = undoUnorderedListStyle(selectedText);\n    undoResultOpositeList = undoOrderedListStyle(undoResult.text);\n    pristineText = undoResultOpositeList.text;\n  }\n  return [undoResult, undoResultOpositeList, pristineText];\n}\n\nfunction listStyle(textarea: HTMLTextAreaElement, style: StyleArgs): SelectionRange {\n  const noInitialSelection = textarea.selectionStart === textarea.selectionEnd;\n  let selectionStart = textarea.selectionStart;\n  let selectionEnd = textarea.selectionEnd;\n\n  // Select whole line\n  expandSelectionToLine(textarea);\n\n  const selectedText = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n\n  // If the user intent was to do an undo, we will stop after this.\n  // Otherwise, we will still undo to other list type to prevent list stacking\n  const [undoResult, undoResultOpositeList, pristineText] = clearExistingListStyle(style, selectedText);\n\n  const prefixedLines = pristineText.split('\\n').map((value, index) => {\n    return `${makePrefix(index, style.unorderedList)}${value}`;\n  });\n\n  const totalPrefixLength = prefixedLines.reduce((previousValue, _currentValue, currentIndex) => {\n    return previousValue + makePrefix(currentIndex, style.unorderedList).length;\n  }, 0);\n\n  const totalPrefixLengthOpositeList = prefixedLines.reduce((previousValue, _currentValue, currentIndex) => {\n    return previousValue + makePrefix(currentIndex, !style.unorderedList).length;\n  }, 0);\n\n  if (undoResult.processed) {\n    if (noInitialSelection) {\n      selectionStart = Math.max(selectionStart - makePrefix(0, style.unorderedList).length, 0);\n      selectionEnd = selectionStart;\n    } else {\n      selectionStart = textarea.selectionStart;\n      selectionEnd = textarea.selectionEnd - totalPrefixLength;\n    }\n    return { text: pristineText, selectionStart, selectionEnd };\n  }\n\n  const { newlinesToAppend, newlinesToPrepend } = newlinesToSurroundSelectedText(textarea);\n  const text = newlinesToAppend + prefixedLines.join('\\n') + newlinesToPrepend;\n\n  if (noInitialSelection) {\n    selectionStart = Math.max(selectionStart + makePrefix(0, style.unorderedList).length + newlinesToAppend.length, 0);\n    selectionEnd = selectionStart;\n  } else {\n    if (undoResultOpositeList.processed) {\n      selectionStart = Math.max(textarea.selectionStart + newlinesToAppend.length, 0);\n      selectionEnd = textarea.selectionEnd + newlinesToAppend.length + totalPrefixLength - totalPrefixLengthOpositeList;\n    } else {\n      selectionStart = Math.max(textarea.selectionStart + newlinesToAppend.length, 0);\n      selectionEnd = textarea.selectionEnd + newlinesToAppend.length + totalPrefixLength;\n    }\n  }\n\n  return { text, selectionStart, selectionEnd };\n}\n","export default function proxifyCompat(compat: Record<string, unknown>, namespace: string) {\n  // regex to replace common/ and NAMESPACE/ for core & core extensions\n  // and remove .js, .ts and .tsx extensions\n  // e.g. admin/utils/extract --> utils/extract\n  // e.g. tags/common/utils/sortTags --> tags/utils/sortTags\n  const regex = new RegExp(String.raw`(\\w+\\/)?(${namespace}|common)\\/`);\n  const fileExt = /(\\.js|\\.tsx?)$/;\n\n  return new Proxy(compat, {\n    get: (obj, prop: string) => obj[prop] || obj[prop.replace(regex, '$1').replace(fileExt, '')],\n  });\n}\n","export default function _taggedTemplateLiteralLoose(strings, raw) {\n  if (!raw) {\n    raw = strings.slice(0);\n  }\n  strings.raw = raw;\n  return strings;\n}","import Component from '../Component';\nimport icon from '../helpers/icon';\nimport withAttr from '../utils/withAttr';\nimport classList from '../utils/classList';\n\n/**\n * The `Select` component displays a <select> input, surrounded with some extra\n * elements for styling. It accepts the following attrs:\n *\n * - `options` A map of option values to labels.\n * - `onchange` A callback to run when the selected value is changed.\n * - `value` The value of the selected option.\n * - `disabled` Disabled state for the input.\n * - `wrapperAttrs` A map of attrs to be passed to the DOM element wrapping the `<select>`\n *\n * Other attributes are passed directly to the `<select>` element rendered to the DOM.\n */\nexport default class Select extends Component {\n  view() {\n    const {\n      options,\n      onchange,\n      value,\n      disabled,\n      className,\n      class: _class,\n\n      // Destructure the `wrapperAttrs` object to extract the `className` for passing to `classList()`\n      // `= {}` prevents errors when `wrapperAttrs` is undefined\n      wrapperAttrs: { className: wrapperClassName, class: wrapperClass, ...wrapperAttrs } = {},\n\n      ...domAttrs\n    } = this.attrs;\n\n    return (\n      <span className={classList('Select', wrapperClassName, wrapperClass)} {...wrapperAttrs}>\n        <select\n          className={classList('Select-input FormControl', className, _class)}\n          onchange={onchange ? withAttr('value', onchange.bind(this)) : undefined}\n          value={value}\n          disabled={disabled}\n          {...domAttrs}\n        >\n          {Object.keys(options).map((key) => (\n            <option value={key}>{options[key]}</option>\n          ))}\n        </select>\n        {icon('fas fa-sort', { className: 'Select-caret' })}\n      </span>\n    );\n  }\n}\n","import type Mithril from 'mithril';\n\nimport Component, { ComponentAttrs } from '../Component';\nimport classList from '../utils/classList';\nimport icon from '../helpers/icon';\n\nexport default class ColorPreviewInput extends Component {\n  view(vnode: Mithril.Vnode<ComponentAttrs, this>) {\n    const { className, id, ...attrs } = this.attrs;\n\n    attrs.type ||= 'text';\n\n    // If the input is a 3 digit hex code, convert it to 6 digits.\n    if (attrs.value.length === 4) {\n      attrs.value = attrs.value.replace(/#([a-f0-9])([a-f0-9])([a-f0-9])/, '#$1$1$2$2$3$3');\n    }\n\n    return (\n      <div className=\"ColorInput\">\n        <input className={classList('FormControl', className)} id={id} {...attrs} />\n\n        <span className=\"ColorInput-icon\" role=\"presentation\">\n          {icon('fas fa-exclamation-circle')}\n        </span>\n\n        <input className=\"ColorInput-preview\" {...attrs} type=\"color\" />\n      </div>\n    );\n  }\n}\n","import extractText from '../utils/extractText';\nimport Button from './Button';\nimport Tooltip from './Tooltip';\n\n/**\n * The `TextEditorButton` component displays a button suitable for the text\n * editor toolbar.\n *\n * Automatically creates tooltips using the Tooltip component and provided text.\n *\n * ## Attrs\n * - `title` - Tooltip for the button\n */\nexport default class TextEditorButton extends Button {\n  view(vnode) {\n    const originalView = super.view(vnode);\n\n    return <Tooltip text={this.attrs.tooltipText || extractText(vnode.children)}>{originalView}</Tooltip>;\n  }\n\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = attrs.className || 'Button Button--icon Button--link';\n    attrs.tooltipText = attrs.title;\n  }\n}\n","import * as extend from './extend';\nimport extenders from './extenders';\nimport Session from './Session';\nimport Store from './Store';\nimport BasicEditorDriver from './utils/BasicEditorDriver';\nimport bidi from './utils/bidi';\nimport evented from './utils/evented';\nimport EventEmitter from './utils/EventEmitter';\nimport KeyboardNavigatable from './utils/KeyboardNavigatable';\nimport liveHumanTimes from './utils/liveHumanTimes';\nimport ItemList from './utils/ItemList';\nimport mixin from './utils/mixin';\nimport humanTime from './utils/humanTime';\nimport computed from './utils/computed';\nimport insertText from './utils/insertText';\nimport styleSelectedText from './utils/styleSelectedText';\nimport Drawer from './utils/Drawer';\nimport * as EditorDriverInterface from './utils/EditorDriverInterface';\nimport anchorScroll from './utils/anchorScroll';\nimport RequestError from './utils/RequestError';\nimport abbreviateNumber from './utils/abbreviateNumber';\nimport escapeRegExp from './utils/escapeRegExp';\nimport * as string from './utils/string';\nimport * as ThrottleDebounce from './utils/throttleDebounce';\nimport Stream from './utils/Stream';\nimport SubtreeRetainer from './utils/SubtreeRetainer';\nimport setRouteWithForcedRefresh from './utils/setRouteWithForcedRefresh';\nimport extract from './utils/extract';\nimport ScrollListener from './utils/ScrollListener';\nimport stringToColor from './utils/stringToColor';\nimport subclassOf from './utils/subclassOf';\nimport patchMithril from './utils/patchMithril';\nimport proxifyCompat from './utils/proxifyCompat';\nimport classList from './utils/classList';\nimport extractText from './utils/extractText';\nimport formatNumber from './utils/formatNumber';\nimport mapRoutes from './utils/mapRoutes';\nimport withAttr from './utils/withAttr';\nimport * as FocusTrap from './utils/focusTrap';\nimport isDark from './utils/isDark';\nimport AccessToken from './models/AccessToken';\nimport Notification from './models/Notification';\nimport User from './models/User';\nimport Post from './models/Post';\nimport Discussion from './models/Discussion';\nimport Group from './models/Group';\nimport Forum from './models/Forum';\nimport Component from './Component';\nimport Translator from './Translator';\nimport AlertManager from './components/AlertManager';\nimport Page from './components/Page';\nimport Switch from './components/Switch';\nimport Badge from './components/Badge';\nimport LoadingIndicator from './components/LoadingIndicator';\nimport Placeholder from './components/Placeholder';\nimport Separator from './components/Separator';\nimport Dropdown from './components/Dropdown';\nimport SplitDropdown from './components/SplitDropdown';\nimport RequestErrorModal from './components/RequestErrorModal';\nimport FieldSet from './components/FieldSet';\nimport Select from './components/Select';\nimport Navigation from './components/Navigation';\nimport Alert from './components/Alert';\nimport Link from './components/Link';\nimport LinkButton from './components/LinkButton';\nimport Checkbox from './components/Checkbox';\nimport ColorPreviewInput from './components/ColorPreviewInput';\nimport ConfirmDocumentUnload from './components/ConfirmDocumentUnload';\nimport SelectDropdown from './components/SelectDropdown';\nimport ModalManager from './components/ModalManager';\nimport Button from './components/Button';\nimport Modal from './components/Modal';\nimport GroupBadge from './components/GroupBadge';\nimport TextEditor from './components/TextEditor';\nimport TextEditorButton from './components/TextEditorButton';\nimport EditUserModal from './components/EditUserModal';\nimport Tooltip from './components/Tooltip';\nimport Model from './Model';\nimport Application from './Application';\nimport fullTime from './helpers/fullTime';\nimport avatar from './helpers/avatar';\nimport fireApplicationError from './helpers/fireApplicationError';\nimport * as fireDebugWarning from './helpers/fireDebugWarning';\nimport icon from './helpers/icon';\nimport humanTimeHelper from './helpers/humanTime';\nimport punctuateSeries from './helpers/punctuateSeries';\nimport highlight from './helpers/highlight';\nimport username from './helpers/username';\nimport userOnline from './helpers/userOnline';\nimport listItems from './helpers/listItems';\nimport textContrastClass from './helpers/textContrastClass';\nimport Fragment from './Fragment';\nimport DefaultResolver from './resolvers/DefaultResolver';\nimport PaginatedListState from './states/PaginatedListState';\nimport isObject from './utils/isObject';\nimport AlertManagerState from './states/AlertManagerState';\nimport ModalManagerState from './states/ModalManagerState';\nimport PageState from './states/PageState';\nimport LabelValue from './components/LabelValue';\nimport IPAddress from './components/IPAddress';\n\nexport default {\n  extenders,\n  extend: extend,\n  Session: Session,\n  Store: Store,\n  'utils/BasicEditorDriver': BasicEditorDriver,\n  'utils/bidi': bidi,\n  'utils/evented': evented,\n  'utils/EventEmitter': EventEmitter,\n  'utils/KeyboardNavigatable': KeyboardNavigatable,\n  'utils/liveHumanTimes': liveHumanTimes,\n  'utils/ItemList': ItemList,\n  'utils/mixin': mixin,\n  'utils/humanTime': humanTime,\n  'utils/computed': computed,\n  'utils/insertText': insertText,\n  'utils/styleSelectedText': styleSelectedText,\n  'utils/Drawer': Drawer,\n  'utils/EditorDriverInterface': EditorDriverInterface,\n  'utils/anchorScroll': anchorScroll,\n  'utils/RequestError': RequestError,\n  'utils/abbreviateNumber': abbreviateNumber,\n  'utils/string': string,\n  'utils/SubtreeRetainer': SubtreeRetainer,\n  'utils/escapeRegExp': escapeRegExp,\n  'utils/extract': extract,\n  'utils/ScrollListener': ScrollListener,\n  'utils/stringToColor': stringToColor,\n  'utils/Stream': Stream,\n  'utils/subclassOf': subclassOf,\n  'utils/setRouteWithForcedRefresh': setRouteWithForcedRefresh,\n  'utils/patchMithril': patchMithril,\n  'utils/proxifyCompat': proxifyCompat,\n  'utils/classList': classList,\n  'utils/extractText': extractText,\n  'utils/formatNumber': formatNumber,\n  'utils/mapRoutes': mapRoutes,\n  'utils/withAttr': withAttr,\n  'utils/throttleDebounce': ThrottleDebounce,\n  'utils/isObject': isObject,\n  'utils/focusTrap': FocusTrap,\n  'utils/isDark': isDark,\n  'models/AccessToken': AccessToken,\n  'models/Notification': Notification,\n  'models/User': User,\n  'models/Post': Post,\n  'models/Discussion': Discussion,\n  'models/Group': Group,\n  'models/Forum': Forum,\n  Component: Component,\n  Fragment: Fragment,\n  Translator: Translator,\n  'components/AlertManager': AlertManager,\n  'components/Page': Page,\n  'components/Switch': Switch,\n  'components/Badge': Badge,\n  'components/LoadingIndicator': LoadingIndicator,\n  'components/Placeholder': Placeholder,\n  'components/Separator': Separator,\n  'components/Dropdown': Dropdown,\n  'components/SplitDropdown': SplitDropdown,\n  'components/RequestErrorModal': RequestErrorModal,\n  'components/FieldSet': FieldSet,\n  'components/Select': Select,\n  'components/Navigation': Navigation,\n  'components/Alert': Alert,\n  'components/Link': Link,\n  'components/LinkButton': LinkButton,\n  'components/Checkbox': Checkbox,\n  'components/ColorPreviewInput': ColorPreviewInput,\n  'components/ConfirmDocumentUnload': ConfirmDocumentUnload,\n  'components/SelectDropdown': SelectDropdown,\n  'components/ModalManager': ModalManager,\n  'components/Button': Button,\n  'components/Modal': Modal,\n  'components/GroupBadge': GroupBadge,\n  'components/TextEditor': TextEditor,\n  'components/TextEditorButton': TextEditorButton,\n  'components/Tooltip': Tooltip,\n  'components/EditUserModal': EditUserModal,\n  'components/LabelValue': LabelValue,\n  'components/IPAddress': IPAddress,\n  Model: Model,\n  Application: Application,\n  'helpers/fullTime': fullTime,\n  'helpers/avatar': avatar,\n  'helpers/fireApplicationError': fireApplicationError,\n  'helpers/fireDebugWarning': fireDebugWarning,\n  'helpers/icon': icon,\n  'helpers/humanTime': humanTimeHelper,\n  'helpers/punctuateSeries': punctuateSeries,\n  'helpers/highlight': highlight,\n  'helpers/username': username,\n  'helpers/userOnline': userOnline,\n  'helpers/listItems': listItems,\n  'helpers/textContrastClass': textContrastClass,\n  'resolvers/DefaultResolver': DefaultResolver,\n  'states/PaginatedListState': PaginatedListState,\n  'states/AlertManagerState': AlertManagerState,\n  'states/ModalManagerState': ModalManagerState,\n  'states/PageState': PageState,\n};\n","/**\n * The `mixin` utility assigns the properties of a set of 'mixin' objects to\n * the prototype of a parent object.\n *\n * @example\n * class MyClass extends mixin(ExistingClass, evented, etc) {}\n *\n * @param {object} Parent The class to extend the new class from.\n * @param {Record<string, any>[]} mixins The objects to mix in.\n * @return {object} A new class that extends Parent and contains the mixins.\n */\nexport default function mixin(Parent, ...mixins) {\n  class Mixed extends Parent {}\n\n  mixins.forEach((object) => {\n    Object.assign(Mixed.prototype, object);\n  });\n\n  return Mixed;\n}\n","import type Mithril from 'mithril';\n\n/**\n * The `Fragment` class represents a chunk of DOM that is rendered once with Mithril and then takes\n * over control of its own DOM and lifecycle.\n *\n * This is very similar to the `Component` wrapper class, but is used for more fine-grained control over\n * the rendering and display of some significant chunks of the DOM. In contrast to components, fragments\n * do not offer Mithril's lifecycle hooks.\n *\n * Use this when you want to enjoy the benefits of JSX / VDOM for initial rendering, combined with\n * small helper methods that then make updates to that DOM directly, instead of fully redrawing\n * everything through Mithril.\n *\n * This should only be used when necessary, and only with `m.render`. If you are unsure whether you need\n * this or `Component, you probably need `Component`.\n */\nexport default abstract class Fragment {\n  /**\n   * The root DOM element for the fragment.\n   */\n  protected element!: Element;\n\n  /**\n   * Returns a jQuery object for this fragment's element. If you pass in a\n   * selector string, this method will return a jQuery object, using the current\n   * element as its buffer.\n   *\n   * For example, calling `fragment.$('li')` will return a jQuery object\n   * containing all of the `li` elements inside the DOM element of this\n   * fragment.\n   *\n   * @param [selector] a jQuery-compatible selector string\n   * @returns the jQuery object for the DOM node\n   * @final\n   */\n  public $(selector?: string): JQuery {\n    const $element = $(this.element) as JQuery<HTMLElement>;\n\n    return selector ? $element.find(selector) : $element;\n  }\n\n  /**\n   * Get the renderable virtual DOM that represents the fragment's view.\n   *\n   * This should NOT be overridden by subclasses. Subclasses wishing to define\n   * their virtual DOM should override Fragment#view instead.\n   *\n   * @example\n   * const fragment = new MyFragment();\n   * m.render(document.body, fragment.render());\n   *\n   * @final\n   */\n  public render(): Mithril.Vnode<Mithril.Attributes, this> {\n    const vdom = this.view();\n\n    vdom.attrs = vdom.attrs || {};\n\n    const originalOnCreate = vdom.attrs.oncreate;\n\n    vdom.attrs.oncreate = (vnode) => {\n      this.element = vnode.dom;\n      if (originalOnCreate) originalOnCreate.apply(this, [vnode]);\n    };\n\n    return vdom;\n  }\n\n  /**\n   * Creates a view out of virtual elements.\n   */\n  abstract view(): Mithril.Vnode<Mithril.Attributes, this>;\n}\n","import app from '../../common/app';\n\n/**\n * The `punctuateSeries` helper formats a list of strings (e.g. names) to read\n * fluently in the application's locale.\n *\n * ```js\n * punctuateSeries(['Toby', 'Franz', 'Dominion']) // Toby, Franz, and Dominion\n * ```\n *\n * @param {import('mithril').Children[]} items\n * @return {import('mithril').Children}')}\n */\nexport default function punctuateSeries(items) {\n  if (items.length === 2) {\n    return app.translator.trans('core.lib.series.two_text', {\n      first: items[0],\n      second: items[1],\n    });\n  } else if (items.length >= 3) {\n    // If there are three or more items, we will join all but the first and\n    // last items with the equivalent of a comma, and then we will feed that\n    // into the translator along with the first and last item.\n    const second = items\n      .slice(1, items.length - 1)\n      .reduce((list, item) => list.concat([item, app.translator.trans('core.lib.series.glue_text')]), [])\n      .slice(0, -1);\n\n    return app.translator.trans('core.lib.series.three_text', {\n      first: items[0],\n      second,\n      third: items[items.length - 1],\n    });\n  }\n\n  return items;\n}\n","import app from '../../forum/app';\nimport Button from '../../common/components/Button';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `LogInButton` component displays a social login button which will open\n * a popup window containing the specified path.\n *\n * ### Attrs\n *\n * - `path`\n */\nexport default class LogInButton extends Button {\n  static initAttrs(attrs) {\n    attrs.className = classList(attrs.className, 'LogInButton');\n\n    attrs.onclick = function () {\n      const width = 580;\n      const height = 400;\n      const $window = $(window);\n\n      window.open(\n        app.forum.attribute('baseUrl') + attrs.path,\n        'logInPopup',\n        `width=${width},` +\n          `height=${height},` +\n          `top=${$window.height() / 2 - height / 2},` +\n          `left=${$window.width() / 2 - width / 2},` +\n          'status=no,scrollbars=yes,resizable=no'\n      );\n    };\n\n    super.initAttrs(attrs);\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport Link from '../../common/components/Link';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport highlight from '../../common/helpers/highlight';\n\n/**\n * The `PostPreview` component shows a link to a post containing the avatar and\n * username of the author, and a short excerpt of the post's content.\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class PostPreview extends Component {\n  view() {\n    const post = this.attrs.post;\n    const user = post.user();\n\n    return (\n      <Link className=\"PostPreview\" href={app.route.post(post)} onclick={this.attrs.onclick}>\n        <span className=\"PostPreview-content\">\n          {avatar(user)}\n          {username(user)} <span className=\"PostPreview-excerpt\">{this.excerpt()}</span>\n        </span>\n      </Link>\n    );\n  }\n\n  /**\n   * @returns {string|undefined|null}\n   */\n  content() {\n    return this.attrs.post.contentType() === 'comment' && this.attrs.post.contentPlain();\n  }\n\n  /**\n   * @returns {string}\n   */\n  excerpt() {\n    return this.content() ? highlight(this.content(), this.attrs.highlight, 300) : '';\n  }\n}\n","import compat from '../common/compat';\n\nimport PostControls from './utils/PostControls';\nimport KeyboardNavigatable from '../common/utils/KeyboardNavigatable';\nimport slidable from './utils/slidable';\nimport History from './utils/History';\nimport DiscussionControls from './utils/DiscussionControls';\nimport alertEmailConfirmation from './utils/alertEmailConfirmation';\nimport UserControls from './utils/UserControls';\nimport Pane from './utils/Pane';\nimport ComposerState from './states/ComposerState';\nimport DiscussionListState from './states/DiscussionListState';\nimport GlobalSearchState from './states/GlobalSearchState';\nimport NotificationListState from './states/NotificationListState';\nimport PostStreamState from './states/PostStreamState';\nimport SearchState from './states/SearchState';\nimport UserSecurityPageState from './states/UserSecurityPageState';\nimport AffixedSidebar from './components/AffixedSidebar';\nimport DiscussionPage from './components/DiscussionPage';\nimport DiscussionListPane from './components/DiscussionListPane';\nimport LogInModal from './components/LogInModal';\nimport NewAccessTokenModal from './components/NewAccessTokenModal';\nimport ComposerBody from './components/ComposerBody';\nimport ForgotPasswordModal from './components/ForgotPasswordModal';\nimport Notification from './components/Notification';\nimport LogInButton from './components/LogInButton';\nimport DiscussionsUserPage from './components/DiscussionsUserPage';\nimport Composer from './components/Composer';\nimport SessionDropdown from './components/SessionDropdown';\nimport HeaderPrimary from './components/HeaderPrimary';\nimport PostEdited from './components/PostEdited';\nimport PostStream from './components/PostStream';\nimport ChangePasswordModal from './components/ChangePasswordModal';\nimport IndexPage from './components/IndexPage';\nimport DiscussionRenamedNotification from './components/DiscussionRenamedNotification';\nimport DiscussionsSearchSource from './components/DiscussionsSearchSource';\nimport HeaderSecondary from './components/HeaderSecondary';\nimport ComposerButton from './components/ComposerButton';\nimport DiscussionList from './components/DiscussionList';\nimport ReplyPlaceholder from './components/ReplyPlaceholder';\nimport AvatarEditor from './components/AvatarEditor';\nimport Post from './components/Post';\nimport SettingsPage from './components/SettingsPage';\nimport TerminalPost from './components/TerminalPost';\nimport ChangeEmailModal from './components/ChangeEmailModal';\nimport NotificationsDropdown from './components/NotificationsDropdown';\nimport UserPage from './components/UserPage';\nimport PostUser from './components/PostUser';\nimport UserCard from './components/UserCard';\nimport UsersSearchSource from './components/UsersSearchSource';\nimport UserSecurityPage from './components/UserSecurityPage';\nimport NotificationGrid from './components/NotificationGrid';\nimport PostPreview from './components/PostPreview';\nimport EventPost from './components/EventPost';\nimport DiscussionHero from './components/DiscussionHero';\nimport PostMeta from './components/PostMeta';\nimport DiscussionRenamedPost from './components/DiscussionRenamedPost';\nimport DiscussionComposer from './components/DiscussionComposer';\nimport LogInButtons from './components/LogInButtons';\nimport NotificationList from './components/NotificationList';\nimport WelcomeHero from './components/WelcomeHero';\nimport SignUpModal from './components/SignUpModal';\nimport CommentPost from './components/CommentPost';\nimport ComposerPostPreview from './components/ComposerPostPreview';\nimport ReplyComposer from './components/ReplyComposer';\nimport NotificationsPage from './components/NotificationsPage';\nimport PostStreamScrubber from './components/PostStreamScrubber';\nimport EditPostComposer from './components/EditPostComposer';\nimport RenameDiscussionModal from './components/RenameDiscussionModal';\nimport Search from './components/Search';\nimport DiscussionListItem from './components/DiscussionListItem';\nimport LoadingPost from './components/LoadingPost';\nimport PostsUserPage from './components/PostsUserPage';\nimport DiscussionPageResolver from './resolvers/DiscussionPageResolver';\nimport BasicEditorDriver from '../common/utils/BasicEditorDriver';\nimport routes from './routes';\nimport ForumApplication from './ForumApplication';\nimport isSafariMobile from './utils/isSafariMobile';\nimport AccessTokensList from './components/AccessTokensList';\nimport DiscussionsSearchItem from './components/DiscussionsSearchItem';\n\nexport default Object.assign(compat, {\n  'utils/PostControls': PostControls,\n  // @deprecated import from 'flarum/common/utils/KeyboardNavigatable' instead\n  'utils/KeyboardNavigatable': KeyboardNavigatable,\n  'utils/slidable': slidable,\n  'utils/History': History,\n  'utils/DiscussionControls': DiscussionControls,\n  'utils/alertEmailConfirmation': alertEmailConfirmation,\n  'utils/UserControls': UserControls,\n  'utils/Pane': Pane,\n  'utils/BasicEditorDriver': BasicEditorDriver,\n  'utils/isSafariMobile': isSafariMobile,\n  'states/ComposerState': ComposerState,\n  'states/DiscussionListState': DiscussionListState,\n  'states/GlobalSearchState': GlobalSearchState,\n  'states/NotificationListState': NotificationListState,\n  'states/PostStreamState': PostStreamState,\n  'states/SearchState': SearchState,\n  'states/UserSecurityPageState': UserSecurityPageState,\n  'components/AffixedSidebar': AffixedSidebar,\n  'components/DiscussionPage': DiscussionPage,\n  'components/DiscussionListPane': DiscussionListPane,\n  'components/LogInModal': LogInModal,\n  'components/NewAccessTokenModal': NewAccessTokenModal,\n  'components/ComposerBody': ComposerBody,\n  'components/ForgotPasswordModal': ForgotPasswordModal,\n  'components/Notification': Notification,\n  'components/LogInButton': LogInButton,\n  'components/DiscussionsUserPage': DiscussionsUserPage,\n  'components/Composer': Composer,\n  'components/SessionDropdown': SessionDropdown,\n  'components/HeaderPrimary': HeaderPrimary,\n  'components/PostEdited': PostEdited,\n  'components/PostStream': PostStream,\n  'components/ChangePasswordModal': ChangePasswordModal,\n  'components/IndexPage': IndexPage,\n  'components/DiscussionRenamedNotification': DiscussionRenamedNotification,\n  'components/DiscussionsSearchSource': DiscussionsSearchSource,\n  'components/DiscussionsSearchItem': DiscussionsSearchItem,\n  'components/HeaderSecondary': HeaderSecondary,\n  'components/ComposerButton': ComposerButton,\n  'components/DiscussionList': DiscussionList,\n  'components/ReplyPlaceholder': ReplyPlaceholder,\n  'components/AvatarEditor': AvatarEditor,\n  'components/Post': Post,\n  'components/SettingsPage': SettingsPage,\n  'components/TerminalPost': TerminalPost,\n  'components/ChangeEmailModal': ChangeEmailModal,\n  'components/NotificationsDropdown': NotificationsDropdown,\n  'components/UserPage': UserPage,\n  'components/PostUser': PostUser,\n  'components/UserCard': UserCard,\n  'components/UsersSearchSource': UsersSearchSource,\n  'components/UserSecurityPage': UserSecurityPage,\n  'components/NotificationGrid': NotificationGrid,\n  'components/PostPreview': PostPreview,\n  'components/EventPost': EventPost,\n  'components/DiscussionHero': DiscussionHero,\n  'components/PostMeta': PostMeta,\n  'components/DiscussionRenamedPost': DiscussionRenamedPost,\n  'components/DiscussionComposer': DiscussionComposer,\n  'components/LogInButtons': LogInButtons,\n  'components/NotificationList': NotificationList,\n  'components/WelcomeHero': WelcomeHero,\n  'components/SignUpModal': SignUpModal,\n  'components/CommentPost': CommentPost,\n  'components/ComposerPostPreview': ComposerPostPreview,\n  'components/ReplyComposer': ReplyComposer,\n  'components/NotificationsPage': NotificationsPage,\n  'components/PostStreamScrubber': PostStreamScrubber,\n  'components/EditPostComposer': EditPostComposer,\n  'components/RenameDiscussionModal': RenameDiscussionModal,\n  'components/Search': Search,\n  'components/DiscussionListItem': DiscussionListItem,\n  'components/LoadingPost': LoadingPost,\n  'components/PostsUserPage': PostsUserPage,\n  'components/AccessTokensList': AccessTokensList,\n  'resolvers/DiscussionPageResolver': DiscussionPageResolver,\n  routes: routes,\n  ForumApplication: ForumApplication,\n});\n","// Expose punycode and ColorThief to the window browser object\nimport 'expose-loader?exposes=punycode!punycode';\nimport 'expose-loader?exposes=ColorThief!color-thief-browser';\n\nimport app from './app';\n\nexport { app };\n\n// Export compat API\nimport compatObj from './compat';\nimport proxifyCompat from '../common/utils/proxifyCompat';\n\n// @ts-ignore\ncompatObj.app = app;\n\nexport const compat = proxifyCompat(compatObj, 'forum');\n"],"names":["Array","prototype","flat","depth","reduce","call","this","acc","val","concat","isArray","$","Affix","element","options","extend","DEFAULTS","target","document","find","$target","on","proxy","checkPosition","checkPositionWithEventLoop","$element","affixed","unpin","pinnedOffset","Plugin","option","each","$this","data","VERSION","RESET","offset","window","getState","scrollHeight","height","offsetTop","offsetBottom","scrollTop","position","targetHeight","top","initializing","colliderTop","getPinnedOffset","removeClass","addClass","setTimeout","is","bottom","Math","max","body","affix","css","affixType","e","Event","trigger","isDefaultPrevented","replace","old","fn","Constructor","noConflict","$spy","jQuery","toggle","Dropdown","getParent","selector","attr","test","$parent","length","parent","clearMenus","which","remove","relatedTarget","hasClass","type","tagName","contains","isActive","documentElement","closest","createElement","insertAfter","toggleClass","keydown","preventDefault","stopPropagation","$items","index","eq","dropdown","DISALLOWED_ATTRIBUTES","uriAttrs","SAFE_URL_PATTERN","DATA_URL_PATTERN","allowedAttribute","allowedAttributeList","attrName","nodeName","toLowerCase","inArray","Boolean","nodeValue","match","regExp","filter","value","RegExp","i","l","sanitizeHtml","unsafeHtml","whiteList","sanitizeFn","implementation","createHTMLDocument","createdDocument","innerHTML","whitelistKeys","map","el","elements","len","elName","attributeList","attributes","whitelistedAttributes","j","len2","removeAttribute","parentNode","removeChild","Tooltip","enabled","timeout","hoverState","inState","init","TRANSITION_DURATION","animation","placement","template","title","delay","html","container","viewport","padding","sanitize","a","area","b","br","col","code","div","em","hr","h1","h2","h3","h4","h5","h6","img","li","ol","p","pre","s","small","span","sub","sup","strong","u","ul","getOptions","$viewport","isFunction","click","hover","focus","constructor","Error","triggers","split","eventIn","eventOut","enter","leave","_options","fixTitle","getDefaults","dataAttributes","dataAttr","hasOwnProperty","show","hide","getDelegateOptions","defaults","key","obj","self","currentTarget","tip","clearTimeout","isInStateTrue","hasContent","inDom","ownerDocument","that","$tip","tipId","getUID","setContent","autoToken","autoPlace","detach","left","display","appendTo","pos","getPosition","actualWidth","offsetWidth","actualHeight","offsetHeight","orgPlacement","viewportDim","right","width","calculatedOffset","getCalculatedOffset","applyPlacement","complete","prevHoverState","support","transition","one","emulateTransitionEnd","marginTop","parseInt","marginLeft","isNaN","setOffset","using","props","round","delta","getViewportAdjustedDelta","isVertical","arrowDelta","arrowOffsetPosition","replaceArrow","dimension","arrow","getTitle","text","callback","removeAttr","$e","isBody","elRect","getBoundingClientRect","isSvg","SVGElement","elOffset","scroll","outerDims","viewportPadding","viewportDimensions","topEdgeOffset","bottomEdgeOffset","leftEdgeOffset","rightEdgeOffset","o","prefix","random","getElementById","$arrow","enable","disable","toggleEnabled","destroy","off","removeData","tooltip","duration","called","$el","end","transEndEventNames","WebkitTransition","MozTransition","OTransition","name","undefined","style","transitionEnd","event","special","bsTransitionEnd","bindType","delegateType","handle","handleObj","handler","apply","arguments","CanvasImage","canvas","context","getContext","appendChild","drawImage","clear","clearRect","update","putImageData","getPixelCount","getImageData","removeCanvas","ColorThief","getColor","getPalette","c","d","f","g","k","m","n","push","MMCQ","quantize","palette","pv","slice","naturalOrder","sum","sort","peek","pop","size","debug","h","r1","r2","g1","g2","b1","b2","histo","vboxes","vbox","count","volume","forEach","copy","min","_volume","_count_set","_count","avg","_avg","gval","bval","color","nearest","sqrt","pow","forcebw","module","exports","r","y","M","weekdays","months","ordinal","t","String","join","v","z","utcOffset","abs","floor","date","year","month","clone","add","ceil","w","D","ms","Q","_","S","args","O","locale","$L","utc","$u","x","$x","$offset","parse","$d","Date","NaN","substring","UTC","$y","getFullYear","$M","getMonth","$D","getDate","$W","getDay","$H","getHours","$m","getMinutes","$s","getSeconds","$ms","getMilliseconds","$utils","isValid","toString","isSame","startOf","endOf","isAfter","isBefore","$g","set","unix","valueOf","getTime","toDate","$locale","weekStart","$set","daysInMonth","get","Number","subtract","format","invalidDate","meridiem","YY","YYYY","MM","MMM","monthsShort","MMMM","DD","dd","weekdaysMin","ddd","weekdaysShort","dddd","H","HH","hh","A","mm","ss","SSS","Z","getTimezoneOffset","diff","toJSON","toISOString","toUTCString","T","$i","isDayjs","en","Ls","LTS","LT","L","LL","LLL","LLLL","formats","toUpperCase","future","past","yy","fromToBase","relativeTime","thresholds","rounding","to","from","toNow","fromNow","globalThis","Function","global","keyHandler","keys","origHandler","hotkeys","filterInputAcceptingElements","textInputTypes","filterContentEditable","filterTextInputs","textAcceptingInputTypes","specialKeys","character","fromCharCode","modif","possible","specialKey","metaKey","ctrlKey","indexOf","shiftNums","version","factory","noGlobal","arr","getProto","Object","getPrototypeOf","array","class2type","hasOwn","fnToString","ObjectFunctionString","nodeType","item","isWindow","preservedScriptAttributes","src","nonce","noModule","DOMEval","node","doc","script","getAttribute","setAttribute","head","toType","isArrayLike","jquery","toArray","num","pushStack","elems","ret","merge","prevObject","elem","first","last","even","grep","_elem","odd","splice","copyIsArray","deep","isPlainObject","expando","isReady","error","msg","noop","proto","Ctor","isEmptyObject","globalEval","makeArray","results","second","invert","matches","callbackExpect","arg","guid","Symbol","iterator","_i","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","pushNative","list","booleans","whitespace","identifier","pseudos","rwhitespace","rtrim","rcomma","rcombinators","rdescend","rpseudo","ridentifier","matchExpr","rhtml","rinputs","rheader","rnative","rquickExpr","rsibling","runescape","funescape","escape","nonHex","high","rcssescape","fcssescape","ch","asCodePoint","charCodeAt","unloadHandler","inDisabledFieldset","addCombinator","disabled","dir","next","childNodes","els","seed","nid","groups","newSelector","newContext","exec","id","getElementsByTagName","getElementsByClassName","qsa","testContext","scope","toSelector","querySelectorAll","qsaError","cache","cacheLength","shift","markFunction","assert","addHandle","attrs","attrHandle","siblingCheck","cur","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createDisabledPseudo","isDisabled","createPositionalPseudo","argument","matchIndexes","namespace","namespaceURI","hasCompare","subWindow","defaultView","addEventListener","attachEvent","className","createComment","getById","getElementsByName","attrId","getAttributeNode","tag","tmp","input","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","specified","sel","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","selectors","createPseudo","relative","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","_argument","simple","forward","ofType","_context","xml","uniqueCache","outerCache","nodeIndex","start","useCache","lastChild","uniqueID","pseudo","setFilters","idx","matched","matcher","unmatched","lang","elemLang","hash","location","activeElement","hasFocus","href","tabIndex","checked","selected","selectedIndex","_matchIndexes","radio","checkbox","file","password","image","submit","reset","tokens","combinator","base","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","contexts","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","filters","parseOnly","soFar","preFilters","cached","setMatchers","elementMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","matcherFromGroupMatchers","token","compiled","_name","defaultValue","unique","isXMLDoc","escapeSelector","until","truncate","siblings","rneedsContext","needsContext","rsingleTag","winnow","qualifier","not","rootjQuery","root","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","prev","sibling","has","targets","prevAll","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","content","reverse","rnothtmlwhite","Identity","Thrower","ex","adoptValue","resolve","reject","noValue","method","promise","fail","then","Callbacks","object","flag","createOptions","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","empty","lock","fireWith","Deferred","func","tuples","state","always","deferred","pipe","fns","newDefer","tuple","returned","progress","notify","onFulfilled","onRejected","onProgress","maxDepth","mightThrow","TypeError","notifyWith","resolveWith","process","exceptionHook","stackTrace","rejectWith","getStackHook","stateString","when","singleValue","remaining","resolveContexts","resolveValues","primary","updateFunc","rerrorNames","stack","console","warn","message","readyException","readyList","completed","removeEventListener","readyWait","wait","readyState","doScroll","access","chainable","emptyGet","raw","bulk","_key","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","camelCase","string","acceptData","owner","Data","uid","defineProperty","configurable","prop","hasData","dataPriv","dataUser","rbrace","rmultiDash","JSON","getData","_data","_removeData","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","defer","pnum","source","rcssNum","cssExpand","isAttached","composed","getRootNode","isHiddenWithinTree","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","defaultDisplayMap","getDefaultDisplay","showHide","values","rcheckableType","rtagName","rscriptType","createDocumentFragment","checkClone","cloneNode","noCloneChecked","wrapMap","thead","tr","td","_default","getAll","setGlobalEval","refElements","tbody","tfoot","colgroup","caption","th","optgroup","buildFragment","scripts","selection","ignored","wrap","attached","fragment","nodes","htmlPrefilter","createTextNode","rtypenamespace","returnTrue","returnFalse","expectSync","err","safeActiveElement","types","origFn","leverageNative","notAsync","saved","isTrigger","stopImmediatePropagation","handleObjIn","eventHandle","events","handlers","namespaces","origType","elemData","create","triggered","dispatch","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","isImmediatePropagationStopped","rnamespace","postDispatch","matchedHandlers","matchedSelectors","button","addProp","hook","enumerable","originalEvent","writable","load","noBubble","beforeunload","returnValue","defaultPrevented","timeStamp","now","isSimulated","altKey","bubbles","cancelable","changedTouches","detail","eventPhase","pageX","pageY","shiftKey","view","charCode","keyCode","buttons","clientX","clientY","offsetX","offsetY","pointerId","pointerType","screenX","screenY","targetTouches","toElement","touches","blur","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","udataOld","udataCur","fixInput","domManip","collection","hasScripts","iNoClone","valueIsFunction","_evalUrl","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","append","prepend","insertBefore","before","after","replaceWith","replaceChild","prependTo","replaceAll","original","insert","rnumnonpx","rcustomProp","getStyles","opener","getComputedStyle","swap","rboxStyle","rtrimCSS","curCSS","computed","minWidth","maxWidth","isCustomProp","getPropertyValue","pixelBoxStyles","addGetHookIf","conditionFn","hookFn","computeStyleTests","cssText","divStyle","pixelPositionVal","reliableMarginLeftVal","roundPixelMeasures","pixelBoxStylesVal","boxSizingReliableVal","scrollboxSizeVal","measure","parseFloat","reliableTrDimensionsVal","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","table","trChild","trStyle","borderTopWidth","borderBottomWidth","cssPrefixes","emptyStyle","vendorProps","finalPropName","cssProps","capName","vendorPropName","rdisplayswap","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","boxModelAdjustment","box","isBorderBox","styles","computedVal","extra","getWidthOrHeight","valueIsBorderBox","offsetProp","getClientRects","Tween","easing","cssHooks","opacity","origName","setProperty","isFinite","scrollboxSizeBuggy","margin","border","suffix","expand","expanded","parts","propHooks","run","percent","eased","step","fx","scrollLeft","linear","swing","cos","PI","fxNow","inProgress","rfxtypes","rrun","schedule","hidden","requestAnimationFrame","interval","tick","createFxNow","genFx","includeWidth","createTween","Animation","tweeners","properties","stopped","prefilters","currentTime","startTime","tweens","opts","specialEasing","originalProperties","originalOptions","gotoEnd","propFilter","bind","timer","anim","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","overflow","overflowX","overflowY","prefilter","speed","opt","speeds","fadeTo","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","slow","fast","time","checkOn","optSelected","radioValue","boolHook","nType","attrHooks","bool","attrNames","getter","lowercaseName","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","tabindex","classNames","curValue","finalValue","stateVal","isValidValue","rreturn","valHooks","optionSet","focusin","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","parentWindow","simulate","triggerHandler","attaches","rquery","parseXML","parserErrorElem","DOMParser","parseFromString","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","traditional","param","valueOrFunction","encodeURIComponent","serialize","serializeArray","r20","rhash","rantiCache","rheaders","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","active","lastModified","etag","url","isLocal","protocol","processData","async","contentType","accepts","json","responseFields","converters","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","urlAnchor","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","overrideMimeType","mimeType","status","abort","statusText","finalText","crossDomain","host","ifModified","headers","beforeSend","success","send","nativeStatusText","responses","isSuccess","response","modified","ct","finalDataType","firstDataType","ajaxHandleResponses","conv2","current","conv","dataFilter","ajaxConvert","getJSON","getScript","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","visible","xhr","XMLHttpRequest","xhrSuccessStatus","xhrSupported","cors","errorCallback","open","username","xhrFields","onload","onerror","onabort","ontimeout","onreadystatechange","responseType","responseText","binary","scriptAttrs","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","keepScripts","parsed","params","animated","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","rect","win","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","defaultExtra","funcName","unbind","delegate","undelegate","fnOver","fnOut","holdReady","hold","parseJSON","isNumeric","trim","_jQuery","_$","Vnode","require","render","subscriptions","rendering","pending","sync","redraw","mount","component","Promise","buildPathname","parsePathname","compileTemplate","assign","sentinel","$window","mountRedraw","fireAsync","setPath","path","history","replaceState","route","pushState","currentPath","lastUpdate","currentResolver","SKIP","defaultRoute","routes","onremove","SyntaxError","callAsync","setImmediate","scheduled","defaultData","some","ReferenceError","resolveRoute","search","pathname","decodeURIComponent","loop","payload","matchedRoute","localComp","comp","onmatch","onbeforeupdate","oncreate","vnode","Link","onclick","oninit","onupdate","onbeforeremove","child","handleEvent","hyperscript","trust","request","parseQueryString","buildQueryString","PromisePolyfill","queryIndex","hashIndex","queryEnd","pathEnd","query","resolved","variadic","newQueryIndex","newHashIndex","newQueryEnd","newPathEnd","querystring","templateData","templateKeys","regexp","executor","resolvers","rejectors","resolveCurrent","rejectCurrent","instance","_instance","shouldAbsorb","execute","retry","executeOnce","runs","onRejection","resolveNext","rejectNext","reason","all","total","consume","race","destructure","charAt","entries","counters","entry","levels","cursor","level","nextLevel","isNumber","desc","getOwnPropertyDescriptor","hyperscriptVnode","normalizeChildren","selectorParser","selectorCache","isEmpty","compileSelector","classes","attrValue","execSelector","newAttrs","currentRedraw","$doc","nameSpace","svg","math","getNameSpace","xmlns","checkState","callHook","createNodes","vnodes","ns","createNode","initLifecycle","dom","insertNode","createText","createHTML","domSize","createFragment","createElementNS","setAttr","setAttrs","maybeSetContentEditable","normalized","setLateSelectAttrs","$$reentrantLock$$","normalize","initComponent","createComponent","possibleParents","updateNodes","removeNodes","isOldKeyed","isKeyed","oldStart","oe","ve","topSibling","oldEnd","updateNode","getNextSibling","moveNodes","lisIndices","originalNextSibling","vnodesLength","oldIndices","getKeyMap","oldIndex","il","lisTemp","makeLisIndices","commonLength","removeNode","oldTag","force","shouldNotUpdate","updateLifecycle","updateText","removeHTML","updateHTML","updateFragment","updateAttrs","updateElement","updateComponent","frag","moveChildToFrag","contenteditable","contentEditable","stateResult","attrsResult","mask","reallyRemove","isLifecycleMethod","isFormAttribute","updateEvent","setAttributeNS","updateStyle","hasPropertyKey","nsLastIndex","uppercaseRegex","capital","normalizeKey","removeProperty","EventDict","ev","prevRedraw","oncompletion","callbackCount","PromiseProxy","makeRequest","background","hasHeader","__proto__","replacedAbort","assumeJSON","FormData","extract","aborted","user","deserialize","withCredentials","config","stringify","callbackKey","Stream","lift","streams","scan","origin","stream","combine","scanMerge","changed","warnedHalt","dependentStreams","dependentFns","_changing","_state","createEnd","_parents","_unregisterChild","_map","ignoreInitial","s1","s2","childIndex","every","mappers","endStream","mapper","log","maxInt","regexPunycode","regexNonASCII","regexSeparators","errors","stringFromCharCode","RangeError","mapDomain","encoded","ucs2decode","output","counter","ucs2encode","fromCodePoint","digitToBasic","digit","adapt","numPoints","firstTime","baseMinusTMin","decode","codePoint","inputLength","bias","basic","lastIndexOf","oldi","baseMinusT","out","encode","basicLength","handledCPCount","handledCPCountPlusOne","q","qMinusT","toUnicode","toASCII","isBrowser","isFirefox","mozInnerScreenX","getCaretCoordinates","querySelector","currentStyle","isInput","whiteSpace","wordWrap","lineHeight","coordinates","offsetLeft","backgroundColor","___EXPOSE_LOADER_IMPORT___","___EXPOSE_LOADER_GLOBAL_THIS___","arr2","__esModule","_defineProperties","descriptor","protoProps","staticProps","_getPrototypeOf","setPrototypeOf","subClass","superClass","_s","_e","_arr","_n","_d","_typeof","assertThisInitialized","_regeneratorRuntime","Op","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","Context","makeInvokeMethod","tryCatch","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","NativeIteratorPrototype","Gp","defineIteratorMethods","_invoke","AsyncIterator","PromiseImpl","invoke","record","__await","unwrapped","previousPromise","callInvokeWithMethodAndArg","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","info","resultName","nextLoc","pushTryEntry","locs","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","iterable","iteratorMethod","doneResult","displayName","isGeneratorFunction","genFun","ctor","mark","awrap","iter","skipTempReset","rootRecord","rval","exception","loc","caught","hasCatch","hasFinally","finallyEntry","thrown","delegateYield","_setPrototypeOf","arrayWithHoles","iterableToArrayLimit","unsupportedIterableToArray","nonIterableRest","arrayLikeToArray","minLen","runtime","regeneratorRuntime","accidentalStrictMode","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","definition","bidi","multi","onchange","selectedOptions","oninput","ctrl","patchMithril","defaultMithril","modifiedMithril","Proxy","Reflect","app","dayjs","localizedFormat","tooltipGen","_assertThisInitialized","_inheritsLoose","_extends","setRouteWithForcedRefresh","newOptions","caller","includes","History","getCurrent","getPrevious","secondTop","canGoBack","back","home","backUrl","Pane","pinnedKey","pinned","localStorage","getItem","showing","hideTimeout","onmouseleave","togglePinned","setItem","Component","componentAttrs","initAttrs","subclassOf","B","PageState","Page","bodyClass","scrollTopOnCreate","useBrowserScrollRestoration","previous","routeName","drawer","modal","close","scrollRestoration","_createClass","isObject","Item","priority","ItemList","_items","getPriority","setPriority","otherList","keepPrimitives","createItemContentProxy","toObject","itemName","property","receiver","Separator","isListItem","isVnode","isSeparator","listItems","rawItems","customTag","items","prevItem","newItems","Tag","itemClassName","classList","DiscussionHero","discussion","badges","_objectWithoutPropertiesLoose","excluded","sourceKeys","SluggingMode","external","avatar","loading","hasTitle","avatarUrl","alt","slug","mode","ALPHANUMERIC","UTF8","getPlainContent","removeSelectors","innerText","ucfirst","substr","camelCaseToSnakeCase","str","generateRandomString","Uint8Array","crypto","getRandomValues","dec","padStart","highlight","phrase","highlighted","icon","fontClass","extractText","vdom","humanTime","translator","trans","abbreviateNumber","number","toFixed","buttonClassName","menuClassName","label","caretIcon","accessibleToggleLabel","renderItems","lazyDraw","getButton","getMenu","onshow","$menu","isRight","windowSrollTop","windowHeight","windowScrollLeft","windowWidth","onhide","getButtonContent","datetime","full","ago","humanTimeUtil","pubdate","TerminalPost","lastPost","replyCount","SubtreeRetainer","callbacks","needsRebuild","invalidate","LoadingIndicator","containerClassName","completeClassName","completeContainerClassName","role","containerAttrs","ConfirmDocumentUnload","boundHandler","fireDebugWarning","forum","attribute","fireDeprecationWarning","githubId","removedFrom","repo","Button","ariaLabel","iconName","_class","buttonAttrs","hasIcon","canInsertText","insertText","textarea","selectionStart","selectionEnd","originalSelectionStart","execCommand","endsWith","dispatchEvent","CustomEvent","setSelectionRange","BasicEditorDriver","build","placeholder","callInputListeners","inputListeners","listener","onkeyup","keyHandlers","onsubmit","moveCursorTo","getSelectionRange","getLastNChars","insertAtCursor","insertAt","insertBetween","cursorPos","replaceBeforeCursor","relCoords","childDomNode","oldText","oldVisibility","shouldRecreateTooltip","shouldChangeTooltipVisibility","tooltipVisible","showOnFocus","ignoreTitleWarning","realText","getRealText","checkDomNodeChanged","recreateTooltip","createTooltip","updateVisibility","domNode","isSameNode","TextEditor","controlItems","toolbarItems","composer","editor","buildEditor","newDisabled","buildEditorParams","submitLabel","preview","ComposerBody","confirmExit","preventClosingWhen","hasChanges","fields","originalContent","headerItems","jumpToPreview","loaded","minimizeComposerIfFullScreen","ReplyComposer","relationships","save","post","goToNumber","alert","viewButton","controls","Alert","dismissible","ondismiss","dismissControl","iconHelper","Modal","alertAttrs","missingMethods","animateShow","onready","dismissibleOptions","viaCloseButton","animateHide","pointer","isDismissible","isDismissibleViaCloseButton","viaEscKey","isDismissibleViaEscKey","viaBackdropClick","isDismissibleViaBackdropClick","ForgotPasswordModal","email","emailLabel","requestParams","errorHandler","LogInButtons","SignUpModal","footer","isProvided","field","provided","usernameLabel","passwordLabel","autocomplete","logIn","identification","LogInModal","submitData","reload","authData","remember","identificationLabel","forgotPassword","signUp","loginParams","RenameDiscussionModal","currentTitle","newTitle","section","userControls","DiscussionPage","canReply","replyAction","moderationControls","canRename","renameAction","destructiveControls","isHidden","canHide","restoreAction","canDelete","deleteAction","hideAction","goToLast","forceRefresh","pushData","hiddenAt","hiddenUser","confirm","slidable","$underneathLeft","$underneathRight","startX","startY","couldBeSliding","isSliding","animatePos","newPos","newX","newY","$underneath","side","activate","specialChars","escapeRegExp","DiscussionListItem","subtree","highlightRegExp","freshness","elementAttrs","Slidable","viewItems","DiscussionControls","controlsView","slidableUnderneathView","contentView","isUnread","markAsRead","isRead","unread","read","contentItems","authorAvatarView","badgesView","mainView","replyCountItem","createdAt","jumpTo","getJumpTo","mainItems","infoItems","mostRelevantPost","lastPostNumber","lastReadPostNumber","slidableInstance","showFirstPost","showRepliesCount","firstPost","excerpt","contentPlain","unreadCount","Placeholder","DiscussionList","getParams","isLoading","isInitialLoading","isLoadingNext","hasNext","loadNext","pageSize","isSearchResults","getPages","pg","pageNum","itemNum","hotEdge","DiscussionListPane","hasItems","enoughSpace","$list","pane","$discussion","listTop","listBottom","outerHeight","discussionTop","discussionBottom","ScrollListener","ticking","passive","LoadingPost","ComposerPostPreview","surround","updatePreview","isVisible","s9e","TextFormatter","updateInterval","setInterval","clearInterval","ReplyPlaceholder","anchorPreview","anchorToBottom","PostStream","scrollListener","onscroll","lastTime","viewingEnd","posts","postIds","postFadeIn","visibleStart","PostComponent","dt","period","postStreamElement","afterFirstPostItems","visibleEnd","endItems","pagesLoading","triggerScroll","calculatePositionTimeout","needsScroll","targetPost","scrollToNumber","animateScroll","scrollToIndex","reply","paused","updateScrubber","loadPostsIfNeeded","calculatePosition","getMarginTop","viewportHeight","viewportTop","$item","loadPrevious","indexFromViewPort","visibleTop","visiblePost","description","startNumber","endNumber","onPositionChange","headerId","scrollToItem","flashItem","$container","itemTop","itemBottom","scrollBottom","updateScrubberHeight","forceUpdateScrubber","loadPromise","itemOffset","$placeholder","formatNumber","Intl","NumberFormat","PostStreamScrubber","updateScrubberValues","fromScroll","forceHeightChange","viewing","formattedCount","unreadPercent","styleUnread","newStyle","oldStyle","goToFirst","firstPostLabel","unreadLabel","lastPostLabel","onresize","resize","dragging","mouseStart","indexStart","onmousedown","onmousemove","onmouseup","percentPerPost","$scrubber","sanitizeIndex","heights","adjustingHeight","animationPromises","part","$part","scrubber","scrollbar","deltaIndex","newIndex","intIndex","goToIndex","$scrollbar","offsetPercent","offsetIndex","minPercentVisible","percentPerVisiblePost","SplitDropdown","getFirstChild","noTrailing","debounceMode","timeoutID","cancelled","lastExec","clearExistingTimeout","wrapper","arguments_","elapsed","cancel","atBegin","throttle","anchorScroll","relativeScroll","PostStreamState","includedPosts","loadPageTimeouts","_loadNext","_loadPrevious","loadRange","noAnimation","resultPromise","loadNearNumber","loadNearIndex","page","near","loadCount","twoPagesAway","loadPage","backwards","loadIds","canEdit","newPosts","pageContent","loadingItems","sidebar","sidebarItems","hero","mainContent","positionChanged","preloadedDiscussion","bySlug","included","discussionId","rawNearParam","nearParam","HeaderPrimary","LinkButton","SessionDropdown","SelectDropdown","activeChild","defaultLabel","Model","store","exists","getIdentifier","relationship","pushAttributes","model","oldData","copyData","meta","apiEndpoint","pushPayload","rawRelationship","transform","hasOne","relationshipData","hasMany","transformDate","computedValue","compute","dependentValues","recompute","isDark","hexcolor","hexnumbers","textContrastClass","Keys","Badge","iconChild","badgeAttrs","badgeNode","Discussion","lastPostedAt","lastPostedUser","commentCount","lastReadAt","session","removePost","markedAllAsReadAt","link","NotificationList","markAllAsRead","deleteAll","discussions","notification","subject","notifications","group","NotificationComponent","$notifications","$scrollParent","inPanel","boundScrollHandler","scrollHandler","scrollParent","atBottom","clientHeight","NotificationsDropdown","newNotifications","getNewCount","getUnreadCount","menuClick","goToRoute","KeyboardNavigatable","Map","whenCallback","onUp","ArrowUp","onDown","ArrowDown","onSelect","ignoreTabPress","Tab","Enter","onTab","onCancel","Escape","onRemove","Backspace","KeyboardEvent","HTMLInputElement","bindTo","navigate","keyCallback","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","DiscussionsSearchItem","discussionTitle","mostRelevantPostContent","DiscussionsSearchSource","queryString","setQueryString","limit","include","queryMutators","UsersSearchResults","localeCompare","Search","searchState","sources","loadingSources","navigator","searchTimeout","updateMaxHeightHandler","currentSearch","getInitialSearch","sourceItems","searchLabel","shouldShowResults","getValue","shouldShowClearButton","focused","setValue","onfocus","onblur","updateMaxHeight","maxHeight","innerHeight","setIndex","getCurrentNumericIndex","selectableItems","$input","selectResult","isCached","MIN_SEARCH_LEN","selectedUrl","UsersSearchSource","$dropdown","fixedIndex","dropdownScroll","dropdownTop","dropdownBottom","HeaderSecondary","locales","cookie","ComposerButton","ComposerState","Position","HIDDEN","componentClass","preventExit","onExit","NORMAL","FULLSCREEN","minimize","MINIMIZED","fullScreen","exitFullScreen","bodyMatches","isFullScreen","composingReplyTo","minimumHeight","maximumHeight","computedHeight","Composer","prevPosition","normal","minimized","showIfMinimized","configHandle","updateHeight","animatePositionChange","initializeHeight","mousedown","heightStart","deltaPixels","changeHeight","updateBodyPadding","$flexible","headerHeight","paddingBottom","footerHeight","animateHeightChange","$composer","oldHeight","newHeight","showBackdrop","$backdrop","hideBackdrop","scrollElement","topOfViewport","defaultHeight","Notification","fromUser","unreadNotificationCount","DiscussionRenamedNotification","postNumber","EditPostComposer","editedContent","editAction","Post","PostControls","footerItems","actionItems","$actions","$controls","existing","GroupBadge","nameSingular","Group","namePlural","ADMINISTRATOR_ID","GUEST_ID","MEMBER_ID","EditUserModal","isEmailConfirmed","setPassword","userGroups","canEditCredentials","nonAdminEditingAdmin","userIsAdmin","canEditGroups","AffixedSidebar","boundOnresize","$sidebar","$header","$footer","$affixElement","UserPage","UserCard","editable","controlsButtonClassName","loadUser","lowercaseUsername","joinTime","navItems","isActor","discussionCount","showDeletionAlert","AvatarEditor","isDraggedOver","quickUpload","ondragover","enableDragover","ondragenter","ondragleave","disableDragover","ondragend","ondrop","dropUpload","openPicker","upload","dataTransfer","files","failure","avatarColor","UserControls","lastSeenAt","online","isOnline","userOnline","PostUser","cardVisible","showCard","hideCard","oncardshow","oncardhide","fullTime","IPAddress","ip","PostMeta","getPermalink","selectPermalink","metaItems","touch","permalink","ipAddress","PostEdited","editedUser","editedInfo","editedAt","CommentPost","revealContent","isEditing","bodyItems","contentHtml","refreshContent","renderFailed","isEdited","editing","toggleContent","EventPost","usernameHelper","descriptionData","descriptionKey","DiscussionRenamedPost","renamed","oldTitle","new","LOCAL_STORAGE_KEY","WelcomeHero","DiscussionComposer","titlePlaceholder","onkeydown","IndexPage","lastDiscussion","setTitle","oldHeroHeight","heroHeight","indexTop","indexBottom","discussionOffset","canStartDiscussion","newDiscussionAction","sortMap","sortOptions","sortId","providesInitialSearch","PostsUserPage","moreResults","loadLimit","loadMore","refresh","loadResults","parseResults","author","PaginatedListState","pages","initialLoading","loadingPrev","loadingNext","loadPrev","getLocation","getPrevPageNumber","getNextPageNumber","links","hasPrev","reqParams","refreshParams","newParams","paramsChanged","isLoadingPrev","getAllItems","EventEmitter","emit","globalEventEmitter","DiscussionListState","extraDiscussions","eventEmitter","deleteDiscussion","preloadedDiscussions","relevance","latest","newest","oldest","removeDiscussion","addDiscussion","DiscussionsUserPage","cb","Checkbox","withAttr","getDisplay","Switch","FieldSet","NotificationGrid","methods","notificationMethods","notificationTypes","preferences","toggleMethod","toggleType","preferenceKey","ChangePasswordModal","requestBody","ChangeEmailModal","requestAttributes","SettingsPage","discloseOnlineLoading","settingsItems","sectionItems","accountItems","notificationsItems","privacyItems","discloseOnline","savePreferences","NotificationsPage","DefaultResolver","makeKey","makeAttrs","requestedPath","DiscussionPageResolver","canonicalizeDiscussionSlug","scrollToPostNumber","LabelValue","AccessTokensList","showingTokens","tokenView","isCurrent","tokenViewItems","tokenInfoItems","tokenActionItems","device","generateTokenTitle","lastActivityAt","lastIpAddress","deleteKey","developer_token","displayKey","revokeButton","revoke","ondelete","tokenValueDisplay","obfuscatedName","fill","NewAccessTokenModal","titleInput","titleLabel","onsuccess","UserSecurityPageState","loadingTerminateSessions","loadingGlobalLogout","hasLoadedTokens","getTokens","setTokens","pushToken","removeToken","getSessionTokens","isSessionToken","getDeveloperTokens","getOtherSessionTokens","hasOtherActiveSessions","removeOtherSessionTokens","UserSecurityPage","routeUsername","loadTokens","developerTokensItems","sessionsItems","globalLogout","hideTokens","terminateAllOthersButton","terminateAllOtherSessions","resolverClass","alertEmailConfirmation","ResendButton","ContainedAlert","candidateSelectors","candidateSelector","NoElement","Element","getCandidates","includeContainer","candidates","getCandidatesIteratively","elementsToCheck","assigned","assignedElements","nestedCandidates","flatten","shadowRoot","getShadowRoot","validShadowRoot","shadowRootFilter","getTabindex","isScope","isContentEditable","sortOrderedTabbables","documentOrder","isZeroArea","isNodeMatchingSelectorFocusable","isHiddenInput","_ref","displayCheck","nodeUnderDetails","parentElement","nodeRootHost","nodeIsAttached","originalNode","rootNode","assignedSlot","isDetailsWithSummary","isDisabledFromFieldset","isNodeMatchingSelectorTabbable","isRadio","radioSet","radioScope","form","queryRadios","CSS","getCheckedRadio","isTabbableRadio","isNonTabbableRadio","isValidShadowRootTabbable","shadowHostNode","sortByOrder","regularTabbables","orderedTabbables","candidateTabindex","sortable","tabbable","isTabbable","focusableCandidateSelector","isFocusable","trapQueue","activeFocusTraps","activateTrap","trap","activeTrap","pause","trapIndex","deactivateTrap","unpause","findIndex","valueOrHandler","getActualTarget","composedPath","createFocusTrap","userOptions","returnFocusOnDeactivate","escapeDeactivates","delayInitialFocus","containers","containerGroups","tabbableGroups","nodeFocusedBeforeActivation","mostRecentlyFocusedNode","delayInitialFocusTimer","getOption","configOverrideOptions","optionName","configOptionName","findContainerIndex","tabbableNodes","getNodeForOption","optionValue","getInitialFocusNode","firstTabbableGroup","firstTabbableNode","updateTabbableNodes","tabbableOptions","focusableNodes","lastTabbableNode","nextTabbableNode","nodeIdx","tryFocus","preventScroll","isSelectableInput","getReturnFocusNode","previousActiveElement","checkPointerDown","clickOutsideDeactivates","deactivate","returnFocus","allowOutsideClick","checkFocusIn","targetContained","Document","checkKey","isEscapeEvent","isTabEvent","destinationNode","containerIndex","containerGroup","startOfGroupIndex","destinationGroupIndex","lastOfGroupIndex","checkTab","checkClick","addListeners","capture","removeListeners","activateOptions","onActivate","onPostActivate","checkCanFocusTrap","finishActivation","deactivateOptions","onDeactivate","onPostDeactivate","checkCanReturnFocus","finishDeactivation","updateContainerElements","containerElements","elementsAsArray","_createFocusTrap","hasPassiveEvents","passiveTestOptions","pluralFormatter","isIosDevice","platform","maxTouchPoints","locks","documentListenerAdded","initialClientY","previousBodyOverflowSetting","previousBodyPosition","previousBodyPaddingRight","allowTouchMove","rawEvent","clearAllBodyScrollLocks","targetElement","ontouchstart","ontouchmove","restorePositionSetting","paddingRight","ModalManager","focusTrap","lastSetFocusTrap","modalClosing","keyUpListener","modalList","handlePossibleBackdropClick","backdropShown","ontransitionend","onBackdropTransitionEnd","handleEscPress","isModalOpen","dialogKey","activeDialogElement","_toConsumableArray","_window","scrollY","scrollX","bottomBarHeight","_reserveScrollBarGap","reserveScrollBarGap","scrollBarGap","innerWidth","clientWidth","computedBodyPaddingRight","setOverflowHidden","isTargetElementTotallyScrolled","handleScroll","disableBodyScroll","activeDialogManagerElement","readyCallback","closedCallback","dismissibleState","propertyName","AlertManager","activeAlerts","getActiveAlerts","urgent","dismiss","RequestErrorModal","formattedError","accumulator","memoize","parseCases","isWhitespace","cases","currTermStart","latestTerm","inTerm","caseBody","branchEndIndex","findClosingBracket","fromIndex","char","splitFormattedArgument","block","separator","indexOfDelimiter","tail","keyCounter","OTHER","replaceNumberSign","numBraces","numberValues","keyParam","pluralTypeHandler","intValue","startsWith","keywordPossibilities","resolvedOptions","PluralRules","pluralKeyword","keyword","selectTypeHandler","replaceRichTags","dontUnescapeIndices","onTagClose","segment","currTagIsClosing","currTag","currTagStart","break","endingLocation","findClosingTag","entireTagInSegment","segmentIndex","segmentContainingClosingTag","tagContents","segmentStart","segmentEnd","processedSegment","newSegmentIndex","traverseMessageTags","unEscapeHtml","startIndex","startSegmentIndex","exit","startI","startJ","inTag","instructions","sanitizeValues","recSanitizeArr","defaultRichHandler","RichMessageFormatter","typeHandlers","richHandler","_classCallCheck","_this","cleanedValues","formatted","sym","fakeValues","fromEntries","_ref2","formattedFake","replaceFake","originalTemplateSegmentIndices","MessageFormatter","_defineProperty","blockStartIndex","blockEndIndex","_splitFormattedArgume2","typeHandler","mithrilRichHandler","Translator","translations","formatter","formatterTypeHandlers","setLocale","getLocale","addTranslations","plural","preprocessParameters","parameters","translation","rich","payloadIsPlural","Store","models","pushObject","allowUnregistered","curr","createRecord","idOrParams","getBy","records","Session","csrfToken","login","logout","Drawer","appElement","resizeHandler","isOpen","drawerAvailableMediaQuery","matchMedia","removeListener","$drawer","addListener","mapRoutes","basePath","resolver","RequestError","updateHumanTimes","liveHumanTimes","override","newMethod","Forum","stringToColor","rgb","hsvToRgb","User","isAdmin","newNotificationCount","calculateAvatarColor","Image","colorThief","crossOrigin","newPreferences","ModalManagerState","stackModal","invalidModalWarning","AlertManagerState","alertId","arg1","arg2","arg3","fireApplicationError","userTitle","consoleTitle","groupEnd","alerts","AccessToken","userId","Application","initializers","forums","users","booted","refs","fontawesome","_title","_titleCount","requestErrorAlert","initialRoute","boot","caughtInitializationErrors","initializer","extension","resources","bootExtensions","extensions","Infinity","appEl","appHeaderEl","preloadedApiDocument","apiDocument","screen","updateTitle","setTitleCount","titleCount","onHomepage","pageTitle","forumName","pageNumber","parser","transformRequestOptions","flarumOptions","modifyText","tmpOptions","originalExtract","requestErrorCatch","customErrorHandler","formattedErrors","decodeURI","requestWasCrossOrigin","isDebug","showDebug","requestErrorDefaultHandler","URL","baseURI","Navigation","onmouseenter","getBackButton","getPaneButton","getDrawerButton","NotificationListState","SearchState","cachedSearches","Set","GlobalSearchState","initialValueSet","currPageProvidesSearch","intializeValue","clearInitialSearch","stickyParams","changeSort","isSafariMobile","vendor","userAgent","ForumApplication","notificationComponents","discussionRenamed","postComponents","comment","makeRouteHelpers","defaultAction","viewingDiscussion","authenticationComplete","loggedIn","ActualModel","PostTypes","Routes","helpers","helper","deprecatedNotice","deprecationIssueId","getHandlers","blockPrefix","blockSuffix","multiline","replaceNext","prefixSpace","scanFor","surroundWithNewlines","orderedList","unorderedList","trimFirst","isMultipleLines","repeat","newlinesToSurroundSelectedText","newlinesToAppend","newlinesToPrepend","beforeSelection","afterSelection","breaksBefore","breaksAfter","newlinesBeforeSelection","newlinesAfterSelection","undoOrderedListStyle","lines","orderedListRegex","shouldUndoOrderedList","line","processed","undoUnorderedListStyle","shouldUndoUnorderedList","makePrefix","proxifyCompat","compat","strings","regex","fileExt","Select","wrapperAttrs","wrapperClassName","wrapperClass","domAttrs","ColorPreviewInput","TextEditorButton","originalView","tooltipText","extenders","evented","Parent","Mixed","mixins","styleArgs","noInitialSelection","lineLength","expandSelectionToLine","selectedText","undoResultOpositeList","undoResult","pristineText","clearExistingListStyle","prefixedLines","totalPrefixLength","previousValue","_currentValue","currentIndex","totalPrefixLengthOpositeList","listStyle","prefixToUse","suffixToUse","multilineStyle","originalSelectionEnd","wordSelectionStart","breakpoint","wordSelectionEnd","expandedSelectionStart","expandedSelectionEnd","beginsWithPrefix","endsWithSuffix","expandSelectedText","hasReplaceNext","ref","replacementText","whitespaceEdges","leadingWhitespace","trailingWhitespace","blockStyle","EditorDriverInterface","ThrottleDebounce","FocusTrap","Fragment","originalOnCreate","humanTimeHelper","third","LogInButton","PostPreview","compatObj"],"sourceRoot":""}
\ No newline at end of file

From c42f0a5d0e81655529219cd629941798787f54b2 Mon Sep 17 00:00:00 2001
From: IanM <16573496+imorland@users.noreply.github.com>
Date: Mon, 21 Oct 2024 21:35:52 +0100
Subject: [PATCH 4/7] fix: postfooter did not apply the empty subclass (#4085)

---
 framework/core/js/src/forum/components/Post.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/framework/core/js/src/forum/components/Post.tsx b/framework/core/js/src/forum/components/Post.tsx
index 2f1447fd7b..08c5eaf05d 100644
--- a/framework/core/js/src/forum/components/Post.tsx
+++ b/framework/core/js/src/forum/components/Post.tsx
@@ -90,7 +90,7 @@ export default abstract class Post<CustomAttrs extends IPostAttrs = IPostAttrs>
       90
     );
 
-    items.add('footer', <footer className="Post-footer">{footerItems.length > 0 ? <ul>{listItems(footerItems)}</ul> : <ul></ul>}</footer>, 80);
+    items.add('footer', <footer className="Post-footer">{footerItems.length > 0 ? <ul>{listItems(footerItems)}</ul> : null}</footer>, 80);
 
     return items;
   }

From 0b55830693684fe2422c89b5100502d0e7c8d5e2 Mon Sep 17 00:00:00 2001
From: flarum-bot <bot@flarum.org>
Date: Mon, 21 Oct 2024 20:40:33 +0000
Subject: [PATCH 5/7] Bundled output for commit
 c42f0a5d0e81655529219cd629941798787f54b2 Includes transpiled JS/TS, and
 Typescript declaration files (typings).

[skip ci]
---
 framework/core/js/dist/forum.js     | 2 +-
 framework/core/js/dist/forum.js.map | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/framework/core/js/dist/forum.js b/framework/core/js/dist/forum.js
index d3bb8f0bfb..ac02048c92 100644
--- a/framework/core/js/dist/forum.js
+++ b/framework/core/js/dist/forum.js
@@ -1,3 +1,3 @@
 /*! For license information please see forum.js.LICENSE.txt */
-(()=>{var t={8492:()=>{},1859:()=>{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)})},9043:()=>{!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)},6199:()=>{!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)},7865:()=>{!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)},6935:()=>{!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)},2898: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},4757:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,n="millisecond",r="second",i="minute",o="hour",s="day",a="week",u="month",l="quarter",c="year",d="date",h="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},v=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:v,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+v(r,2,"0")+":"+v(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,u),o=n-i<0,s=e.clone().add(r+(o?-1:1),u);return+(-(r+(n-i)/(o?i-s:s-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:c,w:a,d:s,D:d,h:o,m:i,s:r,ms:n,Q:l}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},y="en",b={};b[y]=m;var w=function(t){return t instanceof A},D=function t(e,n,r){var i;if(!e)return y;if("string"==typeof e){var o=e.toLowerCase();b[o]&&(i=o),n&&(b[o]=n,i=o);var s=e.split("-");if(!i&&s.length>1)return t(s[0])}else{var a=e.name;b[a]=e,i=a}return!r&&i&&(y=i),i||!r&&y},x=function(t,e){if(w(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new A(n)},C=g;C.l=D,C.i=w,C.w=function(t,e){return x(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var A=function(){function m(t){this.$L=D(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(C.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 C},v.isValid=function(){return!(this.$d.toString()===h)},v.isSame=function(t,e){var n=x(t);return this.startOf(e)<=n&&n<=this.endOf(e)},v.isAfter=function(t,e){return x(t)<this.startOf(e)},v.isBefore=function(t,e){return this.endOf(e)<x(t)},v.$g=function(t,e,n){return C.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=!!C.u(e)||e,h=C.p(t),f=function(t,e){var r=C.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 C.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=C.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[C.p(t)]()},v.add=function(n,l){var d,h=this;n=Number(n);var f=C.p(l),p=function(t){var e=x(h);return C.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 C.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=C.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].slice(0,o)},d=function(t){return C.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:C.s(a+1,2,"0"),MMM:c(n.monthsShort,a,l,3),MMMM:c(l,a),D:this.$D,DD:C.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:C.s(o,2,"0"),h:d(1),hh:d(2),a:f(o,s,!0),A:f(o,s,!1),m:String(s),mm:C.s(s,2,"0"),s:String(this.$s),ss:C.s(this.$s,2,"0"),SSS:C.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=C.p(d),m=x(n),v=(m.utcOffset()-this.utcOffset())*t,g=this-m,y=C.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:C.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=D(t,e,!0);return r&&(n.$L=r),n},v.clone=function(){return C.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}(),E=A.prototype;return x.prototype=E,[["$ms",n],["$s",r],["$m",i],["$H",o],["$W",s],["$M",u],["$y",c],["$D",d]].forEach((function(t){E[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),x.extend=function(t,e){return t.$i||(t(e,A,x),t.$i=!0),x},x.locale=D,x.isDayjs=w,x.unix=function(t){return x(1e3*t)},x.en=b[y],x.Ls=b,x.p={},x}()},6982: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)}}}()},5635: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)}}}()},356:(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}()},9411: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)},9152:function(t,e){var n;!function(e,n){"use strict";"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,(function(r,i){"use strict";var o=[],s=Object.getPrototypeOf,a=o.slice,u=o.flat?function(t){return o.flat.call(t)}:function(t){return o.concat.apply([],t)},l=o.push,c=o.indexOf,d={},h=d.toString,f=d.hasOwnProperty,p=f.toString,m=p.call(Object),v={},g=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},y=function(t){return null!=t&&t===t.window},b=r.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function D(t,e,n){var r,i,o=(n=n||b).createElement("script");if(o.text=t,e)for(r in w)(i=e[r]||e.getAttribute&&e.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?d[h.call(t)]||"object":typeof t}var C="3.6.1",A=function t(e,n){return new t.fn.init(e,n)};function E(t){var e=!!t&&"length"in t&&t.length,n=x(t);return!g(t)&&!y(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}A.fn=A.prototype={jquery:C,constructor:A,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=A.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return A.each(this,t)},map:function(t){return this.pushStack(A.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(A.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(A.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},A.extend=A.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&&(A.isPlainObject(r)||(i=Array.isArray(r)))?(n=s[e],o=i&&!Array.isArray(n)?[]:i||A.isPlainObject(n)?n:{},i=!1,s[e]=A.extend(l,o,r)):void 0!==r&&(s[e]=r));return s},A.extend({expando:"jQuery"+(C+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==h.call(t)||(e=s(t))&&("function"!=typeof(n=f.call(e,"constructor")&&e.constructor)||p.call(n)!==m))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){D(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,r=0;if(E(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&&(E(Object(t))?A.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(E(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&&(A.fn[Symbol.iterator]=o[Symbol.iterator]),A.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){d["[object "+e+"]"]=e.toLowerCase()}));var N=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,D=t.document,x=0,C=0,A=ut(),E=ut(),N=ut(),k=ut(),S=function(t,e){return t===e&&(d=!0),0},T={}.hasOwnProperty,F=[],_=F.pop,P=F.push,B=F.push,I=F.slice,O=function(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",$="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",j="\\[[\\x20\\t\\r\\n\\f]*("+$+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+$+"))|)"+M+"*\\]",R=":("+$+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+j+")*)|.*)\\)|)",H=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]*"),V=new RegExp(M+"|>"),W=new RegExp(R),G=new RegExp("^"+$+"$"),Y={ID:new RegExp("^#("+$+")"),CLASS:new RegExp("^\\.("+$+")"),TAG:new RegExp("^("+$+"|[*])"),ATTR:new RegExp("^"+j),PSEUDO:new RegExp("^"+R),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("^(?:"+L+")$","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{B.apply(F=I.call(D.childNodes),D.childNodes),F[D.childNodes.length].nodeType}catch(t){B={apply:F.length?function(t,e){P.apply(t,I.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,D=e?e.nodeType:9;if(r=r||[],"string"!=typeof t||!t||1!==D&&9!==D&&11!==D)return r;if(!i&&(h(e),e=e||f,m)){if(11!==D&&(d=Z.exec(t)))if(o=d[1]){if(9===D){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 B.apply(r,e.getElementsByTagName(t)),r;if((o=d[3])&&n.getElementsByClassName&&e.getElementsByClassName)return B.apply(r,e.getElementsByClassName(o)),r}if(n.qsa&&!k[t+" "]&&(!v||!v.test(t))&&(1!==D||"object"!==e.nodeName.toLowerCase())){if(g=t,y=e,1===D&&(V.test(t)||z.test(t))){for((y=tt.test(t)&&gt(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 B.apply(r,y.querySelectorAll(g)),r}catch(e){k(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:D;return s!=f&&9===s.nodeType&&s.documentElement?(p=(f=s).documentElement,m=!o(f),D!=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|"+L+")"),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("!=",R)})),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},S=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==D&&b(D,t)?-1:e==f||e.ownerDocument==D&&b(D,e)?1:c?O(c,t)-O(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?O(c,t)-O(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]==D?-1:a[r]==D?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&&!k[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){k(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&&T.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(S),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&&W.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=A[t+" "];return e||(e=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+t+"("+M+"|$)"))&&A(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(H," ")+" ").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]===x&&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]=[x,f,b];break}}else if(y&&(b=f=(l=(c=(d=(h=e)[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]||[])[0]===x&&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]=[x,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=O(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=C++;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=[x,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]===x&&l[1]===a)return h[2]=l[2];if(c[o]=h,h[2]=t(e,n,u))return!0}return!1}}function Dt(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 xt(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 Ct(t,e,n,r,i,o){return r&&!r[w]&&(r=Ct(r)),i&&!i[w]&&(i=Ct(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:xt(m,h,t,a,u),g=n?i||(o?t:p||r)?[]:s:v;if(n&&n(v,g,a,u),r)for(l=xt(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?O(o,d):h[c])>-1&&(o[l]=!(s[l]=d))}}else g=xt(g===s?g.splice(p,g.length):g),i?i(null,s,g,u):B.apply(s,g)}))}function At(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 O(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(Dt(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 Ct(u>1&&Dt(h),u>1&&bt(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace(U,"$1"),n,u<i&&At(t.slice(u,i)),i<o&&At(t=t.slice(i)),i<o&&bt(t))}h.push(n)}return Dt(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=E[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):E(t,u).slice(0)},a=at.compile=function(t,e){var n,i=[],o=[],a=N[t+" "];if(!a){for(e||(e=s(t)),n=e.length;n--;)(a=At(e[n]))[w]?i.push(a):o.push(a);a=N(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=[],D=l,C=o||i&&r.find.TAG("*",c),A=x+=null==D?1:Math.random()||.1,E=C.length;for(c&&(l=s==f||s||c);y!==E&&null!=(d=C[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&&(x=A)}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]=_.call(u));w=xt(w)}B.apply(u,w),c&&!o&&w.length>0&&g+e.length>1&&at.uniqueSort(u)}return c&&(x=A,l=D),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)&&gt(e.parentNode)||e))){if(u.splice(o,1),!(t=i.length&&bt(u)))return B.apply(n,i),n;break}}return(h||a(t,f))(i,e,!m,n,!e||tt.test(t)&&gt(e.parentNode)||e),n},n.sortStable=w.split("").sort(S).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(L,(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);A.find=N,(A.expr=N.selectors)[":"]=A.expr.pseudos,A.uniqueSort=A.unique=N.uniqueSort,A.text=N.getText,A.isXMLDoc=N.isXML,A.contains=N.contains,A.escapeSelector=N.escape;var k=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&A(t).is(n))break;r.push(t)}return r},S=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},T=A.expr.match.needsContext;function F(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var _=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function P(t,e,n){return g(e)?A.grep(t,(function(t,r){return!!e.call(t,r,t)!==n})):e.nodeType?A.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?A.grep(t,(function(t){return c.call(e,t)>-1!==n})):A.filter(e,t,n)}A.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?A.find.matchesSelector(r,t)?[r]:[]:A.find.matches(t,A.grep(e,(function(t){return 1===t.nodeType})))},A.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(A(t).filter((function(){for(e=0;e<r;e++)if(A.contains(i[e],this))return!0})));for(n=this.pushStack([]),e=0;e<r;e++)A.find(t,i[e],n);return r>1?A.uniqueSort(n):n},filter:function(t){return this.pushStack(P(this,t||[],!1))},not:function(t){return this.pushStack(P(this,t||[],!0))},is:function(t){return!!P(this,"string"==typeof t&&T.test(t)?A(t):t||[],!1).length}});var B,I=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(A.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||B,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:I.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 A?e[0]:e,A.merge(this,A.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:b,!0)),_.test(r[1])&&A.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(A):A.makeArray(t,this)}).prototype=A.fn,B=A(b);var O=/^(?:parents|prev(?:Until|All))/,L={children:!0,contents:!0,next:!0,prev:!0};function M(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}A.fn.extend({has:function(t){var e=A(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(A.contains(this,e[t]))return!0}))},closest:function(t,e){var n,r=0,i=this.length,o=[],s="string"!=typeof t&&A(t);if(!T.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&&A.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?A.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?c.call(A(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(A.uniqueSort(A.merge(this.get(),A(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),A.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return k(t,"parentNode")},parentsUntil:function(t,e,n){return k(t,"parentNode",n)},next:function(t){return M(t,"nextSibling")},prev:function(t){return M(t,"previousSibling")},nextAll:function(t){return k(t,"nextSibling")},prevAll:function(t){return k(t,"previousSibling")},nextUntil:function(t,e,n){return k(t,"nextSibling",n)},prevUntil:function(t,e,n){return k(t,"previousSibling",n)},siblings:function(t){return S((t.parentNode||{}).firstChild,t)},children:function(t){return S(t.firstChild)},contents:function(t){return null!=t.contentDocument&&s(t.contentDocument)?t.contentDocument:(F(t,"template")&&(t=t.content||t),A.merge([],t.childNodes))}},(function(t,e){A.fn[t]=function(n,r){var i=A.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=A.filter(r,i)),this.length>1&&(L[t]||A.uniqueSort(i),O.test(t)&&i.reverse()),this.pushStack(i)}}));var $=/[^\x20\t\r\n\f]+/g;function j(t){return t}function R(t){throw t}function H(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])}}A.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return A.each(t.match($)||[],(function(t,n){e[n]=!0})),e}(t):A.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){A.each(n,(function(n,r){g(r)?t.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==x(r)&&e(r)}))}(arguments),n&&!e&&u()),this},remove:function(){return A.each(arguments,(function(t,e){for(var n;(n=A.inArray(e,o,n))>-1;)o.splice(n,1),n<=a&&a--})),this},has:function(t){return t?A.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},A.extend({Deferred:function(t){var e=[["notify","progress",A.Callbacks("memory"),A.Callbacks("memory"),2],["resolve","done",A.Callbacks("once memory"),A.Callbacks("once memory"),0,"resolved"],["reject","fail",A.Callbacks("once memory"),A.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 A.Deferred((function(n){A.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,j,i),s(o,e,R,i)):(o++,l.call(r,s(o,e,j,i),s(o,e,R,i),s(o,e,j,e.notifyWith))):(n!==j&&(a=void 0,u=[r]),(i||e.resolveWith)(a,u))}},c=i?l:function(){try{l()}catch(r){A.Deferred.exceptionHook&&A.Deferred.exceptionHook(r,c.stackTrace),t+1>=o&&(n!==R&&(a=void 0,u=[r]),e.rejectWith(a,u))}};t?c():(A.Deferred.getStackHook&&(c.stackTrace=A.Deferred.getStackHook()),r.setTimeout(c))}}return A.Deferred((function(r){e[0][3].add(s(0,r,g(i)?i:j,r.notifyWith)),e[1][3].add(s(0,r,g(t)?t:j)),e[2][3].add(s(0,r,g(n)?n:R))})).promise()},promise:function(t){return null!=t?A.extend(t,i):i}},o={};return A.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=A.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&&(H(t,o.done(s(n)).resolve,o.reject,!e),"pending"===o.state()||g(i[n]&&i[n].then)))return o.then();for(;n--;)H(i[n],s(n),o.reject);return o.promise()}});var U=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;A.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)},A.readyException=function(t){r.setTimeout((function(){throw t}))};var q=A.Deferred();function z(){b.removeEventListener("DOMContentLoaded",z),r.removeEventListener("load",z),A.ready()}A.fn.ready=function(t){return q.then(t).catch((function(t){A.readyException(t)})),this},A.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--A.readyWait:A.isReady)||(A.isReady=!0,!0!==t&&--A.readyWait>0||q.resolveWith(b,[A]))}}),A.ready.then=q.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?r.setTimeout(A.ready):(b.addEventListener("DOMContentLoaded",z),r.addEventListener("load",z));var V=function t(e,n,r,i,o,s,a){var u=0,l=e.length,c=null==r;if("object"===x(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(A(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},W=/^-ms-/,G=/-([a-z])/g;function Y(t,e){return e.toUpperCase()}function K(t){return t.replace(W,"ms-").replace(G,Y)}var X=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function J(){this.expando=A.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($)||[]).length;for(;n--;)delete r[e[n]]}(void 0===e||A.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&&!A.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}A.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)}}),A.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)})):V(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)}))}}),A.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,A.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){var n=A.queue(t,e=e||"fx"),r=n.length,i=n.shift(),o=A._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,(function(){A.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:A.Callbacks("once memory").add((function(){Q.remove(t,[e+"queue",n])}))})}}),A.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?A.queue(this[0],t):void 0===e?this:this.each((function(){var n=A.queue(this,t,e);A._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&A.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){A.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,r=1,i=A.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 A.contains(t.ownerDocument,t)},ut={composed:!0};st.getRootNode&&(at=function(t){return A.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"===A.css(t,"display")};function ct(t,e,n,r){var i,o,s=20,a=r?function(){return r.cur()}:function(){return A.css(t,e,"")},u=a(),l=n&&n[3]||(A.cssNumber[e]?"":"px"),c=t.nodeType&&(A.cssNumber[e]||"px"!==l&&+u)&&it.exec(A.css(t,e));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;s--;)A.style(t,e,c+l),(1-o)*(1-(o=a()/u||.5))<=0&&(s=0),c/=o;A.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=A.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&&lt(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}A.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)?A(this).show():A(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&&F(t,e)?A.merge([t],n):n}function Dt(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 xt=/<|&#?\w+;/;function Ct(t,e,n,r,i){for(var o,s,a,u,l,c,d=e.createDocumentFragment(),h=[],f=0,p=t.length;f<p;f++)if((o=t[f])||0===o)if("object"===x(o))A.merge(h,o.nodeType?[o]:o);else if(xt.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]+A.htmlPrefilter(o)+u[2],c=u[0];c--;)s=s.lastChild;A.merge(h,s.childNodes),(s=d.firstChild).textContent=""}else h.push(e.createTextNode(o));for(d.textContent="",f=0;o=h[f++];)if(r&&A.inArray(o,r)>-1)i&&i.push(o);else if(l=at(o),s=wt(d.appendChild(o),"script"),l&&Dt(s),n)for(c=0;o=s[c++];)yt.test(o.type||"")&&n.push(o);return d}var At=/^([^.]*)(?:\.(.+)|)/;function Et(){return!0}function Nt(){return!1}function kt(t,e){return t===function(){try{return b.activeElement}catch(t){}}()==("focus"===e)}function St(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)St(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=Nt;else if(!i)return t;return 1===o&&(s=i,i=function(t){return A().off(t),s.apply(this,arguments)},i.guid=s.guid||(s.guid=A.guid++)),t.each((function(){A.event.add(this,e,i,r,n)}))}function Tt(t,e,n){n?(Q.set(t,e,!1),A.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)(A.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:A.event.trigger(A.extend(o[0],A.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===Q.get(t,e)&&A.event.add(t,e,Et)}A.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&&A.find.matchesSelector(st,i),n.guid||(n.guid=A.guid++),(u=v.events)||(u=v.events=Object.create(null)),(s=v.handle)||(s=v.handle=function(e){return A.event.triggered!==e.type?A.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match($)||[""]).length;l--;)f=m=(a=At.exec(e[l])||[])[1],p=(a[2]||"").split(".").sort(),f&&(d=A.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,d=A.event.special[f]||{},c=A.extend({type:f,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&A.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),A.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($)||[""]).length;l--;)if(f=m=(a=At.exec(e[l])||[])[1],p=(a[2]||"").split(".").sort(),f){for(d=A.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)||A.removeEvent(t,f,v.handle),delete u[f])}else for(f in u)A.event.remove(t,f+e[l],n,r,!0);A.isEmptyObject(u)&&Q.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,s,a=new Array(arguments.length),u=A.event.fix(t),l=(Q.get(this,"events")||Object.create(null))[u.type]||[],c=A.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=A.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=((A.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?A(i,this).index(l)>-1:A.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(A.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[A.expando]?t:new A.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return vt.test(e.type)&&e.click&&F(e,"input")&&Tt(e,"click",Et),!1},trigger:function(t){var e=this||t;return vt.test(e.type)&&e.click&&F(e,"input")&&Tt(e,"click"),!0},_default:function(t){var e=t.target;return vt.test(e.type)&&e.click&&F(e,"input")&&Q.get(e,"click")||F(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},A.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},(A.Event=function(t,e){if(!(this instanceof A.Event))return new A.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?Et:Nt,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&&A.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[A.expando]=!0}).prototype={constructor:A.Event,isDefaultPrevented:Nt,isPropagationStopped:Nt,isImmediatePropagationStopped:Nt,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=Et,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=Et,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=Et,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},A.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},A.event.addProp),A.each({focus:"focusin",blur:"focusout"},(function(t,e){A.event.special[t]={setup:function(){return Tt(this,t,kt),!1},trigger:function(){return Tt(this,t),!0},_default:function(e){return Q.get(e.target,t)},delegateType:e}})),A.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){A.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=this,i=t.relatedTarget,o=t.handleObj;return i&&(i===r||A.contains(r,i))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}})),A.fn.extend({on:function(t,e,n,r){return St(this,t,e,n,r)},one:function(t,e,n,r){return St(this,t,e,n,r,1)},off:function(t,e,n){var r,i;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,A(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=Nt),this.each((function(){A.event.remove(this,t,n,e)}))}});var Ft=/<script|<style|<link/i,_t=/checked\s*(?:[^=]|=\s*.checked.)/i,Pt=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Bt(t,e){return F(t,"table")&&F(11!==e.nodeType?e:e.firstChild,"tr")&&A(t).children("tbody")[0]||t}function It(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Ot(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Lt(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++)A.event.add(e,i,a[i][n]);Z.hasData(t)&&(o=Z.access(t),s=A.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 $t(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&&_t.test(p))return t.each((function(i){var o=t.eq(i);m&&(e[0]=p.call(this,i,o.html())),$t(o,e,n,r)}));if(h&&(o=(i=Ct(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=(s=A.map(wt(i,"script"),It)).length;d<h;d++)l=i,d!==f&&(l=A.clone(l,!0,!0),a&&A.merge(s,wt(l,"script"))),n.call(t[d],l,d);if(a)for(c=s[s.length-1].ownerDocument,A.map(s,Ot),d=0;d<a;d++)l=s[d],yt.test(l.type||"")&&!Q.access(l,"globalEval")&&A.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?A._evalUrl&&!l.noModule&&A._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},c):D(l.textContent.replace(Pt,""),l,c))}return t}function jt(t,e,n){for(var r,i=e?A.filter(e,t):t,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||A.cleanData(wt(r)),r.parentNode&&(n&&at(r)&&Dt(wt(r,"script")),r.parentNode.removeChild(r));return t}A.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||A.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++)Lt(o[r],s[r]);else Lt(t,a);return(s=wt(a,"script")).length>0&&Dt(s,!u&&wt(t,"script")),a},cleanData:function(t){for(var e,n,r,i=A.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]?A.event.remove(n,r):A.removeEvent(n,r,e.handle);n[Q.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),A.fn.extend({detach:function(t){return jt(this,t,!0)},remove:function(t){return jt(this,t)},text:function(t){return V(this,(function(t){return void 0===t?A.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 $t(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Bt(this,t).appendChild(t)}))},prepend:function(){return $t(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Bt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return $t(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return $t(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&&(A.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 A.clone(this,t,e)}))},html:function(t){return V(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&&!Ft.test(t)&&!bt[(gt.exec(t)||["",""])[1].toLowerCase()]){t=A.htmlPrefilter(t);try{for(;n<r;n++)1===(e=this[n]||{}).nodeType&&(A.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 $t(this,arguments,(function(e){var n=this.parentNode;A.inArray(this,t)<0&&(A.cleanData(wt(this)),n&&n.replaceChild(e,this))}),t)}}),A.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){A.fn[t]=function(t){for(var n,r=[],i=A(t),o=i.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),A(i[s])[e](n),l.apply(r,n.get());return this.pushStack(r)}}));var Rt=new RegExp("^("+rt+")(?!px)[a-z%]+$","i"),Ht=/^--/,Ut=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=r),e.getComputedStyle(t)},qt=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},zt=new RegExp(ot.join("|"),"i"),Vt=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g");function Wt(t,e,n){var r,i,o,s,a=Ht.test(e),u=t.style;return(n=n||Ut(t))&&(s=n.getPropertyValue(e)||n[e],a&&(s=s.replace(Vt,"$1")),""!==s||at(t)||(s=A.style(t,e)),!v.pixelBoxStyles()&&Rt.test(s)&&zt.test(e)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=s,s=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==s?s+"":s}function Gt(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,A.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 Yt=["Webkit","Moz","ms"],Kt=b.createElement("div").style,Xt={};function Jt(t){return A.cssProps[t]||Xt[t]||(t in Kt?t:Xt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Yt.length;n--;)if((t=Yt[n]+e)in Kt)return t}(t)||t)}var Qt=/^(none|table(?!-c[ea]).+)/,Zt={position:"absolute",visibility:"hidden",display:"block"},te={letterSpacing:"0",fontWeight:"400"};function ee(t,e,n){var r=it.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function ne(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+=A.css(t,n+ot[s],!0,i)),r?("content"===n&&(u-=A.css(t,"padding"+ot[s],!0,i)),"margin"!==n&&(u-=A.css(t,"border"+ot[s]+"Width",!0,i))):(u+=A.css(t,"padding"+ot[s],!0,i),"padding"!==n?u+=A.css(t,"border"+ot[s]+"Width",!0,i):a+=A.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 re(t,e,n){var r=Ut(t),i=(!v.boxSizingReliable()||n)&&"border-box"===A.css(t,"boxSizing",!1,r),o=i,s=Wt(t,e,r),a="offset"+e[0].toUpperCase()+e.slice(1);if(Rt.test(s)){if(!n)return s;s="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&F(t,"tr")||"auto"===s||!parseFloat(s)&&"inline"===A.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===A.css(t,"boxSizing",!1,r),(o=a in t)&&(s=t[a])),(s=parseFloat(s)||0)+ne(t,e,n||(i?"border":"content"),o,r,s)+"px"}function ie(t,e,n,r,i){return new ie.prototype.init(t,e,n,r,i)}A.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Wt(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=Ht.test(e),l=t.style;if(u||(e=Jt(a)),s=A.cssHooks[e]||A.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]||(A.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 Ht.test(e)||(e=Jt(a)),(s=A.cssHooks[e]||A.cssHooks[a])&&"get"in s&&(i=s.get(t,!0,n)),void 0===i&&(i=Wt(t,e,r)),"normal"===i&&e in te&&(i=te[e]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),A.each(["height","width"],(function(t,e){A.cssHooks[e]={get:function(t,n,r){if(n)return!Qt.test(A.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?re(t,e,r):qt(t,Zt,(function(){return re(t,e,r)}))},set:function(t,n,r){var i,o=Ut(t),s=!v.scrollboxSize()&&"absolute"===o.position,a=(s||r)&&"border-box"===A.css(t,"boxSizing",!1,o),u=r?ne(t,e,r,a,o):0;return a&&s&&(u-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-ne(t,e,"border",!1,o)-.5)),u&&(i=it.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=A.css(t,e)),ee(0,n,u)}}})),A.cssHooks.marginLeft=Gt(v.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Wt(t,"marginLeft"))||t.getBoundingClientRect().left-qt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),A.each({margin:"",padding:"",border:"Width"},(function(t,e){A.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&&(A.cssHooks[t+e].set=ee)})),A.fn.extend({css:function(t,e){return V(this,(function(t,e,n){var r,i,o={},s=0;if(Array.isArray(e)){for(r=Ut(t),i=e.length;s<i;s++)o[e[s]]=A.css(t,e[s],!1,r);return o}return void 0!==n?A.style(t,e,n):A.css(t,e)}),t,e,arguments.length>1)}}),A.Tween=ie,ie.prototype={constructor:ie,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||A.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(A.cssNumber[n]?"":"px")},cur:function(){var t=ie.propHooks[this.prop];return t&&t.get?t.get(this):ie.propHooks._default.get(this)},run:function(t){var e,n=ie.propHooks[this.prop];return this.options.duration?this.pos=e=A.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):ie.propHooks._default.set(this),this}},ie.prototype.init.prototype=ie.prototype,ie.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=A.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){A.fx.step[t.prop]?A.fx.step[t.prop](t):1!==t.elem.nodeType||!A.cssHooks[t.prop]&&null==t.elem.style[Jt(t.prop)]?t.elem[t.prop]=t.now:A.style(t.elem,t.prop,t.now+t.unit)}}},ie.propHooks.scrollTop=ie.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},A.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},(A.fx=ie.prototype.init).step={};var oe,se,ae=/^(?:toggle|show|hide)$/,ue=/queueHooks$/;function le(){se&&(!1===b.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(le):r.setTimeout(le,A.fx.interval),A.fx.tick())}function ce(){return r.setTimeout((function(){oe=void 0})),oe=Date.now()}function de(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 he(t,e,n){for(var r,i=(fe.tweeners[e]||[]).concat(fe.tweeners["*"]),o=0,s=i.length;o<s;o++)if(r=i[o].call(n,e,t))return r}function fe(t,e,n){var r,i,o=0,s=fe.prefilters.length,a=A.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var e=oe||ce(),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:A.extend({},e),opts:A.extend(!0,{specialEasing:{},easing:A.easing._default},n),originalProperties:e,originalOptions:n,startTime:oe||ce(),duration:n.duration,tweens:[],createTween:function(e,n){var r=A.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=A.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=fe.prefilters[o].call(l,t,c,l.opts))return g(r.stop)&&(A._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return A.map(c,he,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),A.fx.timer(A.extend(u,{elem:t,anim:l,queue:l.opts.queue})),l}A.Animation=A.extend(fe,{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($);for(var n,r=0,i=t.length;r<i;r++)n=t[r],fe.tweeners[n]=fe.tweeners[n]||[],fe.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&&lt(t),v=Q.get(t,"fxshow");for(r in n.queue||(null==(s=A._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--,A.queue(t,"fx").length||s.empty.fire()}))}))),e)if(i=e[r],ae.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]||A.style(t,r)}if((u=!A.isEmptyObject(e))||!A.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=A.css(t,"display"))&&(l?c=l:(ft([t],!0),l=t.style.display||l,c=A.css(t,"display"),ft([t]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===A.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)A.style(t,r,f[r])}))),u=he(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?fe.prefilters.unshift(t):fe.prefilters.push(t)}}),A.speed=function(t,e,n){var r=t&&"object"==typeof t?A.extend({},t):{complete:n||!n&&e||g(t)&&t,duration:t,easing:n&&e||e&&!g(e)&&e};return A.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in A.fx.speeds?r.duration=A.fx.speeds[r.duration]:r.duration=A.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&&A.dequeue(this,r.queue)},r},A.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=A.isEmptyObject(t),o=A.speed(e,n,r),s=function(){var e=fe(this,A.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=A.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&&ue.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||A.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=A.timers,s=r?r.length:0;for(n.finish=!0,A.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}))}}),A.each(["toggle","show","hide"],(function(t,e){var n=A.fn[e];A.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(de(e,!0),t,r,i)}})),A.each({slideDown:de("show"),slideUp:de("hide"),slideToggle:de("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){A.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}})),A.timers=[],A.fx.tick=function(){var t,e=0,n=A.timers;for(oe=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||A.fx.stop(),oe=void 0},A.fx.timer=function(t){A.timers.push(t),A.fx.start()},A.fx.interval=13,A.fx.start=function(){se||(se=!0,le())},A.fx.stop=function(){se=null},A.fx.speeds={slow:600,fast:200,_default:400},A.fn.delay=function(t,e){return t=A.fx&&A.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 pe,me=A.expr.attrHandle;A.fn.extend({attr:function(t,e){return V(this,A.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){A.removeAttr(this,t)}))}}),A.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?A.prop(t,e,n):(1===o&&A.isXMLDoc(t)||(i=A.attrHooks[e.toLowerCase()]||(A.expr.match.bool.test(e)?pe:void 0)),void 0!==n?null===n?void A.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=A.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!v.radioValue&&"radio"===e&&F(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match($);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),pe={set:function(t,e,n){return!1===e?A.removeAttr(t,n):t.setAttribute(n,n),n}},A.each(A.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=me[e]||A.find.attr;me[e]=function(t,e,r){var i,o,s=e.toLowerCase();return r||(o=me[s],me[s]=i,i=null!=n(t,e,r)?s:null,me[s]=o),i}}));var ve=/^(?:input|select|textarea|button)$/i,ge=/^(?:a|area)$/i;function ye(t){return(t.match($)||[]).join(" ")}function be(t){return t.getAttribute&&t.getAttribute("class")||""}function we(t){return Array.isArray(t)?t:"string"==typeof t&&t.match($)||[]}A.fn.extend({prop:function(t,e){return V(this,A.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[A.propFix[t]||t]}))}}),A.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&A.isXMLDoc(t)||(e=A.propFix[e]||e,i=A.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=A.find.attr(t,"tabindex");return e?parseInt(e,10):ve.test(t.nodeName)||ge.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(A.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)}}),A.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){A.propFix[this.toLowerCase()]=this})),A.fn.extend({addClass:function(t){var e,n,r,i,o,s;return g(t)?this.each((function(e){A(this).addClass(t.call(this,e,be(this)))})):(e=we(t)).length?this.each((function(){if(r=be(this),n=1===this.nodeType&&" "+ye(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");s=ye(n),r!==s&&this.setAttribute("class",s)}})):this},removeClass:function(t){var e,n,r,i,o,s;return g(t)?this.each((function(e){A(this).removeClass(t.call(this,e,be(this)))})):arguments.length?(e=we(t)).length?this.each((function(){if(r=be(this),n=1===this.nodeType&&" "+ye(r)+" "){for(o=0;o<e.length;o++)for(i=e[o];n.indexOf(" "+i+" ")>-1;)n=n.replace(" "+i+" "," ");s=ye(n),r!==s&&this.setAttribute("class",s)}})):this:this.attr("class","")},toggleClass:function(t,e){var n,r,i,o,s=typeof t,a="string"===s||Array.isArray(t);return g(t)?this.each((function(n){A(this).toggleClass(t.call(this,n,be(this),e),e)})):"boolean"==typeof e&&a?e?this.addClass(t):this.removeClass(t):(n=we(t),this.each((function(){if(a)for(o=A(this),i=0;i<n.length;i++)r=n[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==t&&"boolean"!==s||((r=be(this))&&Q.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":Q.get(this,"__className__")||""))})))},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+ye(be(n))+" ").indexOf(e)>-1)return!0;return!1}});var De=/\r/g;A.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,A(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=A.map(i,(function(t){return null==t?"":t+""}))),(e=A.valHooks[this.type]||A.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=A.valHooks[i.type]||A.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(De,""):null==n?"":n:void 0}}),A.extend({valHooks:{option:{get:function(t){var e=A.find.attr(t,"value");return null!=e?e:ye(A.text(t))}},select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,s="select-one"===t.type,a=s?null:[],u=s?o+1:i.length;for(r=o<0?u:s?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!F(n.parentNode,"optgroup"))){if(e=A(n).val(),s)return e;a.push(e)}return a},set:function(t,e){for(var n,r,i=t.options,o=A.makeArray(e),s=i.length;s--;)((r=i[s]).selected=A.inArray(A.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),A.each(["radio","checkbox"],(function(){A.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=A.inArray(A(t).val(),e)>-1}},v.checkOn||(A.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),v.focusin="onfocusin"in r;var xe=/^(?:focusinfocus|focusoutblur)$/,Ce=function(t){t.stopPropagation()};A.extend(A.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+A.event.triggered)&&(m.indexOf(".")>-1&&(v=m.split("."),m=v.shift(),v.sort()),l=m.indexOf(":")<0&&"on"+m,(t=t[A.expando]?t:new A.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]:A.makeArray(e,[t]),d=A.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),A.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Ce),n[m](),t.isPropagationStopped()&&h.removeEventListener(m,Ce),A.event.triggered=void 0,a&&(n[l]=a)),t.result}},simulate:function(t,e,n){var r=A.extend(new A.Event,n,{type:t,isSimulated:!0});A.event.trigger(r,null,e)}}),A.fn.extend({trigger:function(t,e){return this.each((function(){A.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return A.event.trigger(t,e,n,!0)}}),v.focusin||A.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){A.event.simulate(e,t.target,A.event.fix(t))};A.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 Ae=r.location,Ee={guid:Date.now()},Ne=/\?/;A.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||A.error("Invalid XML: "+(n?A.map(n.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var ke=/\[\]$/,Se=/\r?\n/g,Te=/^(?:submit|button|image|reset|file)$/i,Fe=/^(?:input|select|textarea|keygen)/i;function _e(t,e,n,r){var i;if(Array.isArray(e))A.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"!==x(e))r(t,e);else for(i in e)_e(t+"["+i+"]",e[i],n,r)}A.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&&!A.isPlainObject(t))A.each(t,(function(){i(this.name,this.value)}));else for(n in t)_e(n,t[n],e,i);return r.join("&")},A.fn.extend({serialize:function(){return A.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=A.prop(this,"elements");return t?A.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!A(this).is(":disabled")&&Fe.test(this.nodeName)&&!Te.test(t)&&(this.checked||!vt.test(t))})).map((function(t,e){var n=A(this).val();return null==n?null:Array.isArray(n)?A.map(n,(function(t){return{name:e.name,value:t.replace(Se,"\r\n")}})):{name:e.name,value:n.replace(Se,"\r\n")}})).get()}});var Pe=/%20/g,Be=/#.*$/,Ie=/([?&])_=[^&]*/,Oe=/^(.*?):[ \t]*([^\r\n]*)$/gm,Le=/^(?:GET|HEAD)$/,Me=/^\/\//,$e={},je={},Re="*/".concat("*"),He=b.createElement("a");function Ue(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match($)||[];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 qe(t,e,n,r){var i={},o=t===je;function s(a){var u;return i[a]=!0,A.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 ze(t,e){var n,r,i=A.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&A.extend(!0,t,r),t}He.href=Ae.href,A.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ae.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ae.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Re,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":A.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?ze(ze(t,A.ajaxSettings),e):ze(A.ajaxSettings,t)},ajaxPrefilter:Ue($e),ajaxTransport:Ue(je),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0);var n,i,o,s,a,u,l,c,d,h,f=A.ajaxSetup({},e=e||{}),p=f.context||f,m=f.context&&(p.nodeType||p.jquery)?A(p):A.event,v=A.Deferred(),g=A.Callbacks("once memory"),y=f.statusCode||{},w={},D={},x="canceled",C={readyState:0,getResponseHeader:function(t){var e;if(l){if(!s)for(s={};e=Oe.exec(o);)s[e[1].toLowerCase()+" "]=(s[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=s[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(t,e){return null==l&&(t=D[t.toLowerCase()]=D[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==l&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(l)C.always(t[C.status]);else for(e in t)y[e]=[y[e],t[e]];return this},abort:function(t){var e=t||x;return n&&n.abort(e),E(0,e),this}};if(v.promise(C),f.url=((t||f.url||Ae.href)+"").replace(Me,Ae.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match($)||[""],null==f.crossDomain){u=b.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=He.protocol+"//"+He.host!=u.protocol+"//"+u.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=A.param(f.data,f.traditional)),qe($e,f,e,C),l)return C;for(d in(c=A.event&&f.global)&&0==A.active++&&A.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Le.test(f.type),i=f.url.replace(Be,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Pe,"+")):(h=f.url.slice(i.length),f.data&&(f.processData||"string"==typeof f.data)&&(i+=(Ne.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(i=i.replace(Ie,"$1"),h=(Ne.test(i)?"&":"?")+"_="+Ee.guid+++h),f.url=i+h),f.ifModified&&(A.lastModified[i]&&C.setRequestHeader("If-Modified-Since",A.lastModified[i]),A.etag[i]&&C.setRequestHeader("If-None-Match",A.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&C.setRequestHeader("Content-Type",f.contentType),C.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Re+"; q=0.01":""):f.accepts["*"]),f.headers)C.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(p,C,f)||l))return C.abort();if(x="abort",g.add(f.complete),C.done(f.success),C.fail(f.error),n=qe(je,f,e,C)){if(C.readyState=1,c&&m.trigger("ajaxSend",[C,f]),l)return C;f.async&&f.timeout>0&&(a=r.setTimeout((function(){C.abort("timeout")}),f.timeout));try{l=!1,n.send(w,E)}catch(t){if(l)throw t;E(-1,t)}}else E(-1,"No Transport");function E(t,e,s,u){var d,h,b,w,D,x=e;l||(l=!0,a&&r.clearTimeout(a),n=void 0,o=u||"",C.readyState=t>0?4:0,d=t>=200&&t<300||304===t,s&&(w=function(t,e,n){for(var r,i,o,s,a=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||t.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}if(o)return o!==u[0]&&u.unshift(o),n[o]}(f,C,s)),!d&&A.inArray("script",f.dataTypes)>-1&&A.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),w=function(t,e,n,r){var i,o,s,a,u,l={},c=t.dataTypes.slice();if(c[1])for(s in t.converters)l[s.toLowerCase()]=t.converters[s];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(s=l[u+" "+o]||l["* "+o]))for(i in l)if((a=i.split(" "))[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){!0===s?s=l[i]:!0!==l[i]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}(f,w,C,d),d?(f.ifModified&&((D=C.getResponseHeader("Last-Modified"))&&(A.lastModified[i]=D),(D=C.getResponseHeader("etag"))&&(A.etag[i]=D)),204===t||"HEAD"===f.type?x="nocontent":304===t?x="notmodified":(x=w.state,h=w.data,d=!(b=w.error))):(b=x,!t&&x||(x="error",t<0&&(t=0))),C.status=t,C.statusText=(e||x)+"",d?v.resolveWith(p,[h,x,C]):v.rejectWith(p,[C,x,b]),C.statusCode(y),y=void 0,c&&m.trigger(d?"ajaxSuccess":"ajaxError",[C,f,d?h:b]),g.fireWith(p,[C,x]),c&&(m.trigger("ajaxComplete",[C,f]),--A.active||A.event.trigger("ajaxStop")))}return C},getJSON:function(t,e,n){return A.get(t,e,n,"json")},getScript:function(t,e){return A.get(t,void 0,e,"script")}}),A.each(["get","post"],(function(t,e){A[e]=function(t,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),A.ajax(A.extend({url:t,type:e,dataType:i,data:n,success:r},A.isPlainObject(t)&&t))}})),A.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),A._evalUrl=function(t,e,n){return A.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){A.globalEval(t,e,n)}})},A.fn.extend({wrapAll:function(t){var e;return this[0]&&(g(t)&&(t=t.call(this[0])),e=A(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){A(this).wrapInner(t.call(this,e))})):this.each((function(){var e=A(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=g(t);return this.each((function(n){A(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){A(this).replaceWith(this.childNodes)})),this}}),A.expr.pseudos.hidden=function(t){return!A.expr.pseudos.visible(t)},A.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},A.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(t){}};var Ve={0:200,1223:204},We=A.ajaxSettings.xhr();v.cors=!!We&&"withCredentials"in We,v.ajax=We=!!We,A.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(Ve[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()}}})),A.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),A.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 A.globalEval(t),t}}}),A.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),A.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,i){e=A("<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 Ge,Ye=[],Ke=/(=)\?(?=&|$)|\?\?/;A.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ye.pop()||A.expando+"_"+Ee.guid++;return this[t]=!0,t}}),A.ajaxPrefilter("json jsonp",(function(t,e,n){var i,o,s,a=!1!==t.jsonp&&(Ke.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ke.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(Ke,"$1"+i):!1!==t.jsonp&&(t.url+=(Ne.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return s||A.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?A(r).removeProp(i):r[i]=o,t[i]&&(t.jsonpCallback=e.jsonpCallback,Ye.push(i)),s&&g(o)&&o(s[0]),s=o=void 0})),"script"})),v.createHTMLDocument=((Ge=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ge.childNodes.length),A.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=_.exec(t))?[e.createElement(i[1])]:(i=Ct([t],e,o),o&&o.length&&A(o).remove(),A.merge([],i.childNodes)));var r,i,o},A.fn.load=function(t,e,n){var r,i,o,s=this,a=t.indexOf(" ");return a>-1&&(r=ye(t.slice(a)),t=t.slice(0,a)),g(e)?(n=e,e=void 0):e&&"object"==typeof e&&(i="POST"),s.length>0&&A.ajax({url:t,type:i||"GET",dataType:"html",data:e}).done((function(t){o=arguments,s.html(r?A("<div>").append(A.parseHTML(t)).find(r):t)})).always(n&&function(t,e){s.each((function(){n.apply(this,o||[t.responseText,e,t])}))}),this},A.expr.pseudos.animated=function(t){return A.grep(A.timers,(function(e){return t===e.elem})).length},A.offset={setOffset:function(t,e,n){var r,i,o,s,a,u,l=A.css(t,"position"),c=A(t),d={};"static"===l&&(t.style.position="relative"),a=c.offset(),o=A.css(t,"top"),u=A.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,A.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)}},A.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){A.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"===A.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"===A.css(t,"position");)t=t.parentNode;t&&t!==r&&1===t.nodeType&&((i=A(t).offset()).top+=A.css(t,"borderTopWidth",!0),i.left+=A.css(t,"borderLeftWidth",!0))}return{top:e.top-i.top-A.css(r,"marginTop",!0),left:e.left-i.left-A.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===A.css(t,"position");)t=t.offsetParent;return t||st}))}}),A.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;A.fn[t]=function(r){return V(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)}})),A.each(["top","left"],(function(t,e){A.cssHooks[e]=Gt(v.pixelPosition,(function(t,n){if(n)return n=Wt(t,e),Rt.test(n)?A(t).position()[e]+"px":n}))})),A.each({Height:"height",Width:"width"},(function(t,e){A.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,r){A.fn[r]=function(i,o){var s=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===o?"margin":"border");return V(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?A.css(e,n,a):A.style(e,n,i,a)}),e,s?i:void 0,s)}}))})),A.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){A.fn[e]=function(t){return this.on(e,t)}})),A.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)}}),A.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){A.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var Xe=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;A.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||A.guid++,i},A.holdReady=function(t){t?A.readyWait++:A.ready(!0)},A.isArray=Array.isArray,A.parseJSON=JSON.parse,A.nodeName=F,A.isFunction=g,A.isWindow=y,A.camelCase=K,A.type=x,A.now=Date.now,A.isNumeric=function(t){var e=A.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},A.trim=function(t){return null==t?"":(t+"").replace(Xe,"$1")},void 0===(n=function(){return A}.apply(e,[]))||(t.exports=n);var Je=r.jQuery,Qe=r.$;return A.noConflict=function(t){return r.$===A&&(r.$=Qe),t&&r.jQuery===A&&(r.jQuery=Je),A},void 0===i&&(r.jQuery=r.$=A),A}))},542:(t,e,n)=>{"use strict";var r=n(1642);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}}},3600:(t,e,n)=>{"use strict";var r=n(1642),i=n(5334),o=n(187),s=n(3690),a=n(1490),u=n(5211),l=n(6797),c={};t.exports=function(t,e){var n;function d(e,r,i){if(e=s(e,r),null!=n){n();var o=i?i.state:null,a=i?i.title:null;i&&i.replace?t.history.replaceState(o,a,y.prefix+e):t.history.pushState(o,a,y.prefix+e)}else t.location.href=y.prefix+e}var h,f,p,m,v=c,g=y.SKIP={};function y(i,s,b){if(null==i)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");var w,D=0,x=Object.keys(b).map((function(t){if("/"!==t[0])throw new SyntaxError("Routes must start with a `/`");if(/:([^\/\.-]+)(\.{3})?:/.test(t))throw new SyntaxError("Route parameter names must be separated with either `/`, `.`, or `-`");return{route:t,component:b[t],check:u(t)}})),C="function"==typeof setImmediate?setImmediate:setTimeout,A=o.resolve(),E=!1;if(n=null,null!=s){var N=a(s);if(!x.some((function(t){return t.check(N)})))throw new ReferenceError("Default route doesn't match any known routes")}function k(){E=!1;var n=t.location.hash;"#"!==y.prefix[0]&&(n=t.location.search+n,"?"!==y.prefix[0]&&"/"!==(n=t.location.pathname+n)[0]&&(n="/"+n));var r=n.concat().replace(/(?:%[a-f89][a-f0-9])+/gim,decodeURIComponent).slice(y.prefix.length),i=a(r);function o(){if(r===s)throw new Error("Could not resolve default route "+s);d(s,null,{replace:!0})}l(i.params,t.history.state),function t(n){for(;n<x.length;n++)if(x[n].check(i)){var s=x[n].component,a=x[n].route,u=s,l=m=function(o){if(l===m){if(o===g)return t(n+1);h=null==o||"function"!=typeof o.view&&"function"!=typeof o?"div":o,f=i.params,p=r,m=null,v=s.render?s:null,2===D?e.redraw():(D=2,e.redraw.sync())}};return void(s.view||"function"==typeof s?(s={},l(u)):s.onmatch?A.then((function(){return s.onmatch(i.params,r,a)})).then(l,o):l("div"))}o()}(0)}return n=function(){E||(E=!0,C(k))},"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",k,!1)},t.addEventListener("hashchange",k,!1)),e.mount(i,{onbeforeupdate:function(){return!(!(D=D?2:1)||c===v)},oncreate:k,onremove:w,view:function(){if(D&&c!==v){var t=[r(h,f.key,f)];return v&&(t=v.render(t[0])),t}}})}return y.set=function(t,e,n){null!=m&&((n=n||{}).replace=!0),m=null,d(t,e,n)},y.get=function(){return p},y.prefix="#!",y.Link={view:function(t){var e,n,r=t.attrs.options,o={};l(o,t.attrs),o.selector=o.options=o.key=o.oninit=o.oncreate=o.onbeforeupdate=o.onupdate=o.onbeforeremove=o.onremove=null;var s=i(t.attrs.selector||"a",o,t.children);return(s.attrs.disabled=Boolean(s.attrs.disabled))?(s.attrs.href=null,s.attrs["aria-disabled"]="true",s.attrs.onclick=null):(e=s.attrs.onclick,n=s.attrs.href,s.attrs.href=y.prefix+n,s.attrs.onclick=function(t){var i;"function"==typeof e?i=e.call(t.currentTarget,t):null==e||"object"!=typeof e||"function"==typeof e.handleEvent&&e.handleEvent(t),!1===i||t.defaultPrevented||0!==t.button&&0!==t.which&&1!==t.which||t.currentTarget.target&&"_self"!==t.currentTarget.target||t.ctrlKey||t.metaKey||t.shiftKey||t.altKey||(t.preventDefault(),t.redraw=!1,y.set(n,null,r))}),s}},y.param=function(t){return f&&null!=t?f[t]:f},y}},589:(t,e,n)=>{"use strict";var r=n(5334);r.trust=n(4031),r.fragment=n(2505),t.exports=r},7945:(t,e,n)=>{"use strict";var r=n(589),i=n(8450),o=n(570),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(2092),s.render=n(2031),s.redraw=o.redraw,s.request=i.request,s.jsonp=i.jsonp,s.parseQueryString=n(5784),s.buildQueryString=n(7477),s.parsePathname=n(1490),s.buildPathname=n(3690),s.vnode=n(1642),s.PromisePolyfill=n(7068),t.exports=s},570:(t,e,n)=>{"use strict";var r=n(2031);t.exports=n(542)(r,requestAnimationFrame,console)},6797:t=>{"use strict";t.exports=Object.assign||function(t,e){e&&Object.keys(e).forEach((function(n){t[n]=e[n]}))}},3690:(t,e,n)=>{"use strict";var r=n(7477),i=n(6797);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}},5211:(t,e,n)=>{"use strict";var r=n(1490);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}}},1490:(t,e,n)=>{"use strict";var r=n(5784);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))}}},7068: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},187:(t,e,n)=>{"use strict";var r=n(7068);"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},7477: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):""))}}},5784: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}},2031:(t,e,n)=>{"use strict";t.exports=n(4615)(window)},2505:(t,e,n)=>{"use strict";var r=n(1642),i=n(8239);t.exports=function(){var t=i.apply(0,arguments);return t.tag="[",t.children=r.normalizeChildren(t.children),t}},5334:(t,e,n)=>{"use strict";var r=n(1642),i=n(8239),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)}},8239:(t,e,n)=>{"use strict";var r=n(1642);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)}},4615:(t,e,n)=>{"use strict";var r=n(1642);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)k(t,r,null,e[r],n)}(e,c,s),w(t,h,a),!D(e)&&(null!=e.text&&(""!==e.text?h.textContent=e.text:e.children=[r("#",void 0,void 0,e.text,void 0,void 0)]),null!=e.children)){var f=e.children;l(h,f,0,f.length,i,null,s),"select"===e.tag&&null!=c&&function(t,e){if("value"in e)if(null===e.value)-1!==t.dom.selectedIndex&&(t.dom.value=null);else{var n=""+e.value;t.dom.value===n&&-1!==t.dom.selectedIndex||(t.dom.value=n)}"selectedIndex"in e&&k(t,"selectedIndex",null,e.selectedIndex,void 0)}(e,c)}}(t,e,i,s,u)}else!function(t,e,n,i,o){(function(t,e){var n;if("function"==typeof t.tag.view){if(t.state=Object.create(t.tag),null!=(n=t.state.view).$$reentrantLock$$)return;n.$$reentrantLock$$=!0}else{if(t.state=void 0,null!=(n=t.tag).$$reentrantLock$$)return;n.$$reentrantLock$$=!0,t.state=null!=t.tag.prototype&&"function"==typeof t.tag.prototype.view?new t.tag(t):t.tag(t)}if(M(t.state,t,e),null!=t.attrs&&M(t.attrs,t,e),t.instance=r.normalize(a.call(t.state.view,t)),t.instance===t)throw Error("A view cannot return the vnode it received as argument");n.$$reentrantLock$$=null})(e,n),null!=e.instance?(c(t,e.instance,n,i,o),e.dom=e.instance.dom,e.domSize=null!=e.dom?e.instance.domSize:0):e.domSize=0}(t,e,i,s,u)}var d={caption:"table",thead:"table",tbody:"table",tfoot:"table",tr:"tbody",th:"tr",td:"tr",colgroup:"table",col:"colgroup"};function h(t,e,r,i){var o=e.children.match(/^\s*?<(\w+)/im)||[],s=n.createElement(d[o[1]]||"div");"http://www.w3.org/2000/svg"===r?(s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+e.children+"</svg>",s=s.firstChild):s.innerHTML=e.children,e.dom=s.firstChild,e.domSize=s.childNodes.length,e.instance=[];for(var a,u=n.createDocumentFragment();a=s.firstChild;)e.instance.push(a),u.appendChild(a);w(t,u,i)}function f(t,e,n,r,i,o){if(e!==n&&(null!=e||null!=n))if(null==e||0===e.length)l(t,n,0,n.length,r,i,o);else if(null==n||0===n.length)x(t,e,0,e.length);else{var s=null!=e[0]&&null!=e[0].key,a=null!=n[0]&&null!=n[0].key,u=0,d=0;if(!s)for(;d<e.length&&null==e[d];)d++;if(!a)for(;u<n.length&&null==n[u];)u++;if(null===a&&null==s)return;if(s!==a)x(t,e,d,e.length),l(t,n,u,n.length,r,i,o);else if(a){for(var h,f,b,w,D,A=e.length-1,E=n.length-1;A>=d&&E>=u&&(b=e[A],w=n[E],b.key===w.key);)b!==w&&p(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),A--,E--;for(;A>=d&&E>=u&&(h=e[d],f=n[u],h.key===f.key);)d++,u++,h!==f&&p(t,h,f,r,g(e,d,i),o);for(;A>=d&&E>=u&&u!==E&&h.key===w.key&&b.key===f.key;)y(t,b,D=g(e,d,i)),b!==f&&p(t,b,f,r,D,o),++u<=--E&&y(t,h,i),h!==w&&p(t,h,w,r,i,o),null!=w.dom&&(i=w.dom),d++,b=e[--A],w=n[E],h=e[d],f=n[u];for(;A>=d&&E>=u&&b.key===w.key;)b!==w&&p(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),E--,b=e[--A],w=n[E];if(u>E)x(t,e,d,A+1);else if(d>A)l(t,n,u,E+1,r,i,o);else{var N,k,S=i,T=E-u+1,F=new Array(T),_=0,P=0,B=2147483647,I=0;for(P=0;P<T;P++)F[P]=-1;for(P=E;P>=u;P--){null==N&&(N=m(e,d,A+1));var O=N[(w=n[P]).key];null!=O&&(B=O<B?O:-1,F[P-u]=O,b=e[O],e[O]=null,b!==w&&p(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),I++)}if(i=S,I!==A-d+1&&x(t,e,d,A+1),0===I)l(t,n,u,E+1,r,i,o);else if(-1===B)for(k=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}(F),_=k.length-1,P=E;P>=u;P--)f=n[P],-1===F[P-u]?c(t,f,r,o,i):k[_]===P-u?_--:y(t,f,i),null!=f.dom&&(i=n[P].dom);else for(P=E;P>=u;P--)f=n[P],-1===F[P-u]&&c(t,f,r,o,i),null!=f.dom&&(i=n[P].dom)}}else{var L=e.length<n.length?e.length:n.length;for(u=u<d?u:d;u<L;u++)(h=e[u])===(f=n[u])||null==h&&null==f||(null==h?c(t,f,r,o,g(e,u+1,i)):null==f?C(t,h):p(t,h,f,r,g(e,u+1,i),o));e.length>L&&x(t,e,u,e.length),n.length>L&&l(t,n,u,n.length,r,i,o)}}}function p(t,e,n,i,s,u){var l=e.tag;if(l===n.tag){if(n.state=e.state,n.events=e.events,function(t,e){do{var n;if(null!=t.attrs&&"function"==typeof t.attrs.onbeforeupdate&&void 0!==(n=a.call(t.attrs.onbeforeupdate,t,e))&&!n)break;if("string"!=typeof t.tag&&"function"==typeof t.state.onbeforeupdate&&void 0!==(n=a.call(t.state.onbeforeupdate,t,e))&&!n)break;return!1}while(0);return t.dom=e.dom,t.domSize=e.domSize,t.instance=e.instance,t.attrs=e.attrs,t.children=e.children,t.text=e.text,!0}(n,e))return;if("string"==typeof l)switch(null!=n.attrs&&$(n.attrs,n,i),l){case"#":!function(t,e){t.children.toString()!==e.children.toString()&&(t.dom.nodeValue=e.children),e.dom=t.dom}(e,n);break;case"<":!function(t,e,n,r,i){e.children!==n.children?(A(t,e),h(t,n,r,i)):(n.dom=e.dom,n.domSize=e.domSize,n.instance=e.instance)}(t,e,n,u,s);break;case"[":!function(t,e,n,r,i,o){f(t,e.children,n.children,r,i,o);var s=0,a=n.children;if(n.dom=null,null!=a){for(var u=0;u<a.length;u++){var l=a[u];null!=l&&null!=l.dom&&(null==n.dom&&(n.dom=l.dom),s+=l.domSize||1)}1!==s&&(n.domSize=s)}}(t,e,n,i,s,u);break;default:!function(t,e,n,i){var s=e.dom=t.dom;i=o(e)||i,"textarea"===e.tag&&(null==e.attrs&&(e.attrs={}),null!=e.text&&(e.attrs.value=e.text,e.text=void 0)),function(t,e,n,r){if(null!=n)for(var i in n)k(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]||S(t,i,o,r)}(e,t.attrs,e.attrs,i),D(e)||(null!=t.text&&null!=e.text&&""!==e.text?t.text.toString()!==e.text.toString()&&(t.dom.firstChild.nodeValue=e.text):(null!=t.text&&(t.children=[r("#",void 0,void 0,t.text,void 0,t.dom.firstChild)]),null!=e.text&&(e.children=[r("#",void 0,void 0,e.text,void 0,void 0)]),f(s,t.children,e.children,n,null,i)))}(e,n,i,u)}else!function(t,e,n,i,o,s){if(n.instance=r.normalize(a.call(n.state.view,n)),n.instance===n)throw Error("A view cannot return the vnode it received as argument");$(n.state,n,i),null!=n.attrs&&$(n.attrs,n,i),null!=n.instance?(null==e.instance?c(t,n.instance,i,s,o):p(t,e.instance,n.instance,i,o,s),n.dom=n.instance.dom,n.domSize=n.instance.domSize):null!=e.instance?(C(t,e.instance),n.dom=void 0,n.domSize=0):(n.dom=e.dom,n.domSize=e.domSize)}(t,e,n,i,s,u)}else C(t,e),c(t,n,i,u,s)}function m(t,e,n){for(var r=Object.create(null);e<n;e++){var i=t[e];if(null!=i){var o=i.key;null!=o&&(r[o]=e)}}return r}var v=[];function g(t,e,n){for(;e<t.length;e++)if(null!=t[e]&&null!=t[e].dom)return t[e].dom;return n}function y(t,e,r){var i=n.createDocumentFragment();b(t,i,e),w(t,i,r)}function b(t,e,n){for(;null!=n.dom&&n.dom.parentNode===t;){if("string"!=typeof n.tag){if(null!=(n=n.instance))continue}else if("<"===n.tag)for(var r=0;r<n.instance.length;r++)e.appendChild(n.instance[r]);else if("["!==n.tag)e.appendChild(n.dom);else if(1===n.children.length){if(null!=(n=n.children[0]))continue}else for(r=0;r<n.children.length;r++){var i=n.children[r];null!=i&&b(t,e,i)}break}}function w(t,e,n){null!=n?t.insertBefore(e,n):t.appendChild(e)}function D(t){if(null==t.attrs||null==t.attrs.contenteditable&&null==t.attrs.contentEditable)return!1;var e=t.children;if(null!=e&&1===e.length&&"<"===e[0].tag){var n=e[0].children;t.dom.innerHTML!==n&&(t.dom.innerHTML=n)}else if(null!=t.text||null!=e&&0!==e.length)throw new Error("Child node of a contenteditable must be trusted");return!0}function x(t,e,n,r){for(var i=n;i<r;i++){var o=e[i];null!=o&&C(t,o)}}function C(t,e){var n,r,i,o=0,u=e.state;if("string"!=typeof e.tag&&"function"==typeof e.state.onbeforeremove&&null!=(i=a.call(e.state.onbeforeremove,e))&&"function"==typeof i.then&&(o=1,n=i),e.attrs&&"function"==typeof e.attrs.onbeforeremove&&null!=(i=a.call(e.attrs.onbeforeremove,e))&&"function"==typeof i.then&&(o|=2,r=i),s(e,u),o){if(null!=n){var l=function(){1&o&&((o&=2)||c())};n.then(l,l)}null!=r&&(l=function(){2&o&&((o&=1)||c())},r.then(l,l))}else N(e),E(t,e);function c(){s(e,u),N(e),E(t,e)}}function A(t,e){for(var n=0;n<e.instance.length;n++)t.removeChild(e.instance[n])}function E(t,e){for(;null!=e.dom&&e.dom.parentNode===t;){if("string"!=typeof e.tag){if(null!=(e=e.instance))continue}else if("<"===e.tag)A(t,e);else{if("["!==e.tag&&(t.removeChild(e.dom),!Array.isArray(e.children)))break;if(1===e.children.length){if(null!=(e=e.children[0]))continue}else for(var n=0;n<e.children.length;n++){var r=e.children[n];null!=r&&E(t,r)}}break}}function N(t){if("string"!=typeof t.tag&&"function"==typeof t.state.onremove&&a.call(t.state.onremove,t),t.attrs&&"function"==typeof t.attrs.onremove&&a.call(t.attrs.onremove,t),"string"!=typeof t.tag)null!=t.instance&&N(t.instance);else{var e=t.children;if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];null!=r&&N(r)}}}function k(t,e,r,i,o){if("key"!==e&&"is"!==e&&null!=i&&!T(e)&&(r!==i||function(t,e){return"value"===e||"checked"===e||"selectedIndex"===e||"selected"===e&&t.dom===u()||"option"===t.tag&&t.dom.parentNode===n.activeElement}(t,e)||"object"==typeof i)){if("o"===e[0]&&"n"===e[1])return L(t,e,i);if("xlink:"===e.slice(0,6))t.dom.setAttributeNS("http://www.w3.org/1999/xlink",e.slice(6),i);else if("style"===e)I(t.dom,r,i);else if(F(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 S(t,e,n,r){if("key"!==e&&"is"!==e&&null!=n&&!T(e))if("o"!==e[0]||"n"!==e[1]||T(e))if("style"===e)I(t.dom,n,null);else if(!F(t,e,r)||"className"===e||"value"===e&&("option"===t.tag||"select"===t.tag&&-1===t.dom.selectedIndex&&t.dom===u())||"input"===t.tag&&"type"===e){var i=e.indexOf(":");-1!==i&&(e=e.slice(i+1)),!1!==n&&t.dom.removeAttribute("className"===e?"class":e)}else t.dom[e]=null;else L(t,e,void 0)}function T(t){return"oninit"===t||"oncreate"===t||"onupdate"===t||"onremove"===t||"onbeforeremove"===t||"onbeforeupdate"===t}function F(t,e,n){return void 0===n&&(t.tag.indexOf("-")>-1||null!=t.attrs&&t.attrs.is||"href"!==e&&"list"!==e&&"form"!==e&&"width"!==e&&"height"!==e)&&e in t.dom}var _=/[A-Z]/g;function P(t){return"-"+t.toLowerCase()}function B(t){return"-"===t[0]&&"-"===t[1]?t:"cssFloat"===t?"float":t.replace(_,P)}function I(t,e,n){if(e===n);else if(null==n)t.style.cssText="";else if("object"!=typeof n)t.style.cssText=n;else if(null==e||"object"!=typeof e)for(var r in t.style.cssText="",n)null!=(i=n[r])&&t.style.setProperty(B(r),String(i));else{for(var r in n){var i;null!=(i=n[r])&&(i=String(i))!==String(e[r])&&t.style.setProperty(B(r),i)}for(var r in e)null!=e[r]&&null==n[r]&&t.style.removeProperty(B(r))}}function O(){this._=e}function L(t,e,n){if(null!=t.events){if(t.events[e]===n)return;null==n||"function"!=typeof n&&"object"!=typeof n?(null!=t.events[e]&&t.dom.removeEventListener(e.slice(2),t.events,!1),t.events[e]=void 0):(null==t.events[e]&&t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}else null==n||"function"!=typeof n&&"object"!=typeof n||(t.events=new O,t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}function M(t,e,n){"function"==typeof t.oninit&&a.call(t.oninit,e),"function"==typeof t.oncreate&&n.push(a.bind(t.oncreate,e))}function $(t,e,n){"function"==typeof t.onupdate&&n.push(a.bind(t.onupdate,e))}return O.prototype=Object.create(null),O.prototype.handleEvent=function(t){var e,n=this["on"+t.type];"function"==typeof n?e=n.call(t.currentTarget,t):"function"==typeof n.handleEvent&&n.handleEvent(t),this._&&!1!==t.redraw&&(0,this._)(),!1===e&&(t.preventDefault(),t.stopPropagation())},function(t,n,i){if(!t)throw new TypeError("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var o=[],s=u(),a=t.namespaceURI;null==t.vnodes&&(t.textContent=""),n=r.normalizeChildren(Array.isArray(n)?n:[n]);var l=e;try{e="function"==typeof i?i:void 0,f(t,t.vnodes,n,o,null,"http://www.w3.org/1999/xhtml"===a?void 0:a)}finally{e=l}t.vnodes=n,null!=s&&u()!==s&&"function"==typeof s.focus&&s.focus();for(var c=0;c<o.length;c++)o[c]()}}},4031:(t,e,n)=>{"use strict";var r=n(1642);t.exports=function(t){return null==t&&(t=""),r("<",void 0,void 0,t,void 0,void 0)}},1642: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},8450:(t,e,n)=>{"use strict";var r=n(187),i=n(570);t.exports=n(1950)(window,r,i.redraw)},1950:(t,e,n)=>{"use strict";var r=n(3690);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)}))}}},2092:(t,e,n)=>{"use strict";var r=n(570);t.exports=n(3600)(window,r)},30:(t,e,n)=>{"use strict";t.exports=n(6807)},6807: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}()},619:(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,{decode:()=>b,default:()=>C,encode:()=>w,toASCII:()=>x,toUnicode:()=>D,ucs2decode:()=>m,ucs2encode:()=>v});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 D=n.length+1;u=y(i-p,D,0==p),d(i/D)>o-a&&f("overflow"),a+=d(i/D),i%=D,n.splice(i++,0,a)}return String.fromCodePoint.apply(String,n)},w=function(t){for(var e,n=[],i=(t=m(t)).length,a=128,u=0,l=72,c=r(t);!(e=c()).done;){var p=e.value;p<128&&n.push(h(p))}var v=n.length,b=v;for(v&&n.push("-");b<i;){for(var w,D=o,x=r(t);!(w=x()).done;){var C=w.value;C>=a&&C<D&&(D=C)}var A=b+1;D-a>d((o-u)/A)&&f("overflow"),u+=(D-a)*A,a=D;for(var E,N=r(t);!(E=N()).done;){var k=E.value;if(k<a&&++u>o&&f("overflow"),k==a){for(var S=u,T=s;;T+=s){var F=T<=l?1:T>=l+26?26:T-l;if(S<F)break;var _=S-F,P=s-F;n.push(h(g(F+_%P,0))),S=d(_/P)}n.push(h(g(S,0))),l=y(u,A,b==v),u=0,++b}}++u,++a}return n.join("")},D=function(t){return p(t,(function(t){return a.test(t)?b(t.slice(4).toLowerCase()):t}))},x=function(t){return p(t,(function(t){return u.test(t)?"xn--"+w(t):t}))};const C={version:"2.1.0",ucs2:{decode:m,encode:v},decode:b,encode:w,toASCII:x,toUnicode:D}},1655: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)}()},391:(t,e,n)=>{var r=n(9152),i=n(356);void 0===i.$&&(i.$=r),void 0===i.jQuery&&(i.jQuery=r),t.exports=r},1683:(t,e,n)=>{var r=n(2898),i=n(356);void 0===i.ColorThief&&(i.ColorThief=r),t.exports=r},982:(t,e,n)=>{var r=n(4757),i=n(356);void 0===i.dayjs&&(i.dayjs=r),t.exports=r},4473:(t,e,n)=>{var r=n(7945),i=n(356);void 0===i.m&&(i.m=r),t.exports=r},1885:(t,e,n)=>{var r=n(619),i=n(356);void 0===i.punycode&&(i.punycode=r),t.exports=r},9882:t=>{t.exports=function(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},t.exports.__esModule=!0,t.exports.default=t.exports},9696:t=>{t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports},230:t=>{t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},1904:t=>{t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},8213:t=>{function e(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)}}t.exports=function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},402:t=>{t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.__esModule=!0,t.exports.default=t.exports},9767:t=>{function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},2061:(t,e,n)=>{var r=n(480);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&r(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},1209:t=>{t.exports=function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],s=!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.exports.__esModule=!0,t.exports.default=t.exports},6067:t=>{t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},8974:(t,e,n)=>{var r=n(2075).default,i=n(230);t.exports=function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return i(t)},t.exports.__esModule=!0,t.exports.default=t.exports},9440:(t,e,n)=>{var r=n(2075).default;function i(){"use strict";t.exports=i=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},n=Object.prototype,o=n.hasOwnProperty,s=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function d(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,n){return t[e]=n}}function h(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new S(r||[]);return s(o,"_invoke",{value:A(t,n,a)}),o}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p={};function m(){}function v(){}function g(){}var y={};d(y,u,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(T([])));w&&w!==n&&o.call(w,u)&&(y=w);var D=g.prototype=m.prototype=Object.create(y);function x(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function n(i,s,a,u){var l=f(t[i],t,s);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==r(d)&&o.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(d).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(l.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function A(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=E(s,n);if(a){if(a===p)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function E(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var r=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,p;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function T(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(o.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:F}}function F(){return{value:void 0,done:!0}}return v.prototype=g,s(D,"constructor",{value:g,configurable:!0}),s(g,"constructor",{value:v,configurable:!0}),v.displayName=d(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,d(t,c,"GeneratorFunction")),t.prototype=Object.create(D),t},e.awrap=function(t){return{__await:t}},x(C.prototype),d(C.prototype,l,(function(){return this})),e.AsyncIterator=C,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var s=new C(h(t,n,r,i),o);return e.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},x(D),d(D,c,"Generator"),d(D,u,(function(){return this})),d(D,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=T,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(a&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):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),p},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),k(n),p}},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;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},480:t=>{function e(n,r){return t.exports=e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n,r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},5387:(t,e,n)=>{var r=n(9696),i=n(1209),o=n(9111),s=n(6067);t.exports=function(t,e){return r(t)||i(t,e)||o(t,e)||s()},t.exports.__esModule=!0,t.exports.default=t.exports},2075:t=>{function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},9111:(t,e,n)=>{var r=n(9882);t.exports=function(t,e){if(t){if("string"==typeof t)return r(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)?r(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},2507:(t,e,n)=>{var r=n(9440)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(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,{app:()=>v,compat:()=>Co});var t={};n.r(t),n.d(t,{camelCaseToSnakeCase:()=>Z,generateRandomString:()=>tt,getPlainContent:()=>J,slug:()=>X,truncate:()=>K,ucfirst:()=>Q});var e={};n.r(e),n.d(e,{default:()=>mt,fireDeprecationWarning:()=>vt});var i={};n.r(i),n.d(i,{createFocusTrap:()=>dr});var o={};n.r(o),n.d(o,{extend:()=>xi,override:()=>Ci});var s={};n.r(s),n.d(s,{debounce:()=>ie,throttle:()=>re}),n(391),n(4473),n(982),n(9043),n(6199),n(7865),n(6935),n(9411);var a=n(5635),u=n.n(a),l=n(6982),c=n.n(l);function d(t,e){var n="select"===t.tag?t.attrs.multi?"multi":"select":t.attrs.type;return t.attrs.onchange="multi"===n?function(){e([].slice.call(this.selectedOptions,(function(t){return t.value})))}:"select"===n?function(t){e(this.selectedOptions[0].value)}:"checkbox"===n?function(t){e(this.checked)}:t.attrs.oninput=function(t){e(this.value)},"select"===t.tag?t.children.forEach((function(t){t.attrs.value!==e()&&t.children[0]!==e()||(t.attrs.selected=!0)})):"checkbox"===n?t.attrs.checked=e():"radio"===n?t.attrs.checked=e()===t.attrs.value:t.attrs.value=e(),t.attrs.bidi=null,t}d.view=function(t,e,n){return d(e,e.attrs.bidi)};const h=d;function f(t){var e=t.m,n=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=e.apply(this,arguments);return o.attrs||(o.attrs={}),o.attrs.bidi&&h(o,o.attrs.bidi),o};Object.keys(e).forEach((function(t){return n[t]=e[t]})),t.m=n}var p=window;const v=new Proxy({},{get:function(t,e){return Reflect.get(p.app,e,p.app)},set:function(t,e,n){return Reflect.set(p.app,e,n,p.app)}});n(1859),dayjs.extend(u()),dayjs.extend(c()),f(window);var g=$.fn.tooltip;function y(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}function w(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,b(t,e)}function D(){return D=Object.assign?Object.assign.bind():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},D.apply(this,arguments)}function x(t,e,n){void 0===e&&(e=null),void 0===n&&(n={});var r=D({},n);r.state=r.state||{},r.state.key=Date.now(),m.route.set(t,e,r)}$.fn.tooltip=function(t,e){["DANGEROUS_tooltip_jquery_fn_deprecation_exempt"].includes(e)||console.warn("Calling `$.tooltip` is now deprecated. Please use the `<Tooltip>` component exposed by flarum/core instead. `$.tooltip` may be removed in a future version of Flarum.\n\nIf this component doesn't meet your requirements, please open an issue: https://github.com/flarum/core/issues/new?assignees=davwheat&labels=type/bug,needs-verification&template=bug-report.md&title=Tooltip%20component%20unsuitable%20for%20use%20case"),g.bind(this)(t)},n(1885),n(1683);var C=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),x("/")},t}(),A=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}(),E=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=D({},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 N(t,e){return t&&(t===e||t.prototype instanceof e)}var k=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={}),!!N(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}(),S=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}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),v.previous=v.current,v.current=new k(this.constructor,{routeName:this.attrs.routeName}),v.drawer.hide(),v.modal.close()},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.bodyClass&&$("#app").addClass(this.bodyClass),this.scrollTopOnCreate&&$(window).scrollTop(0),"scrollRestoration"in history&&(history.scrollRestoration=this.useBrowserScrollRestoration?"auto":"manual")},n.onremove=function(e){t.prototype.onremove.call(this,e),this.bodyClass&&$("#app").removeClass(this.bodyClass)},e}(E);function T(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function F(t,e,n){return e&&T(t.prototype,e),n&&T(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function _(t){var e=typeof t;return"function"===e||"object"===e&&!!t}var P=function(t,e){this.content=void 0,this.priority=void 0,this.content=t,this.priority=e},B=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 P(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 P&&(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||_(i.content)?D({},i,{content:e.createItemContentProxy(_(i.content)?i.content:Object(i.content),n)}):D({},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)}})},F(t,[{key:"items",get:function(){return new Proxy(this._items,{set:function(){return console.warn("Modifying `ItemList.items` is not allowed."),!1}})}}]),t}(),I=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(){return m("li",{className:"Dropdown-separator"})},e}(E);I.isListItem=!0;const O=I;function L(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=L(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}const M=function(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=L(t))&&(r&&(r+=" "),r+=e);return r};function j(t){return"object"==typeof t&&null!==t&&"tag"in t}function R(t){return j(t)&&t.tag===O}function H(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){(!R(t)||i&&!R(i)&&e!==r.length-1)&&(i=t,o.push(t))})),o).map((function(t){var e,r,i=[t.itemName&&"item-"+t.itemName];if(j(t)&&t.tag.isListItem)return t.attrs=t.attrs||{},t.attrs.key=t.attrs.key||t.itemName,t.key=t.attrs.key,t;j(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=j(t)&&(null==t||null==(e=t.attrs)?void 0:e.key)||t.itemName;return m(s,Object.assign({className:M(i),key:o},n),t)}))}var U=function(t){function e(){return t.apply(this,arguments)||this}w(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"},H(this.items().toArray()))))},n.items=function(){var t=new B,e=this.attrs.discussion,n=e.badges().toArray();return n.length&&t.add("badges",m("ul",{className:"DiscussionHero-badges badges"},H(n)),10),t.add("title",m("h1",{className:"DiscussionHero-title"},e.title())),t},e}(E);function q(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 z(t,e){var n=t[e];return delete t[e],n}var V,W=["options"],G=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(t){var e=t.attrs,n=e.options,r=void 0===n?{}:n,i=q(e,W);i.href||(i.href="");var o=t.children||{tag:"#",children:t.text};return i.external?m("a",i,o):(i.href===m.route.get()&&("replace"in r||(r.replace=!0)),z(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}(E);function Y(t,e){var n;void 0===e&&(e={}),e.className=M("Avatar",e.className),null!=(n=e).loading||(n.loading="lazy");var r="",i="undefined"===e.title||e.title;if(i||delete e.title,t){var o=t.displayName()||"?",s=t.avatarUrl();if(i&&(e.title=e.title||o),s)return m("img",Object.assign({},e,{src:s,alt:""}));r=o.charAt(0).toUpperCase(),e.style={"--avatar-bg":t.color()}}return m("span",e,r)}function K(t,e,n){return void 0===n&&(n=0),(n>0?"...":"")+t.substring(n,n+e)+(t.length>n+e?"...":"")}function X(t,e){switch(void 0===e&&(e=V.ALPHANUMERIC),e){case V.UTF8:return t.toLowerCase().replace(/(?:(?![0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088E\u0898-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09F4-\u09F9\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0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0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u17F0-\u17F9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ACE\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u20D0-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA827\uA82C\uA830-\uA835\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA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33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E-\uDC61\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6\uDF00-\uDF10\uDF12-\uDF3A\uDF3E-\uDF42\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC40-\uDC55]|\uD811[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uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC30-\uDC6D\uDC8F\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAE\uDEC0-\uDEF9]|\uD839[\uDCD0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]|\uDB40[\uDD00-\uDDEF])[\s\S])/gi,"-").replace(/-+/g,"-").replace(/-$|^-/g,"");case V.ALPHANUMERIC:default:return t.toLowerCase().replace(/[^a-z0-9]/gi,"-").replace(/-+/g,"-").replace(/-$|^-/g,"")}}function J(t){var e=t.replace(/(<\/p>|<br>)/g,"$1 &nbsp;").replace(/<img\b[^>]*>/gi," "),n=(new DOMParser).parseFromString(e,"text/html").documentElement;return J.removeSelectors.forEach((function(t){n.querySelectorAll(t).forEach((function(t){t.remove()}))})),n.innerText.replace(/\s+/g," ").trim()}function Q(t){return t.substr(0,1).toUpperCase()+t.substr(1)}function Z(t){return t.replace(/[A-Z]/g,(function(t){return"_"+t.toLowerCase()}))}function tt(t){if(t<0)throw new Error("Cannot generate a random string with length less than 0.");if(0===t)return"";var e=new Uint8Array(t/2);return window.crypto.getRandomValues(e),Array.from(e,(function(t){return t.toString(16).padStart(2,"0")})).join("")}function et(t,e,n){if(!e&&!n)return t;var r=e instanceof RegExp?e:new RegExp(null!=e?e:"","gi"),i=t,o=0;return n&&(e&&(o=Math.max(0,t.search(r)-n/2)),i=K(i,n,o)),i=$("<div/>").text(i).html(),e&&(i=i.replace(r,"<mark>$&</mark>")),m.trust(i)}function nt(t,e){return void 0===e&&(e={}),e.className=M("icon",t,e.className),m("i",Object.assign({"aria-hidden":"true"},e))}!function(t){t.ALPHANUMERIC="alphanum",t.UTF8="utf8"}(V||(V={})),J.removeSelectors=["blockquote","script"];var rt=n(4757),it=n.n(rt);function ot(t){return t instanceof Array?t.map((function(t){return ot(t)})).join(""):"object"==typeof t&&null!==t?t.children?ot(t.children):String(t.text):String(t)}function st(t){var e=it()(t),n=it()();return e.isAfter(n)&&(e=n),e.diff(it()())<-2592e6?e.year()===it()().year()?e.format(ot(v.translator.trans("core.lib.datetime_formats.humanTimeShort"))):e.format(ot(v.translator.trans("core.lib.datetime_formats.humanTimeLong"))):e.fromNow()}function at(t){return t>=1e6?Math.floor(t/1e6)+ot(v.translator.trans("core.lib.number_suffix.mega_text")):t>=1e3?(t/1e3).toFixed(1)+ot(v.translator.trans("core.lib.number_suffix.kilo_text")):t.toString()}var ut=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).showing=!1,e}w(e,t),e.initAttrs=function(t){t.className||(t.className=""),t.buttonClassName||(t.buttonClassName=""),t.menuClassName||(t.menuClassName=""),t.label||(t.label=""),null!=t.caretIcon||(t.caretIcon="fas fa-caret-down"),t.accessibleToggleLabel||(t.accessibleToggleLabel=ot(v.translator.trans("core.lib.dropdown.toggle_dropdown_accessible_label")))};var n=e.prototype;return n.view=function(t){var e=t.children?H(t.children):[],n=!this.attrs.lazyDraw||this.showing;return m("div",{className:"ButtonGroup Dropdown dropdown "+this.attrs.className+" itemCount"+e.length+(this.showing?" open":"")},this.getButton(t.children),n&&this.getMenu(e))},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.$().on("shown.bs.dropdown",(function(){var t,e,r,i,o,s,a,u,l,c,d,h=n.attrs,f=h.lazyDraw,p=h.onshow;n.showing=!0,f&&m.redraw.sync(),"function"==typeof p&&p(),f||m.redraw();var v=n.$(".Dropdown-menu"),g=v.hasClass("Dropdown-menu--right"),y=null!=(t=null==(e=v.offset())?void 0:e.top)?t:0,b=null!=(r=v.height())?r:0,w=null!=(i=$(window).scrollTop())?i:0,D=null!=(o=$(window).height())?o:0;v.removeClass("Dropdown-menu--top Dropdown-menu--right"),v.toggleClass("Dropdown-menu--top",y+b>w+D),((null==(s=v.offset())?void 0:s.top)||0)<0&&v.removeClass("Dropdown-menu--top");var x=null!=(a=null==(u=v.offset())?void 0:u.left)?a:0,C=null!=(l=v.width())?l:0,A=null!=(c=$(window).scrollLeft())?c:0,E=null!=(d=$(window).width())?d:0;v.toggleClass("Dropdown-menu--right",g||x+C>A+E)})),this.$().on("hidden.bs.dropdown",(function(){n.showing=!1,n.attrs.onhide&&n.attrs.onhide(),m.redraw()}))},n.getButton=function(t){return m("button",{className:"Dropdown-toggle "+this.attrs.buttonClassName,"aria-haspopup":"menu","aria-label":this.attrs.accessibleToggleLabel,"data-toggle":"dropdown",onclick:this.attrs.onclick},this.getButtonContent(t))},n.getButtonContent=function(t){return[this.attrs.icon?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}(E);function lt(t){var e=it()(t),n=e.format(),r=e.format("LLLL"),i=st(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 w(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")," ",Wi.translator.trans("core.forum.discussion_list."+(e?"replied":"started")+"_text",{user:n,ago:lt(r)}))},e}(E),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 w(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=q(t,ht),u=M("LoadingIndicator",s),l=M("LoadingIndicator-container","unset"!==n&&"LoadingIndicator-container--"+n,i&&"LoadingIndicator-container--"+i,o);return m("div",Object.assign({"aria-label":v.translator.trans("core.lib.loading_indicator.accessible_label"),role:"status"},a.containerAttrs,{"data-size":i,className:l}),m("div",Object.assign({"aria-hidden":"true",className:u},a)))},e}(E),pt=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.handler=function(){return this.attrs.when()||void 0},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.boundHandler=this.handler.bind(this),$(window).on("beforeunload",this.boundHandler)},n.onremove=function(e){t.prototype.onremove.call(this,e),$(window).off("beforeunload",this.boundHandler)},n.view=function(t){return m("[",null,t.children)},e}(E);function mt(){var t;v.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}w(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=q(e,gt);n||(n="button"),i||(i=r),"object"==typeof i&&(i=ot(i)),(s||a)&&delete c.onclick;var d=D({disabled:s,className:u=M(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||ot(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}(E),bt=n(1655),wt=n.n(bt),Dt=null;function xt(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===Dt||!0===Dt){t.contentEditable="true";try{Dt=document.execCommand("insertText",!1,n)}catch(t){Dt=!1}t.contentEditable="false"}Dt&&!t.value.slice(0,t.selectionStart).endsWith(n)&&(Dt=!1),Dt||(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 Ct=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 B;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;xt(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}(),At=["text","tooltipVisible","showOnFocus","position","ignoreTitleWarning","html","delay"],Et=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}w(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,q(n,At),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":M("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)?ot(t):t},n.checkDomNodeChanged=function(){var t=this.firstChild.dom;t&&!t.isSameNode(this.childDomNode)&&(this.childDomNode=t,this.shouldRecreateTooltip=!0)},e}(E),Nt=function(t){function e(){return t.apply(this,arguments)||this}w(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"},H(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 Ct(t,this.buildEditorParams())},n.controlItems=function(){var t=new B;return t.add("submit",m(yt,{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(Et,{text:v.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 B},n.oninput=function(t){this.value=t,this.attrs.onchange(this.value)},n.onsubmit=function(){this.attrs.onsubmit(this.value)},e}(E),kt=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.composer=this.attrs.composer,this.loading=!1,this.attrs.confirmExit&&this.composer.preventClosingWhen((function(){return n.hasChanges()}),this.attrs.confirmExit),this.composer.fields.content(this.attrs.originalContent||"")},n.view=function(){var t;return m(pt,{when:this.hasChanges.bind(this)},m("div",{className:M("ComposerBody",this.attrs.className)},Y(this.attrs.user,{className:"ComposerBody-avatar"}),m("div",{className:"ComposerBody-content"},m("ul",{className:"ComposerBody-header"},H(this.headerItems().toArray())),m("div",{className:"ComposerBody-editor"},m(Nt,{submitLabel:this.attrs.submitLabel,placeholder:this.attrs.placeholder,disabled:this.loading||this.attrs.disabled,composer:this.composer,preview:null==(t=this.jumpToPreview)?void 0:t.bind(this),onchange:this.composer.fields.content,onsubmit:this.onsubmit.bind(this),value:this.composer.fields.content()}))),m(ft,{display:"unset",containerClassName:M("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 B},n.onsubmit=function(){},n.loaded=function(){this.loading=!1,m.redraw()},e}(E);function St(t){Wi.composer.isFullScreen()&&(Wi.composer.minimize(),t.stopPropagation())}var Tt=function(t){function e(){return t.apply(this,arguments)||this}w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.placeholder=e.placeholder||ot(Wi.translator.trans("core.forum.composer_reply.body_placeholder")),e.submitLabel=e.submitLabel||Wi.translator.trans("core.forum.composer_reply.submit_button"),e.confirmExit=e.confirmExit||ot(Wi.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(G,{href:Wi.route.discussion(n),onclick:St},n.title()))),e},n.jumpToPreview=function(t){St(t),m.route.set(Wi.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();Wi.store.createRecord("posts").save(n).then((function(n){if(Wi.viewingDiscussion(e)){var r=Wi.current.get("stream");r.update().then((function(){return r.goToNumber(n.number())}))}else{var i,o=m(yt,{className:"Button Button--link",onclick:function(){m.route.set(Wi.route.post(n)),Wi.alerts.dismiss(i)}},Wi.translator.trans("core.forum.composer_reply.view_button"));i=Wi.alerts.show({type:"success",controls:[o]},Wi.translator.trans("core.forum.composer_reply.posted_message"))}t.composer.hide()}),this.loaded.bind(this))},e}(kt),Ft=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(t){var e=Object.assign({},this.attrs),n=z(e,"type");e.className=M("Alert","Alert--"+n,e.className);var r=z(e,"title"),i=z(e,"icon"),o=z(e,"content")||t.children,s=z(e,"controls")||[],a=z(e,"dismissible"),u=z(e,"ondismiss"),l=[];return(a||void 0===a)&&l.push(m(yt,{"aria-label":v.translator.trans("core.lib.alert.dismiss_a11y_label"),icon:"fas fa-times",className:"Button Button--link Button--icon Alert-dismiss",onclick:u})),m("div",e,!!r&&m("div",{className:"Alert-title"},!!i&&m("span",{className:"Alert-title-icon"},nt(i)),m("span",{className:"Alert-title-text"},r)),m("span",{className:"Alert-body"},o),m("ul",{className:"Alert-controls"},H(s.concat(l))))},e}(E),_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).loading=!1,e.alertAttrs=null,e}w(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 new Promise((function(t){return setTimeout(t,300)}))},n.view=function(){var t=this;return this.alertAttrs&&(this.alertAttrs.dismissible=!1),m("div",{className:M("Modal modal-dialog fade",this.className())},m("div",{className:"Modal-content"},this.dismissibleOptions.viaCloseButton&&m("div",{className:"Modal-close App-backControl"},m(yt,{icon:"fas fa-times",onclick:function(){return t.hide()},className:"Button Button--icon Button--link","aria-label":v.translator.trans("core.lib.modal.close")})),m("form",{onsubmit:this.onsubmit.bind(this)},m("div",{className:"Modal-header"},m("h3",{className:"App-titleControl App-titleControl--text"},this.title())),!!this.alertAttrs&&m("div",{className:"Modal-alert"},m(Ft,this.alertAttrs)),this.content())))},n.onsubmit=function(t){},n.onready=function(){this.$().find("input, select, textarea").first().trigger("focus").trigger("select")},n.hide=function(){this.attrs.animateHide()},n.loaded=function(){this.loading=!1,m.redraw()},n.onerror=function(t){var e;this.alertAttrs=t.alert,m.redraw(),422===t.status&&null!=(e=t.response)&&e.errors?this.$("form [name="+t.response.errors[0].source.pointer.replace("/data/attributes/","")+"]").trigger("select"):this.onready()},F(e,[{key:"dismissibleOptions",get:function(){return this.constructor.dismissibleOptions}}],[{key:"dismissibleOptions",get:function(){return this.isDismissible?{isDismissible:!0,viaCloseButton:this.isDismissibleViaCloseButton,viaEscKey:this.isDismissibleViaEscKey,viaBackdropClick:this.isDismissibleViaBackdropClick}:{isDismissible:!1,viaCloseButton:!1,viaEscKey:!1,viaBackdropClick:!1}}}]),e}(E);_t.isDismissible=!0,_t.isDismissibleViaCloseButton=!0,_t.isDismissibleViaEscKey=!0,_t.isDismissibleViaBackdropClick=!0;var Pt=n(30);const Bt=n.n(Pt)();var It=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}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.email=Bt(this.attrs.email||"")},n.className=function(){return"ForgotPasswordModal Modal--small"},n.title=function(){return Wi.translator.trans("core.forum.forgot_password.title")},n.content=function(){return this.success?m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},Wi.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)},Wi.translator.trans("core.forum.forgot_password.dismiss_button"))))):m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},Wi.translator.trans("core.forum.forgot_password.text")),this.fields().toArray()))},n.fields=function(){var t=new B,e=ot(Wi.translator.trans("core.forum.forgot_password.email_placeholder"));return t.add("email",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"email",type:"email",placeholder:e,"aria-label":e,bidi:this.email,disabled:this.loading})),50),t.add("submit",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Wi.translator.trans("core.forum.forgot_password.submit_button"))),-10),t},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0,Wi.request({method:"POST",url:Wi.forum.attribute("apiUrl")+"/forgot",body:this.requestParams(),errorHandler:this.onerror.bind(this)}).then((function(){e.success=!0,e.alertAttrs=null})).catch((function(){})).then(this.loaded.bind(this))},n.requestParams=function(){return{email:this.email()}},n.onerror=function(e){404===e.status&&e.alert&&(e.alert.content=Wi.translator.trans("core.forum.forgot_password.not_found_message")),t.prototype.onerror.call(this,e)},e}(_t),Ot=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){return m("div",{className:"LogInButtons"},this.items().toArray())},n.items=function(){return new B},e}(E),Lt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).username=void 0,e.email=void 0,e.password=void 0,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.username=Bt(this.attrs.username||""),this.email=Bt(this.attrs.email||""),this.password=Bt(this.attrs.password||"")},n.className=function(){return"Modal--small SignUpModal"},n.title=function(){return Wi.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(Ot,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]},n.fields=function(){var t=new B,e=ot(Wi.translator.trans("core.forum.sign_up.username_placeholder")),n=ot(Wi.translator.trans("core.forum.sign_up.email_placeholder")),r=ot(Wi.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},Wi.translator.trans("core.forum.sign_up.submit_button"))),-10),t},n.footer=function(){return[m("p",{className:"SignUpModal-logIn"},Wi.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()};Wi.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();Wi.request({url:Wi.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 D({username:this.username(),email:this.email()},t)},e}(_t),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}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.identification=Bt(this.attrs.identification||""),this.password=Bt(this.attrs.password||""),this.remember=Bt(!!this.attrs.remember)},n.className=function(){return"LogInModal Modal--small"},n.title=function(){return Wi.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(Ot,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]},n.fields=function(){var t=new B,e=ot(Wi.translator.trans("core.forum.log_in.username_or_email_placeholder")),n=ot(Wi.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}),Wi.translator.trans("core.forum.log_in.remember_me_label")))),10),t.add("submit",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Wi.translator.trans("core.forum.log_in.submit_button"))),-10),t},n.footer=function(){return m("[",null,m("p",{className:"LogInModal-forgotPassword"},m("a",{onclick:this.forgotPassword.bind(this)},Wi.translator.trans("core.forum.log_in.forgot_password_link"))),Wi.forum.attribute("allowSignUp")&&m("p",{className:"LogInModal-signUp"},Wi.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;Wi.modal.show(It,e)},n.signUp=function(){var t,e=this.identification(),n=((t={})[e.includes("@")?"email":"username"]=e,t);Wi.modal.show(Lt,n)},n.onready=function(){this.$("[name="+(this.identification()?"password":"identification")+"]").trigger("select")},n.onsubmit=function(t){t.preventDefault(),this.loading=!0,Wi.session.login(this.loginParams(),{errorHandler:this.onerror.bind(this)}).then((function(){return window.location.reload()}),this.loaded.bind(this))},n.loginParams=function(){return{identification:this.identification(),password:this.password(),remember:this.remember()}},n.onerror=function(e){401===e.status&&e.alert&&(e.alert.content=Wi.translator.trans("core.forum.log_in.invalid_login_message"),this.password("")),t.prototype.onerror.call(this,e)},e}(_t),$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).discussion=void 0,e.currentTitle=void 0,e.newTitle=void 0,e}w(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=Bt(this.currentTitle)},n.className=function(){return"RenameDiscussionModal Modal--small"},n.title=function(){return Wi.translator.trans("core.forum.rename_discussion.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("input",{className:"FormControl",bidi:this.newTitle,type:"text"})),m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Wi.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(){Wi.viewingDiscussion(e.discussion)&&Wi.current.get("stream").update(),m.redraw(),e.hide()})).catch((function(){e.loading=!1,m.redraw()}));this.hide()},e}(_t);const jt={controls:function(t,e){var n=this,r=new B;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(O,null)))})),r},userControls:function(t,e){var n=this,r=new B;return e instanceof ae&&r.add("reply",!Wi.session.user||t.canReply()?m(yt,{icon:"fas fa-reply",onclick:function(){return n.replyAction.bind(t)(!0,!1).catch((function(){}))}},Wi.translator.trans(Wi.session.user?"core.forum.discussion_controls.reply_button":"core.forum.discussion_controls.log_in_to_reply_button")):m(yt,{icon:"fas fa-reply",className:"disabled",title:ot(Wi.translator.trans("core.forum.discussion_controls.cannot_reply_text"))},Wi.translator.trans("core.forum.discussion_controls.cannot_reply_button"))),r},moderationControls:function(t){var e=new B;return t.canRename()&&e.add("rename",m(yt,{icon:"fas fa-pencil-alt",onclick:this.renameAction.bind(t)},Wi.translator.trans("core.forum.discussion_controls.rename_button"))),e},destructiveControls:function(t){var e=new B;return t.isHidden()?(t.canHide()&&e.add("restore",m(yt,{icon:"fas fa-reply",onclick:this.restoreAction.bind(t)},Wi.translator.trans("core.forum.discussion_controls.restore_button"))),t.canDelete()&&e.add("delete",m(yt,{icon:"fas fa-times",onclick:this.deleteAction.bind(t)},Wi.translator.trans("core.forum.discussion_controls.delete_forever_button")))):t.canHide()&&e.add("hide",m(yt,{icon:"far fa-trash-alt",onclick:this.hideAction.bind(t)},Wi.translator.trans("core.forum.discussion_controls.delete_button"))),e},replyAction:function(t,e){var n=this;return new Promise((function(r,i){return Wi.session.user?n.canReply()?(Wi.composer.composingReplyTo(n)&&!e||Wi.composer.load(Tt,{user:Wi.session.user,discussion:n}),Wi.composer.show(),t&&Wi.viewingDiscussion(n)&&!Wi.composer.isFullScreen()&&Wi.current.get("stream").goToNumber("reply"),r(Wi.composer)):i():(Wi.modal.show(Mt),i())}))},hideAction:function(){return this.pushData({attributes:{hiddenAt:new Date},relationships:{hiddenUser:Wi.session.user}}),this.save({isHidden:!0})},restoreAction:function(){return this.pushData({attributes:{hiddenAt:null},relationships:{hiddenUser:null}}),this.save({isHidden:!1})},deleteAction:function(){var t=this;if(confirm(ot(Wi.translator.trans("core.forum.discussion_controls.delete_confirmation"))))return Wi.viewingDiscussion(this)&&Wi.history.back(),this.delete().then((function(){return Wi.discussions.removeDiscussion(t)}))},renameAction:function(){return Wi.modal.show($t,{currentTitle:this.title(),discussion:this})}};function Rt(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 Ht=/[.*+?^${}()|[\]\\]/g;function Ut(t){return t.replace(Ht,"\\$&")}var qt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).subtree=void 0,e.highlightRegExp=void 0,e}w(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=Wi.session.user&&Wi.session.user.markedAllAsReadAt();return t&&t.getTime()}),(function(){return n.active()}))},n.elementAttrs=function(){return{className:M("DiscussionListItem",{active:this.active(),"DiscussionListItem--hidden":this.attrs.discussion.isHidden(),Slidable:"ontouchstart"in window})}},n.view=function(){var t=this.elementAttrs();return m("div",t,this.viewItems().toArray())},n.viewItems=function(){var t=new B,e=this.attrs.discussion,n=jt.controls(e,this).toArray();return t.add("controls",this.controlsView(n),100),t.add("slidableUnderneath",this.slidableUnderneathView(),90),t.add("content",this.contentView(),80),t},n.controlsView=function(t){return m("[",null,!!t.length&&m(ut,{icon:"fas fa-ellipsis-v",className:"DiscussionListItem-controls",buttonClassName:"Button Button--icon Button--flat Slidable-underneath Slidable-underneath--right",accessibleToggleLabel:Wi.translator.trans("core.forum.discussion_controls.toggle_dropdown_accessible_label")},t))},n.slidableUnderneathView=function(){var t=this.attrs.discussion.isUnread();return m("span",{className:M("Slidable-underneath Slidable-underneath--left Slidable-underneath--elastic",{disabled:!t}),onclick:this.markAsRead.bind(this)},nt("fas fa-check"))},n.contentView=function(){var t=this.attrs.discussion,e=t.isUnread(),n=t.isRead();return m("div",{className:M("DiscussionListItem-content","Slidable-content",{unread:e,read:n})},this.contentItems().toArray())},n.contentItems=function(){var t=new B;return t.add("authorAvatar",this.authorAvatarView(),100),t.add("badges",this.badgesView(),90),t.add("main",this.mainView(),80),t.add("replyCount",this.replyCountItem(),70),t},n.authorAvatarView=function(){var t=this.attrs.discussion,e=t.user();return m(Et,{text:Wi.translator.trans("core.forum.discussion_list.started_text",{user:e,ago:st(t.createdAt())}),position:"right"},m(G,{className:"DiscussionListItem-author",href:e?Wi.route.user(e):"#"},Y(e||null,{title:""})))},n.badgesView=function(){var t=this.attrs.discussion;return m("ul",{className:"DiscussionListItem-badges badges"},H(t.badges().toArray()))},n.mainView=function(){var t=this.attrs.discussion,e=this.getJumpTo();return m(G,{href:Wi.route.discussion(t,e),className:"DiscussionListItem-main"},this.mainItems().toArray())},n.mainItems=function(){var t=new B,e=this.attrs.discussion;return t.add("title",m("h2",{className:"DiscussionListItem-title"},et(e.title(),this.highlightRegExp)),100),t.add("info",m("ul",{className:"DiscussionListItem-info"},H(this.infoItems().toArray())),90),t},n.getJumpTo=function(){var t=this.attrs.discussion,e=0;if(this.attrs.params.q){var n=t.mostRelevantPost();n&&(e=n.number());var r=Ut(this.attrs.params.q);this.highlightRegExp=new RegExp(r+"|"+r.trim().replace(/\s+/g,"|"),"gi")}else{var i;e=Math.min(null!=(i=t.lastPostNumber())?i:0,(t.lastReadPostNumber()||0)+1)}return e},n.oncreate=function(e){if(t.prototype.oncreate.call(this,e),"ontouchstart"in window){var n=Rt(this.element);this.$(".DiscussionListItem-controls").on("hidden.bs.dropdown",(function(){return n.reset()}))}},n.onbeforeupdate=function(e){return t.prototype.onbeforeupdate.call(this,e),this.subtree.needsRebuild()},n.active=function(){return Wi.current.matches(ae,{discussion:this.attrs.discussion})},n.showFirstPost=function(){var t;return["newest","oldest"].includes(null!=(t=this.attrs.params.sort)?t:"")},n.showRepliesCount=function(){return"replies"===this.attrs.params.sort},n.markAsRead=function(){var t=this.attrs.discussion;t.isUnread()&&(t.save({lastReadPostNumber:t.lastPostNumber()}),m.redraw())},n.infoItems=function(){var t=new B;if(this.attrs.params.q){var e=this.attrs.discussion.mostRelevantPost()||this.attrs.discussion.firstPost();if(e&&"comment"===e.contentType()){var n,r=et(null!=(n=e.contentPlain())?n:"",this.highlightRegExp,175);t.add("excerpt",r,-100)}}else t.add("terminalPost",m(ct,{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",{className:"visually-hidden"},Wi.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",{className:"visually-hidden"},Wi.translator.trans("core.forum.discussion_list.total_replies_a11y_label",{count:t.replyCount()})))},e}(E),zt=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(){return m("div",{className:"Placeholder"},m("p",null,this.attrs.text))},e}(E),Vt=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(){var t,e=this.attrs.state,n=e.getParams(),r=e.isInitialLoading()||e.isLoadingNext();if(r?t=m(ft,null):e.hasNext()&&(t=m(yt,{className:"Button",onclick:e.loadNext.bind(e)},Wi.translator.trans("core.forum.discussion_list.load_more_button"))),e.isEmpty()){var i=Wi.translator.trans("core.forum.discussion_list.empty_text");return m("div",{className:"DiscussionList"},m(zt,{text:i}))}var o=e.pageSize;return m("div",{className:M("DiscussionList",{"DiscussionList--searchResults":e.isSearchResults()})},m("ul",{role:"feed","aria-busy":r,className:"DiscussionList-discussions"},e.getPages().map((function(t,e){return t.items.map((function(t,r){return m("li",{key:t.id(),"data-id":t.id(),role:"article","aria-setsize":"-1","aria-posinset":e*o+r},m(qt,{discussion:t,params:n}))}))}))),m("div",{className:"DiscussionList-loadMore"},t))},e}(E),Wt=function(t){t.pageX<10&&Wi.pane.show()},Gt=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){if(this.attrs.state.hasItems())return m("aside",{className:"DiscussionPage-list"},this.enoughSpace()&&m(Vt,{state:this.attrs.state}))},n.oncreate=function(e){t.prototype.oncreate.call(this,e);var n=$(e.dom),r=Wi.pane;if(n.hover(r.show.bind(r),r.onmouseleave.bind(r)),$(document).on("mousemove",Wt),Wi.previous.matches(ae)){var i=Wi.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){Wi.cache.discussionListPaneScrollTop=$(t.dom).scrollTop(),$(document).off("mousemove",Wt)},n.enoughSpace=function(){return!$(".App-navigation").is(":visible")},e}(E),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 w(e,t),e.prototype.view=function(){return m("div",{className:"Post CommentPost LoadingPost"},m("header",{className:"Post-header"},Y(null,{className:"PostUser-avatar"}),m("div",{className:"fakeText"})),m("div",{className:"Post-body"},m("div",{className:"fakeText"}),m("div",{className:"fakeText"}),m("div",{className:"fakeText"})))},e}(E);function Xt(t){var e=t&&t.displayName()||v.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}w(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}(E),Qt=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){var t=this;return Wi.composer.composingReplyTo(this.attrs.discussion)?m("article",{className:"Post CommentPost editing","aria-busy":"true"},m("header",{className:"Post-header"},m("div",{className:"PostUser"},m("h3",{className:"PostUser-name"},Y(Wi.session.user,{className:"PostUser-avatar"}),Xt(Wi.session.user)),m("ul",{className:"PostUser-badges badges"},H(Wi.session.user.badges().toArray())))),m(Jt,{className:"Post-body",composer:Wi.composer,surround:this.anchorPreview.bind(this)})):m("button",{className:"Post ReplyPlaceholder",onclick:function(){jt.replyAction.call(t.attrs.discussion,!0).catch((function(){}))}},m("span",{className:"Post-header"},Y(Wi.session.user,{className:"PostUser-avatar"})," ",Wi.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}(E),Zt=function(t){function e(){return t.apply(this,arguments)||this}w(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=Wi.postComponents[n.contentType()];s=!!l&&m(l,{post:n}),a.key="post"+n.id(),a.oncreate=o,a["data-time"]=u.toISOString(),a["data-number"]=n.number(),a["data-id"]=n.id(),a["data-type"]=n.contentType();var c=u-t;c>3456e5&&(s=[m("div",{className:"PostStream-timeGap"},m("span",null,Wi.translator.trans("core.forum.post_stream.time_lapsed_text",{period:dayjs().add(c,"ms").fromNow(!0)}))),s]),t=u}else a.key="post"+i[e.stream.visibleStart+r],s=m(Kt,null);var d=m("div",Object.assign({className:"PostStream-item"},a),s);return 0===r&&e.afterFirstPostItems().toArray().length>0?m.fragment(D({},a),[d,m("div",{className:"PostStream-item PostStream-afterFirstPost",key:"afterFirstPost"},e.afterFirstPostItems().toArray())]):d}));return!n&&r[this.stream.visibleEnd-this.stream.visibleStart-1]&&s.push(m("div",{className:"PostStream-loadMore",key:"loadMore"},m(yt,{className:"Button",onclick:this.stream.loadNext.bind(this.stream)},Wi.translator.trans("core.forum.post_stream.load_more_button")))),n&&s.push.apply(s,this.endItems().toArray()),!n||Wi.session.user&&!this.discussion.canReply()||s.push(m("div",{className:"PostStream-item",key:"reply","data-index":this.stream.count(),oncreate:o},m(Qt,{discussion:this.discussion}))),m("div",{className:"PostStream",role:"feed","aria-live":"off","aria-busy":this.stream.pagesLoading?"true":"false"},s)},n.afterFirstPostItems=function(){return new B},n.endItems=function(){return new B},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(ot(Wi.translator.trans("core.lib.datetime_formats.scrubber"))))},n.calculatePosition=function(t){void 0===t&&(t=window.pageYOffset);var e,n,r=this.getMarginTop(),i=$(window),o=i.height()-r,s=i.scrollTop()+r,a=t+r;this.$(".PostStream-item").each((function(){var t=$(this),r=t.offset().top,i=t.outerHeight(!0),u=Math.max(0,a-r);if(void 0===e&&(u/i<.75||(i-u)/o>.25)&&(e=t.data("number")),r+i>s){if(!(r+i<s+o))return!1;t.data("number")&&(n=t.data("number"))}})),e&&this.attrs.onPositionChange(e||1,n,e)},n.getMarginTop=function(){var t="phone"===Wi.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()+Wi.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()+Wi.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}(E);function te(t,e){return void 0===e&&(e=v.data.locale),new Intl.NumberFormat(e).format(t)}var ee=function(t){function e(){return t.apply(this,arguments)||this}w(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=Wi.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+"%",opacity:r?1:0};t.state.oldStyle?e.stop(!0).css(t.state.oldStyle).animate(n):e.css(n),t.state.oldStyle=n}var o=["PostStreamScrubber","Dropdown"];return this.attrs.className&&o.push(this.attrs.className),m("div",{className:o.join(" ")},m("button",{className:"Button Dropdown-toggle","data-toggle":"dropdown"},e," ",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")," ",this.firstPostLabel()),m("div",{className:"Scrubber-scrollbar"},m("div",{className:"Scrubber-before"}),m("div",{className:"Scrubber-handle"},m("div",{className:"Scrubber-bar"}),m("div",{className:"Scrubber-info"},m("strong",null,e),m("span",{className:"Scrubber-description"}))),m("div",{className:"Scrubber-after"}),m("div",{className:"Scrubber-unread",oncreate:i,onupdate:i},this.unreadLabel(n))),m("a",{className:"Scrubber-last",onclick:this.goToLast.bind(this)},nt("fas fa-angle-double-down")," ",this.lastPostLabel()))))},n.firstPostLabel=function(){return Wi.translator.trans("core.forum.post_scrubber.original_post_link")},n.unreadLabel=function(t){return Wi.translator.trans("core.forum.post_scrubber.unread_text",{count:t})},n.lastPostLabel=function(){return Wi.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}(E),ne=function(t){function e(){return t.apply(this,arguments)||this}w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=M(e.className,"Dropdown--split"),e.menuClassName=M(e.menuClassName,"Dropdown-menu--right")};var n=e.prototype;return n.getButton=function(t){var e=this.getFirstChild(t),n=Object.assign({},null==e?void 0:e.attrs);return n.className=M(n.className,"SplitDropdown-button Button",this.attrs.buttonClassName),m("[",null,m(yt,n,e.children),m("button",{className:"Dropdown-toggle Button Button--icon "+this.attrs.buttonClassName,"aria-haspopup":"menu","aria-label":this.attrs.accessibleToggleLabel,"data-toggle":"dropdown"},this.attrs.icon?nt(this.attrs.icon,{className:"Button-icon"}):null,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=void 0,this.paused=!1,this.loadPageTimeouts={},this.pagesLoading=0,this.index=0,this.number=1,this.visible=1,this.visibleStart=0,this.visibleEnd=0,this.animateScroll=!1,this.needsScroll=!1,this.targetPost=null,this.description="",this.forceUpdateScrubber=!1,this.loadPromise=null,this.loadNext=void 0,this.loadPrevious=void 0,this.discussion=t,this.loadNext=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=D({},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(),Wi.store.find("posts",{filter:{discussion:this.discussion.id()},page:{near:t}}).then(this.show.bind(this)))},e.loadNearIndex=function(e){if(e>=this.visibleStart&&e<this.visibleEnd)return Promise.resolve();var n=this.sanitizeIndex(e-t.loadCount/2),r=n+t.loadCount;return this.reset(n,r),this.loadRange(n,r).then(this.show.bind(this))},e._loadNext=function(){var e=this.visibleEnd,n=this.visibleEnd=this.sanitizeIndex(this.visibleEnd+t.loadCount),r=e-2*t.loadCount;r>this.visibleStart&&r>=0&&(this.visibleStart=r+t.loadCount+1,this.loadPageTimeouts[r]&&(clearTimeout(this.loadPageTimeouts[r]),delete this.loadPageTimeouts[r],this.pagesLoading--)),this.loadPage(e,n)},e._loadPrevious=function(){var e=this.visibleStart,n=this.visibleStart=this.sanitizeIndex(this.visibleStart-t.loadCount),r=n+2*t.loadCount;r<this.visibleEnd&&r<=this.count()&&(this.visibleEnd=r,this.loadPageTimeouts[r]&&(clearTimeout(this.loadPageTimeouts[r]),delete this.loadPageTimeouts[r],this.pagesLoading--)),this.loadPage(n,e,!0)},e.loadPage=function(t,e,n){var r=this;void 0===n&&(n=!1),this.pagesLoading++;var i=function(){t<r.visibleStart||e>r.visibleEnd||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--})),delete r.loadPageTimeouts[t]}),this.pagesLoading-1?1e3:0)},e.loadRange=function(t,e){var n=[],r=[];return this.discussion.postIds().slice(t,e).forEach((function(t){var e=Wi.store.getById("posts",t);e&&e.discussion()&&void 0!==e.canEdit()?r.push(e):n.push(t)})),n.length?Wi.store.find("posts",n).then((function(t){return r.concat(t).sort((function(t,e){return t.number()-e.number()}))})):Promise.resolve(r)},e.show=function(t){var e;this.visibleStart=t.length?this.discussion.postIds().indexOf(null!=(e=t[0].id())?e:"0"):0,this.visibleEnd=this.sanitizeIndex(this.visibleStart+t.length)},e.reset=function(e,n){this.visibleStart=e||0,this.visibleEnd=this.sanitizeIndex(n||t.loadCount)},e.posts=function(){return this.discussion.postIds().slice(this.visibleStart,this.visibleEnd).map((function(t){var e=Wi.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;var ae=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}w(e,t);var n=e.prototype;return n.oninit=function(e){var n,r;t.prototype.oninit.call(this,e),this.load(),(Wi.discussions.hasItems()||Wi.discussions.isLoading())&&(null==(n=Wi.pane)||n.enable(),null==(r=Wi.pane)||r.hide()),this.bodyClass="App--discussion"},n.onremove=function(e){var n,r,i;t.prototype.onremove.call(this,e),null==(n=Wi.pane)||n.disable(),!this.discussion||!Wi.composer.composingReplyTo(this.discussion)||null!=(r=Wi.composer)&&null!=(i=r.fields)&&i.content()?Wi.composer.minimize():Wi.composer.hide()},n.view=function(){return m("div",{className:"DiscussionPage"},this.viewItems().toArray())},n.viewItems=function(){var t=new B;return t.add("pane",m(Gt,{state:Wi.discussions}),100),t.add("discussions",m("div",{className:"DiscussionPage-discussion"},this.discussion?this.pageContent().toArray():this.loadingItems().toArray()),90),t},n.loadingItems=function(){var t=new B;return t.add("spinner",m(ft,null),100),t},n.sidebar=function(){return m("nav",{className:"DiscussionPage-nav"},m("ul",null,H(this.sidebarItems().toArray())))},n.hero=function(){return m(U,{discussion:this.discussion})},n.pageContent=function(){var t=new B;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 B;return t.add("sidebar",this.sidebar(),100),t.add("poststream",m("div",{className:"DiscussionPage-stream"},m(Zt,{discussion:this.discussion,stream:this.stream,onPositionChange:this.positionChanged.bind(this)})),10),t},n.load=function(){var t=Wi.preloadedApiDocument();if(t)setTimeout(this.show.bind(this,t),0);else{var e=this.requestParams();Wi.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;Wi.history.push("discussion",t.title()),Wi.setTitle(t.title()),Wi.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 Wi.store.getById("posts",t.id)})).sort((function(t,e){return t.number()-e.number()})).slice(0,20)}this.stream=new se(t,i);var s=m.route.param("near"),a="reply"===s?"reply":parseInt(s);this.stream.goToNumber(a||(null!=(e=null==(n=i[0])?void 0:n.number())?e:0),!0).then((function(){r.discussion=t,Wi.current.set("discussion",t),Wi.current.set("stream",r.stream)}))},n.sidebarItems=function(){var t=new B;return this.discussion&&t.add("controls",m(ne,{icon:"fas fa-ellipsis-v",className:"App-primaryControl",buttonClassName:"Button--primary",accessibleToggleLabel:Wi.translator.trans("core.forum.discussion_controls.toggle_dropdown_accessible_label")},jt.controls(this.discussion,this).toArray()),100),t.add("scrubber",m(ee,{stream:this.stream,className:"App-titleControl"}),-100),t},n.positionChanged=function(t,e){var n=this.discussion;if(n){var r=Wi.route.discussion(n,this.near=t);window.history.replaceState(null,document.title,r),Wi.history.push("discussion",n.title()),Wi.session.user&&e>(n.lastReadPostNumber()||0)&&(n.save({lastReadPostNumber:e}),m.redraw())}},e}(S),ue=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},H(this.items().toArray()))},n.items=function(){return new B},e}(E),le=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.active=this.isActive(e),void 0===e.force&&(e.force=!0)},e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return n.tag=G,n.attrs.active=String(n.attrs.active),delete n.attrs.type,n},e.isActive=function(t){var e,n;return void 0!==t.active?t.active:(null==(e=m.route.get())?void 0:e.split("?")[0])===(null==(n=t.href)?void 0:n.split("?")[0])},e}(yt),ce=function(t){function e(){return t.apply(this,arguments)||this}w(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=ot(Wi.translator.trans("core.forum.header.session_dropdown_accessible_label"))};var n=e.prototype;return n.view=function(e){return t.prototype.view.call(this,D({},e,{children:this.items().toArray()}))},n.getButtonContent=function(){var t=Wi.session.user;return[Y(t)," ",m("span",{className:"Button-label"},Xt(t))]},n.items=function(){var t=new B,e=Wi.session.user;return t.add("profile",m(le,{icon:"fas fa-user",href:Wi.route.user(e)},Wi.translator.trans("core.forum.header.profile_button")),100),t.add("settings",m(le,{icon:"fas fa-cog",href:Wi.route("settings")},Wi.translator.trans("core.forum.header.settings_button")),50),Wi.forum.attribute("adminUrl")&&t.add("administration",m(le,{icon:"fas fa-wrench",href:Wi.forum.attribute("adminUrl"),target:"_blank"},Wi.translator.trans("core.forum.header.admin_button")),0),t.add("separator",m(O,null),-90),t.add("logOut",m(yt,{icon:"fas fa-sign-out-alt",onclick:Wi.session.logout.bind(Wi.session)},Wi.translator.trans("core.forum.header.log_out_button")),-100),t},e}(ut);function de(t){if(!t||"object"!=typeof t||t instanceof Array)return!1;var e=t.tag;return("string"!=typeof e||"a"===e||"button"===e)&&("object"!=typeof e&&"function"!=typeof e||!("initAttrs"in e)||e.initAttrs(t.attrs),"object"!=typeof e&&"function"!=typeof e||!("isActive"in e)?t.attrs.active:e.isActive(t.attrs))}var he=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.initAttrs=function(e){null!=e.caretIcon||(e.caretIcon="fas fa-sort"),t.initAttrs.call(this,e),e.className=M(e.className,"Dropdown--select")},e.prototype.getButtonContent=function(t){var e=t.find(de),n=e&&"object"==typeof e&&"children"in e&&e.children||this.attrs.defaultLabel;return Array.isArray(n)&&(n=n[0]),[m("span",{className:"Button-label"},n),this.attrs.caretIcon?nt(this.attrs.caretIcon,{className:"Button-caret"}):null]},e}(ut),fe=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=v.store),this.data={},this.freshness=new Date,this.exists=!1,this.store=void 0,this.data=t,this.store=e}var e=t.prototype;return e.id=function(){return"id"in this.data?this.data.id:void 0},e.attribute=function(t){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){if("id"in e&&(this.data.id=e.id),"type"in e&&(this.data.type=e.type),"attributes"in e){var n;for(var r in(n=this.data).attributes||(n.attributes={}),e.attributes){var i=e.attributes[r];i&&i instanceof t&&(vt("Providing models as attributes to `Model.pushData()` or `Model.pushAttributes()` is deprecated.","3249"),delete e.attributes[r],e.relationships||(e.relationships={}),e.relationships[r]={data:t.getIdentifier(i)})}Object.assign(this.data.attributes,e.attributes)}if("relationships"in e){var o,s=null!=(o=this.data.relationships)?o:{};for(var a in e.relationships){var u=e.relationships[a];if(null!==u){var l;l=u instanceof t?{data:t.getIdentifier(u)}:u instanceof Array?{data:u.map(t.getIdentifier)}:u,e.relationships[a]=l,s[a]=l}else delete s[a],delete e.relationships[a]}this.data.relationships=s}return this.freshness=new Date,this},e.pushAttributes=function(t){this.pushData({attributes:t})},e.save=function(e,n){var r=this;void 0===n&&(n={});var i={type:this.data.type,attributes:e};if("id"in this.data&&(i.id=this.data.id),e.relationships){for(var o in i.relationships={},e.relationships){var s=e.relationships[o];null!==s&&(i.relationships[o]={data:s instanceof Array?s.map(t.getIdentifier):t.getIdentifier(s)})}delete e.relationships}var a=this.copyData();this.pushData(i);var u={data:i,meta:n.meta||void 0};return v.request(D({method:this.exists?"PATCH":"POST",url:v.forum.attribute("apiUrl")+this.apiEndpoint(),body:u},n)).then((function(t){return r.store.pushPayload(t)}),(function(t){throw r.pushData(a),m.redraw(),t}))},e.delete=function(t,e){var n=this;return void 0===t&&(t={}),void 0===e&&(e={}),this.exists?v.request(D({method:"DELETE",url:v.forum.attribute("apiUrl")+this.apiEndpoint(),body:t},e)).then((function(){n.exists=!1,n.store.remove(n)})):Promise.resolve()},e.apiEndpoint=function(){return"/"+this.data.type+("id"in this.data?"/"+this.data.id:"")},e.copyData=function(){return JSON.parse(JSON.stringify(this.data))},e.rawRelationship=function(t){var e,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 pe(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i=e.slice(0,-1),o=e.slice(-1)[0],s={};return function(){var t=this,e=!1;return i.forEach((function(n){var r=t[n],i="function"==typeof r?r.call(t):r;s[n]!==i&&(e=!0,s[n]=i)})),e&&(r=o.apply(this,i.map((function(t){return s[t]})))),r}}function me(t){if(!t||t.length<4)return!1;var e=t.replace("#","");return 3===e.length&&(e+=e),(299*parseInt(e.slice(0,2),16)+587*parseInt(e.slice(2,4),16)+114*parseInt(e.slice(4,6),16))/1e3<(parseInt(getComputedStyle(document.body).getPropertyValue("--yiq-threshold").trim())||128)}function ve(t){return t?me(t)?"text-contrast--light":"text-contrast--dark":"text-contrast--unchanged"}var ge,ye=["type","icon","label","color","style"],be=function(t){function e(){return t.apply(this,arguments)||this}return w(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=q(t,ye),u=M("Badge",[e&&"Badge--"+e],a.className,ve(i)),l=n?nt(n,{className:"Badge-icon"}):m.trust("&nbsp;"),c=D({},s,{"--badge-bg":i}),d=D({},a,{className:u,style:c}),h=m("div",d,l);return r?m(Et,{text:r},h):h},e}(E),we=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.title=function(){return fe.attribute("title").call(this)},n.slug=function(){return fe.attribute("slug").call(this)},n.createdAt=function(){return fe.attribute("createdAt",fe.transformDate).call(this)},n.user=function(){return fe.hasOne("user").call(this)},n.firstPost=function(){return fe.hasOne("firstPost").call(this)},n.lastPostedAt=function(){return fe.attribute("lastPostedAt",fe.transformDate).call(this)},n.lastPostedUser=function(){return fe.hasOne("lastPostedUser").call(this)},n.lastPost=function(){return fe.hasOne("lastPost").call(this)},n.lastPostNumber=function(){return fe.attribute("lastPostNumber").call(this)},n.commentCount=function(){return fe.attribute("commentCount").call(this)},n.replyCount=function(){return pe("commentCount",(function(t){var e;return Math.max(0,(null!=(e=t)?e:0)-1)})).call(this)},n.posts=function(){return fe.hasMany("posts").call(this)},n.mostRelevantPost=function(){return fe.hasOne("mostRelevantPost").call(this)},n.lastReadAt=function(){return fe.attribute("lastReadAt",fe.transformDate).call(this)},n.lastReadPostNumber=function(){return fe.attribute("lastReadPostNumber").call(this)},n.isUnread=function(){return pe("unreadCount",(function(t){return!!t})).call(this)},n.isRead=function(){return pe("unreadCount",(function(t){return!(!v.session.user||t)})).call(this)},n.hiddenAt=function(){return fe.attribute("hiddenAt",fe.transformDate).call(this)},n.hiddenUser=function(){return fe.hasOne("hiddenUser").call(this)},n.isHidden=function(){return pe("hiddenAt",(function(t){return!!t})).call(this)},n.canReply=function(){return fe.attribute("canReply").call(this)},n.canRename=function(){return fe.attribute("canRename").call(this)},n.canHide=function(){return fe.attribute("canHide").call(this)},n.canDelete=function(){return fe.attribute("canDelete").call(this)},n.removePost=function(t){var e=this.rawRelationship("posts");e&&e.some((function(n,r){return t===n.id&&(e.splice(r,1),!0)}))},n.unreadCount=function(){var t,e,n,r=v.session.user;if(r&&(null!=(t=null==(e=r.markedAllAsReadAt())?void 0:e.getTime())?t:0)<(null==(n=this.lastPostedAt())?void 0:n.getTime())){var i,o,s=Math.max(0,(null!=(i=this.lastPostNumber())?i:0)-(this.lastReadPostNumber()||0));return Math.min(s,null!=(o=this.commentCount())?o:0)}return 0},n.badges=function(){var t=new B;return this.isHidden()&&t.add("hidden",m(be,{type:"hidden",icon:"fas fa-trash",label:v.translator.trans("core.lib.badge.hidden_tooltip")})),t},n.postIds=function(){var t,e;return null!=(t=null==(e=this.rawRelationship("posts"))?void 0:e.map((function(t){return t.id})))?t:[]},e}(fe),De=function(t){function e(){return t.apply(this,arguments)||this}w(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"},Wi.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 B,e=this.attrs.state;return t.add("mark_all_as_read",m(Et,{text:Wi.translator.trans("core.forum.notifications.mark_all_as_read_tooltip")},m(yt,{className:"Button Button--link","data-container":".NotificationList",icon:"fas fa-check",title:Wi.translator.trans("core.forum.notifications.mark_all_as_read_tooltip"),onclick:e.markAllAsRead.bind(e)})),70),t.add("delete_all",m(Et,{text:Wi.translator.trans("core.forum.notifications.delete_all_tooltip")},m(yt,{className:"Button Button--link","data-container":".NotificationList",icon:"fas fa-trash-alt",title:Wi.translator.trans("core.forum.notifications.delete_all_tooltip"),onclick:function(){confirm(Wi.translator.trans("core.forum.notifications.delete_all_confirm"))&&e.deleteAll.call(e)}})),50),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 we?i=r:r&&r.discussion&&(i=r.discussion());var o=i?i.id():0;n[o]=n[o]||{discussion:i,notifications:[]},n[o].notifications.push(t),-1===e.indexOf(n[o])&&e.push(n[o])}})),e.map((function(t){var e=t.discussion&&t.discussion.badges().toArray();return m("div",{className:"NotificationGroup"},t.discussion?m(G,{className:"NotificationGroup-header",href:Wi.route.discussion(t.discussion)},e&&!!e.length&&m("ul",{className:"NotificationGroup-badges badges"},H(e)),m("span",null,t.discussion.title())):m("div",{className:"NotificationGroup-header"},Wi.forum.attribute("title")),m("ul",{className:"NotificationGroup-content"},t.notifications.map((function(t){var e=Wi.notificationComponents[t.contentType()];return!!e&&m("li",null,m(e,{notification:t}))}))))}))})):m("div",{className:"NotificationList-empty"},Wi.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}(E),xe=function(t){function e(){return t.apply(this,arguments)||this}w(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=ot(Wi.translator.trans("core.forum.notifications.tooltip"))),e.icon||(e.icon="fas fa-bell"),e.accessibleToggleLabel||(e.accessibleToggleLabel=ot(Wi.translator.trans("core.forum.notifications.toggle_dropdown_accessible_label"))),t.initAttrs.call(this,e)};var n=e.prototype;return n.getButton=function(e){var n=this.getNewCount(),r=t.prototype.getButton.call(this,e);return r.attrs.title=this.attrs.label,r.attrs.className=M(r.attrs.className,[n&&"new"]),r.attrs.onclick=this.onclick.bind(this),r},n.getButtonContent=function(){var t=this.getUnreadCount();return[this.attrs.icon?nt(this.attrs.icon,{className:"Button-icon"}):null,0!==t&&m("span",{className:"NotificationsDropdown-unread"},t),m("span",{className:"Button-label"},this.attrs.label)]},n.getMenu=function(){return m("div",{className:M("Dropdown-menu",this.attrs.menuClassName),onclick:this.menuClick.bind(this)},this.showing&&m(De,{state:this.attrs.state}))},n.onclick=function(){Wi.drawer.isOpen()?this.goToRoute():this.attrs.state.load()},n.goToRoute=function(){m.route.set(Wi.route("notifications"))},n.getUnreadCount=function(){return Wi.session.user.unreadNotificationCount()},n.getNewCount=function(){return Wi.session.user.newNotificationCount()},n.menuClick=function(t){(t.shiftKey||t.metaKey||t.ctrlKey||1===t.button)&&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"}(ge||(ge={}));var Ce=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(ge.ArrowUp,(function(e){e.preventDefault(),t(e)})),this},e.onDown=function(t){return this.callbacks.set(ge.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(ge.Tab,n),this.callbacks.set(ge.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(ge.Escape,(function(e){e.stopPropagation(),e.preventDefault(),t(e)})),this},e.onRemove=function(t){return this.callbacks.set(ge.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 Ae(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 Ee(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function s(t){Ae(o,r,i,s,a,"next",t)}function a(t){Ae(o,r,i,s,a,"throw",t)}s(void 0)}))}}var Ne=n(2507),ke=n.n(Ne),Se=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).query=void 0,e.discussion=void 0,e.mostRelevantPost=void 0,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.query=this.attrs.query,this.discussion=this.attrs.discussion,this.mostRelevantPost=this.attrs.mostRelevantPost},n.view=function(){return m("li",{className:"DiscussionSearchResult","data-index":"discussions"+this.discussion.id()},m(G,{href:Wi.route.discussion(this.discussion,this.mostRelevantPost&&this.mostRelevantPost.number()||0)},this.viewItems().toArray()))},n.discussionTitle=function(){return this.discussion.title()},n.mostRelevantPostContent=function(){var t;return null==(t=this.mostRelevantPost)?void 0:t.contentPlain()},n.viewItems=function(){var t,e=new B;return e.add("discussion-title",m("div",{className:"DiscussionSearchResult-title"},et(this.discussionTitle(),this.query)),90),this.mostRelevantPost&&e.add("most-relevant",m("div",{className:"DiscussionSearchResult-excerpt"},et(null!=(t=this.mostRelevantPostContent())?t:"",this.query,100)),80),e},e}(E),Te=function(){function t(){this.results=new Map,this.queryString=null}var e=t.prototype;return e.search=function(){var t=Ee(ke().mark((function t(e){var n,r=this;return ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=e.toLowerCase(),this.results.set(e,[]),this.setQueryString(e),n={filter:{q:this.queryString||e},page:{limit:this.limit()},include:this.includes().join(",")},t.abrupt("return",Wi.store.find("discussions",n).then((function(t){r.results.set(e,t),m.redraw()})));case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.view=function(t){t=t.toLowerCase(),this.setQueryString(t);var e=(this.results.get(t)||[]).map((function(e){var n=e.mostRelevantPost();return m(Se,{query:t,discussion:e,mostRelevantPost:n})}));return[m("li",{className:"Dropdown-header"},Wi.translator.trans("core.forum.search.discussions_heading")),m("li",null,m(le,{icon:"fas fa-search",href:Wi.route("index",{q:this.queryString})},Wi.translator.trans("core.forum.search.all_discussions_button",{query:t})))].concat(e)},e.includes=function(){return["mostRelevantPost"]},e.limit=function(){return 3},e.queryMutators=function(){return[]},e.setQueryString=function(t){this.queryString=t+" "+this.queryMutators().join(" ")},t}(),Fe=function(){function t(){this.results=new Map}var e=t.prototype;return e.search=function(){var t=Ee(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",Wi.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(Wi.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"},Wi.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(G,{href:Wi.route.user(e)},Y(e),D({},n,{text:void 0,children:r})))}))):[]},t}(),_e=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}w(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=ot(Wi.translator.trans("core.forum.header.search_placeholder")),r=!!e,i=!(!this.searchState.getValue()||!this.hasFocus),o=!(this.loadingSources||!this.searchState.getValue());return m("div",{role:"search","aria-label":Wi.translator.trans("core.forum.header.search_role_label"),className:M("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":Wi.translator.trans("core.forum.header.search_clear_button_accessible_label"),type:"button"},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 Ce,this.navigator.onUp((function(){return r.setIndex(r.getCurrentNumericIndex()-1,!0)})).onDown((function(){return r.setIndex(r.getCurrentNumericIndex()+1,!0)})).onSelect(this.selectResult.bind(this),!0).onCancel(this.clear.bind(this)).bindTo(s),s.on("input focus",(function(){var t=this.value.toLowerCase();t&&(i.searchTimeout&&clearTimeout(i.searchTimeout),i.searchTimeout=window.setTimeout((function(){var e;o.isCached(t)||(t.length>=i.constructor.MIN_SEARCH_LEN&&(null==(e=i.sources)||e.map((function(e){e.search&&(i.loadingSources++,e.search(t).then((function(){i.loadingSources=Math.max(0,i.loadingSources-1),m.redraw()})))}))),o.cache(t),m.redraw())}),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 B;return Wi.forum.attribute("canViewForum")&&t.add("discussions",new Te),Wi.forum.attribute("canSearchUsers")&&t.add("users",new Fe),t},n.selectableItems=function(){return this.$(".Search-results > li:not(.Dropdown-header)")},n.getCurrentNumericIndex=function(){return Math.max(0,this.selectableItems().index(this.getItem(this.index)))},n.getItem=function(t){var e=this.selectableItems(),n=e.filter('[data-index="'+t+'"]');return n.length||(n=e.eq(t)),n},n.setIndex=function(t,e){void 0===e&&(e=!1);var n=this.selectableItems(),r=n.parent(),i=t;t<0?i=n.length-1:t>=n.length&&(i=0);var o=n.removeClass("active").eq(i).addClass("active");if(this.index=parseInt(o.attr("data-index"))||i,e){var s,a=r.scrollTop(),u=r.offset().top,l=u+r.outerHeight(),c=o.offset().top,d=c+o.outerHeight();c<u?s=a-u+c-parseInt(r.css("padding-top"),10):d>l&&(s=a-l+d+parseInt(r.css("padding-bottom"),10)),void 0!==s&&r.stop(!0).animate({scrollTop:s},100)}},F(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}(E);_e.MIN_SEARCH_LEN=3;var Pe=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},H(this.items().toArray()))},n.items=function(){var t=new B;if(t.add("search",m(_e,{state:Wi.search}),30),Wi.forum.attribute("showLanguageSelector")&&Object.keys(Wi.data.locales).length>1){var e=[],n=function(t){e.push(m(yt,{active:Wi.data.locale===t,icon:Wi.data.locale!==t||"fas fa-check",onclick:function(){Wi.session.user?Wi.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())}},Wi.data.locales[t]))};for(var r in Wi.data.locales)n(r);t.add("locale",m(he,{buttonClassName:"Button Button--link",accessibleToggleLabel:Wi.translator.trans("core.forum.header.locale_dropdown_accessible_label")},e),20)}return Wi.session.user?(t.add("notifications",m(xe,{state:Wi.notifications}),10),t.add("session",m(ce,null),0)):(Wi.forum.attribute("allowSignUp")&&t.add("signUp",m(yt,{className:"Button Button--link",onclick:function(){return Wi.modal.show(Lt)}},Wi.translator.trans("core.forum.header.sign_up_link")),10),t.add("logIn",m(yt,{className:"Button Button--link",onclick:function(){return Wi.modal.show(Mt)}},Wi.translator.trans("core.forum.header.log_in_link")),0)),t},e}(E),Be=function(t){function e(){return t.apply(this,arguments)||this}return w(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:Bt("")},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={}),!!N(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"===Wi.screen()},e.composingReplyTo=function(t){return this.isVisible()&&this.bodyMatches(Tt,{discussion:t})},e.preventExit=function(){if(this.isVisible()&&this.onExit)return this.onExit.callback()?!confirm(this.onExit.message):void 0},e.preventClosingWhen=function(t,e){this.onExit={callback:t,message:e}},e.minimumHeight=function(){return 200},e.maximumHeight=function(){return $(window).height()-$("#header").outerHeight()},e.computedHeight=function(){return this.position===t.Position.MINIMIZED?"":this.position===t.Position.FULLSCREEN?$(window).height():Math.max(this.minimumHeight(),Math.min(this.height,this.maximumHeight()))},t}();Ie.Position={HIDDEN:"hidden",NORMAL:"normal",MINIMIZED:"minimized",FULLSCREEN:"fullScreen"};const Oe=Ie;var Le=function(t){function e(){return t.apply(this,arguments)||this}w(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,r=t.componentClass;return m("div",{className:"Composer "+M(e)},m("div",{className:"Composer-handle",oncreate:this.configHandle.bind(this)}),m("ul",{className:"Composer-controls"},H(this.controlItems().toArray())),m("div",{className:"Composer-content",onclick:n},r&&m(r,Object.assign({},t.attrs,{composer:this.state,disabled:e.minimized}))))},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.state.position===this.prevPosition?this.updateHeight():(this.animatePositionChange(),this.prevPosition=this.state.position)},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.initializeHeight(),this.$().hide().css("bottom",-this.state.computedHeight()),this.$().on("focus blur",":input,.TextEditor-editorContainer",(function(t){n.active="focusin"===t.type,m.redraw()})),this.$().on("keydown",":input,.TextEditor-editorContainer","esc",(function(){return n.state.close()})),this.handlers={},$(window).on("resize",this.handlers.onresize=this.updateHeight.bind(this)).resize(),$(document).on("mousemove",this.handlers.onmousemove=this.onmousemove.bind(this)).on("mouseup",this.handlers.onmouseup=this.onmouseup.bind(this))},n.onremove=function(e){t.prototype.onremove.call(this,e),$(window).off("resize",this.handlers.onresize),$(document).off("mousemove",this.handlers.onmousemove).off("mouseup",this.handlers.onmouseup)},n.configHandle=function(t){var e=this;$(t.dom).css("cursor","row-resize").bind("dragstart mousedown",(function(t){return t.preventDefault()})).mousedown((function(t){e.mouseStart=t.clientY,e.heightStart=e.$().height(),e.handle=$(this),$("body").css("cursor","row-resize")}))},n.onmousemove=function(t){if(this.handle){var e=this.mouseStart-t.clientY;this.changeHeight(this.heightStart+e);var n=$(window).scrollTop(),r=n>0&&n+$(window).height()>=$(document).height();this.updateBodyPadding(r)}},n.onmouseup=function(){this.handle&&(this.handle=null,$("body").css("cursor",""))},n.focus=function(){this.$(".Composer-content :input:enabled:visible, .TextEditor-editor").first().focus()},n.updateHeight=function(){var t=this.state.computedHeight(),e=this.$(".Composer-flexible");if(this.$().height(t),e.length){var n=e.offset().top-this.$().offset().top,r=parseInt(e.css("padding-bottom"),10),i=this.$(".Composer-footer").outerHeight(!0);e.height(this.$().outerHeight()-n-r-i)}},n.updateBodyPadding=function(){var t=this.state.position!==Oe.Position.HIDDEN&&this.state.position!==Oe.Position.MINIMIZED&&"phone"!==Wi.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"===Wi.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 B;return this.state.position===Oe.Position.FULLSCREEN?t.add("exitFullScreen",m(Be,{icon:"fas fa-compress",title:Wi.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",m(Be,{icon:"fas fa-minus minimize",title:Wi.translator.trans("core.forum.composer.minimize_tooltip"),onclick:this.state.minimize.bind(this.state),itemClassName:"App-backControl"})),t.add("fullScreen",m(Be,{icon:"fas fa-expand",title:Wi.translator.trans("core.forum.composer.full_screen_tooltip"),onclick:this.state.fullScreen.bind(this.state)}))),t.add("close",m(Be,{icon:"fas fa-times",title:Wi.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}(E),Me=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(t){var e,n,r,i,o,s=this,a=this.attrs.notification,u=null!=(e=null==(n=this.href)?void 0:n.call(this))?e:"",l=a.fromUser();return m(G,{className:M("Notification","Notification--"+a.contentType(),[!a.isRead()&&"unread"]),href:u,external:u.includes("://"),onclick:this.markAsRead.bind(this)},Y(l||null),nt(null==(r=this.icon)?void 0:r.call(this),{className:"Notification-icon"}),m("span",{className:"Notification-title"},m("span",{className:"Notification-content"},null==(i=this.content)?void 0:i.call(this)),m("span",{className:"Notification-title-spring"}),lt(a.createdAt())),!a.isRead()&&m(yt,{className:"Notification-action Button Button--link",icon:"fas fa-check",title:Wi.translator.trans("core.forum.notifications.mark_as_read_tooltip"),onclick:function(t){t.preventDefault(),t.stopPropagation(),s.markAsRead()}}),m("div",{className:"Notification-excerpt"},null==(o=this.excerpt)?void 0:o.call(this)))},n.markAsRead=function(){var t,e;this.attrs.notification.isRead()||(null==(t=Wi.session.user)||t.pushAttributes({unreadNotificationCount:(null!=(e=Wi.session.user.unreadNotificationCount())?e:1)-1}),this.attrs.notification.save({isRead:!0}))},e}(E),$e=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-pencil-alt"},n.href=function(){var t=this.attrs.notification,e=t.subject();return e?Wi.route.discussion(e,t.content().postNumber):"#"},n.content=function(){return Wi.translator.trans("core.forum.notifications.discussion_renamed_text",{user:this.attrs.notification.fromUser()})},n.excerpt=function(){return null},e}(Me);function je(t){Wi.composer.isFullScreen()&&(Wi.composer.minimize(),t.stopPropagation())}var Re=function(t){function e(){return t.apply(this,arguments)||this}w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.submitLabel=e.submitLabel||Wi.translator.trans("core.forum.composer_edit.submit_button"),e.confirmExit=e.confirmExit||Wi.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(G,{href:Wi.route.discussion(n.discussion(),n.number()),onclick:je},Wi.translator.trans("core.forum.composer_edit.post_link",{number:n.number(),discussion:n.discussion().title()})))),e},n.jumpToPreview=function(t){je(t),m.route.set(Wi.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(Wi.viewingDiscussion(e))Wi.current.get("stream").goToNumber(n.number());else var r=Wi.alerts.show({type:"success",controls:[m(yt,{className:"Button Button--link",onclick:function(){m.route.set(Wi.route.post(n)),Wi.alerts.dismiss(r)}},Wi.translator.trans("core.forum.composer_edit.view_button"))]},Wi.translator.trans("core.forum.composer_edit.edited_message"));t.composer.hide()}),this.loaded.bind(this))},e}(kt);const He={controls:function(t,e){var n=this,r=new B;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(O,null)))})),r},userControls:function(t,e){return new B},moderationControls:function(t,e){var n=new B;return"comment"===t.contentType()&&t.canEdit()&&(t.isHidden()||n.add("edit",m(yt,{icon:"fas fa-pencil-alt",onclick:this.editAction.bind(t)},Wi.translator.trans("core.forum.post_controls.edit_button")))),n},destructiveControls:function(t,e){var n=new B;return"comment"!==t.contentType()||t.isHidden()?("comment"===t.contentType()&&t.canHide()&&n.add("restore",m(yt,{icon:"fas fa-reply",onclick:this.restoreAction.bind(t)},Wi.translator.trans("core.forum.post_controls.restore_button"))),t.canDelete()&&n.add("delete",m(yt,{icon:"fas fa-times",onclick:this.deleteAction.bind(t,e)},Wi.translator.trans("core.forum.post_controls.delete_forever_button")))):t.canHide()&&n.add("hide",m(yt,{icon:"far fa-trash-alt",onclick:this.hideAction.bind(t)},Wi.translator.trans("core.forum.post_controls.delete_button"))),n},editAction:function(){var t=this;return new Promise((function(e){return Wi.composer.load(Re,{post:t}),Wi.composer.show(),e()}))},hideAction:function(){if(confirm(ot(Wi.translator.trans("core.forum.post_controls.hide_confirmation"))))return this.pushData({attributes:{hiddenAt:new Date},relationships:{hiddenUser:Wi.session.user}}),this.save({isHidden:!0}).then((function(){return m.redraw()}))},restoreAction:function(){return this.pushData({attributes:{hiddenAt:null},relationships:{hiddenUser:null}}),this.save({isHidden:!1}).then((function(){return m.redraw()}))},deleteAction:function(t){var e=this;if(confirm(ot(Wi.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||(Wi.discussions.removeDiscussion(t),Wi.viewingDiscussion(t)&&Wi.history.back())})).catch((function(){})).then((function(){t&&(t.loading=!1),m.redraw()}))}};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).loading=!1,e.subtree=void 0,e}w(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}))},n.view=function(t){var 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.viewItems(n,r).toArray()))},n.viewItems=function(t,e){var n=this,r=new B;return r.add("content",this.loading?m(ft,null):this.content(),100),r.add("actions",m("aside",{className:"Post-actions"},m("ul",null,H(this.actionItems().toArray()),!!t.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 n.$(".Post-controls").addClass("open")},onhide:function(){return n.$(".Post-controls").removeClass("open")},accessibleToggleLabel:Wi.translator.trans("core.forum.post_controls.toggle_dropdown_accessible_label")},t)))),90),r.add("footer",m("footer",{className:"Post-footer"},e.length>0?m("ul",null,H(e)):m("ul",null)),80),r},n.onbeforeupdate=function(e){return t.prototype.onbeforeupdate.call(this,e),this.subtree.needsRebuild()},n.onupdate=function(e){t.prototype.onupdate.call(this,e);var n=this.$(".Post-actions"),r=this.$(".Post-controls");n.toggleClass("openWithin",r.hasClass("open"))},n.elementAttrs=function(){return{}},n.content=function(){return[]},n.classes=function(t){var e=(t||"").split(" ").concat(["Post"]),n=this.attrs.post.user(),r=this.attrs.post.discussion();return this.loading&&e.push("Post--loading"),n&&n===Wi.session.user&&e.push("Post--by-actor"),n&&n===r.user()&&e.push("Post--by-start-user"),e},n.actionItems=function(){return new B},n.footerItems=function(){return new B},e}(E),qe=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.group&&(e.icon=e.group.icon()||"",e.color=e.group.color()||"",e.label=void 0===e.label?e.group.nameSingular():e.label,e.type="group--"+e.group.id(),delete e.group)},e}(be),ze=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.nameSingular=function(){return fe.attribute("nameSingular").call(this)},n.namePlural=function(){return fe.attribute("namePlural").call(this)},n.color=function(){return fe.attribute("color").call(this)},n.icon=function(){return fe.attribute("icon").call(this)},n.isHidden=function(){return fe.attribute("isHidden").call(this)},e}(fe);ze.ADMINISTRATOR_ID="1",ze.GUEST_ID="2",ze.MEMBER_ID="3";var Ve=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}w(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=Bt(r.username()||""),this.email=Bt(r.email()||""),this.isEmailConfirmed=Bt(r.isEmailConfirmed()||!1),this.setPassword=Bt(!1),this.password=Bt(r.password()||"");var i=r.groups()||[];v.store.all("groups").filter((function(t){return![ze.GUEST_ID,ze.MEMBER_ID].includes(t.id())})).forEach((function(t){return n.groups[t.id()]=Bt(i.includes(t))}))},n.className=function(){return"EditUserModal Modal--small"},n.title=function(){return v.translator.trans("core.lib.edit_user.title")},n.content=function(){var t=this.fields().toArray();return m("div",{className:"Modal-body"},t.length>1?m("div",{className:"Form"},this.fields().toArray()):v.translator.trans("core.lib.edit_user.nothing_available"))},n.fields=function(){var t=this,e=new B;return this.attrs.user.canEditCredentials()&&(e.add("username",m("div",{className:"Form-group"},m("label",null,v.translator.trans("core.lib.edit_user.username_heading")),m("input",{className:"FormControl",placeholder:ot(v.translator.trans("core.lib.edit_user.username_label")),bidi:this.username,disabled:this.nonAdminEditingAdmin()})),40),v.session.user!==this.attrs.user&&(e.add("email",m("div",{className:"Form-group"},m("label",null,v.translator.trans("core.lib.edit_user.email_heading")),m("div",null,m("input",{className:"FormControl",placeholder:ot(v.translator.trans("core.lib.edit_user.email_label")),bidi:this.email,disabled:this.nonAdminEditingAdmin()})),!this.isEmailConfirmed()&&this.userIsAdmin(v.session.user)&&m("div",null,m(yt,{className:"Button Button--block",loading:this.loading,onclick:this.activate.bind(this)},v.translator.trans("core.lib.edit_user.activate_button")))),30),e.add("password",m("div",{className:"Form-group"},m("label",null,v.translator.trans("core.lib.edit_user.password_heading")),m("div",null,m("label",{className:"checkbox"},m("input",{type:"checkbox",onchange:function(e){var n=e.target;t.setPassword(n.checked),m.redraw.sync(),n.checked&&t.$("[name=password]").select(),e.redraw=!1},disabled:this.nonAdminEditingAdmin()}),v.translator.trans("core.lib.edit_user.set_password_label")),this.setPassword()&&m("input",{className:"FormControl",type:"password",name:"password",placeholder:ot(v.translator.trans("core.lib.edit_user.password_label")),bidi:this.password,disabled:this.nonAdminEditingAdmin()}))),20))),this.attrs.user.canEditGroups()&&e.add("groups",m("div",{className:"Form-group EditUserModal-groups"},m("label",null,v.translator.trans("core.lib.edit_user.groups_heading")),m("div",null,Object.keys(this.groups).map((function(t){return v.store.getById("groups",t)})).filter(Boolean).map((function(e){return e&&m("label",{className:"checkbox"},m("input",{type:"checkbox",bidi:t.groups[e.id()],disabled:e.id()===ze.ADMINISTRATOR_ID&&(t.attrs.user===v.session.user||!t.userIsAdmin(v.session.user))}),m(qe,{group:e,label:null})," ",e.nameSingular())})))),10),e.add("submit",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary",type:"submit",loading:this.loading},v.translator.trans("core.lib.edit_user.submit_button"))),-10),e},n.activate=function(){var t=this;this.loading=!0;var e={username:this.username(),isEmailConfirmed:!0};this.attrs.user.save(e,{errorHandler:this.onerror.bind(this)}).then((function(){t.isEmailConfirmed(!0),t.loading=!1,m.redraw()})).catch((function(){t.loading=!1,m.redraw()}))},n.data=function(){var t=this,e={},n={};return this.attrs.user.canEditCredentials()&&!this.nonAdminEditingAdmin()&&(e.username=this.username(),v.session.user!==this.attrs.user&&(e.email=this.email()),this.setPassword()&&(e.password=this.password())),this.attrs.user.canEditGroups()&&(n.groups=Object.keys(this.groups).filter((function(e){return t.groups[e]()})).map((function(t){return v.store.getById("groups",t)})).filter((function(t){return t instanceof ze}))),e.relationships=n,e},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0,this.attrs.user.save(this.data(),{errorHandler:this.onerror.bind(this)}).then(this.hide.bind(this)).catch((function(){e.loading=!1,m.redraw()}))},n.nonAdminEditingAdmin=function(){return this.userIsAdmin(this.attrs.user)&&!this.userIsAdmin(v.session.user)},n.userIsAdmin=function(t){return!!((null==t?void 0:t.groups())||[]).some((function(t){return(null==t?void 0:t.id())===ze.ADMINISTRATOR_ID}))},e}(_t),We=function(t){function e(){return t.apply(this,arguments)||this}w(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}(E),Ge=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).user=null,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.bodyClass="App--user"},n.view=function(){return m("div",{className:"UserPage"},this.user?[m(Xe,{user:this.user,className:"Hero UserHero",editable:this.user.canEdit()||this.user===Wi.session.user,controlsButtonClassName:"Button"}),m("div",{className:"container"},m("div",{className:"sideNavContainer"},m(We,null,m("nav",{className:"sideNav UserPage-nav"},m("ul",null,H(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,Wi.current.set("user",t),Wi.setTitle(t.displayName()),m.redraw()},n.loadUser=function(t){var e=this,n=t.toLowerCase();Wi.preloadedApiDocument(),Wi.store.all("users").some((function(r){return!(r.username().toLowerCase()!==n&&r.id()!==t||!r.joinTime()||(e.show(r),0))})),this.user||Wi.store.find("users",t,{bySlug:!0}).then(this.show.bind(this))},n.sidebarItems=function(){var t=new B;return t.add("nav",m(he,{className:"App-titleControl",buttonClassName:"Button"},this.navItems().toArray())),t},n.navItems=function(){var t=new B,e=this.user,n=Wi.session.user===e;return t.add("posts",m(le,{href:Wi.route("user.posts",{username:e.slug()}),icon:"far fa-comment"},Wi.translator.trans("core.forum.user.posts_link")," ",m("span",{className:"Button-badge"},e.commentCount())),100),t.add("discussions",m(le,{href:Wi.route("user.discussions",{username:e.slug()}),icon:"fas fa-bars"},Wi.translator.trans("core.forum.user.discussions_link")," ",m("span",{className:"Button-badge"},e.discussionCount())),90),n&&(t.add("separator",m(O,null),-90),t.add("settings",m(le,{href:Wi.route("settings"),icon:"fas fa-cog"},Wi.translator.trans("core.forum.user.settings_link")),-100)),(n||Wi.forum.attribute("canModerateAccessTokens"))&&(n||t.add("security-separator",m(O,null),-90),t.add("security",m(le,{href:Wi.route("user.security",{username:e.slug()}),icon:"fas fa-shield-alt"},Wi.translator.trans("core.forum.user.security_link")),-100)),t},e}(S);const Ye={controls:function(t,e){var n=this,r=new B;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(O,null)))})),r},userControls:function(){return new B},moderationControls:function(t){var e=new B;return(t.canEdit()||t.canEditCredentials()||t.canEditGroups())&&e.add("edit",m(yt,{icon:"fas fa-pencil-alt",onclick:this.editAction.bind(this,t)},Wi.translator.trans("core.forum.user_controls.edit_button"))),e},destructiveControls:function(t){var e=new B;return"1"!==t.id()&&t.canDelete()&&e.add("delete",m(yt,{icon:"fas fa-times",onclick:this.deleteAction.bind(this,t)},Wi.translator.trans("core.forum.user_controls.delete_button"))),e},deleteAction:function(t){var e=this;confirm(Wi.translator.trans("core.forum.user_controls.delete_confirmation"))&&t.delete().then((function(){e.showDeletionAlert(t,"success"),Wi.current.matches(Ge,{user:t})?Wi.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];Wi.alerts.show({type:e},Wi.translator.trans(n,{user:t,email:t.email()}))},editAction:function(t){Wi.modal.show(Ve,{user:t})}};var Ke=function(t){function e(){return t.apply(this,arguments)||this}w(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:M(["AvatarEditor","Dropdown",this.attrs.className,this.loading&&"loading",this.isDraggedOver&&"dragover"])},Y(t,{loading:"eager"}),m("a",{className:t.avatarUrl()?"Dropdown-toggle":"Dropdown-toggle AvatarEditor--noAvatar",title:Wi.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"},H(this.controlItems().toArray())))},n.controlItems=function(){var t=new B;return t.add("upload",m(yt,{icon:"fas fa-upload",onclick:this.openPicker.bind(this)},Wi.translator.trans("core.forum.user.avatar_upload_button"))),t.add("remove",m(yt,{icon:"fas fa-times",onclick:this.remove.bind(this)},Wi.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(),Wi.request({method:"POST",url:Wi.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(),Wi.request({method:"DELETE",url:Wi.forum.attribute("apiUrl")+"/users/"+t.id()+"/avatar"}).then(this.success.bind(this),this.failure.bind(this))},n.success=function(t){Wi.store.pushPayload(t),delete this.attrs.user.avatarColor,this.loading=!1,m.redraw()},n.failure=function(t){this.loading=!1,m.redraw()},e}(E),Xe=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.user,e=Ye.controls(t,this).toArray(),n=t.color(),r=t.badges().toArray();return m("div",{className:M("UserCard",this.attrs.className),style:n&&{"--usercard-bg":n}},m("div",{className:"darkenBackground"},m("div",{className:"container"},!!e.length&&m(ut,{className:"UserCard-controls App-primaryControl",menuClassName:"Dropdown-menu--right",buttonClassName:this.attrs.controlsButtonClassName,label:Wi.translator.trans("core.forum.user_controls.button"),accessibleToggleLabel:Wi.translator.trans("core.forum.user_controls.toggle_dropdown_accessible_label"),icon:"fas fa-ellipsis-v"},e),m("div",{className:"UserCard-profile"},m("h1",{className:"UserCard-identity"},this.attrs.editable?m("[",null,m(Ke,{user:t,className:"UserCard-avatar"})," ",Xt(t)):m(G,{href:Wi.route.user(t)},m("div",{className:"UserCard-avatar"},Y(t,{loading:"eager"})),Xt(t))),!!r.length&&m("ul",{className:"UserCard-badges badges"},H(r)),m("ul",{className:"UserCard-info"},H(this.infoItems().toArray()))))))},n.infoItems=function(){var t=new B,e=this.attrs.user,n=e.lastSeenAt();if(n){var r=e.isOnline();t.add("lastSeen",m("span",{className:M("UserCard-lastSeen",{online:r})},r?[nt("fas fa-circle")," ",Wi.translator.trans("core.forum.user.online_text")]:[nt("far fa-clock")," ",st(n)]),100)}return t.add("joined",Wi.translator.trans("core.forum.user.joined_date_text",{ago:st(e.joinTime())}),90),t},e}(E);function Je(t){return t.lastSeenAt()&&t.isOnline()?m("span",{className:"UserOnline"},nt("fas fa-circle")):null}var Qe=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.post,e=t.user();return e?m("div",{className:"PostUser"},m("h3",{className:"PostUser-name"},m(G,{href:Wi.route.user(e)},Y(e,{className:"PostUser-avatar"}),Je(e),Xt(e))),m("ul",{className:"PostUser-badges badges"},H(e.badges().toArray())),!t.isHidden()&&this.attrs.cardVisible&&m(Xe,{user:e,className:"UserCard--popover",controlsButtonClassName:"Button Button--icon Button--flat"})):m("div",{className:"PostUser"},m("h3",{className:"PostUser-name"},Y(e,{className:"PostUser-avatar"})," ",Xt(e)))},n.oncreate=function(e){var n,r=this;t.prototype.oncreate.call(this,e),this.$().on("mouseover",".PostUser-name a, .UserCard",(function(){clearTimeout(n),n=setTimeout(r.showCard.bind(r),500)})).on("mouseout",".PostUser-name a, .UserCard",(function(){clearTimeout(n),n=setTimeout(r.hideCard.bind(r),250)}))},n.showCard=function(){var t=this;this.attrs.oncardshow(),setTimeout((function(){return t.$(".UserCard").addClass("in")}))},n.hideCard=function(){var t=this;this.$(".UserCard").removeClass("in").one("transitionend webkitTransitionEnd oTransitionEnd",(function(){t.attrs.oncardhide()}))},e}(E);function Ze(t){var e=it()(t),n=e.format(),r=e.format("LLLL");return m("time",{pubdate:!0,datetime:n},r)}var tn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).ip=void 0,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.ip=this.attrs.ip||""},n.view=function(){return m("span",{className:"IPAddress"},this.viewItems().toArray())},n.viewItems=function(){var t=new B;return t.add("ip",m("span",null,this.ip),100),t},e}(E),en=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){return m("div",{className:"Dropdown PostMeta"},this.viewItems().toArray())},n.getPermalink=function(t){return Wi.forum.attribute("baseOrigin")+Wi.route.post(t)},n.selectPermalink=function(t){var e=this;setTimeout((function(){return $(e.element).parent().find(".PostMeta-permalink").select()})),t.redraw=!1},n.viewItems=function(){var t=this,e=new B,n=this.attrs.post.createdAt();return e.add("time",m("a",{className:"Dropdown-toggle",onclick:function(e){return t.selectPermalink(e)},"data-toggle":"dropdown"},lt(n)),100),e.add("meta-dropdown",m("div",{className:"Dropdown-menu dropdown-menu"},this.metaItems().toArray()),90),e},n.metaItems=function(){var t=new B,e=this.attrs.post,n="ontouchstart"in document.documentElement,r=this.getPermalink(e),i=e.createdAt();return t.add("post-number",m("span",{className:"PostMeta-number"},Wi.translator.trans("core.forum.post.number_tooltip",{number:e.number()})," "),100),t.add("post-time",m("span",{className:"PostMeta-time"},Ze(i)),90),t.add("post-ip",m("span",{className:"PostMeta-ip"},m(tn,{ip:e.data.attributes.ipAddress})),80),t.add("permalink",n?m("a",{className:"Button PostMeta-permalink",href:r},r):m("input",{className:"FormControl PostMeta-permalink",value:r,onclick:function(t){return t.stopPropagation()}}),0),t},e}(E),nn=function(t){function e(){return t.apply(this,arguments)||this}w(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=Wi.translator.trans("core.forum.post.edited_tooltip",{user:e,ago:st(t.editedAt())});return m(Et,{text:n},m("span",{className:"PostEdited"},Wi.translator.trans("core.forum.post.edited_text")))},n.oncreate=function(e){t.prototype.oncreate.call(this,e)},e}(E),rn=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.revealContent=!1,this.cardVisible=!1,this.subtree.check((function(){return n.cardVisible}),(function(){return n.isEditing()}),(function(){return n.revealContent}))},n.content=function(){return t.prototype.content.call(this).concat(this.contentItems().toArray())},n.contentItems=function(){var t=new B;return t.add("header",m("header",{className:"Post-header"},m("ul",null,H(this.headerItems().toArray()))),100),t.add("body",m("div",{className:"Post-body"},this.bodyItems().toArray()),90),t},n.bodyItems=function(){var t=new B;return t.add("content",this.isEditing()?m(Jt,{className:"Post-preview",composer:Wi.composer}):m.trust(this.attrs.post.contentHtml()),100),t},n.refreshContent=function(){var t=this.isEditing()?"":this.attrs.post.contentHtml();this.contentHtml!==t&&this.$(".Post-body script").each((function(){var t=document.createElement("script");t.textContent=this.textContent,Array.from(this.attributes).forEach((function(e){return t.setAttribute(e.name,e.value)})),this.parentNode.replaceChild(t,this)})),this.contentHtml=t},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.refreshContent()},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.refreshContent()},n.isEditing=function(){return Wi.composer.bodyMatches(Re,{post:this.attrs.post})},n.elementAttrs=function(){var e=this.attrs.post,n=t.prototype.elementAttrs.call(this);return n.className=M(n.className,"CommentPost",{"Post--renderFailed":e.renderFailed(),"Post--hidden":e.isHidden(),"Post--edited":e.isEdited(),revealContent:this.revealContent,editing:this.isEditing()}),this.isEditing()&&(n["aria-busy"]="true"),n},n.toggleContent=function(){this.revealContent=!this.revealContent},n.headerItems=function(){var t=this,e=new B,n=this.attrs.post;return e.add("user",m(Qe,{post:n,cardVisible:this.cardVisible,oncardshow:function(){t.cardVisible=!0,m.redraw()},oncardhide:function(){t.cardVisible=!1,m.redraw()}}),100),e.add("meta",m(en,{post:n})),n.isEdited()&&!n.isHidden()&&e.add("edited",m(nn,{post:n})),n.isHidden()&&e.add("toggle",m(yt,{className:"Button Button--default Button--more",icon:"fas fa-ellipsis-h",onclick:this.toggleContent.bind(this)})),e},e}(Ue),on=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.elementAttrs=function(){var e=t.prototype.elementAttrs.call(this);return e.className=M(e.className,"EventPost",Q(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(G,{className:"EventPost-user",href:Wi.route.user(e)},n):n,time:lt(this.attrs.post.createdAt())});return t.prototype.content.call(this).concat([nt(this.icon(),{className:"EventPost-icon"}),m("div",{className:"EventPost-info"},this.description(r))])},n.icon=function(){return""},n.description=function(t){return Wi.translator.trans(this.descriptionKey(),t)},n.descriptionKey=function(){return""},n.descriptionData=function(){return{}},e}(Ue),sn=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-pencil-alt"},n.description=function(t){var e=Wi.translator.trans("core.forum.post_stream.discussion_renamed_text",t);return m("span",null,e)},n.descriptionData=function(){var t=this.attrs.post,e=t.content()[0],n=t.content()[1];return{new:m(Et,{text:ot(Wi.translator.trans("core.forum.post_stream.discussion_renamed_old_tooltip",{old:e}))},m("strong",{className:"DiscussionRenamedPost-new"},n))}},e}(on),an="welcomeHidden",un=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}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e)},n.view=function(t){return this.isHidden()?null:m("header",{className:"Hero WelcomeHero"},m("div",{className:"container"},this.viewItems().toArray()))},n.hide=function(){localStorage.setItem(an,"true")},n.isHidden=function(){var t;return null==(t=Wi.forum.attribute("welcomeTitle"))||!t.trim()||!!localStorage.getItem(an)||!!this.hidden},n.viewItems=function(){var t=this,e=new B;return e.add("dismiss-button",m(yt,{icon:"fas fa-times",onclick:function(){t.$().slideUp(t.hide.bind(t))},className:"Hero-close Button Button--icon Button--link","aria-label":Wi.translator.trans("core.forum.welcome_hero.hide")}),100),e.add("content",m("div",{className:"containerNarrow"},this.contentItems().toArray()),80),e},n.contentItems=function(){var t=new B;return t.add("title",m("h1",{className:"Hero-title"},Wi.forum.attribute("welcomeTitle")),100),t.add("subtitle",m("div",{className:"Hero-subtitle"},m.trust(Wi.forum.attribute("welcomeMessage")))),t},e}(E),ln=function(t){function e(){return t.apply(this,arguments)||this}w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.placeholder=e.placeholder||ot(Wi.translator.trans("core.forum.composer_discussion.body_placeholder")),e.submitLabel=e.submitLabel||Wi.translator.trans("core.forum.composer_discussion.submit_button"),e.confirmExit=e.confirmExit||ot(Wi.translator.trans("core.forum.composer_discussion.discard_confirmation")),e.titlePlaceholder=e.titlePlaceholder||ot(Wi.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||Bt(""),this.title=this.composer.fields.title},n.headerItems=function(){var e=t.prototype.headerItems.call(this);return e.add("title",m("h3",null,Wi.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();Wi.store.createRecord("discussions").save(e).then((function(e){t.composer.hide(),Wi.discussions.refresh(),m.route.set(Wi.route.discussion(e))}),this.loaded.bind(this))},e}(kt),cn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).lastDiscussion=void 0,e}w(e,t);var n=e.prototype;return n.oninit=function(n){t.prototype.oninit.call(this,n),Wi.previous.matches(ae)&&(this.lastDiscussion=Wi.previous.get("discussion")),Wi.previous.matches(e)&&Wi.discussions.clear(),Wi.discussions.refreshParams(Wi.search.params(),m.route.param("page")&&Number(m.route.param("page"))||1),Wi.history.push("index",ot(Wi.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,H(this.sidebarItems().toArray()))),m("div",{className:"IndexPage-results sideNavOffset"},this.contentItems().toArray()))))},n.contentItems=function(){var t=new B;return t.add("toolbar",m("div",{className:"IndexPage-toolbar"},this.toolbarItems().toArray()),100),t.add("discussionList",m(Vt,{state:Wi.discussions}),90),t},n.toolbarItems=function(){var t=new B;return t.add("view",m("ul",{className:"IndexPage-toolbar-view"},H(this.viewItems().toArray())),100),t.add("action",m("ul",{className:"IndexPage-toolbar-action"},H(this.actionItems().toArray())),90),t},n.setTitle=function(){Wi.setTitle(ot(Wi.translator.trans("core.forum.index.meta_title_text"))),Wi.setTitleCount(0)},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.setTitle();var n=Wi.cache.heroHeight,r=Wi.cache.heroHeight=this.$(".Hero").outerHeight()||0,i=Wi.cache.scrollTop;if($("#app").css("min-height",($(window).height()||0)+r),null!=Wi.previous.type&&(this.lastDiscussion?$(window).scrollTop(i-n+r):$(window).scrollTop(0),this.lastDiscussion)){var o=this.$('li[data-id="'+this.lastDiscussion.id()+'"] .DiscussionListItem');if(o.length){var s=$("#header").outerHeight()||0,a=$(window).height()||0,u=o.offset(),l=u&&u.top||0,c=l+(o.outerHeight()||0);(l<i+s||c>i+a)&&$(window).scrollTop(l-s)}}},n.onbeforeremove=function(e){t.prototype.onbeforeremove.call(this,e),Wi.cache.scrollTop=$(window).scrollTop()},n.onremove=function(e){t.prototype.onremove.call(this,e),$("#app").css("min-height","")},n.hero=function(){return m(un,null)},n.sidebarItems=function(){var t=this,e=new B,n=Wi.forum.attribute("canStartDiscussion")||!Wi.session.user;return e.add("newDiscussion",m(yt,{icon:"fas fa-edit",className:"Button Button--primary IndexPage-newDiscussion",itemClassName:"App-primaryControl",onclick:function(){return t.newDiscussionAction().catch((function(){}))},disabled:!n},Wi.translator.trans("core.forum.index."+(n?"start_discussion_button":"cannot_start_discussion_button")))),e.add("nav",m(he,{buttonClassName:"Button",className:"App-titleControl",accessibleToggleLabel:Wi.translator.trans("core.forum.index.toggle_sidenav_dropdown_accessible_label")},this.navItems().toArray())),e},n.navItems=function(){var t=new B,e=Wi.search.stickyParams();return t.add("allDiscussions",m(le,{href:Wi.route("index",e),icon:"far fa-comments"},Wi.translator.trans("core.forum.index.all_discussions_link")),100),t},n.viewItems=function(){var t=new B,e=Wi.discussions.sortMap(),n=Object.keys(e).reduce((function(t,e){return t[e]=Wi.translator.trans("core.forum.index_sort."+e+"_button"),t}),{});return t.add("sort",m(ut,{buttonClassName:"Button",label:n[Wi.search.params().sort]||Object.keys(e).map((function(t){return n[t]}))[0],accessibleToggleLabel:Wi.translator.trans("core.forum.index_sort.toggle_dropdown_accessible_label")},Object.keys(n).map((function(t){var r=n[t],i=(Wi.search.params().sort||Object.keys(e)[0])===t;return m(yt,{icon:!i||"fas fa-check",onclick:Wi.search.changeSort.bind(Wi.search,t),active:i},r)})))),t},n.actionItems=function(){var t=new B;return t.add("refresh",m(yt,{title:Wi.translator.trans("core.forum.index.refresh_tooltip"),icon:"fas fa-sync",className:"Button Button--icon",onclick:function(){Wi.discussions.refresh(),Wi.session.user&&(Wi.store.find("users",Wi.session.user.id()),m.redraw())}})),Wi.session.user&&t.add("markAllAsRead",m(yt,{title:Wi.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 Wi.session.user?(Wi.composer.load(ln,{user:Wi.session.user}),Wi.composer.show(),t(Wi.composer)):(Wi.modal.show(Mt),e())}))},n.markAllAsRead=function(){var t;confirm(ot(Wi.translator.trans("core.forum.index.mark_all_as_read_confirmation")))&&(null==(t=Wi.session.user)||t.save({markedAllAsReadAt:new Date}))},e}(S);cn.providesInitialSearch=!0;var dn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).loading=!0,e.moreResults=!1,e.posts=[],e.loadLimit=20,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.loadUser(m.route.param("username"))},n.content=function(){var t,e=this;return 0!==this.posts.length||this.loading?(this.loading?t=m(ft,null):this.moreResults&&(t=m("div",{className:"PostsUserPage-loadMore"},m(yt,{className:"Button",onclick:this.loadMore.bind(this)},Wi.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"},Wi.translator.trans("core.forum.user.in_discussion_text",{discussion:m(G,{href:Wi.route.post(t)},e.discussionTitle(t))})),m(rn,{post:t}))}))),m("div",{className:"PostsUserPage-loadMore"},t))):m("div",{className:"PostsUserPage"},m(zt,{text:Wi.translator.trans("core.forum.user.posts_empty_text")}))},n.show=function(e){t.prototype.show.call(this,e),this.refresh()},n.refresh=function(){this.loading=!0,this.posts=[],m.redraw(),this.loadResults().then(this.parseResults.bind(this))},n.loadResults=function(t){return void 0===t&&(t=0),Wi.store.find("posts",{filter:{author:this.user.username(),type:"comment"},page:{offset:t,limit:this.loadLimit},sort:"-createdAt"})},n.loadMore=function(){this.loading=!0,this.loadResults(this.posts.length).then(this.parseResults.bind(this))},n.parseResults=function(t){var e;return this.loading=!1,(e=this.posts).push.apply(e,t),this.moreResults=t.length>=this.loadLimit,m.redraw(),t},n.discussionTitle=function(t){return t.discussion().title()},e}(Ge),hn=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=D({},e,{page:D({},e.page,{offset:this.pageSize*(t-1)}),include:n});return v.store.find(this.type,r)},e.requestParams=function(){return this.params},e.refreshParams=function(t,e){return this.isEmpty()||this.paramsChanged(t)?(this.params=t,this.refresh(e)):Promise.resolve()},e.refresh=function(t){var e=this;return void 0===t&&(t=1),this.initialLoading=!0,this.loadingPrev=!1,this.loadingNext=!1,this.clear(),this.location={page:t},this.loadPage().then((function(t){e.pages=[],e.parseResults(e.location.page,t)})).finally((function(){return e.initialLoading=!1}))},e.getPages=function(){return this.pages},e.getLocation=function(){return this.location},e.isLoading=function(){return this.initialLoading||this.loadingNext||this.loadingPrev},e.isInitialLoading=function(){return this.initialLoading},e.isLoadingPrev=function(){return this.loadingPrev},e.isLoadingNext=function(){return this.loadingNext},e.hasItems=function(){return!!this.getAllItems().length},e.isEmpty=function(){return!this.isInitialLoading()&&!this.hasItems()},e.hasPrev=function(){var t;return!(null==(t=this.pages[0])||!t.hasPrev)},e.hasNext=function(){var t;return!(null==(t=this.pages[this.pages.length-1])||!t.hasNext)},e.getParams=function(){return this.params},e.getNextPageNumber=function(){var t,e=null==(t=this.pages[this.pages.length-1])?void 0:t.number;return e&&!isNaN(e)?e+1:this.location.page},e.getPrevPageNumber=function(){var t,e=null==(t=this.pages[0])?void 0:t.number;return e&&!isNaN(e)?Math.max(e-1,1):this.location.page},e.paramsChanged=function(t){var e=this;return Object.keys(t).some((function(n){return e.getParams()[n]!==t[n]}))},e.getAllItems=function(){return this.getPages().map((function(t){return t.items})).flat()},t}(),fn=function(){function t(){this.events={},this.events={}}var e=t.prototype;return e.on=function(t,e){return this.events[t]||(this.events[t]=[]),this.events[t].push(e),this},e.emit=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.events[t]&&this.events[t].forEach((function(t){return t.apply(void 0,n)}))},t}();function pn(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 mn=new fn,vn=function(t){function e(e,n){var r;return void 0===n&&(n=1),(r=t.call(this,e,n,20)||this).extraDiscussions=[],r.eventEmitter=void 0,r.eventEmitter=mn.on("discussion.deleted",r.deleteDiscussion.bind(y(r))),r}w(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=Wi.preloadedApiDocument();return n?(this.initialLoading=!1,Promise.resolve(n)):t.prototype.loadPage.call(this,e)},n.clear=function(){t.prototype.clear.call(this),this.extraDiscussions=[]},n.sortMap=function(){var t={};return this.params.q&&(t.relevance=""),t.latest="-lastPostedAt",t.top="-commentCount",t.newest="-createdAt",t.oldest="createdAt",t},n.isSearchResults=function(){return!!this.params.q},n.removeDiscussion=function(t){this.eventEmitter.emit("discussion.deleted",t)},n.deleteDiscussion=function(t){for(var e,n=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return pn(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)?pn(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},F(e,[{key:"type",get:function(){return"discussions"}}]),e}(hn),gn=function(t){function e(){return t.apply(this,arguments)||this}w(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 vn({filter:{author:e.username()},sort:"newest"}),this.state.refresh()},n.content=function(){return m("div",{className:"DiscussionsUserPage"},m(Vt,{state:this.state}))},e}(Ge);const yn=function(t,e){return function(){e(this.getAttribute(t)||this[t])}};var bn=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(t){var e=M(["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:yn("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}(E),wn=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=M(e.className,"Checkbox--switch")},e.prototype.getDisplay=function(){return!!this.attrs.loading&&t.prototype.getDisplay.call(this)},e}(bn),Dn=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(t){return m("fieldset",{className:this.attrs.className},m("legend",null,this.attrs.label),m("ul",null,H(t.children)))},e}(E),xn=function(t){function e(){return t.apply(this,arguments)||this}w(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(bn,{state:!!e[i],loading:t.loading[i],disabled:!(i in e),onchange:t.toggle.bind(t,[i])},m("span",{className:"sr-only"},Wi.translator.trans("core.forum.settings.notification_checkbox_a11y_label_template",{description:n.label,method:r.label}))))})))}))))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$("thead .NotificationGrid-groupToggle").bind("mouseenter mouseleave",(function(t){var e=parseInt($(this).index(),10)+1;$(this).parents("table").find("td:nth-child("+e+")").toggleClass("highlighted","mouseenter"===t.type)})),this.$("tbody .NotificationGrid-groupToggle").bind("mouseenter mouseleave",(function(t){$(this).parent().find("td").toggleClass("highlighted","mouseenter"===t.type)}))},n.toggle=function(t){var e=this,n=this.attrs.user,r=n.preferences(),i=!r[t[0]];t.forEach((function(t){e.loading[t]=!0,r[t]=i})),m.redraw(),n.save({preferences:r}).then((function(){t.forEach((function(t){return e.loading[t]=!1})),m.redraw()}))},n.toggleMethod=function(t){var e=this,n=this.types.map((function(n){return e.preferenceKey(n.name,t)})).filter((function(t){return t in e.attrs.user.preferences()}));this.toggle(n)},n.toggleType=function(t){var e=this,n=this.methods.map((function(n){return e.preferenceKey(t,n.name)})).filter((function(t){return t in e.attrs.user.preferences()}));this.toggle(n)},n.preferenceKey=function(t,e){return"notify_"+t+"_"+e},n.notificationMethods=function(){var t=new B;return t.add("alert",{name:"alert",icon:"fas fa-bell",label:Wi.translator.trans("core.forum.settings.notify_by_web_heading")}),t.add("email",{name:"email",icon:"far fa-envelope",label:Wi.translator.trans("core.forum.settings.notify_by_email_heading")}),t},n.notificationTypes=function(){var t=new B;return t.add("discussionRenamed",{name:"discussionRenamed",icon:"fas fa-pencil-alt",label:Wi.translator.trans("core.forum.settings.notify_discussion_renamed_label")}),t},e}(E),Cn=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.className=function(){return"ChangePasswordModal Modal--small"},n.title=function(){return Wi.translator.trans("core.forum.change_password.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},this.fields().toArray()))},n.fields=function(){var t=new B;return t.add("help",m("p",{className:"helpText"},Wi.translator.trans("core.forum.change_password.text"))),t.add("submit",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Wi.translator.trans("core.forum.change_password.send_button")))),t},n.onsubmit=function(t){t.preventDefault(),this.loading=!0,Wi.request({method:"POST",url:Wi.forum.attribute("apiUrl")+"/forgot",body:this.requestBody()}).then(this.hide.bind(this),this.loaded.bind(this))},n.requestBody=function(){return{email:Wi.session.user.email()}},e}(_t),An=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).email=void 0,e.password=void 0,e.success=!1,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.email=Bt(Wi.session.user.email()||""),this.password=Bt("")},n.className=function(){return"ChangeEmailModal Modal--small"},n.title=function(){return Wi.translator.trans("core.forum.change_email.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},this.fields().toArray()))},n.fields=function(){var t=new B;return this.success?(t.add("help",m("p",{className:"helpText"},Wi.translator.trans("core.forum.change_email.confirmation_message",{email:m("strong",null,this.email())}))),t.add("dismiss",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},Wi.translator.trans("core.forum.change_email.dismiss_button"))))):(t.add("email",m("div",{className:"Form-group"},m("input",{type:"email",name:"email",className:"FormControl",placeholder:Wi.session.user.email(),bidi:this.email,disabled:this.loading}))),t.add("password",m("div",{className:"Form-group"},m("input",{type:"password",name:"password",className:"FormControl",autocomplete:"current-password",placeholder:Wi.translator.trans("core.forum.change_email.confirm_password_placeholder"),bidi:this.password,disabled:this.loading}))),t.add("submit",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Wi.translator.trans("core.forum.change_email.submit_button"))))),t},n.onsubmit=function(t){var e=this;t.preventDefault(),this.email()!==Wi.session.user.email()?(this.loading=!0,this.alertAttrs=null,Wi.session.user.save(this.requestAttributes(),{errorHandler:this.onerror.bind(this),meta:{password:this.password()}}).then((function(){e.success=!0})).catch((function(){})).then(this.loaded.bind(this))):this.hide()},n.requestAttributes=function(){return{email:this.email()}},n.onerror=function(e){401===e.status&&e.alert&&(e.alert.content=Wi.translator.trans("core.forum.change_email.incorrect_password_message")),t.prototype.onerror.call(this,e)},e}(_t),En=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).discloseOnlineLoading=void 0,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.show(Wi.session.user),Wi.setTitle(ot(Wi.translator.trans("core.forum.settings.title")))},n.content=function(){return m("div",{className:"SettingsPage"},m("ul",null,H(this.settingsItems().toArray())))},n.settingsItems=function(){var t=this,e=new B;return["account","notifications","privacy"].forEach((function(n,r){var i=n+"Items";e.add(n,m(Dn,{className:"Settings-"+n,label:Wi.translator.trans("core.forum.settings."+n+"_heading")},t[i]().toArray()),100-10*r)})),e},n.accountItems=function(){var t=new B;return t.add("changePassword",m(yt,{className:"Button",onclick:function(){return Wi.modal.show(Cn)}},Wi.translator.trans("core.forum.settings.change_password_button")),100),t.add("changeEmail",m(yt,{className:"Button",onclick:function(){return Wi.modal.show(An)}},Wi.translator.trans("core.forum.settings.change_email_button")),90),t},n.notificationsItems=function(){var t=new B;return t.add("notificationGrid",m(xn,{user:this.user}),100),t},n.privacyItems=function(){var t,e=this,n=new B;return n.add("discloseOnline",m(wn,{state:null==(t=this.user.preferences())?void 0:t.discloseOnline,onchange:function(t){e.discloseOnlineLoading=!0,e.user.savePreferences({discloseOnline:t}).then((function(){e.discloseOnlineLoading=!1,m.redraw()}))},loading:this.discloseOnlineLoading},Wi.translator.trans("core.forum.settings.privacy_disclose_online_label")),100),n},e}(Ge),Nn=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),Wi.history.push("notifications",ot(Wi.translator.trans("core.forum.notifications.title"))),Wi.notifications.load(),this.bodyClass="App--notifications"},n.view=function(){return m("div",{className:"NotificationsPage"},m(De,{state:Wi.notifications}))},e}(S),kn=function(){function t(t,e){this.component=void 0,this.routeName=void 0,this.component=t,this.routeName=e}var e=t.prototype;return e.makeKey=function(){return this.routeName+JSON.stringify(m.route.param())},e.makeAttrs=function(t){return D({},t.attrs,{routeName:this.routeName})},e.onmatch=function(t,e,n){return this.component},e.render=function(t){return[D({},t,{attrs:this.makeAttrs(t),key:this.makeKey()})]},t}(),Sn=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.canonicalizeDiscussionSlug=function(t){if(t)return t.split("-")[0]},n.makeKey=function(){var t=D({},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 Wi.current.matches(ae)&&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 Wi.current.get("stream").goToNumber(r)})),e.scrollToPostNumber=null}return t.prototype.render.call(this,n)},e}(kn);Sn.scrollToPostNumber=null;var Tn=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(t){return m("div",{className:"LabelValue"},m("div",{className:"LabelValue-label"},v.translator.trans("core.lib.data_segment.label",{label:this.attrs.label})),m("div",{className:"LabelValue-value"},this.attrs.value))},e}(E),Fn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).loading={},e.showingTokens={},e}w(e,t);var n=e.prototype;return n.view=function(t){return m("div",{className:"AccessTokensList"},this.attrs.tokens.length?this.attrs.tokens.map(this.tokenView.bind(this)):m("div",{className:"AccessTokensList--empty"},Wi.translator.trans("core.forum.security.empty_text")))},n.tokenView=function(t){return m("div",{className:M("AccessTokensList-item",{"AccessTokensList-item--active":t.isCurrent()}),key:t.id()},this.tokenViewItems(t).toArray())},n.tokenViewItems=function(t){var e=new B;return e.add("icon",m("div",{className:"AccessTokensList-item-icon"},nt(this.attrs.icon||"fas fa-key")),50),e.add("info",m("div",{className:"AccessTokensList-item-info"},this.tokenInfoItems(t).toArray()),40),e.add("actions",m("div",{className:"AccessTokensList-item-actions"},this.tokenActionItems(t).toArray()),30),e},n.tokenInfoItems=function(t){var e=new B;return"session"===this.attrs.type?e.add("title",m("div",{className:"AccessTokensList-item-title"},m("span",{className:"AccessTokensList-item-title-main"},t.device()),t.isCurrent()&&[" — ",m("span",{className:"AccessTokensList-item-title-sub"},Wi.translator.trans("core.forum.security.current_active_session"))])):e.add("title",m("div",{className:"AccessTokensList-item-title"},m("span",{className:"AccessTokensList-item-title-main"},this.generateTokenTitle(t)))),e.add("createdAt",m("div",{className:"AccessTokensList-item-createdAt"},m(Tn,{label:Wi.translator.trans("core.forum.security.created"),value:lt(t.createdAt())}))),e.add("lastActivityAt",m("div",{className:"AccessTokensList-item-lastActivityAt"},m(Tn,{label:Wi.translator.trans("core.forum.security.last_activity"),value:t.lastActivityAt()?m("[",null,lt(t.lastActivityAt()),t.lastIpAddress()&&m("span",null," ","— ",m(tn,{ip:t.lastIpAddress()})),"developer_token"===this.attrs.type&&t.device()&&m("[",null," ","— ",m("span",{className:"AccessTokensList-item-title-sub"},t.device()))):Wi.translator.trans("core.forum.security.never")}))),e},n.tokenActionItems=function(t){var e=this,n=new B,r={session:"terminate_session",developer_token:"revoke_access_token"}[this.attrs.type];if("developer_token"===this.attrs.type){var i=!this.showingTokens[t.id()],o=i?"show_access_token":"hide_access_token";n.add("toggleDisplay",m(yt,{className:"Button Button--inverted",icon:i?"fas fa-eye":"fas fa-eye-slash",onclick:function(){e.showingTokens[t.id()]=i,m.redraw()}},Wi.translator.trans("core.forum.security."+o)))}var s=m(yt,{className:"Button Button--danger",disabled:t.isCurrent(),loading:!!this.loading[t.id()],onclick:function(){return e.revoke(t)}},Wi.translator.trans("core.forum.security."+r));return t.isCurrent()&&(s=m(Et,{text:Wi.translator.trans("core.forum.security.cannot_terminate_current_session")},m("div",{tabindex:"0"},s))),n.add("revoke",s),n},n.revoke=function(){var t=Ee(ke().mark((function t(e){var n,r,i;return ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(confirm(ot(Wi.translator.trans("core.forum.security.revoke_access_token_confirmation")))){t.next=2;break}return t.abrupt("return");case 2:return this.loading[e.id()]=!0,t.next=5,e.delete();case 5:this.loading[e.id()]=!1,null==(n=(r=this.attrs).ondelete)||n.call(r,e),i="session"===this.attrs.type?"session_terminated":"token_revoked",Wi.alerts.show({type:"success"},Wi.translator.trans("core.forum.security."+i,{count:1})),m.redraw();case 10:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),n.generateTokenTitle=function(t){var e=t.title()||Wi.translator.trans("core.forum.security.token_title_placeholder"),n=this.tokenValueDisplay(t);return Wi.translator.trans("core.forum.security.token_item_title",{title:e,token:n})},n.tokenValueDisplay=function(t){var e=Array(12).fill("*").join(""),n=this.showingTokens[t.id()]?t.token():e;return m("code",{className:"AccessTokensList-item-token"},n)},e}(E),_n=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).titleInput=Bt(""),e}w(e,t);var n=e.prototype;return n.className=function(){return"Modal--small NewAccessTokenModal"},n.title=function(){return Wi.translator.trans("core.forum.security.new_access_token_modal.title")},n.content=function(){var t=Wi.translator.trans("core.forum.security.new_access_token_modal.title_placeholder");return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("input",{type:"text",className:"FormControl",bidi:this.titleInput,placeholder:t,"aria-label":t})),m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Wi.translator.trans("core.forum.security.new_access_token_modal.submit_button")))))},n.submitData=function(){return{title:this.titleInput()}},n.onsubmit=function(e){var n=this;t.prototype.onsubmit.call(this,e),e.preventDefault(),this.loading=!0,Wi.store.createRecord("access-tokens").save(this.submitData()).then((function(t){n.attrs.onsuccess(t),Wi.modal.close()})).finally(this.loaded.bind(this))},e}(_t),Pn=function(){function t(){this.tokens=null,this.loadingTerminateSessions=!1,this.loadingGlobalLogout=!1}var e=t.prototype;return e.hasLoadedTokens=function(){return null!==this.tokens},e.getTokens=function(){return this.tokens},e.setTokens=function(t){this.tokens=t},e.pushToken=function(t){var e;null==(e=this.tokens)||e.push(t)},e.removeToken=function(t){this.tokens=this.tokens.filter((function(e){return e!==t}))},e.getSessionTokens=function(){var t;return(null==(t=this.tokens)?void 0:t.filter((function(t){return t.isSessionToken()})).sort((function(t,e){return e.isCurrent()?1:-1})))||[]},e.getDeveloperTokens=function(){var t;return(null==(t=this.tokens)?void 0:t.filter((function(t){return!t.isSessionToken()})))||null},e.getOtherSessionTokens=function(){var t;return(null==(t=this.tokens)?void 0:t.filter((function(t){return t.isSessionToken()&&!t.isCurrent()})))||[]},e.hasOtherActiveSessions=function(){return(this.getOtherSessionTokens()||[]).length>0},e.removeOtherSessionTokens=function(){this.tokens=this.tokens.filter((function(t){return!t.isSessionToken()||t.isCurrent()}))},t}(),Bn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).state=new Pn,e}w(e,t);var n=e.prototype;return n.oninit=function(e){var n;t.prototype.oninit.call(this,e);var r=m.route.param("username");r===(null==(n=Wi.session.user)?void 0:n.slug())||Wi.forum.attribute("canModerateAccessTokens")||m.route.set("/"),this.loadUser(r),Wi.setTitle(ot(Wi.translator.trans("core.forum.security.title"))),this.loadTokens()},n.content=function(){return m("div",{className:"UserSecurityPage"},m("ul",null,H(this.settingsItems().toArray())))},n.settingsItems=function(){var t,e=new B;return Wi.forum.attribute("canCreateAccessToken")||Wi.forum.attribute("canModerateAccessTokens")||this.state.hasLoadedTokens()&&null!=(t=this.state.getDeveloperTokens())&&t.length?e.add("developerTokens",m(Dn,{className:"UserSecurityPage-developerTokens",label:Wi.translator.trans("core.forum.security.developer_tokens_heading")},this.developerTokensItems().toArray())):this.state.hasLoadedTokens()||e.add("developerTokens",m(ft,null)),e.add("sessions",m(Dn,{className:"UserSecurityPage-sessions",label:Wi.translator.trans("core.forum.security.sessions_heading")},this.sessionsItems().toArray())),this.user.id()===Wi.session.user.id()&&e.add("globalLogout",m(Dn,{className:"UserSecurityPage-globalLogout",label:Wi.translator.trans("core.forum.security.global_logout.heading")},m("span",{className:"helpText"},Wi.translator.trans("core.forum.security.global_logout.help_text")),m(yt,{className:"Button",icon:"fas fa-sign-out-alt",onclick:this.globalLogout.bind(this),loading:this.state.loadingGlobalLogout,disabled:this.state.loadingTerminateSessions},Wi.translator.trans("core.forum.security.global_logout.log_out_button")))),e},n.developerTokensItems=function(){var t=this,e=new B;return e.add("accessTokenList",this.state.hasLoadedTokens()?m(Fn,{type:"developer_token",ondelete:function(e){t.state.removeToken(e),m.redraw()},tokens:this.state.getDeveloperTokens(),icon:"fas fa-key",hideTokens:!1}):m(ft,null)),this.user.id()===Wi.session.user.id()&&e.add("newAccessToken",m(yt,{className:"Button",disabled:!Wi.forum.attribute("canCreateAccessToken"),onclick:function(){return Wi.modal.show(_n,{onsuccess:function(e){t.state.pushToken(e),m.redraw()}})}},Wi.translator.trans("core.forum.security.new_access_token_button"))),e},n.sessionsItems=function(){var t=this,e=new B;if(e.add("sessionsList",this.state.hasLoadedTokens()?m(Fn,{type:"session",ondelete:function(e){t.state.removeToken(e),m.redraw()},tokens:this.state.getSessionTokens(),icon:"fas fa-laptop",hideTokens:!0}):m(ft,null)),this.user.id()===Wi.session.user.id()){var n=!this.state.hasOtherActiveSessions(),r=m(yt,{className:"Button",onclick:this.terminateAllOtherSessions.bind(this),loading:this.state.loadingTerminateSessions,disabled:this.state.loadingGlobalLogout||n},Wi.translator.trans("core.forum.security.terminate_all_other_sessions"));n&&(r=m(Et,{text:Wi.translator.trans("core.forum.security.cannot_terminate_current_session")},m("span",{tabindex:"0"},r))),e.add("terminateAllOtherSessions",r)}return e},n.loadTokens=function(){var t=this;return Wi.store.find("access-tokens",{filter:{user:this.user.id()}}).then((function(e){t.state.setTokens(e),m.redraw()}))},n.terminateAllOtherSessions=function(){var t=this;if(confirm(ot(Wi.translator.trans("core.forum.security.terminate_all_other_sessions_confirmation"))))return this.state.loadingTerminateSessions=!0,Wi.request({method:"DELETE",url:Wi.forum.attribute("apiUrl")+"/sessions"}).then((function(){var e=t.state.getOtherSessionTokens().length;t.state.removeOtherSessionTokens(),Wi.alerts.show({type:"success"},Wi.translator.trans("core.forum.security.session_terminated",{count:e}))})).catch((function(){Wi.alerts.show({type:"error"},Wi.translator.trans("core.forum.security.session_termination_failed"))})).finally((function(){t.state.loadingTerminateSessions=!1,m.redraw()}))},n.globalLogout=function(){var t=this;return this.state.loadingGlobalLogout=!0,Wi.request({method:"POST",url:Wi.forum.attribute("baseUrl")+"/global-logout"}).then((function(){return window.location.reload()})).finally((function(){t.state.loadingGlobalLogout=!1,m.redraw()}))},e}(Ge);function In(t){t.routes={index:{path:"/all",component:cn},discussion:{path:"/d/:id",component:ae,resolverClass:Sn},"discussion.near":{path:"/d/:id/:near",component:ae,resolverClass:Sn},user:{path:"/u/:username",component:dn},"user.posts":{path:"/u/:username",component:dn},"user.discussions":{path:"/u/:username/discussions",component:gn},settings:{path:"/settings",component:En},"user.security":{path:"/u/:username/security",component:Bn},notifications:{path:"/notifications",component:Nn}}}function On(t){var e=t.session.user;if(e&&!e.isEmailConfirmed()){var n=function(n){function r(){return n.apply(this,arguments)||this}w(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,{className:"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}(E),r=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return D({},n,{children:[m("div",{className:"container"},n.children)]})},e}(Ft);m.mount($('<div className="App-notices"/>').insertBefore("#content")[0],{view:function(){return m(r,{dismissible:!1,controls:[m(n,null)],className:"Alert--emailConfirmation"},t.translator.trans("core.forum.user_email_confirmation.alert_message",{email:m("strong",null,e.email())}))}})}}var Ln=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],Mn=Ln.join(","),$n="undefined"==typeof Element,jn=$n?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Rn=!$n&&Element.prototype.getRootNode?function(t){return t.getRootNode()}:function(t){return t.ownerDocument},Hn=function(t,e,n){var r=Array.prototype.slice.apply(t.querySelectorAll(Mn));return e&&jn.call(t,Mn)&&r.unshift(t),r.filter(n)},Un=function t(e,n,r){for(var i=[],o=Array.from(e);o.length;){var s=o.shift();if("SLOT"===s.tagName){var a=s.assignedElements(),u=t(a.length?a:s.children,!0,r);r.flatten?i.push.apply(i,u):i.push({scope:s,candidates:u})}else{jn.call(s,Mn)&&r.filter(s)&&(n||!e.includes(s))&&i.push(s);var l=s.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(s),c=!r.shadowRootFilter||r.shadowRootFilter(s);if(l&&c){var d=t(!0===l?s.children:l.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scope:s,candidates:d})}else o.unshift.apply(o,s.children)}}return i},qn=function(t,e){return t.tabIndex<0&&(e||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||t.isContentEditable)&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},zn=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Vn=function(t){return"INPUT"===t.tagName},Wn=function(t){var e=t.getBoundingClientRect(),n=e.width,r=e.height;return 0===n&&0===r},Gn=function(t,e){return!(e.disabled||function(t){return Vn(t)&&"hidden"===t.type}(e)||function(t,e){var n=e.displayCheck,r=e.getShadowRoot;if("hidden"===getComputedStyle(t).visibility)return!0;var i=jn.call(t,"details>summary:first-of-type")?t.parentElement:t;if(jn.call(i,"details:not([open]) *"))return!0;var o=Rn(t).host,s=(null==o?void 0:o.ownerDocument.contains(o))||t.ownerDocument.contains(t);if(n&&"full"!==n){if("non-zero-area"===n)return Wn(t)}else{if("function"==typeof r){for(var a=t;t;){var u=t.parentElement,l=Rn(t);if(u&&!u.shadowRoot&&!0===r(u))return Wn(t);t=t.assignedSlot?t.assignedSlot:u||l===t.ownerDocument?u:l.host}t=a}if(s)return!t.getClientRects().length}return!1}(e,t)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var n=0;n<e.children.length;n++){var r=e.children.item(n);if("LEGEND"===r.tagName)return!!jn.call(e,"fieldset[disabled] *")||!r.contains(t)}return!0}e=e.parentElement}return!1}(e))},Yn=function(t,e){return!(function(t){return function(t){return Vn(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,n=t.form||Rn(t),r=function(t){return n.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=r(window.CSS.escape(t.name));else try{e=r(t.name)}catch(t){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message),!1}var i=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]}(e,t.form);return!i||i===t}(t)}(e)||qn(e)<0||!Gn(t,e))},Kn=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Xn=function t(e){var n=[],r=[];return e.forEach((function(e,i){var o=!!e.scope,s=o?e.scope:e,a=qn(s,o),u=o?t(e.candidates):s;0===a?o?n.push.apply(n,u):n.push(s):r.push({documentOrder:i,tabIndex:a,item:e,isScope:o,content:u})})),r.sort(zn).reduce((function(t,e){return e.isScope?t.push.apply(t,e.content):t.push(e.content),t}),[]).concat(n)},Jn=function(t,e){var n;return n=(e=e||{}).getShadowRoot?Un([t],e.includeContainer,{filter:Yn.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:Kn}):Hn(t,e.includeContainer,Yn.bind(null,e)),Xn(n)},Qn=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==jn.call(t,Mn)&&Yn(e,t)},Zn=Ln.concat("iframe").join(","),tr=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==jn.call(t,Zn)&&Gn(e,t)};function er(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 nr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?er(Object(n),!0).forEach((function(e){rr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):er(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function rr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ir,or=(ir=[],{activateTrap:function(t){if(ir.length>0){var e=ir[ir.length-1];e!==t&&e.pause()}var n=ir.indexOf(t);-1===n||ir.splice(n,1),ir.push(t)},deactivateTrap:function(t){var e=ir.indexOf(t);-1!==e&&ir.splice(e,1),ir.length>0&&ir[ir.length-1].unpause()}}),sr=function(t){return setTimeout(t,0)},ar=function(t,e){var n=-1;return t.every((function(t,r){return!e(t)||(n=r,!1)})),n},ur=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},lr=function(t){return t.target.shadowRoot&&"function"==typeof t.composedPath?t.composedPath()[0]:t.target},cr=function(t,e){var n,r=(null==e?void 0:e.document)||document,i=nr({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},e),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s=function(t,e,n){return t&&void 0!==t[e]?t[e]:i[n||e]},a=function(t){return o.containerGroups.findIndex((function(e){var n=e.container,r=e.tabbableNodes;return n.contains(t)||r.find((function(e){return e===t}))}))},u=function(t){var e=i[t];if("function"==typeof e){for(var n=arguments.length,o=new Array(n>1?n-1:0),s=1;s<n;s++)o[s-1]=arguments[s];e=e.apply(void 0,o)}if(!0===e&&(e=void 0),!e){if(void 0===e||!1===e)return e;throw new Error("`".concat(t,"` was specified but was not a node, or did not return a node"))}var a=e;if("string"==typeof e&&!(a=r.querySelector(e)))throw new Error("`".concat(t,"` as selector refers to no known node"));return a},l=function(){var t=u("initialFocus");if(!1===t)return!1;if(void 0===t)if(a(r.activeElement)>=0)t=r.activeElement;else{var e=o.tabbableGroups[0];t=e&&e.firstTabbableNode||u("fallbackFocus")}if(!t)throw new Error("Your focus-trap needs to have at least one focusable element");return t},c=function(){if(o.containerGroups=o.containers.map((function(t){var e,n,r=Jn(t,i.tabbableOptions),o=(e=t,(n=(n=i.tabbableOptions)||{}).getShadowRoot?Un([e],n.includeContainer,{filter:Gn.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):Hn(e,n.includeContainer,Gn.bind(null,n)));return{container:t,tabbableNodes:r,focusableNodes:o,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=o.findIndex((function(e){return e===t}));if(!(n<0))return e?o.slice(n+1).find((function(t){return Qn(t,i.tabbableOptions)})):o.slice(0,n).reverse().find((function(t){return Qn(t,i.tabbableOptions)}))}}})),o.tabbableGroups=o.containerGroups.filter((function(t){return t.tabbableNodes.length>0})),o.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},d=function t(e){!1!==e&&e!==r.activeElement&&(e&&e.focus?(e.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=e,function(t){return t.tagName&&"input"===t.tagName.toLowerCase()&&"function"==typeof t.select}(e)&&e.select()):t(l()))},h=function(t){var e=u("setReturnFocus",t);return e||!1!==e&&t},f=function(t){var e=lr(t);a(e)>=0||(ur(i.clickOutsideDeactivates,t)?n.deactivate({returnFocus:i.returnFocusOnDeactivate&&!tr(e,i.tabbableOptions)}):ur(i.allowOutsideClick,t)||t.preventDefault())},p=function(t){var e=lr(t),n=a(e)>=0;n||e instanceof Document?n&&(o.mostRecentlyFocusedNode=e):(t.stopImmediatePropagation(),d(o.mostRecentlyFocusedNode||l()))},m=function(t){if(function(t){return"Escape"===t.key||"Esc"===t.key||27===t.keyCode}(t)&&!1!==ur(i.escapeDeactivates,t))return t.preventDefault(),void n.deactivate();(function(t){return"Tab"===t.key||9===t.keyCode})(t)&&function(t){var e=lr(t);c();var n=null;if(o.tabbableGroups.length>0){var r=a(e),s=r>=0?o.containerGroups[r]:void 0;if(r<0)n=t.shiftKey?o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:o.tabbableGroups[0].firstTabbableNode;else if(t.shiftKey){var l=ar(o.tabbableGroups,(function(t){var n=t.firstTabbableNode;return e===n}));if(l<0&&(s.container===e||tr(e,i.tabbableOptions)&&!Qn(e,i.tabbableOptions)&&!s.nextTabbableNode(e,!1))&&(l=r),l>=0){var h=0===l?o.tabbableGroups.length-1:l-1;n=o.tabbableGroups[h].lastTabbableNode}}else{var f=ar(o.tabbableGroups,(function(t){var n=t.lastTabbableNode;return e===n}));if(f<0&&(s.container===e||tr(e,i.tabbableOptions)&&!Qn(e,i.tabbableOptions)&&!s.nextTabbableNode(e))&&(f=r),f>=0){var p=f===o.tabbableGroups.length-1?0:f+1;n=o.tabbableGroups[p].firstTabbableNode}}}else n=u("fallbackFocus");n&&(t.preventDefault(),d(n))}(t)},v=function(t){var e=lr(t);a(e)>=0||ur(i.clickOutsideDeactivates,t)||ur(i.allowOutsideClick,t)||(t.preventDefault(),t.stopImmediatePropagation())},g=function(){if(o.active)return or.activateTrap(n),o.delayInitialFocusTimer=i.delayInitialFocus?sr((function(){d(l())})):d(l()),r.addEventListener("focusin",p,!0),r.addEventListener("mousedown",f,{capture:!0,passive:!1}),r.addEventListener("touchstart",f,{capture:!0,passive:!1}),r.addEventListener("click",v,{capture:!0,passive:!1}),r.addEventListener("keydown",m,{capture:!0,passive:!1}),n},y=function(){if(o.active)return r.removeEventListener("focusin",p,!0),r.removeEventListener("mousedown",f,!0),r.removeEventListener("touchstart",f,!0),r.removeEventListener("click",v,!0),r.removeEventListener("keydown",m,!0),n};return(n={get active(){return o.active},get paused(){return o.paused},activate:function(t){if(o.active)return this;var e=s(t,"onActivate"),n=s(t,"onPostActivate"),i=s(t,"checkCanFocusTrap");i||c(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,e&&e();var a=function(){i&&c(),g(),n&&n()};return i?(i(o.containers.concat()).then(a,a),this):(a(),this)},deactivate:function(t){if(!o.active)return this;var e=nr({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},t);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,y(),o.active=!1,o.paused=!1,or.deactivateTrap(n);var r=s(e,"onDeactivate"),a=s(e,"onPostDeactivate"),u=s(e,"checkCanReturnFocus"),l=s(e,"returnFocus","returnFocusOnDeactivate");r&&r();var c=function(){sr((function(){l&&d(h(o.nodeFocusedBeforeActivation)),a&&a()}))};return l&&u?(u(h(o.nodeFocusedBeforeActivation)).then(c,c),this):(c(),this)},pause:function(){return o.paused||!o.active||(o.paused=!0,y()),this},unpause:function(){return o.paused&&o.active?(o.paused=!1,c(),g(),this):this},updateContainerElements:function(t){var e=[].concat(t).filter(Boolean);return o.containers=e.map((function(t){return"string"==typeof t?r.querySelector(t):t})),o.active&&c(),this}}).updateContainerElements(t),n};function dr(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e[1]=D({escapeDeactivates:!1},e[1]),cr.apply(void 0,e)}var hr=!1;if("undefined"!=typeof window){var fr={get passive(){hr=!0}};window.addEventListener("testPassive",null,fr),window.removeEventListener("testPassive",null,fr)}var pr,mr="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),vr=[],gr=!1,yr=-1,br=void 0,wr=void 0,Dr=void 0,xr=function(t){return vr.some((function(e){return!(!e.options.allowTouchMove||!e.options.allowTouchMove(t))}))},Cr=function(t){var e=t||window.event;return!!xr(e.target)||e.touches.length>1||(e.preventDefault&&e.preventDefault(),!1)},Ar=function(){mr&&(vr.forEach((function(t){t.targetElement.ontouchstart=null,t.targetElement.ontouchmove=null})),gr&&(document.removeEventListener("touchmove",Cr,hr?{passive:!1}:void 0),gr=!1),yr=-1),mr?function(){if(void 0!==wr){var t=-parseInt(document.body.style.top,10),e=-parseInt(document.body.style.left,10);document.body.style.position=wr.position,document.body.style.top=wr.top,document.body.style.left=wr.left,window.scrollTo(e,t),wr=void 0}}():(void 0!==Dr&&(document.body.style.paddingRight=Dr,Dr=void 0),void 0!==br&&(document.body.style.overflow=br,br=void 0)),vr=[]},Er=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).focusTrap=void 0,e.lastSetFocusTrap=void 0,e.modalClosing=!1,e.keyUpListener=null,e}w(e,t);var n=e.prototype;return n.view=function(t){var e=this;return m("[",null,this.attrs.state.modalList.map((function(t,n){var r=null==t?void 0:t.componentClass;return m("div",{key:t.key,className:"ModalManager modal","data-modal-key":t.key,"data-modal-number":n,role:"dialog","aria-modal":"true",style:{"--modal-number":n},"aria-hidden":e.attrs.state.modal!==t&&"true"},!!r&&[m(r,Object.assign({key:t.key},t.attrs,{animateShow:e.animateShow.bind(e),animateHide:e.animateHide.bind(e),state:e.attrs.state})),m("div",{key:t.key,className:"ModalManager-invisibleBackdrop",onclick:e.handlePossibleBackdropClick.bind(e)})])})),this.attrs.state.backdropShown&&m("div",{className:"Modal-backdrop backdrop",ontransitionend:this.onBackdropTransitionEnd.bind(this),"data-showing":!!this.attrs.state.modalList.length,style:{"--modal-count":this.attrs.state.modalList.length}}))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.keyUpListener=this.handleEscPress.bind(this),document.body.addEventListener("keyup",this.keyUpListener)},n.onbeforeremove=function(e){t.prototype.onbeforeremove.call(this,e),this.keyUpListener&&document.body.removeEventListener("keyup",this.keyUpListener),this.keyUpListener=null},n.onupdate=function(e){var n=this;t.prototype.onupdate.call(this,e),requestAnimationFrame((function(){try{var t,e;if(!n.attrs.state.isModalOpen())return null==(e=document.getElementById("app"))||e.setAttribute("aria-hidden","false"),null==n.focusTrap.deactivate||n.focusTrap.deactivate(),void Ar();null==(t=document.getElementById("app"))||t.setAttribute("aria-hidden","true");var r=n.attrs.state.modal.key;n.focusTrap&&n.lastSetFocusTrap!==r&&(null==n.focusTrap.deactivate||n.focusTrap.deactivate(),Ar()),n.activeDialogElement&&n.lastSetFocusTrap!==r&&(n.focusTrap=dr(n.activeDialogElement,{allowOutsideClick:!0}),null==n.focusTrap.activate||n.focusTrap.activate(),function(t,e){if(t){if(!vr.some((function(e){return e.targetElement===t}))){var n={targetElement:t,options:e||{}};vr=[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(vr),[n]),mr?window.requestAnimationFrame((function(){if(void 0===wr){wr={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var t=window,e=t.scrollY,n=t.scrollX,r=t.innerHeight;document.body.style.position="fixed",document.body.style.top=-e,document.body.style.left=-n,setTimeout((function(){return window.requestAnimationFrame((function(){var t=r-window.innerHeight;t&&e>=r&&(document.body.style.top=-(e+t))}))}),300)}})):function(t){if(void 0===Dr){var e=!!t&&!0===t.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;if(e&&n>0){var r=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);Dr=document.body.style.paddingRight,document.body.style.paddingRight=r+n+"px"}}void 0===br&&(br=document.body.style.overflow,document.body.style.overflow="hidden")}(e),mr&&(t.ontouchstart=function(t){1===t.targetTouches.length&&(yr=t.targetTouches[0].clientY)},t.ontouchmove=function(e){1===e.targetTouches.length&&function(t,e){var n=t.targetTouches[0].clientY-yr;!xr(t.target)&&(e&&0===e.scrollTop&&n>0||function(t){return!!t&&t.scrollHeight-t.scrollTop<=t.clientHeight}(e)&&n<0?Cr(t):t.stopPropagation())}(e,t)},gr||(document.addEventListener("touchmove",Cr,hr?{passive:!1}:void 0),gr=!0))}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")}(n.activeDialogManagerElement,{reserveScrollBarGap:!0})),n.lastSetFocusTrap=r}catch(t){}}))},n.animateShow=function(t){var e=this;void 0===t&&(t=function(){}),this.attrs.state.modal&&(this.activeDialogElement.addEventListener("transitionend",(function(){t()}),{once:!0}),requestAnimationFrame((function(){e.activeDialogElement.classList.add("in")})))},n.animateHide=function(t){var e=this;void 0===t&&(t=function(){}),this.modalClosing||(this.modalClosing=!0,this.activeDialogElement.addEventListener("transitionend",(function(){e.modalClosing=!1,e.attrs.state.close(),t()}),{once:!0}),this.activeDialogElement.classList.remove("in"),this.activeDialogElement.classList.add("out"))},n.handleEscPress=function(t){if(this.attrs.state.modal){var e=this.attrs.state.modal.componentClass.dismissibleOptions;"Escape"===t.key&&e.viaEscKey&&(t.preventDefault(),this.animateHide())}},n.handlePossibleBackdropClick=function(t){this.attrs.state.modal&&this.attrs.state.modal.componentClass.dismissibleOptions.viaBackdropClick&&this.animateHide()},n.onBackdropTransitionEnd=function(t){"opacity"===t.propertyName&&null===t.currentTarget.getAttribute("data-showing")&&(this.attrs.state.backdropShown=!1,m.redraw())},F(e,[{key:"activeDialogElement",get:function(){var t;return document.body.querySelector('.ModalManager[data-modal-key="'+(null==(t=this.attrs.state.modal)?void 0:t.key)+'"] .Modal')}},{key:"activeDialogManagerElement",get:function(){var t;return document.body.querySelector('.ModalManager[data-modal-key="'+(null==(t=this.attrs.state.modal)?void 0:t.key)+'"]')}}]),e}(E),Nr=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state},n.view=function(){var t=this,e=this.state.getActiveAlerts();return m("div",{className:"AlertManager"},Object.keys(e).map(Number).map((function(n){var r=e[n],i="error"===r.attrs.type;return m("div",{className:"AlertManager-alert",role:"alert","aria-live":i?"assertive":"polite"},m(r.componentClass,Object.assign({},r.attrs,{ondismiss:t.state.dismiss.bind(t.state,n)}),r.children))})))},e}(E),kr=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.className=function(){return"RequestErrorModal Modal--large"},n.title=function(){return!!this.attrs.error.xhr&&this.attrs.error.xhr.status+" "+this.attrs.error.xhr.statusText},n.content=function(){var t,e=this.attrs,n=e.error,r=e.formattedError;return t=r.length?r.join("\n\n"):n.response?JSON.stringify(n.response,null,2):n.responseText,m("div",{className:"Modal-body"},m("pre",null,this.attrs.error.options.method," ",this.attrs.error.options.url,m("br",null),m("br",null),t))},e}(_t),Sr=n(5387),Tr=n.n(Sr),Fr=n(1904),_r=n.n(Fr),Pr=n(8213),Br=n.n(Pr),Ir=n(2061),Or=n.n(Ir),Lr=n(8974),Mr=n.n(Lr),$r=n(9767),jr=n.n($r),Rr=n(402),Hr=n.n(Rr);function Ur(t){return t.reduce((function(t,e){return t.concat(Array.isArray(e)?Ur(e):e)}),[])}function qr(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 zr(t){for(var e=function(t){return/\s/.test(t)},n=[],r={},i=0,o=null,s=!1,a=0;a<t.length;){if(s&&(e(t[a])||"{"===t[a]))s=!1,o=t.slice(i,a),"{"===t[a]&&a--;else if(!s&&!e(t[a])){var u="{"===t[a];if(o&&u){var l=Vr(t,a);if(-1===l)throw new Error('Unbalanced curly braces in string: "'.concat(t,'"'));r[o]=t.slice(a+1,l),a=l,o=null}else o&&(n.push(o),o=null),s=!0,i=a}a++}return s&&(o=t.slice(i)),o&&n.push(o),{args:n,cases:r}}function Vr(t,e){for(var n=0,r=e+1;r<t.length;r++){var i=t.charAt(r);if("}"===i){if(0===n)return r;n--}else"{"===i&&n++}return-1}function Wr(t){return Gr(t.slice(1,-1),",",3)}function Gr(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(!t)return r;if(1===n)return r.push(t),r;var i=t.indexOf(e);if(-1===i)return r.push(t),r;var o=t.substring(0,i).trim(),s=t.substring(i+e.length+1).trim();return r.push(o),Gr(s,e,n-1,r)}function Yr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Kr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Yr(Object(n),!0).forEach((function(e){Hr()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Xr=0,Jr="other";function Qr(t,e){for(var n=0,r="",i=0,o={};n<t.length;){if("#"!==t[n]||i)r+=t[n];else{var s="__hashToken".concat(Xr++);r+="{".concat(s,", number}"),o[s]=e}"{"===t[n]?i++:"}"===t[n]&&i--,n++}return{caseBody:r,numberValues:o}}function Zr(t){var e=arguments.length>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=zr(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!==pr&&pr.resolvedOptions().locale===n||(pr=new Intl.PluralRules(n));var c=pr.select(u);c!==Jr&&l.push(c)}1===u&&l.push("one"),l.push("=".concat(u),Jr);for(var d=0;d<l.length;d++){var h=l[d];if(h in a){var f=Qr(a[h],u),p=f.caseBody,m=f.numberValues;return i(p,Kr(Kr({},r),m))}}return t}var ti="other";function ei(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=zr(e),o=i.cases;return t in o?r(o[t],n):ti in o?r(o.other,n):t}function ni(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=[],o=function(r,o,s,a,u,l){if(o)return{break:!0};var c=ri(t,s,a,u);if(!c)return i;var d=c.segmentIndex===a,h=t[c.segmentIndex],f=[];if(d)f.push(r.slice(u+1,c.segmentStart));else{f.push(r.slice(u+1));for(var p=a+1;p<c.segmentIndex;p++)f.push(t[p]);f.push(h.slice(0,c.segmentStart))}return i.push(r.slice(0,l)),i.push(n(s,e,ni(f.filter((function(t){return""!==t})),e,n))),t.splice(c.segmentIndex+1,0,h.slice(c.segmentEnd+1)),{processedSegment:!0,newSegmentIndex:c.segmentIndex,break:!0}};return ii(t,0,0,i,o),i.filter((function(t){return""!==t})).map((function(t,e){return r.includes(e)?t:si(t)}))}function ri(t,e,n,r){var i,o=1;return ii(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}function ii(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 oi(t){return Object.keys(t).reduce((function(e,n){return e[n]=ai(t[n]),e}),{})}function si(t){return"string"!=typeof t?t:t.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#039;/g,"'").replace(/&amp;/g,"&")}function ai(t){return"string"==typeof t||t instanceof String?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"):Array.isArray(t)?t.map(ai):t}function ui(t,e,n){return"<".concat(t,">").concat(si(n),"</").concat(t,">")}var li=function(t){Or()(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=jr()(e);if(n){var i=jr()(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return Mr()(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 _r()(this,i),(e=r.call(this,t,n)).richHandler=o||ui,e}return Br()(i,[{key:"rich",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=oi(e),r=Ur(this.process(t,n)),i=Math.random().toString(36)+Math.random().toString(36)+Math.random().toString(36),o=Object.fromEntries(Object.entries(e).map((function(t){var e=Tr()(t,2),n=e[0];return e[1],[n,i]}))),s=Ur(this.process(t,o)),a=ni(s,o,(function(){return i})),u=a.map((function(t,e){return t===i?null:e})).filter((function(t){return null!==t}));return ni(r,n,this.richHandler,u)}}]),i}(function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_r()(this,t),Hr()(this,"format",qr((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ur(n.process(t,e)).join("")}))),this.locale=e,this.typeHandlers=r}return Br()(t,[{key:"process",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)return[];var n=t.indexOf("{");if(-1!==n){var r=Vr(t,n);if(-1===r)throw new Error('Unbalanced curly braces in string: "'.concat(t,'"'));var i=t.substring(n,r+1);if(i){var o=[],s=t.substring(0,n);s&&o.push(s);var a=Wr(i),u=Tr()(a,3),l=u[0],c=u[1],d=u[2],h=e[l];null==h&&(h="");var f=c&&this.typeHandlers[c];o.push(f?f(h,d,this.locale,e,this.process.bind(this)):h);var p=t.substring(r+1);return p&&o.push(this.process(p,e)),o}}return[t]}}]),t}());function ci(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 di(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ci(Object(n),!0).forEach((function(e){Hr()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ci(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function hi(t,e,n){var r=e[t]||m(t),i=si(m.fragment(n).children);return di(di({},r),{},{children:i})}var fi=function(){function t(){this.translations={},this.formatter=new li(null,this.formatterTypeHandlers(),hi)}var e=t.prototype;return e.setLocale=function(t){this.formatter.locale=t},e.getLocale=function(){return this.formatter.locale},e.addTranslations=function(t){Object.assign(this.translations,t)},e.formatterTypeHandlers=function(){return{plural:Zr,select:ei}},e.preprocessParameters=function(t){if("user"in t){var e=z(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 pi(t){return Array.isArray(t.data)}var mi=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=Ee(ke().mark((function t(e,n,r,i){var o,s,a=this;return ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===r&&(r={}),void 0===i&&(i={}),o=r,s=v.forum.attribute("apiUrl")+"/"+e,n instanceof Array?s+="?filter[id]="+n.join(","):"object"==typeof n?o=n:n&&(s+="/"+n),t.abrupt("return",v.request(D({method:"GET",url:s,params:o},i)).then((function(t){return pi(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}(),vi=function(){function t(t,e){this.user=void 0,this.csrfToken=void 0,this.user=t,this.csrfToken=e}var e=t.prototype;return e.login=function(t,e){return void 0===e&&(e={}),v.request(D({method:"POST",url:v.forum.attribute("baseUrl")+"/login",body:t},e))},e.logout=function(){window.location.href=v.forum.attribute("baseUrl")+"/logout?token="+this.csrfToken},t}(),gi=function(){function t(){var t=this;this.focusTrap=void 0,this.appElement=void 0,this.resizeHandler=function(e){!e.matches&&t.isOpen()&&t.hide()}.bind(this),this.drawerAvailableMediaQuery=void 0,document.getElementById("content").addEventListener("click",(function(e){t.isOpen()&&(e.preventDefault(),t.hide())})),this.appElement=document.getElementById("app"),this.focusTrap=dr("#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 yi(t,e){void 0===e&&(e="");var n={};for(var r in t){var i=t[r];if("resolver"in i)n[e+i.path]=i.resolver;else{if(!("component"in i))throw new Error("Either a resolver or a component must be provided for the route ["+r+"]");var o="resolverClass"in i?i.resolverClass:kn;n[e+i.path]=new o(i.component,r)}}return n}var bi=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 wi(){$("[data-humantime]").each((function(){var t=$(this),e=st(t.attr("datetime"));t.html(e)}))}function Di(){setInterval(wi,1e4)}function xi(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 Ci(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 Ai=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.apiEndpoint=function(){return"/"},e}(fe),Ei=n(2898),Ni=n.n(Ei);function ki(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 Si=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}w(e,t);var n=e.prototype;return n.username=function(){return fe.attribute("username").call(this)},n.slug=function(){return fe.attribute("slug").call(this)},n.displayName=function(){return fe.attribute("displayName").call(this)},n.email=function(){return fe.attribute("email").call(this)},n.isEmailConfirmed=function(){return fe.attribute("isEmailConfirmed").call(this)},n.password=function(){return fe.attribute("password").call(this)},n.avatarUrl=function(){return fe.attribute("avatarUrl").call(this)},n.preferences=function(){return fe.attribute("preferences").call(this)},n.groups=function(){return fe.hasMany("groups").call(this)},n.isAdmin=function(){return fe.attribute("isAdmin").call(this)},n.joinTime=function(){return fe.attribute("joinTime",fe.transformDate).call(this)},n.lastSeenAt=function(){return fe.attribute("lastSeenAt",fe.transformDate).call(this)},n.markedAllAsReadAt=function(){return fe.attribute("markedAllAsReadAt",fe.transformDate).call(this)},n.unreadNotificationCount=function(){return fe.attribute("unreadNotificationCount").call(this)},n.newNotificationCount=function(){return fe.attribute("newNotificationCount").call(this)},n.discussionCount=function(){return fe.attribute("discussionCount").call(this)},n.commentCount=function(){return fe.attribute("commentCount").call(this)},n.canEdit=function(){return fe.attribute("canEdit").call(this)},n.canEditCredentials=function(){return fe.attribute("canEditCredentials").call(this)},n.canEditGroups=function(){return fe.attribute("canEditGroups").call(this)},n.canDelete=function(){return fe.attribute("canDelete").call(this)},n.color=function(){var t=this;return pe("displayName","avatarUrl","avatarColor",(function(e,n,r){return r?"rgb("+r.join(", ")+")":n?(t.calculateAvatarColor(),""):"#"+ki(e)})).call(this)},n.isOnline=function(){return dayjs().subtract(5,"minutes").isBefore(this.lastSeenAt())},n.badges=function(){var t=new B,e=this.groups();return e&&e.forEach((function(e){t.add("group"+(null==e?void 0:e.id()),m(qe,{group:e}))})),t},n.calculateAvatarColor=function(){var t,e=new Image,n=this;e.addEventListener("load",(function(){try{var t=new(Ni());n.avatarColor=t.getColor(this)}catch(t){if(!(t instanceof TypeError))throw t;n.avatarColor=[255,255,255]}n.freshness=new Date,m.redraw()})),e.crossOrigin="anonymous",e.src=null!=(t=this.avatarUrl())?t:""},n.savePreferences=function(t){var e=this.preferences();return Object.assign(null!=e?e:{},t),this.save({preferences:e})},e}(fe),Ti=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.number=function(){return fe.attribute("number").call(this)},n.discussion=function(){return fe.hasOne("discussion").call(this)},n.createdAt=function(){return fe.attribute("createdAt",fe.transformDate).call(this)},n.user=function(){return fe.hasOne("user").call(this)},n.contentType=function(){return fe.attribute("contentType").call(this)},n.content=function(){return fe.attribute("content").call(this)},n.contentHtml=function(){return fe.attribute("contentHtml").call(this)},n.renderFailed=function(){return fe.attribute("renderFailed").call(this)},n.contentPlain=function(){return pe("contentHtml",(function(t){return"string"==typeof t?J(t):t})).call(this)},n.editedAt=function(){return fe.attribute("editedAt",fe.transformDate).call(this)},n.editedUser=function(){return fe.hasOne("editedUser").call(this)},n.isEdited=function(){return pe("editedAt",(function(t){return!!t})).call(this)},n.hiddenAt=function(){return fe.attribute("hiddenAt",fe.transformDate).call(this)},n.hiddenUser=function(){return fe.hasOne("hiddenUser").call(this)},n.isHidden=function(){return pe("hiddenAt",(function(t){return!!t})).call(this)},n.canEdit=function(){return fe.attribute("canEdit").call(this)},n.canHide=function(){return fe.attribute("canHide").call(this)},n.canDelete=function(){return fe.attribute("canDelete").call(this)},e}(fe),Fi=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.contentType=function(){return fe.attribute("contentType").call(this)},n.content=function(){return fe.attribute("content").call(this)},n.createdAt=function(){return fe.attribute("createdAt",fe.transformDate).call(this)},n.isRead=function(){return fe.attribute("isRead").call(this)},n.user=function(){return fe.hasOne("user").call(this)},n.fromUser=function(){return fe.hasOne("fromUser").call(this)},n.subject=function(){return fe.hasOne("subject").call(this)},e}(fe),_i=function(){function t(){this.modal=null,this.modalList=[],this.backdropShown=!1,this.key=0}var e=t.prototype;return e.show=function(t,e,n){var r=this;if(void 0===e&&(e={}),void 0===n&&(n=!1),!(t.prototype instanceof _t)){var i="The ModalManager can only show Modals.";throw console.error(i),new Error(i)}this.backdropShown=!0,m.redraw.sync(),requestAnimationFrame((function(){r.modal={componentClass:t,attrs:e,key:r.key++},n?r.modalList.push(r.modal):r.modalList=[r.modal],m.redraw()}))},e.close=function(){this.modal&&(this.modalList.length>1?(this.modalList.pop(),this.modal=this.modalList[this.modalList.length-1]):(this.modal=null,this.modalList=[]),m.redraw())},e.isModalOpen=function(){return!!this.modal},t}(),Pi=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=Ft,o={};return 1==arguments.length?r=t:2==arguments.length?(o=t,r=e):3==arguments.length&&(i=t,o=e,r=n),this.activeAlerts[++this.alertId]={children:r,attrs:o,componentClass:i},m.redraw(),this.alertId},e.dismiss=function(t){t&&t in this.activeAlerts&&(delete this.activeAlerts[t],m.redraw())},e.clear=function(){this.activeAlerts={},m.redraw()},t}();function Bi(t,e,n){var r,i;console.group("%c"+e,"background-color: #d83e3e; color: #ffffff; font-weight: bold;"),console.error(n),console.groupEnd(),null!=(r=v.session)&&null!=(i=r.user)&&i.isAdmin()&&v.alerts.show({type:"error"},""+t)}var Ii=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.token=function(){return fe.attribute("token").call(this)},n.userId=function(){return fe.attribute("userId").call(this)},n.title=function(){return fe.attribute("title").call(this)},n.type=function(){return fe.attribute("type").call(this)},n.createdAt=function(){return fe.attribute("createdAt",fe.transformDate).call(this)},n.lastActivityAt=function(){return fe.attribute("lastActivityAt",fe.transformDate).call(this)},n.lastIpAddress=function(){return fe.attribute("lastIpAddress").call(this)},n.device=function(){return fe.attribute("device").call(this)},n.isCurrent=function(){return fe.attribute("isCurrent").call(this)},n.isSessionToken=function(){return fe.attribute("isSessionToken").call(this)},e}(fe),Oi=["background","deserialize","extract","modifyText"];function Li(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 Mi=function(){function t(){this.forum=void 0,this.routes={},this.initializers=new B,this.session=void 0,this.translator=new fi,this.store=new mi({"access-tokens":Ii,forums:Ai,users:Si,discussions:we,posts:Ti,groups:ze,notifications:Fi}),this.cache={},this.booted=!1,this.current=new k(null),this.previous=new k(null),this.modal=new _i,this.alerts=new Pi,this.drawer=void 0,this.history=null,this.pane=null,this.data=void 0,this.refs={fontawesome:"https://fontawesome.com/v5/search?o=r&m=free"},this._title="",this._titleCount=0,this.requestErrorAlert=null,this.initialRoute=void 0}var e=t.prototype;return e.load=function(t){this.data=t,this.translator.setLocale(t.locale)},e.boot=function(){var t,e=this,n=[];this.initializers.toArray().forEach((function(t){try{t(e)}catch(e){var r=t.itemName.includes("/")?t.itemName.replace(/(\/flarum-ext-)|(\/flarum-)/g,"-"):t.itemName;n.push((function(){return Bi(ot(v.translator.trans("core.lib.error.extension_initialiation_failed_message",{extension:r})),r+" failed to initialize",e)}))}})),this.store.pushPayload({data:this.data.resources}),this.forum=this.store.getById("forums","1"),this.session=new vi(null!=(t=this.store.getById("users",String(this.data.session.userId)))?t:null,this.data.session.csrfToken),this.mount(),this.initialRoute=window.location.href,n.forEach((function(t){return t()}))},e.bootExtensions=function(t){var e=this;Object.keys(t).forEach((function(n){var r=t[n];if(r.extend)for(var i,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Li(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)?Li(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r.extend.flat(1/0));!(i=o()).done;)i.value.extend(e,{name:n,exports:r})}))},e.mount=function(t){var e=this;void 0===t&&(t=""),m.mount(document.getElementById("modal"),{view:function(){return m(Er,{state:e.modal})}}),m.mount(document.getElementById("alerts"),{view:function(){return m(Nr,{state:e.alerts})}}),this.drawer=new gi,m.route(document.getElementById("content"),t+"/",yi(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"),Di()},e.preloadedApiDocument=function(){if(this.data.apiDocument&&window.location.href===this.initialRoute){var t=(pi(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?ot(v.translator.trans("core.lib.meta_titles.without_page_title",n)):ot(v.translator.trans("core.lib.meta_titles.with_page_title",n));r=t+r;var i=new DOMParser;document.title=i.parseFromString(r,"text/html").body.innerText},e.transformRequestOptions=function(t){var e=this,n=D({},t),r=n.background,i=n.deserialize,o=n.extract,s=n.modifyText,a=q(n,Oi),u=s||o,l=D({background:null==r||r,deserialize:null!=i?i:function(t){return t}},a);if(xi(l,"config",(function(t,n){n.setRequestHeader("X-CSRF-Token",e.session.csrfToken)})),l.method&&!["GET","POST"].includes(l.method)){var c=l.method;xi(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 bi(n,""+e,l,t);if(t.getResponseHeader){var r=t.getResponseHeader("X-CSRF-Token");r&&(v.session.csrfToken=r)}try{return""===e?null:JSON.parse(e)}catch(n){throw new bi(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=v.translator.trans("core.lib.error.permission_denied_message");break;case 404:case 410:o=v.translator.trans("core.lib.error.not_found_message");break;case 413:o=v.translator.trans("core.lib.error.payload_too_large_message");break;case 429:o=v.translator.trans("core.lib.error.rate_limit_exceeded_message");break;default:o=this.requestWasCrossOrigin(t)?v.translator.trans("core.lib.error.generic_cross_origin_message"):v.translator.trans("core.lib.error.generic_message")}var a=v.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)},v.translator.trans("core.lib.debug_button"))]},e?e(t):this.requestErrorDefaultHandler(t,a,s),Promise.reject(t)},e.requestWasCrossOrigin=function(t){return new URL(t.options.url,document.baseURI).origin!==window.location.origin},e.requestErrorDefaultHandler=function(t,e,n){if(!(t instanceof bi))throw t;if(e&&t.xhr){var r,i=t.options,o=i.method,s=i.url,a=t.xhr.status,u=void 0===a?"":a;console.group(o+" "+s+" "+u),n.length?(r=console).error.apply(r,n):console.error(t),console.groupEnd()}t.alert&&(this.requestErrorAlert=this.alerts.show(t.alert,t.alert.content))},e.showDebug=function(t,e){null!==this.requestErrorAlert&&this.alerts.dismiss(this.requestErrorAlert),this.modal.show(kr,{error:t,formattedError:e})},e.route=function(t,e){void 0===e&&(e={});var n=this.routes[t];if(!n)throw new Error("Route '"+t+"' does not exist");var r=n.path.replace(/:([^\/]+)/g,(function(t,n){return""+z(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:"")},F(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}(),$i=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){var t=v.history,e=v.pane;return m("div",{className:M("Navigation ButtonGroup",this.attrs.className),onmouseenter:e&&e.show.bind(e),onmouseleave:e&&e.onmouseleave.bind(e)},null!=t&&t.canGoBack()?[this.getBackButton(),this.getPaneButton()]:this.getDrawerButton())},n.getBackButton=function(){var t=v.history,e=null==t?void 0:t.getPrevious();return m(le,{className:"Button Navigation-back Button--icon",href:null==t?void 0:t.backUrl(),icon:"fas fa-chevron-left","aria-label":null==e?void 0:e.title,onclick:function(e){e.shiftKey||e.ctrlKey||e.metaKey||2===e.which||(e.preventDefault(),null==t||t.back())}})},n.getPaneButton=function(){var t=v.pane;return t&&t.active?m(yt,{className:M("Button Button--icon Navigation-pin",{active:t.pinned}),onclick:t.togglePinned.bind(t),icon:"fas fa-thumbtack"}):null},n.getDrawerButton=function(){if(!this.attrs.drawer)return null;var t=v.drawer,e=v.session.user;return m(yt,{className:M("Button Button--icon Navigation-drawer",{new:null==e?void 0:e.newNotificationCount()}),onclick:function(e){e.stopPropagation(),t.show()},icon:"fas fa-bars","aria-label":v.translator.trans("core.lib.nav.drawer_button")})},e}(E),ji=function(t){function e(){return t.call(this,{},1,20)||this}w(e,t);var n=e.prototype;return n.load=function(){var e,n;return null!=(e=Wi.session.user)&&e.newNotificationCount()&&(this.pages=[],this.location={page:1}),this.pages.length>0?Promise.resolve():(null==(n=Wi.session.user)||n.pushAttributes({newNotificationCount:0}),t.prototype.loadNext.call(this))},n.markAllAsRead=function(){var t;if(0!==this.pages.length)return null==(t=Wi.session.user)||t.pushAttributes({unreadNotificationCount:0}),this.pages.forEach((function(t){t.items.forEach((function(t){return t.pushAttributes({isRead:!0})}))})),Wi.request({url:Wi.forum.attribute("apiUrl")+"/notifications/read",method:"POST"})},n.deleteAll=function(){var t;if(0!==this.pages.length)return null==(t=Wi.session.user)||t.pushAttributes({unreadNotificationCount:0}),this.pages=[],Wi.request({url:Wi.forum.attribute("apiUrl")+"/notifications",method:"DELETE"})},F(e,[{key:"type",get:function(){return"notifications"}}]),e}(hn),Ri=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}(),Hi=["q"],Ui=function(t){function e(e){var n;return void 0===e&&(e=[]),(n=t.call(this,e)||this).initialValueSet=!1,n}w(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 Wi.current.type&&Wi.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,q(t,Hi));x(Wi.route(Wi.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(Wi.discussions.sortMap())[0]?delete e.sort:e.sort=t,x(Wi.route(Wi.current.get("routeName"),e))},e}(Ri);function qi(){return"ontouchstart"in window&&null!=navigator.vendor&&navigator.vendor.includes("Apple")&&null!=navigator.userAgent&&!navigator.userAgent.includes("CriOS")&&!navigator.userAgent.includes("FxiOS")}var zi=function(t){function e(){var e;return(e=t.call(this)||this).notificationComponents={discussionRenamed:$e},e.postComponents={comment:rn,discussionRenamed:sn},e.pane=null,e.history=new C,e.notifications=new ji,e.search=new Ui,e.composer=new Oe,e.discussions=new vn({}),e.route=void 0,e.data=void 0,In(y(e)),e.route=Object.assign(Object.getPrototypeOf(Object.getPrototypeOf(y(e))).route.bind(y(e)),function(t){return{discussion:function(t){function e(e,n){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(e,n){return t.route(n&&1!==n?"discussion.near":"discussion",{id:e.slug(),near:n&&1!==n?n:void 0})})),post:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(e){return t.route.discussion(e.discussion(),e.number())})),user:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(e){return t.route("user",{username:e.slug()})}))}}(y(e))),e}w(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,ot(this.translator.trans("core.forum.header.back_to_index_tooltip")),"/"),this.pane=new A(document.getElementById("app")),m.route.prefix="",t.prototype.mount.call(this,this.forum.attribute("basePath")),m.mount(document.getElementById("app-navigation"),{view:function(){return m($i,{className:"App-backControl",drawer:!0})}}),m.mount(document.getElementById("header-navigation"),$i),m.mount(document.getElementById("header-primary"),ue),m.mount(document.getElementById("header-secondary"),Pe),m.mount(document.getElementById("composer"),{view:function(){return m(Le,{state:e.composer})}}),On(this),document.getElementById("home-link").addEventListener("click",(function(t){var e;if(!t.ctrlKey&&!t.metaKey&&1!==t.button){t.preventDefault(),Wi.history.home();var n=null==(e=Wi.session.user)?void 0:e.id();n&&(Wi.store.find("users",n),m.redraw())}})),qi()&&$((function(){$(".App").addClass("mobile-safari")}))},n.viewingDiscussion=function(t){return this.current.matches(ae,{discussion:t})},n.authenticationComplete=function(t){t.loggedIn?window.location.reload():this.modal.show(Lt,t)},e}(Mi),Vi=new zi;window.app=Vi;const Wi=Vi;function Gi(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 Yi=function(){function t(t){this.model=void 0,this.callbacks=[],this.model=t}var e=t.prototype;return e.attribute=function(t,e){var n=this;return void 0===e&&(e=null),this.callbacks.push((function(){n.model.prototype[t]=e?fe.attribute(t,e):fe.attribute(t)})),this},e.hasOne=function(t){var e=this;return this.callbacks.push((function(){e.model.prototype[t]=fe.hasOne(t)})),this},e.hasMany=function(t){var e=this;return this.callbacks.push((function(){e.model.prototype[t]=fe.hasMany(t)})),this},e.extend=function(t,e){for(var n,r=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Gi(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)?Gi(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.callbacks);!(n=r()).done;)n.value.call(this)},t}(),Ki=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}(),Xi=function(){function t(){this.routes={},this.helpers={}}var e=t.prototype;return e.add=function(t,e,n){return this.routes[t]={path:e,component:n},this},e.helper=function(t,e){return this.helpers[t]=e,this},e.extend=function(t,e){Object.assign(t.routes,this.routes),Object.assign(t.route,this.helpers)},t}(),Ji=function(){function t(){this.models={}}var e=t.prototype;return e.add=function(t,e){return this.models[t]=e,this},e.extend=function(t,e){for(var n in this.models){if(t.store.models[n])throw new Error('The model type "'+n+'" has already been registered with the class "'+t.store.models[n].name+'".');t.store.models[n]=this.models[n]}},t}();const Qi={Model:Yi,PostTypes:Ki,Routes:Xi,Store:Ji};var Zi="The `evented` util is deprecated and no longer supported.",to="2547";const eo={handlers:null,getHandlers:function(t){return vt(Zi,to),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(Zi,to),this.getHandlers(t).forEach((function(t){return t.apply(e,r)}))},on:function(t,e){vt(Zi,to),this.getHandlers(t).push(e)},one:function(t,e){vt(Zi,to),this.getHandlers(t).push((function n(){e.apply(this,arguments),this.off(t,n)}))},off:function(t,e){vt(Zi,to);var n=this.getHandlers(t),r=n.indexOf(e);-1!==r&&n.splice(r,1)}};var no={prefix:"",suffix:"",blockPrefix:"",blockSuffix:"",multiline:!1,replaceNext:"",prefixSpace:!1,scanFor:"",surroundWithNewlines:!1,orderedList:!1,unorderedList:!1,trimFirst:!1};function ro(t){return t.trim().split("\n").length>1}function io(t,e){return Array(e+1).join(t)}function oo(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=io("\n",2-a)),i.match(/\S/)&&u<2&&(n=io("\n",2-u)),null==e&&(e=""),null==n&&(n=""),{newlinesToAppend:e,newlinesToPrepend:n}}function so(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 ao(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 uo(t,e){return e?"- ":t+1+". "}var lo,co=n(8492);function ho(t,e){var n,r,i=new RegExp(String.raw(lo||(n=["(w+/)?(","|common)/"],(r=["(\\w+\\/)?(","|common)\\/"])||(r=n.slice(0)),n.raw=r,lo=n),e)),o=/(\.js|\.tsx?)$/;return new Proxy(t,{get:function(t,e){return t[e]||t[e.replace(i,"$1").replace(o,"")]}})}var fo=["className","class"],po=["options","onchange","value","disabled","className","class","wrapperAttrs"],mo=function(t){function e(){return t.apply(this,arguments)||this}return w(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=q(a,fo),d=q(t,po);return m("span",Object.assign({className:M("Select",u,l)},c),m("select",Object.assign({className:M("Select-input FormControl",o,s),onchange:n?yn("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}(E),vo=["className","id"],go=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(t){var e=this.attrs,n=e.className,r=e.id,i=q(e,vo);return i.type||(i.type="text"),4===i.value.length&&(i.value=i.value.replace(/#([a-f0-9])([a-f0-9])([a-f0-9])/,"#$1$1$2$2$3$3")),m("div",{className:"ColorInput"},m("input",Object.assign({className:M("FormControl",n),id:r},i)),m("span",{className:"ColorInput-icon",role:"presentation"},nt("fas fa-exclamation-circle")),m("input",Object.assign({className:"ColorInput-preview"},i,{type:"color"})))},e}(E),yo=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return m(Et,{text:this.attrs.tooltipText||ot(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 bo={extenders:Qi,extend:o,Session:vi,Store:mi,"utils/BasicEditorDriver":Ct,"utils/bidi":h,"utils/evented":eo,"utils/EventEmitter":fn,"utils/KeyboardNavigatable":Ce,"utils/liveHumanTimes":Di,"utils/ItemList":B,"utils/mixin":function(t){for(var e=function(t){function e(){return t.apply(this,arguments)||this}return w(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":st,"utils/computed":pe,"utils/insertText":xt,"utils/styleSelectedText":function(t,e){t.focus(),e=Object.assign({},no,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=ao((r=so(e)).text)).text:(n=so((r=ao(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""+uo(n,e.unorderedList)+t})),d=c.reduce((function(t,n,r){return t+uo(r,e.unorderedList).length}),0),h=c.reduce((function(t,n,r){return t+uo(r,!e.unorderedList).length}),0);if(a.processed)return n?i=r=Math.max(r-uo(0,e.unorderedList).length,0):(r=t.selectionStart,i=t.selectionEnd-d),{text:l,selectionStart:r,selectionEnd:i};var f=oo(t),p=f.newlinesToAppend,m=f.newlinesToPrepend,v=p+c.join("\n")+m;return n?i=r=Math.max(r+uo(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&&ro(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=oo(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=ro(h)&&i.length>0?i+"\n":n,p=ro(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=oo(t);f=b.newlinesToAppend+n,p+=b.newlinesToPrepend}if(h.startsWith(f)&&h.endsWith(p)){var w=h.slice(f.length,h.length-p.length);if(c===d){var D=c-f.length;D=Math.max(D,v),v=g=D=Math.min(D,v+w.length)}else g=v+w.length;return{text:w,selectionStart:v,selectionEnd:g}}if(y)return u.length>0&&h.match(u)?{text:f+(p=p.replace(s,h)),selectionStart:v=g=v+f.length,selectionEnd:g}:{text:f+h+p,selectionStart:v=v+f.length+h.length+p.indexOf(s),selectionEnd:g=v+s.length};var x=f+h+p;v=c+f.length,g=d+f.length;var C=h.match(/^\s*|\s*$/g);if(e.trimFirst&&C){var A=C[0]||"",E=C[1]||"";x=A+f+h.trim()+p+E,v+=A.length,g-=E.length}return{text:x,selectionStart:v,selectionEnd:g}}(t,e),xt(t,n)},"utils/Drawer":gi,"utils/EditorDriverInterface":co,"utils/anchorScroll":oe,"utils/RequestError":bi,"utils/abbreviateNumber":at,"utils/string":t,"utils/SubtreeRetainer":dt,"utils/escapeRegExp":Ut,"utils/extract":z,"utils/ScrollListener":Yt,"utils/stringToColor":ki,"utils/Stream":Bt,"utils/subclassOf":N,"utils/setRouteWithForcedRefresh":x,"utils/patchMithril":f,"utils/proxifyCompat":ho,"utils/classList":M,"utils/extractText":ot,"utils/formatNumber":te,"utils/mapRoutes":yi,"utils/withAttr":yn,"utils/throttleDebounce":s,"utils/isObject":_,"utils/focusTrap":i,"utils/isDark":me,"models/AccessToken":Ii,"models/Notification":Fi,"models/User":Si,"models/Post":Ti,"models/Discussion":we,"models/Group":ze,"models/Forum":Ai,Component:E,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:fi,"components/AlertManager":Nr,"components/Page":S,"components/Switch":wn,"components/Badge":be,"components/LoadingIndicator":ft,"components/Placeholder":zt,"components/Separator":O,"components/Dropdown":ut,"components/SplitDropdown":ne,"components/RequestErrorModal":kr,"components/FieldSet":Dn,"components/Select":mo,"components/Navigation":$i,"components/Alert":Ft,"components/Link":G,"components/LinkButton":le,"components/Checkbox":bn,"components/ColorPreviewInput":go,"components/ConfirmDocumentUnload":pt,"components/SelectDropdown":he,"components/ModalManager":Er,"components/Button":yt,"components/Modal":_t,"components/GroupBadge":qe,"components/TextEditor":Nt,"components/TextEditorButton":yo,"components/Tooltip":Et,"components/EditUserModal":Ve,"components/LabelValue":Tn,"components/IPAddress":tn,Model:fe,Application:Mi,"helpers/fullTime":Ze,"helpers/avatar":Y,"helpers/fireApplicationError":Bi,"helpers/fireDebugWarning":e,"helpers/icon":nt,"helpers/humanTime":lt,"helpers/punctuateSeries":function(t){if(2===t.length)return v.translator.trans("core.lib.series.two_text",{first:t[0],second:t[1]});if(t.length>=3){var e=t.slice(1,t.length-1).reduce((function(t,e){return t.concat([e,v.translator.trans("core.lib.series.glue_text")])}),[]).slice(0,-1);return v.translator.trans("core.lib.series.three_text",{first:t[0],second:e,third:t[t.length-1]})}return t},"helpers/highlight":et,"helpers/username":Xt,"helpers/userOnline":Je,"helpers/listItems":H,"helpers/textContrastClass":ve,"resolvers/DefaultResolver":kn,"states/PaginatedListState":hn,"states/AlertManagerState":Pi,"states/ModalManagerState":_i,"states/PageState":k};var wo=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.initAttrs=function(e){e.className=M(e.className,"LogInButton"),e.onclick=function(){var t=$(window);window.open(Wi.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),Do=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.post,e=t.user();return m(G,{className:"PostPreview",href:Wi.route.post(t),onclick:this.attrs.onclick},m("span",{className:"PostPreview-content"},Y(e),Xt(e)," ",m("span",{className:"PostPreview-excerpt"},this.excerpt())))},n.content=function(){return"comment"===this.attrs.post.contentType()&&this.attrs.post.contentPlain()},n.excerpt=function(){return this.content()?et(this.content(),this.attrs.highlight,300):""},e}(E);const xo=Object.assign(bo,{"utils/PostControls":He,"utils/KeyboardNavigatable":Ce,"utils/slidable":Rt,"utils/History":C,"utils/DiscussionControls":jt,"utils/alertEmailConfirmation":On,"utils/UserControls":Ye,"utils/Pane":A,"utils/BasicEditorDriver":Ct,"utils/isSafariMobile":qi,"states/ComposerState":Oe,"states/DiscussionListState":vn,"states/GlobalSearchState":Ui,"states/NotificationListState":ji,"states/PostStreamState":se,"states/SearchState":Ri,"states/UserSecurityPageState":Pn,"components/AffixedSidebar":We,"components/DiscussionPage":ae,"components/DiscussionListPane":Gt,"components/LogInModal":Mt,"components/NewAccessTokenModal":_n,"components/ComposerBody":kt,"components/ForgotPasswordModal":It,"components/Notification":Me,"components/LogInButton":wo,"components/DiscussionsUserPage":gn,"components/Composer":Le,"components/SessionDropdown":ce,"components/HeaderPrimary":ue,"components/PostEdited":nn,"components/PostStream":Zt,"components/ChangePasswordModal":Cn,"components/IndexPage":cn,"components/DiscussionRenamedNotification":$e,"components/DiscussionsSearchSource":Te,"components/DiscussionsSearchItem":Se,"components/HeaderSecondary":Pe,"components/ComposerButton":Be,"components/DiscussionList":Vt,"components/ReplyPlaceholder":Qt,"components/AvatarEditor":Ke,"components/Post":Ue,"components/SettingsPage":En,"components/TerminalPost":ct,"components/ChangeEmailModal":An,"components/NotificationsDropdown":xe,"components/UserPage":Ge,"components/PostUser":Qe,"components/UserCard":Xe,"components/UsersSearchSource":Fe,"components/UserSecurityPage":Bn,"components/NotificationGrid":xn,"components/PostPreview":Do,"components/EventPost":on,"components/DiscussionHero":U,"components/PostMeta":en,"components/DiscussionRenamedPost":sn,"components/DiscussionComposer":ln,"components/LogInButtons":Ot,"components/NotificationList":De,"components/WelcomeHero":un,"components/SignUpModal":Lt,"components/CommentPost":rn,"components/ComposerPostPreview":Jt,"components/ReplyComposer":Tt,"components/NotificationsPage":Nn,"components/PostStreamScrubber":ee,"components/EditPostComposer":Re,"components/RenameDiscussionModal":$t,"components/Search":_e,"components/DiscussionListItem":qt,"components/LoadingPost":Kt,"components/PostsUserPage":dn,"components/AccessTokensList":Fn,"resolvers/DiscussionPageResolver":Sn,routes:In,ForumApplication:zi});xo.app=Wi;var Co=ho(xo,"forum")})(),flarum.core=r})();
+(()=>{var t={8492:()=>{},1859:()=>{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)})},9043:()=>{!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)},6199:()=>{!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)},7865:()=>{!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)},6935:()=>{!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)},2898: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},4757:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,n="millisecond",r="second",i="minute",o="hour",s="day",a="week",u="month",l="quarter",c="year",d="date",h="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},v=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:v,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+v(r,2,"0")+":"+v(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,u),o=n-i<0,s=e.clone().add(r+(o?-1:1),u);return+(-(r+(n-i)/(o?i-s:s-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:c,w:a,d:s,D:d,h:o,m:i,s:r,ms:n,Q:l}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},y="en",b={};b[y]=m;var w=function(t){return t instanceof A},D=function t(e,n,r){var i;if(!e)return y;if("string"==typeof e){var o=e.toLowerCase();b[o]&&(i=o),n&&(b[o]=n,i=o);var s=e.split("-");if(!i&&s.length>1)return t(s[0])}else{var a=e.name;b[a]=e,i=a}return!r&&i&&(y=i),i||!r&&y},x=function(t,e){if(w(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new A(n)},C=g;C.l=D,C.i=w,C.w=function(t,e){return x(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var A=function(){function m(t){this.$L=D(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(C.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 C},v.isValid=function(){return!(this.$d.toString()===h)},v.isSame=function(t,e){var n=x(t);return this.startOf(e)<=n&&n<=this.endOf(e)},v.isAfter=function(t,e){return x(t)<this.startOf(e)},v.isBefore=function(t,e){return this.endOf(e)<x(t)},v.$g=function(t,e,n){return C.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=!!C.u(e)||e,h=C.p(t),f=function(t,e){var r=C.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 C.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=C.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[C.p(t)]()},v.add=function(n,l){var d,h=this;n=Number(n);var f=C.p(l),p=function(t){var e=x(h);return C.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 C.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=C.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].slice(0,o)},d=function(t){return C.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:C.s(a+1,2,"0"),MMM:c(n.monthsShort,a,l,3),MMMM:c(l,a),D:this.$D,DD:C.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:C.s(o,2,"0"),h:d(1),hh:d(2),a:f(o,s,!0),A:f(o,s,!1),m:String(s),mm:C.s(s,2,"0"),s:String(this.$s),ss:C.s(this.$s,2,"0"),SSS:C.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=C.p(d),m=x(n),v=(m.utcOffset()-this.utcOffset())*t,g=this-m,y=C.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:C.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=D(t,e,!0);return r&&(n.$L=r),n},v.clone=function(){return C.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}(),E=A.prototype;return x.prototype=E,[["$ms",n],["$s",r],["$m",i],["$H",o],["$W",s],["$M",u],["$y",c],["$D",d]].forEach((function(t){E[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),x.extend=function(t,e){return t.$i||(t(e,A,x),t.$i=!0),x},x.locale=D,x.isDayjs=w,x.unix=function(t){return x(1e3*t)},x.en=b[y],x.Ls=b,x.p={},x}()},6982: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)}}}()},5635: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)}}}()},356:(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}()},9411: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)},9152:function(t,e){var n;!function(e,n){"use strict";"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,(function(r,i){"use strict";var o=[],s=Object.getPrototypeOf,a=o.slice,u=o.flat?function(t){return o.flat.call(t)}:function(t){return o.concat.apply([],t)},l=o.push,c=o.indexOf,d={},h=d.toString,f=d.hasOwnProperty,p=f.toString,m=p.call(Object),v={},g=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},y=function(t){return null!=t&&t===t.window},b=r.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function D(t,e,n){var r,i,o=(n=n||b).createElement("script");if(o.text=t,e)for(r in w)(i=e[r]||e.getAttribute&&e.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?d[h.call(t)]||"object":typeof t}var C="3.6.1",A=function t(e,n){return new t.fn.init(e,n)};function E(t){var e=!!t&&"length"in t&&t.length,n=x(t);return!g(t)&&!y(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}A.fn=A.prototype={jquery:C,constructor:A,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=A.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return A.each(this,t)},map:function(t){return this.pushStack(A.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(A.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(A.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},A.extend=A.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&&(A.isPlainObject(r)||(i=Array.isArray(r)))?(n=s[e],o=i&&!Array.isArray(n)?[]:i||A.isPlainObject(n)?n:{},i=!1,s[e]=A.extend(l,o,r)):void 0!==r&&(s[e]=r));return s},A.extend({expando:"jQuery"+(C+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==h.call(t)||(e=s(t))&&("function"!=typeof(n=f.call(e,"constructor")&&e.constructor)||p.call(n)!==m))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){D(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,r=0;if(E(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&&(E(Object(t))?A.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(E(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&&(A.fn[Symbol.iterator]=o[Symbol.iterator]),A.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){d["[object "+e+"]"]=e.toLowerCase()}));var N=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,D=t.document,x=0,C=0,A=ut(),E=ut(),N=ut(),k=ut(),S=function(t,e){return t===e&&(d=!0),0},T={}.hasOwnProperty,F=[],_=F.pop,P=F.push,B=F.push,I=F.slice,O=function(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",$="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",j="\\[[\\x20\\t\\r\\n\\f]*("+$+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+$+"))|)"+M+"*\\]",R=":("+$+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+j+")*)|.*)\\)|)",H=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]*"),V=new RegExp(M+"|>"),W=new RegExp(R),G=new RegExp("^"+$+"$"),Y={ID:new RegExp("^#("+$+")"),CLASS:new RegExp("^\\.("+$+")"),TAG:new RegExp("^("+$+"|[*])"),ATTR:new RegExp("^"+j),PSEUDO:new RegExp("^"+R),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("^(?:"+L+")$","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{B.apply(F=I.call(D.childNodes),D.childNodes),F[D.childNodes.length].nodeType}catch(t){B={apply:F.length?function(t,e){P.apply(t,I.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,D=e?e.nodeType:9;if(r=r||[],"string"!=typeof t||!t||1!==D&&9!==D&&11!==D)return r;if(!i&&(h(e),e=e||f,m)){if(11!==D&&(d=Z.exec(t)))if(o=d[1]){if(9===D){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 B.apply(r,e.getElementsByTagName(t)),r;if((o=d[3])&&n.getElementsByClassName&&e.getElementsByClassName)return B.apply(r,e.getElementsByClassName(o)),r}if(n.qsa&&!k[t+" "]&&(!v||!v.test(t))&&(1!==D||"object"!==e.nodeName.toLowerCase())){if(g=t,y=e,1===D&&(V.test(t)||z.test(t))){for((y=tt.test(t)&&gt(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 B.apply(r,y.querySelectorAll(g)),r}catch(e){k(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:D;return s!=f&&9===s.nodeType&&s.documentElement?(p=(f=s).documentElement,m=!o(f),D!=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|"+L+")"),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("!=",R)})),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},S=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==D&&b(D,t)?-1:e==f||e.ownerDocument==D&&b(D,e)?1:c?O(c,t)-O(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?O(c,t)-O(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]==D?-1:a[r]==D?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&&!k[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){k(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&&T.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(S),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&&W.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=A[t+" "];return e||(e=new RegExp("(^|[\\x20\\t\\r\\n\\f])"+t+"("+M+"|$)"))&&A(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(H," ")+" ").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]===x&&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]=[x,f,b];break}}else if(y&&(b=f=(l=(c=(d=(h=e)[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]||[])[0]===x&&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]=[x,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=O(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=C++;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=[x,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]===x&&l[1]===a)return h[2]=l[2];if(c[o]=h,h[2]=t(e,n,u))return!0}return!1}}function Dt(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 xt(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 Ct(t,e,n,r,i,o){return r&&!r[w]&&(r=Ct(r)),i&&!i[w]&&(i=Ct(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:xt(m,h,t,a,u),g=n?i||(o?t:p||r)?[]:s:v;if(n&&n(v,g,a,u),r)for(l=xt(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?O(o,d):h[c])>-1&&(o[l]=!(s[l]=d))}}else g=xt(g===s?g.splice(p,g.length):g),i?i(null,s,g,u):B.apply(s,g)}))}function At(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 O(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(Dt(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 Ct(u>1&&Dt(h),u>1&&bt(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace(U,"$1"),n,u<i&&At(t.slice(u,i)),i<o&&At(t=t.slice(i)),i<o&&bt(t))}h.push(n)}return Dt(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=E[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):E(t,u).slice(0)},a=at.compile=function(t,e){var n,i=[],o=[],a=N[t+" "];if(!a){for(e||(e=s(t)),n=e.length;n--;)(a=At(e[n]))[w]?i.push(a):o.push(a);a=N(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=[],D=l,C=o||i&&r.find.TAG("*",c),A=x+=null==D?1:Math.random()||.1,E=C.length;for(c&&(l=s==f||s||c);y!==E&&null!=(d=C[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&&(x=A)}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]=_.call(u));w=xt(w)}B.apply(u,w),c&&!o&&w.length>0&&g+e.length>1&&at.uniqueSort(u)}return c&&(x=A,l=D),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)&&gt(e.parentNode)||e))){if(u.splice(o,1),!(t=i.length&&bt(u)))return B.apply(n,i),n;break}}return(h||a(t,f))(i,e,!m,n,!e||tt.test(t)&&gt(e.parentNode)||e),n},n.sortStable=w.split("").sort(S).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(L,(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);A.find=N,(A.expr=N.selectors)[":"]=A.expr.pseudos,A.uniqueSort=A.unique=N.uniqueSort,A.text=N.getText,A.isXMLDoc=N.isXML,A.contains=N.contains,A.escapeSelector=N.escape;var k=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&A(t).is(n))break;r.push(t)}return r},S=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},T=A.expr.match.needsContext;function F(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var _=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function P(t,e,n){return g(e)?A.grep(t,(function(t,r){return!!e.call(t,r,t)!==n})):e.nodeType?A.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?A.grep(t,(function(t){return c.call(e,t)>-1!==n})):A.filter(e,t,n)}A.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?A.find.matchesSelector(r,t)?[r]:[]:A.find.matches(t,A.grep(e,(function(t){return 1===t.nodeType})))},A.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(A(t).filter((function(){for(e=0;e<r;e++)if(A.contains(i[e],this))return!0})));for(n=this.pushStack([]),e=0;e<r;e++)A.find(t,i[e],n);return r>1?A.uniqueSort(n):n},filter:function(t){return this.pushStack(P(this,t||[],!1))},not:function(t){return this.pushStack(P(this,t||[],!0))},is:function(t){return!!P(this,"string"==typeof t&&T.test(t)?A(t):t||[],!1).length}});var B,I=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(A.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||B,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:I.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 A?e[0]:e,A.merge(this,A.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:b,!0)),_.test(r[1])&&A.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(A):A.makeArray(t,this)}).prototype=A.fn,B=A(b);var O=/^(?:parents|prev(?:Until|All))/,L={children:!0,contents:!0,next:!0,prev:!0};function M(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}A.fn.extend({has:function(t){var e=A(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(A.contains(this,e[t]))return!0}))},closest:function(t,e){var n,r=0,i=this.length,o=[],s="string"!=typeof t&&A(t);if(!T.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&&A.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?A.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?c.call(A(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(A.uniqueSort(A.merge(this.get(),A(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),A.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return k(t,"parentNode")},parentsUntil:function(t,e,n){return k(t,"parentNode",n)},next:function(t){return M(t,"nextSibling")},prev:function(t){return M(t,"previousSibling")},nextAll:function(t){return k(t,"nextSibling")},prevAll:function(t){return k(t,"previousSibling")},nextUntil:function(t,e,n){return k(t,"nextSibling",n)},prevUntil:function(t,e,n){return k(t,"previousSibling",n)},siblings:function(t){return S((t.parentNode||{}).firstChild,t)},children:function(t){return S(t.firstChild)},contents:function(t){return null!=t.contentDocument&&s(t.contentDocument)?t.contentDocument:(F(t,"template")&&(t=t.content||t),A.merge([],t.childNodes))}},(function(t,e){A.fn[t]=function(n,r){var i=A.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=A.filter(r,i)),this.length>1&&(L[t]||A.uniqueSort(i),O.test(t)&&i.reverse()),this.pushStack(i)}}));var $=/[^\x20\t\r\n\f]+/g;function j(t){return t}function R(t){throw t}function H(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])}}A.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return A.each(t.match($)||[],(function(t,n){e[n]=!0})),e}(t):A.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){A.each(n,(function(n,r){g(r)?t.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==x(r)&&e(r)}))}(arguments),n&&!e&&u()),this},remove:function(){return A.each(arguments,(function(t,e){for(var n;(n=A.inArray(e,o,n))>-1;)o.splice(n,1),n<=a&&a--})),this},has:function(t){return t?A.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},A.extend({Deferred:function(t){var e=[["notify","progress",A.Callbacks("memory"),A.Callbacks("memory"),2],["resolve","done",A.Callbacks("once memory"),A.Callbacks("once memory"),0,"resolved"],["reject","fail",A.Callbacks("once memory"),A.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 A.Deferred((function(n){A.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,j,i),s(o,e,R,i)):(o++,l.call(r,s(o,e,j,i),s(o,e,R,i),s(o,e,j,e.notifyWith))):(n!==j&&(a=void 0,u=[r]),(i||e.resolveWith)(a,u))}},c=i?l:function(){try{l()}catch(r){A.Deferred.exceptionHook&&A.Deferred.exceptionHook(r,c.stackTrace),t+1>=o&&(n!==R&&(a=void 0,u=[r]),e.rejectWith(a,u))}};t?c():(A.Deferred.getStackHook&&(c.stackTrace=A.Deferred.getStackHook()),r.setTimeout(c))}}return A.Deferred((function(r){e[0][3].add(s(0,r,g(i)?i:j,r.notifyWith)),e[1][3].add(s(0,r,g(t)?t:j)),e[2][3].add(s(0,r,g(n)?n:R))})).promise()},promise:function(t){return null!=t?A.extend(t,i):i}},o={};return A.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=A.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&&(H(t,o.done(s(n)).resolve,o.reject,!e),"pending"===o.state()||g(i[n]&&i[n].then)))return o.then();for(;n--;)H(i[n],s(n),o.reject);return o.promise()}});var U=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;A.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)},A.readyException=function(t){r.setTimeout((function(){throw t}))};var q=A.Deferred();function z(){b.removeEventListener("DOMContentLoaded",z),r.removeEventListener("load",z),A.ready()}A.fn.ready=function(t){return q.then(t).catch((function(t){A.readyException(t)})),this},A.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--A.readyWait:A.isReady)||(A.isReady=!0,!0!==t&&--A.readyWait>0||q.resolveWith(b,[A]))}}),A.ready.then=q.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?r.setTimeout(A.ready):(b.addEventListener("DOMContentLoaded",z),r.addEventListener("load",z));var V=function t(e,n,r,i,o,s,a){var u=0,l=e.length,c=null==r;if("object"===x(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(A(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},W=/^-ms-/,G=/-([a-z])/g;function Y(t,e){return e.toUpperCase()}function K(t){return t.replace(W,"ms-").replace(G,Y)}var X=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function J(){this.expando=A.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($)||[]).length;for(;n--;)delete r[e[n]]}(void 0===e||A.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&&!A.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}A.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)}}),A.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)})):V(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)}))}}),A.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,A.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){var n=A.queue(t,e=e||"fx"),r=n.length,i=n.shift(),o=A._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,(function(){A.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:A.Callbacks("once memory").add((function(){Q.remove(t,[e+"queue",n])}))})}}),A.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?A.queue(this[0],t):void 0===e?this:this.each((function(){var n=A.queue(this,t,e);A._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&A.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){A.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,r=1,i=A.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 A.contains(t.ownerDocument,t)},ut={composed:!0};st.getRootNode&&(at=function(t){return A.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"===A.css(t,"display")};function ct(t,e,n,r){var i,o,s=20,a=r?function(){return r.cur()}:function(){return A.css(t,e,"")},u=a(),l=n&&n[3]||(A.cssNumber[e]?"":"px"),c=t.nodeType&&(A.cssNumber[e]||"px"!==l&&+u)&&it.exec(A.css(t,e));if(c&&c[3]!==l){for(u/=2,l=l||c[3],c=+u||1;s--;)A.style(t,e,c+l),(1-o)*(1-(o=a()/u||.5))<=0&&(s=0),c/=o;A.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=A.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&&lt(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}A.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)?A(this).show():A(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&&F(t,e)?A.merge([t],n):n}function Dt(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 xt=/<|&#?\w+;/;function Ct(t,e,n,r,i){for(var o,s,a,u,l,c,d=e.createDocumentFragment(),h=[],f=0,p=t.length;f<p;f++)if((o=t[f])||0===o)if("object"===x(o))A.merge(h,o.nodeType?[o]:o);else if(xt.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]+A.htmlPrefilter(o)+u[2],c=u[0];c--;)s=s.lastChild;A.merge(h,s.childNodes),(s=d.firstChild).textContent=""}else h.push(e.createTextNode(o));for(d.textContent="",f=0;o=h[f++];)if(r&&A.inArray(o,r)>-1)i&&i.push(o);else if(l=at(o),s=wt(d.appendChild(o),"script"),l&&Dt(s),n)for(c=0;o=s[c++];)yt.test(o.type||"")&&n.push(o);return d}var At=/^([^.]*)(?:\.(.+)|)/;function Et(){return!0}function Nt(){return!1}function kt(t,e){return t===function(){try{return b.activeElement}catch(t){}}()==("focus"===e)}function St(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)St(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=Nt;else if(!i)return t;return 1===o&&(s=i,i=function(t){return A().off(t),s.apply(this,arguments)},i.guid=s.guid||(s.guid=A.guid++)),t.each((function(){A.event.add(this,e,i,r,n)}))}function Tt(t,e,n){n?(Q.set(t,e,!1),A.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)(A.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:A.event.trigger(A.extend(o[0],A.Event.prototype),o.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===Q.get(t,e)&&A.event.add(t,e,Et)}A.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&&A.find.matchesSelector(st,i),n.guid||(n.guid=A.guid++),(u=v.events)||(u=v.events=Object.create(null)),(s=v.handle)||(s=v.handle=function(e){return A.event.triggered!==e.type?A.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match($)||[""]).length;l--;)f=m=(a=At.exec(e[l])||[])[1],p=(a[2]||"").split(".").sort(),f&&(d=A.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,d=A.event.special[f]||{},c=A.extend({type:f,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&A.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),A.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($)||[""]).length;l--;)if(f=m=(a=At.exec(e[l])||[])[1],p=(a[2]||"").split(".").sort(),f){for(d=A.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)||A.removeEvent(t,f,v.handle),delete u[f])}else for(f in u)A.event.remove(t,f+e[l],n,r,!0);A.isEmptyObject(u)&&Q.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,s,a=new Array(arguments.length),u=A.event.fix(t),l=(Q.get(this,"events")||Object.create(null))[u.type]||[],c=A.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=A.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=((A.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?A(i,this).index(l)>-1:A.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(A.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[A.expando]?t:new A.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return vt.test(e.type)&&e.click&&F(e,"input")&&Tt(e,"click",Et),!1},trigger:function(t){var e=this||t;return vt.test(e.type)&&e.click&&F(e,"input")&&Tt(e,"click"),!0},_default:function(t){var e=t.target;return vt.test(e.type)&&e.click&&F(e,"input")&&Q.get(e,"click")||F(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},A.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},(A.Event=function(t,e){if(!(this instanceof A.Event))return new A.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?Et:Nt,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&&A.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[A.expando]=!0}).prototype={constructor:A.Event,isDefaultPrevented:Nt,isPropagationStopped:Nt,isImmediatePropagationStopped:Nt,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=Et,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=Et,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=Et,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},A.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},A.event.addProp),A.each({focus:"focusin",blur:"focusout"},(function(t,e){A.event.special[t]={setup:function(){return Tt(this,t,kt),!1},trigger:function(){return Tt(this,t),!0},_default:function(e){return Q.get(e.target,t)},delegateType:e}})),A.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){A.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=this,i=t.relatedTarget,o=t.handleObj;return i&&(i===r||A.contains(r,i))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}})),A.fn.extend({on:function(t,e,n,r){return St(this,t,e,n,r)},one:function(t,e,n,r){return St(this,t,e,n,r,1)},off:function(t,e,n){var r,i;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,A(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=Nt),this.each((function(){A.event.remove(this,t,n,e)}))}});var Ft=/<script|<style|<link/i,_t=/checked\s*(?:[^=]|=\s*.checked.)/i,Pt=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Bt(t,e){return F(t,"table")&&F(11!==e.nodeType?e:e.firstChild,"tr")&&A(t).children("tbody")[0]||t}function It(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Ot(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Lt(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++)A.event.add(e,i,a[i][n]);Z.hasData(t)&&(o=Z.access(t),s=A.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 $t(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&&_t.test(p))return t.each((function(i){var o=t.eq(i);m&&(e[0]=p.call(this,i,o.html())),$t(o,e,n,r)}));if(h&&(o=(i=Ct(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=(s=A.map(wt(i,"script"),It)).length;d<h;d++)l=i,d!==f&&(l=A.clone(l,!0,!0),a&&A.merge(s,wt(l,"script"))),n.call(t[d],l,d);if(a)for(c=s[s.length-1].ownerDocument,A.map(s,Ot),d=0;d<a;d++)l=s[d],yt.test(l.type||"")&&!Q.access(l,"globalEval")&&A.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?A._evalUrl&&!l.noModule&&A._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")},c):D(l.textContent.replace(Pt,""),l,c))}return t}function jt(t,e,n){for(var r,i=e?A.filter(e,t):t,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||A.cleanData(wt(r)),r.parentNode&&(n&&at(r)&&Dt(wt(r,"script")),r.parentNode.removeChild(r));return t}A.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||A.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++)Lt(o[r],s[r]);else Lt(t,a);return(s=wt(a,"script")).length>0&&Dt(s,!u&&wt(t,"script")),a},cleanData:function(t){for(var e,n,r,i=A.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]?A.event.remove(n,r):A.removeEvent(n,r,e.handle);n[Q.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),A.fn.extend({detach:function(t){return jt(this,t,!0)},remove:function(t){return jt(this,t)},text:function(t){return V(this,(function(t){return void 0===t?A.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 $t(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Bt(this,t).appendChild(t)}))},prepend:function(){return $t(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Bt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return $t(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return $t(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&&(A.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 A.clone(this,t,e)}))},html:function(t){return V(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&&!Ft.test(t)&&!bt[(gt.exec(t)||["",""])[1].toLowerCase()]){t=A.htmlPrefilter(t);try{for(;n<r;n++)1===(e=this[n]||{}).nodeType&&(A.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 $t(this,arguments,(function(e){var n=this.parentNode;A.inArray(this,t)<0&&(A.cleanData(wt(this)),n&&n.replaceChild(e,this))}),t)}}),A.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){A.fn[t]=function(t){for(var n,r=[],i=A(t),o=i.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),A(i[s])[e](n),l.apply(r,n.get());return this.pushStack(r)}}));var Rt=new RegExp("^("+rt+")(?!px)[a-z%]+$","i"),Ht=/^--/,Ut=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=r),e.getComputedStyle(t)},qt=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},zt=new RegExp(ot.join("|"),"i"),Vt=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g");function Wt(t,e,n){var r,i,o,s,a=Ht.test(e),u=t.style;return(n=n||Ut(t))&&(s=n.getPropertyValue(e)||n[e],a&&(s=s.replace(Vt,"$1")),""!==s||at(t)||(s=A.style(t,e)),!v.pixelBoxStyles()&&Rt.test(s)&&zt.test(e)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=s,s=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==s?s+"":s}function Gt(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,A.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 Yt=["Webkit","Moz","ms"],Kt=b.createElement("div").style,Xt={};function Jt(t){return A.cssProps[t]||Xt[t]||(t in Kt?t:Xt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Yt.length;n--;)if((t=Yt[n]+e)in Kt)return t}(t)||t)}var Qt=/^(none|table(?!-c[ea]).+)/,Zt={position:"absolute",visibility:"hidden",display:"block"},te={letterSpacing:"0",fontWeight:"400"};function ee(t,e,n){var r=it.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function ne(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+=A.css(t,n+ot[s],!0,i)),r?("content"===n&&(u-=A.css(t,"padding"+ot[s],!0,i)),"margin"!==n&&(u-=A.css(t,"border"+ot[s]+"Width",!0,i))):(u+=A.css(t,"padding"+ot[s],!0,i),"padding"!==n?u+=A.css(t,"border"+ot[s]+"Width",!0,i):a+=A.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 re(t,e,n){var r=Ut(t),i=(!v.boxSizingReliable()||n)&&"border-box"===A.css(t,"boxSizing",!1,r),o=i,s=Wt(t,e,r),a="offset"+e[0].toUpperCase()+e.slice(1);if(Rt.test(s)){if(!n)return s;s="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&F(t,"tr")||"auto"===s||!parseFloat(s)&&"inline"===A.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===A.css(t,"boxSizing",!1,r),(o=a in t)&&(s=t[a])),(s=parseFloat(s)||0)+ne(t,e,n||(i?"border":"content"),o,r,s)+"px"}function ie(t,e,n,r,i){return new ie.prototype.init(t,e,n,r,i)}A.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Wt(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=Ht.test(e),l=t.style;if(u||(e=Jt(a)),s=A.cssHooks[e]||A.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]||(A.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 Ht.test(e)||(e=Jt(a)),(s=A.cssHooks[e]||A.cssHooks[a])&&"get"in s&&(i=s.get(t,!0,n)),void 0===i&&(i=Wt(t,e,r)),"normal"===i&&e in te&&(i=te[e]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),A.each(["height","width"],(function(t,e){A.cssHooks[e]={get:function(t,n,r){if(n)return!Qt.test(A.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?re(t,e,r):qt(t,Zt,(function(){return re(t,e,r)}))},set:function(t,n,r){var i,o=Ut(t),s=!v.scrollboxSize()&&"absolute"===o.position,a=(s||r)&&"border-box"===A.css(t,"boxSizing",!1,o),u=r?ne(t,e,r,a,o):0;return a&&s&&(u-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-ne(t,e,"border",!1,o)-.5)),u&&(i=it.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=A.css(t,e)),ee(0,n,u)}}})),A.cssHooks.marginLeft=Gt(v.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Wt(t,"marginLeft"))||t.getBoundingClientRect().left-qt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),A.each({margin:"",padding:"",border:"Width"},(function(t,e){A.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&&(A.cssHooks[t+e].set=ee)})),A.fn.extend({css:function(t,e){return V(this,(function(t,e,n){var r,i,o={},s=0;if(Array.isArray(e)){for(r=Ut(t),i=e.length;s<i;s++)o[e[s]]=A.css(t,e[s],!1,r);return o}return void 0!==n?A.style(t,e,n):A.css(t,e)}),t,e,arguments.length>1)}}),A.Tween=ie,ie.prototype={constructor:ie,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||A.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(A.cssNumber[n]?"":"px")},cur:function(){var t=ie.propHooks[this.prop];return t&&t.get?t.get(this):ie.propHooks._default.get(this)},run:function(t){var e,n=ie.propHooks[this.prop];return this.options.duration?this.pos=e=A.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):ie.propHooks._default.set(this),this}},ie.prototype.init.prototype=ie.prototype,ie.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=A.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){A.fx.step[t.prop]?A.fx.step[t.prop](t):1!==t.elem.nodeType||!A.cssHooks[t.prop]&&null==t.elem.style[Jt(t.prop)]?t.elem[t.prop]=t.now:A.style(t.elem,t.prop,t.now+t.unit)}}},ie.propHooks.scrollTop=ie.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},A.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},(A.fx=ie.prototype.init).step={};var oe,se,ae=/^(?:toggle|show|hide)$/,ue=/queueHooks$/;function le(){se&&(!1===b.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(le):r.setTimeout(le,A.fx.interval),A.fx.tick())}function ce(){return r.setTimeout((function(){oe=void 0})),oe=Date.now()}function de(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 he(t,e,n){for(var r,i=(fe.tweeners[e]||[]).concat(fe.tweeners["*"]),o=0,s=i.length;o<s;o++)if(r=i[o].call(n,e,t))return r}function fe(t,e,n){var r,i,o=0,s=fe.prefilters.length,a=A.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var e=oe||ce(),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:A.extend({},e),opts:A.extend(!0,{specialEasing:{},easing:A.easing._default},n),originalProperties:e,originalOptions:n,startTime:oe||ce(),duration:n.duration,tweens:[],createTween:function(e,n){var r=A.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=A.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=fe.prefilters[o].call(l,t,c,l.opts))return g(r.stop)&&(A._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return A.map(c,he,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),A.fx.timer(A.extend(u,{elem:t,anim:l,queue:l.opts.queue})),l}A.Animation=A.extend(fe,{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($);for(var n,r=0,i=t.length;r<i;r++)n=t[r],fe.tweeners[n]=fe.tweeners[n]||[],fe.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&&lt(t),v=Q.get(t,"fxshow");for(r in n.queue||(null==(s=A._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--,A.queue(t,"fx").length||s.empty.fire()}))}))),e)if(i=e[r],ae.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]||A.style(t,r)}if((u=!A.isEmptyObject(e))||!A.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=A.css(t,"display"))&&(l?c=l:(ft([t],!0),l=t.style.display||l,c=A.css(t,"display"),ft([t]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===A.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)A.style(t,r,f[r])}))),u=he(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?fe.prefilters.unshift(t):fe.prefilters.push(t)}}),A.speed=function(t,e,n){var r=t&&"object"==typeof t?A.extend({},t):{complete:n||!n&&e||g(t)&&t,duration:t,easing:n&&e||e&&!g(e)&&e};return A.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in A.fx.speeds?r.duration=A.fx.speeds[r.duration]:r.duration=A.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&&A.dequeue(this,r.queue)},r},A.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=A.isEmptyObject(t),o=A.speed(e,n,r),s=function(){var e=fe(this,A.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=A.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&&ue.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||A.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=A.timers,s=r?r.length:0;for(n.finish=!0,A.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}))}}),A.each(["toggle","show","hide"],(function(t,e){var n=A.fn[e];A.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(de(e,!0),t,r,i)}})),A.each({slideDown:de("show"),slideUp:de("hide"),slideToggle:de("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){A.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}})),A.timers=[],A.fx.tick=function(){var t,e=0,n=A.timers;for(oe=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||A.fx.stop(),oe=void 0},A.fx.timer=function(t){A.timers.push(t),A.fx.start()},A.fx.interval=13,A.fx.start=function(){se||(se=!0,le())},A.fx.stop=function(){se=null},A.fx.speeds={slow:600,fast:200,_default:400},A.fn.delay=function(t,e){return t=A.fx&&A.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 pe,me=A.expr.attrHandle;A.fn.extend({attr:function(t,e){return V(this,A.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){A.removeAttr(this,t)}))}}),A.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?A.prop(t,e,n):(1===o&&A.isXMLDoc(t)||(i=A.attrHooks[e.toLowerCase()]||(A.expr.match.bool.test(e)?pe:void 0)),void 0!==n?null===n?void A.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=A.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!v.radioValue&&"radio"===e&&F(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match($);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),pe={set:function(t,e,n){return!1===e?A.removeAttr(t,n):t.setAttribute(n,n),n}},A.each(A.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=me[e]||A.find.attr;me[e]=function(t,e,r){var i,o,s=e.toLowerCase();return r||(o=me[s],me[s]=i,i=null!=n(t,e,r)?s:null,me[s]=o),i}}));var ve=/^(?:input|select|textarea|button)$/i,ge=/^(?:a|area)$/i;function ye(t){return(t.match($)||[]).join(" ")}function be(t){return t.getAttribute&&t.getAttribute("class")||""}function we(t){return Array.isArray(t)?t:"string"==typeof t&&t.match($)||[]}A.fn.extend({prop:function(t,e){return V(this,A.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[A.propFix[t]||t]}))}}),A.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&A.isXMLDoc(t)||(e=A.propFix[e]||e,i=A.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=A.find.attr(t,"tabindex");return e?parseInt(e,10):ve.test(t.nodeName)||ge.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(A.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)}}),A.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){A.propFix[this.toLowerCase()]=this})),A.fn.extend({addClass:function(t){var e,n,r,i,o,s;return g(t)?this.each((function(e){A(this).addClass(t.call(this,e,be(this)))})):(e=we(t)).length?this.each((function(){if(r=be(this),n=1===this.nodeType&&" "+ye(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");s=ye(n),r!==s&&this.setAttribute("class",s)}})):this},removeClass:function(t){var e,n,r,i,o,s;return g(t)?this.each((function(e){A(this).removeClass(t.call(this,e,be(this)))})):arguments.length?(e=we(t)).length?this.each((function(){if(r=be(this),n=1===this.nodeType&&" "+ye(r)+" "){for(o=0;o<e.length;o++)for(i=e[o];n.indexOf(" "+i+" ")>-1;)n=n.replace(" "+i+" "," ");s=ye(n),r!==s&&this.setAttribute("class",s)}})):this:this.attr("class","")},toggleClass:function(t,e){var n,r,i,o,s=typeof t,a="string"===s||Array.isArray(t);return g(t)?this.each((function(n){A(this).toggleClass(t.call(this,n,be(this),e),e)})):"boolean"==typeof e&&a?e?this.addClass(t):this.removeClass(t):(n=we(t),this.each((function(){if(a)for(o=A(this),i=0;i<n.length;i++)r=n[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==t&&"boolean"!==s||((r=be(this))&&Q.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":Q.get(this,"__className__")||""))})))},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+ye(be(n))+" ").indexOf(e)>-1)return!0;return!1}});var De=/\r/g;A.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,A(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=A.map(i,(function(t){return null==t?"":t+""}))),(e=A.valHooks[this.type]||A.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=A.valHooks[i.type]||A.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(De,""):null==n?"":n:void 0}}),A.extend({valHooks:{option:{get:function(t){var e=A.find.attr(t,"value");return null!=e?e:ye(A.text(t))}},select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,s="select-one"===t.type,a=s?null:[],u=s?o+1:i.length;for(r=o<0?u:s?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!F(n.parentNode,"optgroup"))){if(e=A(n).val(),s)return e;a.push(e)}return a},set:function(t,e){for(var n,r,i=t.options,o=A.makeArray(e),s=i.length;s--;)((r=i[s]).selected=A.inArray(A.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),A.each(["radio","checkbox"],(function(){A.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=A.inArray(A(t).val(),e)>-1}},v.checkOn||(A.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),v.focusin="onfocusin"in r;var xe=/^(?:focusinfocus|focusoutblur)$/,Ce=function(t){t.stopPropagation()};A.extend(A.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+A.event.triggered)&&(m.indexOf(".")>-1&&(v=m.split("."),m=v.shift(),v.sort()),l=m.indexOf(":")<0&&"on"+m,(t=t[A.expando]?t:new A.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]:A.makeArray(e,[t]),d=A.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),A.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Ce),n[m](),t.isPropagationStopped()&&h.removeEventListener(m,Ce),A.event.triggered=void 0,a&&(n[l]=a)),t.result}},simulate:function(t,e,n){var r=A.extend(new A.Event,n,{type:t,isSimulated:!0});A.event.trigger(r,null,e)}}),A.fn.extend({trigger:function(t,e){return this.each((function(){A.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return A.event.trigger(t,e,n,!0)}}),v.focusin||A.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){A.event.simulate(e,t.target,A.event.fix(t))};A.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 Ae=r.location,Ee={guid:Date.now()},Ne=/\?/;A.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||A.error("Invalid XML: "+(n?A.map(n.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var ke=/\[\]$/,Se=/\r?\n/g,Te=/^(?:submit|button|image|reset|file)$/i,Fe=/^(?:input|select|textarea|keygen)/i;function _e(t,e,n,r){var i;if(Array.isArray(e))A.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"!==x(e))r(t,e);else for(i in e)_e(t+"["+i+"]",e[i],n,r)}A.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&&!A.isPlainObject(t))A.each(t,(function(){i(this.name,this.value)}));else for(n in t)_e(n,t[n],e,i);return r.join("&")},A.fn.extend({serialize:function(){return A.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=A.prop(this,"elements");return t?A.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!A(this).is(":disabled")&&Fe.test(this.nodeName)&&!Te.test(t)&&(this.checked||!vt.test(t))})).map((function(t,e){var n=A(this).val();return null==n?null:Array.isArray(n)?A.map(n,(function(t){return{name:e.name,value:t.replace(Se,"\r\n")}})):{name:e.name,value:n.replace(Se,"\r\n")}})).get()}});var Pe=/%20/g,Be=/#.*$/,Ie=/([?&])_=[^&]*/,Oe=/^(.*?):[ \t]*([^\r\n]*)$/gm,Le=/^(?:GET|HEAD)$/,Me=/^\/\//,$e={},je={},Re="*/".concat("*"),He=b.createElement("a");function Ue(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match($)||[];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 qe(t,e,n,r){var i={},o=t===je;function s(a){var u;return i[a]=!0,A.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 ze(t,e){var n,r,i=A.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&A.extend(!0,t,r),t}He.href=Ae.href,A.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ae.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ae.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Re,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":A.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?ze(ze(t,A.ajaxSettings),e):ze(A.ajaxSettings,t)},ajaxPrefilter:Ue($e),ajaxTransport:Ue(je),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0);var n,i,o,s,a,u,l,c,d,h,f=A.ajaxSetup({},e=e||{}),p=f.context||f,m=f.context&&(p.nodeType||p.jquery)?A(p):A.event,v=A.Deferred(),g=A.Callbacks("once memory"),y=f.statusCode||{},w={},D={},x="canceled",C={readyState:0,getResponseHeader:function(t){var e;if(l){if(!s)for(s={};e=Oe.exec(o);)s[e[1].toLowerCase()+" "]=(s[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=s[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(t,e){return null==l&&(t=D[t.toLowerCase()]=D[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==l&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(l)C.always(t[C.status]);else for(e in t)y[e]=[y[e],t[e]];return this},abort:function(t){var e=t||x;return n&&n.abort(e),E(0,e),this}};if(v.promise(C),f.url=((t||f.url||Ae.href)+"").replace(Me,Ae.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match($)||[""],null==f.crossDomain){u=b.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=He.protocol+"//"+He.host!=u.protocol+"//"+u.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=A.param(f.data,f.traditional)),qe($e,f,e,C),l)return C;for(d in(c=A.event&&f.global)&&0==A.active++&&A.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Le.test(f.type),i=f.url.replace(Be,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Pe,"+")):(h=f.url.slice(i.length),f.data&&(f.processData||"string"==typeof f.data)&&(i+=(Ne.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(i=i.replace(Ie,"$1"),h=(Ne.test(i)?"&":"?")+"_="+Ee.guid+++h),f.url=i+h),f.ifModified&&(A.lastModified[i]&&C.setRequestHeader("If-Modified-Since",A.lastModified[i]),A.etag[i]&&C.setRequestHeader("If-None-Match",A.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&C.setRequestHeader("Content-Type",f.contentType),C.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Re+"; q=0.01":""):f.accepts["*"]),f.headers)C.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(p,C,f)||l))return C.abort();if(x="abort",g.add(f.complete),C.done(f.success),C.fail(f.error),n=qe(je,f,e,C)){if(C.readyState=1,c&&m.trigger("ajaxSend",[C,f]),l)return C;f.async&&f.timeout>0&&(a=r.setTimeout((function(){C.abort("timeout")}),f.timeout));try{l=!1,n.send(w,E)}catch(t){if(l)throw t;E(-1,t)}}else E(-1,"No Transport");function E(t,e,s,u){var d,h,b,w,D,x=e;l||(l=!0,a&&r.clearTimeout(a),n=void 0,o=u||"",C.readyState=t>0?4:0,d=t>=200&&t<300||304===t,s&&(w=function(t,e,n){for(var r,i,o,s,a=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||t.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}if(o)return o!==u[0]&&u.unshift(o),n[o]}(f,C,s)),!d&&A.inArray("script",f.dataTypes)>-1&&A.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),w=function(t,e,n,r){var i,o,s,a,u,l={},c=t.dataTypes.slice();if(c[1])for(s in t.converters)l[s.toLowerCase()]=t.converters[s];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(s=l[u+" "+o]||l["* "+o]))for(i in l)if((a=i.split(" "))[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){!0===s?s=l[i]:!0!==l[i]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}(f,w,C,d),d?(f.ifModified&&((D=C.getResponseHeader("Last-Modified"))&&(A.lastModified[i]=D),(D=C.getResponseHeader("etag"))&&(A.etag[i]=D)),204===t||"HEAD"===f.type?x="nocontent":304===t?x="notmodified":(x=w.state,h=w.data,d=!(b=w.error))):(b=x,!t&&x||(x="error",t<0&&(t=0))),C.status=t,C.statusText=(e||x)+"",d?v.resolveWith(p,[h,x,C]):v.rejectWith(p,[C,x,b]),C.statusCode(y),y=void 0,c&&m.trigger(d?"ajaxSuccess":"ajaxError",[C,f,d?h:b]),g.fireWith(p,[C,x]),c&&(m.trigger("ajaxComplete",[C,f]),--A.active||A.event.trigger("ajaxStop")))}return C},getJSON:function(t,e,n){return A.get(t,e,n,"json")},getScript:function(t,e){return A.get(t,void 0,e,"script")}}),A.each(["get","post"],(function(t,e){A[e]=function(t,n,r,i){return g(n)&&(i=i||r,r=n,n=void 0),A.ajax(A.extend({url:t,type:e,dataType:i,data:n,success:r},A.isPlainObject(t)&&t))}})),A.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),A._evalUrl=function(t,e,n){return A.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){A.globalEval(t,e,n)}})},A.fn.extend({wrapAll:function(t){var e;return this[0]&&(g(t)&&(t=t.call(this[0])),e=A(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){A(this).wrapInner(t.call(this,e))})):this.each((function(){var e=A(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=g(t);return this.each((function(n){A(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){A(this).replaceWith(this.childNodes)})),this}}),A.expr.pseudos.hidden=function(t){return!A.expr.pseudos.visible(t)},A.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},A.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(t){}};var Ve={0:200,1223:204},We=A.ajaxSettings.xhr();v.cors=!!We&&"withCredentials"in We,v.ajax=We=!!We,A.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(Ve[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()}}})),A.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),A.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 A.globalEval(t),t}}}),A.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),A.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,i){e=A("<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 Ge,Ye=[],Ke=/(=)\?(?=&|$)|\?\?/;A.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ye.pop()||A.expando+"_"+Ee.guid++;return this[t]=!0,t}}),A.ajaxPrefilter("json jsonp",(function(t,e,n){var i,o,s,a=!1!==t.jsonp&&(Ke.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ke.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(Ke,"$1"+i):!1!==t.jsonp&&(t.url+=(Ne.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return s||A.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?A(r).removeProp(i):r[i]=o,t[i]&&(t.jsonpCallback=e.jsonpCallback,Ye.push(i)),s&&g(o)&&o(s[0]),s=o=void 0})),"script"})),v.createHTMLDocument=((Ge=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ge.childNodes.length),A.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=_.exec(t))?[e.createElement(i[1])]:(i=Ct([t],e,o),o&&o.length&&A(o).remove(),A.merge([],i.childNodes)));var r,i,o},A.fn.load=function(t,e,n){var r,i,o,s=this,a=t.indexOf(" ");return a>-1&&(r=ye(t.slice(a)),t=t.slice(0,a)),g(e)?(n=e,e=void 0):e&&"object"==typeof e&&(i="POST"),s.length>0&&A.ajax({url:t,type:i||"GET",dataType:"html",data:e}).done((function(t){o=arguments,s.html(r?A("<div>").append(A.parseHTML(t)).find(r):t)})).always(n&&function(t,e){s.each((function(){n.apply(this,o||[t.responseText,e,t])}))}),this},A.expr.pseudos.animated=function(t){return A.grep(A.timers,(function(e){return t===e.elem})).length},A.offset={setOffset:function(t,e,n){var r,i,o,s,a,u,l=A.css(t,"position"),c=A(t),d={};"static"===l&&(t.style.position="relative"),a=c.offset(),o=A.css(t,"top"),u=A.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,A.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)}},A.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){A.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"===A.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"===A.css(t,"position");)t=t.parentNode;t&&t!==r&&1===t.nodeType&&((i=A(t).offset()).top+=A.css(t,"borderTopWidth",!0),i.left+=A.css(t,"borderLeftWidth",!0))}return{top:e.top-i.top-A.css(r,"marginTop",!0),left:e.left-i.left-A.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===A.css(t,"position");)t=t.offsetParent;return t||st}))}}),A.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;A.fn[t]=function(r){return V(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)}})),A.each(["top","left"],(function(t,e){A.cssHooks[e]=Gt(v.pixelPosition,(function(t,n){if(n)return n=Wt(t,e),Rt.test(n)?A(t).position()[e]+"px":n}))})),A.each({Height:"height",Width:"width"},(function(t,e){A.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,r){A.fn[r]=function(i,o){var s=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===o?"margin":"border");return V(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?A.css(e,n,a):A.style(e,n,i,a)}),e,s?i:void 0,s)}}))})),A.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){A.fn[e]=function(t){return this.on(e,t)}})),A.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)}}),A.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){A.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var Xe=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;A.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||A.guid++,i},A.holdReady=function(t){t?A.readyWait++:A.ready(!0)},A.isArray=Array.isArray,A.parseJSON=JSON.parse,A.nodeName=F,A.isFunction=g,A.isWindow=y,A.camelCase=K,A.type=x,A.now=Date.now,A.isNumeric=function(t){var e=A.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},A.trim=function(t){return null==t?"":(t+"").replace(Xe,"$1")},void 0===(n=function(){return A}.apply(e,[]))||(t.exports=n);var Je=r.jQuery,Qe=r.$;return A.noConflict=function(t){return r.$===A&&(r.$=Qe),t&&r.jQuery===A&&(r.jQuery=Je),A},void 0===i&&(r.jQuery=r.$=A),A}))},542:(t,e,n)=>{"use strict";var r=n(1642);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}}},3600:(t,e,n)=>{"use strict";var r=n(1642),i=n(5334),o=n(187),s=n(3690),a=n(1490),u=n(5211),l=n(6797),c={};t.exports=function(t,e){var n;function d(e,r,i){if(e=s(e,r),null!=n){n();var o=i?i.state:null,a=i?i.title:null;i&&i.replace?t.history.replaceState(o,a,y.prefix+e):t.history.pushState(o,a,y.prefix+e)}else t.location.href=y.prefix+e}var h,f,p,m,v=c,g=y.SKIP={};function y(i,s,b){if(null==i)throw new Error("Ensure the DOM element that was passed to `m.route` is not undefined");var w,D=0,x=Object.keys(b).map((function(t){if("/"!==t[0])throw new SyntaxError("Routes must start with a `/`");if(/:([^\/\.-]+)(\.{3})?:/.test(t))throw new SyntaxError("Route parameter names must be separated with either `/`, `.`, or `-`");return{route:t,component:b[t],check:u(t)}})),C="function"==typeof setImmediate?setImmediate:setTimeout,A=o.resolve(),E=!1;if(n=null,null!=s){var N=a(s);if(!x.some((function(t){return t.check(N)})))throw new ReferenceError("Default route doesn't match any known routes")}function k(){E=!1;var n=t.location.hash;"#"!==y.prefix[0]&&(n=t.location.search+n,"?"!==y.prefix[0]&&"/"!==(n=t.location.pathname+n)[0]&&(n="/"+n));var r=n.concat().replace(/(?:%[a-f89][a-f0-9])+/gim,decodeURIComponent).slice(y.prefix.length),i=a(r);function o(){if(r===s)throw new Error("Could not resolve default route "+s);d(s,null,{replace:!0})}l(i.params,t.history.state),function t(n){for(;n<x.length;n++)if(x[n].check(i)){var s=x[n].component,a=x[n].route,u=s,l=m=function(o){if(l===m){if(o===g)return t(n+1);h=null==o||"function"!=typeof o.view&&"function"!=typeof o?"div":o,f=i.params,p=r,m=null,v=s.render?s:null,2===D?e.redraw():(D=2,e.redraw.sync())}};return void(s.view||"function"==typeof s?(s={},l(u)):s.onmatch?A.then((function(){return s.onmatch(i.params,r,a)})).then(l,o):l("div"))}o()}(0)}return n=function(){E||(E=!0,C(k))},"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",k,!1)},t.addEventListener("hashchange",k,!1)),e.mount(i,{onbeforeupdate:function(){return!(!(D=D?2:1)||c===v)},oncreate:k,onremove:w,view:function(){if(D&&c!==v){var t=[r(h,f.key,f)];return v&&(t=v.render(t[0])),t}}})}return y.set=function(t,e,n){null!=m&&((n=n||{}).replace=!0),m=null,d(t,e,n)},y.get=function(){return p},y.prefix="#!",y.Link={view:function(t){var e,n,r=t.attrs.options,o={};l(o,t.attrs),o.selector=o.options=o.key=o.oninit=o.oncreate=o.onbeforeupdate=o.onupdate=o.onbeforeremove=o.onremove=null;var s=i(t.attrs.selector||"a",o,t.children);return(s.attrs.disabled=Boolean(s.attrs.disabled))?(s.attrs.href=null,s.attrs["aria-disabled"]="true",s.attrs.onclick=null):(e=s.attrs.onclick,n=s.attrs.href,s.attrs.href=y.prefix+n,s.attrs.onclick=function(t){var i;"function"==typeof e?i=e.call(t.currentTarget,t):null==e||"object"!=typeof e||"function"==typeof e.handleEvent&&e.handleEvent(t),!1===i||t.defaultPrevented||0!==t.button&&0!==t.which&&1!==t.which||t.currentTarget.target&&"_self"!==t.currentTarget.target||t.ctrlKey||t.metaKey||t.shiftKey||t.altKey||(t.preventDefault(),t.redraw=!1,y.set(n,null,r))}),s}},y.param=function(t){return f&&null!=t?f[t]:f},y}},589:(t,e,n)=>{"use strict";var r=n(5334);r.trust=n(4031),r.fragment=n(2505),t.exports=r},7945:(t,e,n)=>{"use strict";var r=n(589),i=n(8450),o=n(570),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(2092),s.render=n(2031),s.redraw=o.redraw,s.request=i.request,s.jsonp=i.jsonp,s.parseQueryString=n(5784),s.buildQueryString=n(7477),s.parsePathname=n(1490),s.buildPathname=n(3690),s.vnode=n(1642),s.PromisePolyfill=n(7068),t.exports=s},570:(t,e,n)=>{"use strict";var r=n(2031);t.exports=n(542)(r,requestAnimationFrame,console)},6797:t=>{"use strict";t.exports=Object.assign||function(t,e){e&&Object.keys(e).forEach((function(n){t[n]=e[n]}))}},3690:(t,e,n)=>{"use strict";var r=n(7477),i=n(6797);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}},5211:(t,e,n)=>{"use strict";var r=n(1490);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}}},1490:(t,e,n)=>{"use strict";var r=n(5784);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))}}},7068: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},187:(t,e,n)=>{"use strict";var r=n(7068);"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},7477: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):""))}}},5784: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}},2031:(t,e,n)=>{"use strict";t.exports=n(4615)(window)},2505:(t,e,n)=>{"use strict";var r=n(1642),i=n(8239);t.exports=function(){var t=i.apply(0,arguments);return t.tag="[",t.children=r.normalizeChildren(t.children),t}},5334:(t,e,n)=>{"use strict";var r=n(1642),i=n(8239),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)}},8239:(t,e,n)=>{"use strict";var r=n(1642);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)}},4615:(t,e,n)=>{"use strict";var r=n(1642);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)k(t,r,null,e[r],n)}(e,c,s),w(t,h,a),!D(e)&&(null!=e.text&&(""!==e.text?h.textContent=e.text:e.children=[r("#",void 0,void 0,e.text,void 0,void 0)]),null!=e.children)){var f=e.children;l(h,f,0,f.length,i,null,s),"select"===e.tag&&null!=c&&function(t,e){if("value"in e)if(null===e.value)-1!==t.dom.selectedIndex&&(t.dom.value=null);else{var n=""+e.value;t.dom.value===n&&-1!==t.dom.selectedIndex||(t.dom.value=n)}"selectedIndex"in e&&k(t,"selectedIndex",null,e.selectedIndex,void 0)}(e,c)}}(t,e,i,s,u)}else!function(t,e,n,i,o){(function(t,e){var n;if("function"==typeof t.tag.view){if(t.state=Object.create(t.tag),null!=(n=t.state.view).$$reentrantLock$$)return;n.$$reentrantLock$$=!0}else{if(t.state=void 0,null!=(n=t.tag).$$reentrantLock$$)return;n.$$reentrantLock$$=!0,t.state=null!=t.tag.prototype&&"function"==typeof t.tag.prototype.view?new t.tag(t):t.tag(t)}if(M(t.state,t,e),null!=t.attrs&&M(t.attrs,t,e),t.instance=r.normalize(a.call(t.state.view,t)),t.instance===t)throw Error("A view cannot return the vnode it received as argument");n.$$reentrantLock$$=null})(e,n),null!=e.instance?(c(t,e.instance,n,i,o),e.dom=e.instance.dom,e.domSize=null!=e.dom?e.instance.domSize:0):e.domSize=0}(t,e,i,s,u)}var d={caption:"table",thead:"table",tbody:"table",tfoot:"table",tr:"tbody",th:"tr",td:"tr",colgroup:"table",col:"colgroup"};function h(t,e,r,i){var o=e.children.match(/^\s*?<(\w+)/im)||[],s=n.createElement(d[o[1]]||"div");"http://www.w3.org/2000/svg"===r?(s.innerHTML='<svg xmlns="http://www.w3.org/2000/svg">'+e.children+"</svg>",s=s.firstChild):s.innerHTML=e.children,e.dom=s.firstChild,e.domSize=s.childNodes.length,e.instance=[];for(var a,u=n.createDocumentFragment();a=s.firstChild;)e.instance.push(a),u.appendChild(a);w(t,u,i)}function f(t,e,n,r,i,o){if(e!==n&&(null!=e||null!=n))if(null==e||0===e.length)l(t,n,0,n.length,r,i,o);else if(null==n||0===n.length)x(t,e,0,e.length);else{var s=null!=e[0]&&null!=e[0].key,a=null!=n[0]&&null!=n[0].key,u=0,d=0;if(!s)for(;d<e.length&&null==e[d];)d++;if(!a)for(;u<n.length&&null==n[u];)u++;if(null===a&&null==s)return;if(s!==a)x(t,e,d,e.length),l(t,n,u,n.length,r,i,o);else if(a){for(var h,f,b,w,D,A=e.length-1,E=n.length-1;A>=d&&E>=u&&(b=e[A],w=n[E],b.key===w.key);)b!==w&&p(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),A--,E--;for(;A>=d&&E>=u&&(h=e[d],f=n[u],h.key===f.key);)d++,u++,h!==f&&p(t,h,f,r,g(e,d,i),o);for(;A>=d&&E>=u&&u!==E&&h.key===w.key&&b.key===f.key;)y(t,b,D=g(e,d,i)),b!==f&&p(t,b,f,r,D,o),++u<=--E&&y(t,h,i),h!==w&&p(t,h,w,r,i,o),null!=w.dom&&(i=w.dom),d++,b=e[--A],w=n[E],h=e[d],f=n[u];for(;A>=d&&E>=u&&b.key===w.key;)b!==w&&p(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),E--,b=e[--A],w=n[E];if(u>E)x(t,e,d,A+1);else if(d>A)l(t,n,u,E+1,r,i,o);else{var N,k,S=i,T=E-u+1,F=new Array(T),_=0,P=0,B=2147483647,I=0;for(P=0;P<T;P++)F[P]=-1;for(P=E;P>=u;P--){null==N&&(N=m(e,d,A+1));var O=N[(w=n[P]).key];null!=O&&(B=O<B?O:-1,F[P-u]=O,b=e[O],e[O]=null,b!==w&&p(t,b,w,r,i,o),null!=w.dom&&(i=w.dom),I++)}if(i=S,I!==A-d+1&&x(t,e,d,A+1),0===I)l(t,n,u,E+1,r,i,o);else if(-1===B)for(k=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}(F),_=k.length-1,P=E;P>=u;P--)f=n[P],-1===F[P-u]?c(t,f,r,o,i):k[_]===P-u?_--:y(t,f,i),null!=f.dom&&(i=n[P].dom);else for(P=E;P>=u;P--)f=n[P],-1===F[P-u]&&c(t,f,r,o,i),null!=f.dom&&(i=n[P].dom)}}else{var L=e.length<n.length?e.length:n.length;for(u=u<d?u:d;u<L;u++)(h=e[u])===(f=n[u])||null==h&&null==f||(null==h?c(t,f,r,o,g(e,u+1,i)):null==f?C(t,h):p(t,h,f,r,g(e,u+1,i),o));e.length>L&&x(t,e,u,e.length),n.length>L&&l(t,n,u,n.length,r,i,o)}}}function p(t,e,n,i,s,u){var l=e.tag;if(l===n.tag){if(n.state=e.state,n.events=e.events,function(t,e){do{var n;if(null!=t.attrs&&"function"==typeof t.attrs.onbeforeupdate&&void 0!==(n=a.call(t.attrs.onbeforeupdate,t,e))&&!n)break;if("string"!=typeof t.tag&&"function"==typeof t.state.onbeforeupdate&&void 0!==(n=a.call(t.state.onbeforeupdate,t,e))&&!n)break;return!1}while(0);return t.dom=e.dom,t.domSize=e.domSize,t.instance=e.instance,t.attrs=e.attrs,t.children=e.children,t.text=e.text,!0}(n,e))return;if("string"==typeof l)switch(null!=n.attrs&&$(n.attrs,n,i),l){case"#":!function(t,e){t.children.toString()!==e.children.toString()&&(t.dom.nodeValue=e.children),e.dom=t.dom}(e,n);break;case"<":!function(t,e,n,r,i){e.children!==n.children?(A(t,e),h(t,n,r,i)):(n.dom=e.dom,n.domSize=e.domSize,n.instance=e.instance)}(t,e,n,u,s);break;case"[":!function(t,e,n,r,i,o){f(t,e.children,n.children,r,i,o);var s=0,a=n.children;if(n.dom=null,null!=a){for(var u=0;u<a.length;u++){var l=a[u];null!=l&&null!=l.dom&&(null==n.dom&&(n.dom=l.dom),s+=l.domSize||1)}1!==s&&(n.domSize=s)}}(t,e,n,i,s,u);break;default:!function(t,e,n,i){var s=e.dom=t.dom;i=o(e)||i,"textarea"===e.tag&&(null==e.attrs&&(e.attrs={}),null!=e.text&&(e.attrs.value=e.text,e.text=void 0)),function(t,e,n,r){if(null!=n)for(var i in n)k(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]||S(t,i,o,r)}(e,t.attrs,e.attrs,i),D(e)||(null!=t.text&&null!=e.text&&""!==e.text?t.text.toString()!==e.text.toString()&&(t.dom.firstChild.nodeValue=e.text):(null!=t.text&&(t.children=[r("#",void 0,void 0,t.text,void 0,t.dom.firstChild)]),null!=e.text&&(e.children=[r("#",void 0,void 0,e.text,void 0,void 0)]),f(s,t.children,e.children,n,null,i)))}(e,n,i,u)}else!function(t,e,n,i,o,s){if(n.instance=r.normalize(a.call(n.state.view,n)),n.instance===n)throw Error("A view cannot return the vnode it received as argument");$(n.state,n,i),null!=n.attrs&&$(n.attrs,n,i),null!=n.instance?(null==e.instance?c(t,n.instance,i,s,o):p(t,e.instance,n.instance,i,o,s),n.dom=n.instance.dom,n.domSize=n.instance.domSize):null!=e.instance?(C(t,e.instance),n.dom=void 0,n.domSize=0):(n.dom=e.dom,n.domSize=e.domSize)}(t,e,n,i,s,u)}else C(t,e),c(t,n,i,u,s)}function m(t,e,n){for(var r=Object.create(null);e<n;e++){var i=t[e];if(null!=i){var o=i.key;null!=o&&(r[o]=e)}}return r}var v=[];function g(t,e,n){for(;e<t.length;e++)if(null!=t[e]&&null!=t[e].dom)return t[e].dom;return n}function y(t,e,r){var i=n.createDocumentFragment();b(t,i,e),w(t,i,r)}function b(t,e,n){for(;null!=n.dom&&n.dom.parentNode===t;){if("string"!=typeof n.tag){if(null!=(n=n.instance))continue}else if("<"===n.tag)for(var r=0;r<n.instance.length;r++)e.appendChild(n.instance[r]);else if("["!==n.tag)e.appendChild(n.dom);else if(1===n.children.length){if(null!=(n=n.children[0]))continue}else for(r=0;r<n.children.length;r++){var i=n.children[r];null!=i&&b(t,e,i)}break}}function w(t,e,n){null!=n?t.insertBefore(e,n):t.appendChild(e)}function D(t){if(null==t.attrs||null==t.attrs.contenteditable&&null==t.attrs.contentEditable)return!1;var e=t.children;if(null!=e&&1===e.length&&"<"===e[0].tag){var n=e[0].children;t.dom.innerHTML!==n&&(t.dom.innerHTML=n)}else if(null!=t.text||null!=e&&0!==e.length)throw new Error("Child node of a contenteditable must be trusted");return!0}function x(t,e,n,r){for(var i=n;i<r;i++){var o=e[i];null!=o&&C(t,o)}}function C(t,e){var n,r,i,o=0,u=e.state;if("string"!=typeof e.tag&&"function"==typeof e.state.onbeforeremove&&null!=(i=a.call(e.state.onbeforeremove,e))&&"function"==typeof i.then&&(o=1,n=i),e.attrs&&"function"==typeof e.attrs.onbeforeremove&&null!=(i=a.call(e.attrs.onbeforeremove,e))&&"function"==typeof i.then&&(o|=2,r=i),s(e,u),o){if(null!=n){var l=function(){1&o&&((o&=2)||c())};n.then(l,l)}null!=r&&(l=function(){2&o&&((o&=1)||c())},r.then(l,l))}else N(e),E(t,e);function c(){s(e,u),N(e),E(t,e)}}function A(t,e){for(var n=0;n<e.instance.length;n++)t.removeChild(e.instance[n])}function E(t,e){for(;null!=e.dom&&e.dom.parentNode===t;){if("string"!=typeof e.tag){if(null!=(e=e.instance))continue}else if("<"===e.tag)A(t,e);else{if("["!==e.tag&&(t.removeChild(e.dom),!Array.isArray(e.children)))break;if(1===e.children.length){if(null!=(e=e.children[0]))continue}else for(var n=0;n<e.children.length;n++){var r=e.children[n];null!=r&&E(t,r)}}break}}function N(t){if("string"!=typeof t.tag&&"function"==typeof t.state.onremove&&a.call(t.state.onremove,t),t.attrs&&"function"==typeof t.attrs.onremove&&a.call(t.attrs.onremove,t),"string"!=typeof t.tag)null!=t.instance&&N(t.instance);else{var e=t.children;if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];null!=r&&N(r)}}}function k(t,e,r,i,o){if("key"!==e&&"is"!==e&&null!=i&&!T(e)&&(r!==i||function(t,e){return"value"===e||"checked"===e||"selectedIndex"===e||"selected"===e&&t.dom===u()||"option"===t.tag&&t.dom.parentNode===n.activeElement}(t,e)||"object"==typeof i)){if("o"===e[0]&&"n"===e[1])return L(t,e,i);if("xlink:"===e.slice(0,6))t.dom.setAttributeNS("http://www.w3.org/1999/xlink",e.slice(6),i);else if("style"===e)I(t.dom,r,i);else if(F(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 S(t,e,n,r){if("key"!==e&&"is"!==e&&null!=n&&!T(e))if("o"!==e[0]||"n"!==e[1]||T(e))if("style"===e)I(t.dom,n,null);else if(!F(t,e,r)||"className"===e||"value"===e&&("option"===t.tag||"select"===t.tag&&-1===t.dom.selectedIndex&&t.dom===u())||"input"===t.tag&&"type"===e){var i=e.indexOf(":");-1!==i&&(e=e.slice(i+1)),!1!==n&&t.dom.removeAttribute("className"===e?"class":e)}else t.dom[e]=null;else L(t,e,void 0)}function T(t){return"oninit"===t||"oncreate"===t||"onupdate"===t||"onremove"===t||"onbeforeremove"===t||"onbeforeupdate"===t}function F(t,e,n){return void 0===n&&(t.tag.indexOf("-")>-1||null!=t.attrs&&t.attrs.is||"href"!==e&&"list"!==e&&"form"!==e&&"width"!==e&&"height"!==e)&&e in t.dom}var _=/[A-Z]/g;function P(t){return"-"+t.toLowerCase()}function B(t){return"-"===t[0]&&"-"===t[1]?t:"cssFloat"===t?"float":t.replace(_,P)}function I(t,e,n){if(e===n);else if(null==n)t.style.cssText="";else if("object"!=typeof n)t.style.cssText=n;else if(null==e||"object"!=typeof e)for(var r in t.style.cssText="",n)null!=(i=n[r])&&t.style.setProperty(B(r),String(i));else{for(var r in n){var i;null!=(i=n[r])&&(i=String(i))!==String(e[r])&&t.style.setProperty(B(r),i)}for(var r in e)null!=e[r]&&null==n[r]&&t.style.removeProperty(B(r))}}function O(){this._=e}function L(t,e,n){if(null!=t.events){if(t.events[e]===n)return;null==n||"function"!=typeof n&&"object"!=typeof n?(null!=t.events[e]&&t.dom.removeEventListener(e.slice(2),t.events,!1),t.events[e]=void 0):(null==t.events[e]&&t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}else null==n||"function"!=typeof n&&"object"!=typeof n||(t.events=new O,t.dom.addEventListener(e.slice(2),t.events,!1),t.events[e]=n)}function M(t,e,n){"function"==typeof t.oninit&&a.call(t.oninit,e),"function"==typeof t.oncreate&&n.push(a.bind(t.oncreate,e))}function $(t,e,n){"function"==typeof t.onupdate&&n.push(a.bind(t.onupdate,e))}return O.prototype=Object.create(null),O.prototype.handleEvent=function(t){var e,n=this["on"+t.type];"function"==typeof n?e=n.call(t.currentTarget,t):"function"==typeof n.handleEvent&&n.handleEvent(t),this._&&!1!==t.redraw&&(0,this._)(),!1===e&&(t.preventDefault(),t.stopPropagation())},function(t,n,i){if(!t)throw new TypeError("Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.");var o=[],s=u(),a=t.namespaceURI;null==t.vnodes&&(t.textContent=""),n=r.normalizeChildren(Array.isArray(n)?n:[n]);var l=e;try{e="function"==typeof i?i:void 0,f(t,t.vnodes,n,o,null,"http://www.w3.org/1999/xhtml"===a?void 0:a)}finally{e=l}t.vnodes=n,null!=s&&u()!==s&&"function"==typeof s.focus&&s.focus();for(var c=0;c<o.length;c++)o[c]()}}},4031:(t,e,n)=>{"use strict";var r=n(1642);t.exports=function(t){return null==t&&(t=""),r("<",void 0,void 0,t,void 0,void 0)}},1642: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},8450:(t,e,n)=>{"use strict";var r=n(187),i=n(570);t.exports=n(1950)(window,r,i.redraw)},1950:(t,e,n)=>{"use strict";var r=n(3690);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)}))}}},2092:(t,e,n)=>{"use strict";var r=n(570);t.exports=n(3600)(window,r)},30:(t,e,n)=>{"use strict";t.exports=n(6807)},6807: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}()},619:(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,{decode:()=>b,default:()=>C,encode:()=>w,toASCII:()=>x,toUnicode:()=>D,ucs2decode:()=>m,ucs2encode:()=>v});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 D=n.length+1;u=y(i-p,D,0==p),d(i/D)>o-a&&f("overflow"),a+=d(i/D),i%=D,n.splice(i++,0,a)}return String.fromCodePoint.apply(String,n)},w=function(t){for(var e,n=[],i=(t=m(t)).length,a=128,u=0,l=72,c=r(t);!(e=c()).done;){var p=e.value;p<128&&n.push(h(p))}var v=n.length,b=v;for(v&&n.push("-");b<i;){for(var w,D=o,x=r(t);!(w=x()).done;){var C=w.value;C>=a&&C<D&&(D=C)}var A=b+1;D-a>d((o-u)/A)&&f("overflow"),u+=(D-a)*A,a=D;for(var E,N=r(t);!(E=N()).done;){var k=E.value;if(k<a&&++u>o&&f("overflow"),k==a){for(var S=u,T=s;;T+=s){var F=T<=l?1:T>=l+26?26:T-l;if(S<F)break;var _=S-F,P=s-F;n.push(h(g(F+_%P,0))),S=d(_/P)}n.push(h(g(S,0))),l=y(u,A,b==v),u=0,++b}}++u,++a}return n.join("")},D=function(t){return p(t,(function(t){return a.test(t)?b(t.slice(4).toLowerCase()):t}))},x=function(t){return p(t,(function(t){return u.test(t)?"xn--"+w(t):t}))};const C={version:"2.1.0",ucs2:{decode:m,encode:v},decode:b,encode:w,toASCII:x,toUnicode:D}},1655: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)}()},391:(t,e,n)=>{var r=n(9152),i=n(356);void 0===i.$&&(i.$=r),void 0===i.jQuery&&(i.jQuery=r),t.exports=r},1683:(t,e,n)=>{var r=n(2898),i=n(356);void 0===i.ColorThief&&(i.ColorThief=r),t.exports=r},982:(t,e,n)=>{var r=n(4757),i=n(356);void 0===i.dayjs&&(i.dayjs=r),t.exports=r},4473:(t,e,n)=>{var r=n(7945),i=n(356);void 0===i.m&&(i.m=r),t.exports=r},1885:(t,e,n)=>{var r=n(619),i=n(356);void 0===i.punycode&&(i.punycode=r),t.exports=r},9882:t=>{t.exports=function(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},t.exports.__esModule=!0,t.exports.default=t.exports},9696:t=>{t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports},230:t=>{t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},1904:t=>{t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},8213:t=>{function e(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)}}t.exports=function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},402:t=>{t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.__esModule=!0,t.exports.default=t.exports},9767:t=>{function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},2061:(t,e,n)=>{var r=n(480);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&r(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},1209:t=>{t.exports=function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],s=!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.exports.__esModule=!0,t.exports.default=t.exports},6067:t=>{t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},8974:(t,e,n)=>{var r=n(2075).default,i=n(230);t.exports=function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return i(t)},t.exports.__esModule=!0,t.exports.default=t.exports},9440:(t,e,n)=>{var r=n(2075).default;function i(){"use strict";t.exports=i=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},n=Object.prototype,o=n.hasOwnProperty,s=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function d(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,n){return t[e]=n}}function h(t,e,n,r){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),a=new S(r||[]);return s(o,"_invoke",{value:A(t,n,a)}),o}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p={};function m(){}function v(){}function g(){}var y={};d(y,u,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(T([])));w&&w!==n&&o.call(w,u)&&(y=w);var D=g.prototype=m.prototype=Object.create(y);function x(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function n(i,s,a,u){var l=f(t[i],t,s);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==r(d)&&o.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(d).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,u)}))}u(l.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function A(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=E(s,n);if(a){if(a===p)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function E(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,E(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var r=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,p;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function T(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(o.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:F}}function F(){return{value:void 0,done:!0}}return v.prototype=g,s(D,"constructor",{value:g,configurable:!0}),s(g,"constructor",{value:v,configurable:!0}),v.displayName=d(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,d(t,c,"GeneratorFunction")),t.prototype=Object.create(D),t},e.awrap=function(t){return{__await:t}},x(C.prototype),d(C.prototype,l,(function(){return this})),e.AsyncIterator=C,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var s=new C(h(t,n,r,i),o);return e.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},x(D),d(D,c,"Generator"),d(D,u,(function(){return this})),d(D,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=T,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return s.type="throw",s.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(a&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=t,s.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):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),p},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),k(n),p}},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;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},480:t=>{function e(n,r){return t.exports=e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n,r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},5387:(t,e,n)=>{var r=n(9696),i=n(1209),o=n(9111),s=n(6067);t.exports=function(t,e){return r(t)||i(t,e)||o(t,e)||s()},t.exports.__esModule=!0,t.exports.default=t.exports},2075:t=>{function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},9111:(t,e,n)=>{var r=n(9882);t.exports=function(t,e){if(t){if("string"==typeof t)return r(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)?r(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},2507:(t,e,n)=>{var r=n(9440)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(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,{app:()=>v,compat:()=>Co});var t={};n.r(t),n.d(t,{camelCaseToSnakeCase:()=>Z,generateRandomString:()=>tt,getPlainContent:()=>J,slug:()=>X,truncate:()=>K,ucfirst:()=>Q});var e={};n.r(e),n.d(e,{default:()=>mt,fireDeprecationWarning:()=>vt});var i={};n.r(i),n.d(i,{createFocusTrap:()=>dr});var o={};n.r(o),n.d(o,{extend:()=>xi,override:()=>Ci});var s={};n.r(s),n.d(s,{debounce:()=>ie,throttle:()=>re}),n(391),n(4473),n(982),n(9043),n(6199),n(7865),n(6935),n(9411);var a=n(5635),u=n.n(a),l=n(6982),c=n.n(l);function d(t,e){var n="select"===t.tag?t.attrs.multi?"multi":"select":t.attrs.type;return t.attrs.onchange="multi"===n?function(){e([].slice.call(this.selectedOptions,(function(t){return t.value})))}:"select"===n?function(t){e(this.selectedOptions[0].value)}:"checkbox"===n?function(t){e(this.checked)}:t.attrs.oninput=function(t){e(this.value)},"select"===t.tag?t.children.forEach((function(t){t.attrs.value!==e()&&t.children[0]!==e()||(t.attrs.selected=!0)})):"checkbox"===n?t.attrs.checked=e():"radio"===n?t.attrs.checked=e()===t.attrs.value:t.attrs.value=e(),t.attrs.bidi=null,t}d.view=function(t,e,n){return d(e,e.attrs.bidi)};const h=d;function f(t){var e=t.m,n=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=e.apply(this,arguments);return o.attrs||(o.attrs={}),o.attrs.bidi&&h(o,o.attrs.bidi),o};Object.keys(e).forEach((function(t){return n[t]=e[t]})),t.m=n}var p=window;const v=new Proxy({},{get:function(t,e){return Reflect.get(p.app,e,p.app)},set:function(t,e,n){return Reflect.set(p.app,e,n,p.app)}});n(1859),dayjs.extend(u()),dayjs.extend(c()),f(window);var g=$.fn.tooltip;function y(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}function w(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,b(t,e)}function D(){return D=Object.assign?Object.assign.bind():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},D.apply(this,arguments)}function x(t,e,n){void 0===e&&(e=null),void 0===n&&(n={});var r=D({},n);r.state=r.state||{},r.state.key=Date.now(),m.route.set(t,e,r)}$.fn.tooltip=function(t,e){["DANGEROUS_tooltip_jquery_fn_deprecation_exempt"].includes(e)||console.warn("Calling `$.tooltip` is now deprecated. Please use the `<Tooltip>` component exposed by flarum/core instead. `$.tooltip` may be removed in a future version of Flarum.\n\nIf this component doesn't meet your requirements, please open an issue: https://github.com/flarum/core/issues/new?assignees=davwheat&labels=type/bug,needs-verification&template=bug-report.md&title=Tooltip%20component%20unsuitable%20for%20use%20case"),g.bind(this)(t)},n(1885),n(1683);var C=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),x("/")},t}(),A=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}(),E=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=D({},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 N(t,e){return t&&(t===e||t.prototype instanceof e)}var k=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={}),!!N(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}(),S=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}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),v.previous=v.current,v.current=new k(this.constructor,{routeName:this.attrs.routeName}),v.drawer.hide(),v.modal.close()},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.bodyClass&&$("#app").addClass(this.bodyClass),this.scrollTopOnCreate&&$(window).scrollTop(0),"scrollRestoration"in history&&(history.scrollRestoration=this.useBrowserScrollRestoration?"auto":"manual")},n.onremove=function(e){t.prototype.onremove.call(this,e),this.bodyClass&&$("#app").removeClass(this.bodyClass)},e}(E);function T(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function F(t,e,n){return e&&T(t.prototype,e),n&&T(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function _(t){var e=typeof t;return"function"===e||"object"===e&&!!t}var P=function(t,e){this.content=void 0,this.priority=void 0,this.content=t,this.priority=e},B=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 P(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 P&&(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||_(i.content)?D({},i,{content:e.createItemContentProxy(_(i.content)?i.content:Object(i.content),n)}):D({},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)}})},F(t,[{key:"items",get:function(){return new Proxy(this._items,{set:function(){return console.warn("Modifying `ItemList.items` is not allowed."),!1}})}}]),t}(),I=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(){return m("li",{className:"Dropdown-separator"})},e}(E);I.isListItem=!0;const O=I;function L(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=L(t[e]))&&(r&&(r+=" "),r+=n);else for(e in t)t[e]&&(r&&(r+=" "),r+=e);return r}const M=function(){for(var t,e,n=0,r="";n<arguments.length;)(t=arguments[n++])&&(e=L(t))&&(r&&(r+=" "),r+=e);return r};function j(t){return"object"==typeof t&&null!==t&&"tag"in t}function R(t){return j(t)&&t.tag===O}function H(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){(!R(t)||i&&!R(i)&&e!==r.length-1)&&(i=t,o.push(t))})),o).map((function(t){var e,r,i=[t.itemName&&"item-"+t.itemName];if(j(t)&&t.tag.isListItem)return t.attrs=t.attrs||{},t.attrs.key=t.attrs.key||t.itemName,t.key=t.attrs.key,t;j(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=j(t)&&(null==t||null==(e=t.attrs)?void 0:e.key)||t.itemName;return m(s,Object.assign({className:M(i),key:o},n),t)}))}var U=function(t){function e(){return t.apply(this,arguments)||this}w(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"},H(this.items().toArray()))))},n.items=function(){var t=new B,e=this.attrs.discussion,n=e.badges().toArray();return n.length&&t.add("badges",m("ul",{className:"DiscussionHero-badges badges"},H(n)),10),t.add("title",m("h1",{className:"DiscussionHero-title"},e.title())),t},e}(E);function q(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 z(t,e){var n=t[e];return delete t[e],n}var V,W=["options"],G=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(t){var e=t.attrs,n=e.options,r=void 0===n?{}:n,i=q(e,W);i.href||(i.href="");var o=t.children||{tag:"#",children:t.text};return i.external?m("a",i,o):(i.href===m.route.get()&&("replace"in r||(r.replace=!0)),z(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}(E);function Y(t,e){var n;void 0===e&&(e={}),e.className=M("Avatar",e.className),null!=(n=e).loading||(n.loading="lazy");var r="",i="undefined"===e.title||e.title;if(i||delete e.title,t){var o=t.displayName()||"?",s=t.avatarUrl();if(i&&(e.title=e.title||o),s)return m("img",Object.assign({},e,{src:s,alt:""}));r=o.charAt(0).toUpperCase(),e.style={"--avatar-bg":t.color()}}return m("span",e,r)}function K(t,e,n){return void 0===n&&(n=0),(n>0?"...":"")+t.substring(n,n+e)+(t.length>n+e?"...":"")}function X(t,e){switch(void 0===e&&(e=V.ALPHANUMERIC),e){case V.UTF8:return t.toLowerCase().replace(/(?:(?![0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088E\u0898-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09F4-\u09F9\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71-\u0B77\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BF2\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C78-\u0C7E\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D63\u0D66-\u0D78\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F33\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u17F0-\u17F9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ACE\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u20D0-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA827\uA82C\uA830-\uA835\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\u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DD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6\uDF00-\uDF10\uDF12-\uDF3A\uDF3E-\uDF42\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC40-\uDC55]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFE4\uDFF0\uDFF1]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uD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80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF]|\uDB40[\uDD00-\uDDEF])[\s\S])/gi,"-").replace(/-+/g,"-").replace(/-$|^-/g,"");case V.ALPHANUMERIC:default:return t.toLowerCase().replace(/[^a-z0-9]/gi,"-").replace(/-+/g,"-").replace(/-$|^-/g,"")}}function J(t){var e=t.replace(/(<\/p>|<br>)/g,"$1 &nbsp;").replace(/<img\b[^>]*>/gi," "),n=(new DOMParser).parseFromString(e,"text/html").documentElement;return J.removeSelectors.forEach((function(t){n.querySelectorAll(t).forEach((function(t){t.remove()}))})),n.innerText.replace(/\s+/g," ").trim()}function Q(t){return t.substr(0,1).toUpperCase()+t.substr(1)}function Z(t){return t.replace(/[A-Z]/g,(function(t){return"_"+t.toLowerCase()}))}function tt(t){if(t<0)throw new Error("Cannot generate a random string with length less than 0.");if(0===t)return"";var e=new Uint8Array(t/2);return window.crypto.getRandomValues(e),Array.from(e,(function(t){return t.toString(16).padStart(2,"0")})).join("")}function et(t,e,n){if(!e&&!n)return t;var r=e instanceof RegExp?e:new RegExp(null!=e?e:"","gi"),i=t,o=0;return n&&(e&&(o=Math.max(0,t.search(r)-n/2)),i=K(i,n,o)),i=$("<div/>").text(i).html(),e&&(i=i.replace(r,"<mark>$&</mark>")),m.trust(i)}function nt(t,e){return void 0===e&&(e={}),e.className=M("icon",t,e.className),m("i",Object.assign({"aria-hidden":"true"},e))}!function(t){t.ALPHANUMERIC="alphanum",t.UTF8="utf8"}(V||(V={})),J.removeSelectors=["blockquote","script"];var rt=n(4757),it=n.n(rt);function ot(t){return t instanceof Array?t.map((function(t){return ot(t)})).join(""):"object"==typeof t&&null!==t?t.children?ot(t.children):String(t.text):String(t)}function st(t){var e=it()(t),n=it()();return e.isAfter(n)&&(e=n),e.diff(it()())<-2592e6?e.year()===it()().year()?e.format(ot(v.translator.trans("core.lib.datetime_formats.humanTimeShort"))):e.format(ot(v.translator.trans("core.lib.datetime_formats.humanTimeLong"))):e.fromNow()}function at(t){return t>=1e6?Math.floor(t/1e6)+ot(v.translator.trans("core.lib.number_suffix.mega_text")):t>=1e3?(t/1e3).toFixed(1)+ot(v.translator.trans("core.lib.number_suffix.kilo_text")):t.toString()}var ut=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).showing=!1,e}w(e,t),e.initAttrs=function(t){t.className||(t.className=""),t.buttonClassName||(t.buttonClassName=""),t.menuClassName||(t.menuClassName=""),t.label||(t.label=""),null!=t.caretIcon||(t.caretIcon="fas fa-caret-down"),t.accessibleToggleLabel||(t.accessibleToggleLabel=ot(v.translator.trans("core.lib.dropdown.toggle_dropdown_accessible_label")))};var n=e.prototype;return n.view=function(t){var e=t.children?H(t.children):[],n=!this.attrs.lazyDraw||this.showing;return m("div",{className:"ButtonGroup Dropdown dropdown "+this.attrs.className+" itemCount"+e.length+(this.showing?" open":"")},this.getButton(t.children),n&&this.getMenu(e))},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.$().on("shown.bs.dropdown",(function(){var t,e,r,i,o,s,a,u,l,c,d,h=n.attrs,f=h.lazyDraw,p=h.onshow;n.showing=!0,f&&m.redraw.sync(),"function"==typeof p&&p(),f||m.redraw();var v=n.$(".Dropdown-menu"),g=v.hasClass("Dropdown-menu--right"),y=null!=(t=null==(e=v.offset())?void 0:e.top)?t:0,b=null!=(r=v.height())?r:0,w=null!=(i=$(window).scrollTop())?i:0,D=null!=(o=$(window).height())?o:0;v.removeClass("Dropdown-menu--top Dropdown-menu--right"),v.toggleClass("Dropdown-menu--top",y+b>w+D),((null==(s=v.offset())?void 0:s.top)||0)<0&&v.removeClass("Dropdown-menu--top");var x=null!=(a=null==(u=v.offset())?void 0:u.left)?a:0,C=null!=(l=v.width())?l:0,A=null!=(c=$(window).scrollLeft())?c:0,E=null!=(d=$(window).width())?d:0;v.toggleClass("Dropdown-menu--right",g||x+C>A+E)})),this.$().on("hidden.bs.dropdown",(function(){n.showing=!1,n.attrs.onhide&&n.attrs.onhide(),m.redraw()}))},n.getButton=function(t){return m("button",{className:"Dropdown-toggle "+this.attrs.buttonClassName,"aria-haspopup":"menu","aria-label":this.attrs.accessibleToggleLabel,"data-toggle":"dropdown",onclick:this.attrs.onclick},this.getButtonContent(t))},n.getButtonContent=function(t){return[this.attrs.icon?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}(E);function lt(t){var e=it()(t),n=e.format(),r=e.format("LLLL"),i=st(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 w(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")," ",Wi.translator.trans("core.forum.discussion_list."+(e?"replied":"started")+"_text",{user:n,ago:lt(r)}))},e}(E),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 w(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=q(t,ht),u=M("LoadingIndicator",s),l=M("LoadingIndicator-container","unset"!==n&&"LoadingIndicator-container--"+n,i&&"LoadingIndicator-container--"+i,o);return m("div",Object.assign({"aria-label":v.translator.trans("core.lib.loading_indicator.accessible_label"),role:"status"},a.containerAttrs,{"data-size":i,className:l}),m("div",Object.assign({"aria-hidden":"true",className:u},a)))},e}(E),pt=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.handler=function(){return this.attrs.when()||void 0},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.boundHandler=this.handler.bind(this),$(window).on("beforeunload",this.boundHandler)},n.onremove=function(e){t.prototype.onremove.call(this,e),$(window).off("beforeunload",this.boundHandler)},n.view=function(t){return m("[",null,t.children)},e}(E);function mt(){var t;v.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}w(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=q(e,gt);n||(n="button"),i||(i=r),"object"==typeof i&&(i=ot(i)),(s||a)&&delete c.onclick;var d=D({disabled:s,className:u=M(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||ot(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}(E),bt=n(1655),wt=n.n(bt),Dt=null;function xt(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===Dt||!0===Dt){t.contentEditable="true";try{Dt=document.execCommand("insertText",!1,n)}catch(t){Dt=!1}t.contentEditable="false"}Dt&&!t.value.slice(0,t.selectionStart).endsWith(n)&&(Dt=!1),Dt||(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 Ct=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 B;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;xt(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}(),At=["text","tooltipVisible","showOnFocus","position","ignoreTitleWarning","html","delay"],Et=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}w(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,q(n,At),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":M("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)?ot(t):t},n.checkDomNodeChanged=function(){var t=this.firstChild.dom;t&&!t.isSameNode(this.childDomNode)&&(this.childDomNode=t,this.shouldRecreateTooltip=!0)},e}(E),Nt=function(t){function e(){return t.apply(this,arguments)||this}w(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"},H(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 Ct(t,this.buildEditorParams())},n.controlItems=function(){var t=new B;return t.add("submit",m(yt,{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(Et,{text:v.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 B},n.oninput=function(t){this.value=t,this.attrs.onchange(this.value)},n.onsubmit=function(){this.attrs.onsubmit(this.value)},e}(E),kt=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.composer=this.attrs.composer,this.loading=!1,this.attrs.confirmExit&&this.composer.preventClosingWhen((function(){return n.hasChanges()}),this.attrs.confirmExit),this.composer.fields.content(this.attrs.originalContent||"")},n.view=function(){var t;return m(pt,{when:this.hasChanges.bind(this)},m("div",{className:M("ComposerBody",this.attrs.className)},Y(this.attrs.user,{className:"ComposerBody-avatar"}),m("div",{className:"ComposerBody-content"},m("ul",{className:"ComposerBody-header"},H(this.headerItems().toArray())),m("div",{className:"ComposerBody-editor"},m(Nt,{submitLabel:this.attrs.submitLabel,placeholder:this.attrs.placeholder,disabled:this.loading||this.attrs.disabled,composer:this.composer,preview:null==(t=this.jumpToPreview)?void 0:t.bind(this),onchange:this.composer.fields.content,onsubmit:this.onsubmit.bind(this),value:this.composer.fields.content()}))),m(ft,{display:"unset",containerClassName:M("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 B},n.onsubmit=function(){},n.loaded=function(){this.loading=!1,m.redraw()},e}(E);function St(t){Wi.composer.isFullScreen()&&(Wi.composer.minimize(),t.stopPropagation())}var Tt=function(t){function e(){return t.apply(this,arguments)||this}w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.placeholder=e.placeholder||ot(Wi.translator.trans("core.forum.composer_reply.body_placeholder")),e.submitLabel=e.submitLabel||Wi.translator.trans("core.forum.composer_reply.submit_button"),e.confirmExit=e.confirmExit||ot(Wi.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(G,{href:Wi.route.discussion(n),onclick:St},n.title()))),e},n.jumpToPreview=function(t){St(t),m.route.set(Wi.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();Wi.store.createRecord("posts").save(n).then((function(n){if(Wi.viewingDiscussion(e)){var r=Wi.current.get("stream");r.update().then((function(){return r.goToNumber(n.number())}))}else{var i,o=m(yt,{className:"Button Button--link",onclick:function(){m.route.set(Wi.route.post(n)),Wi.alerts.dismiss(i)}},Wi.translator.trans("core.forum.composer_reply.view_button"));i=Wi.alerts.show({type:"success",controls:[o]},Wi.translator.trans("core.forum.composer_reply.posted_message"))}t.composer.hide()}),this.loaded.bind(this))},e}(kt),Ft=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(t){var e=Object.assign({},this.attrs),n=z(e,"type");e.className=M("Alert","Alert--"+n,e.className);var r=z(e,"title"),i=z(e,"icon"),o=z(e,"content")||t.children,s=z(e,"controls")||[],a=z(e,"dismissible"),u=z(e,"ondismiss"),l=[];return(a||void 0===a)&&l.push(m(yt,{"aria-label":v.translator.trans("core.lib.alert.dismiss_a11y_label"),icon:"fas fa-times",className:"Button Button--link Button--icon Alert-dismiss",onclick:u})),m("div",e,!!r&&m("div",{className:"Alert-title"},!!i&&m("span",{className:"Alert-title-icon"},nt(i)),m("span",{className:"Alert-title-text"},r)),m("span",{className:"Alert-body"},o),m("ul",{className:"Alert-controls"},H(s.concat(l))))},e}(E),_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).loading=!1,e.alertAttrs=null,e}w(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 new Promise((function(t){return setTimeout(t,300)}))},n.view=function(){var t=this;return this.alertAttrs&&(this.alertAttrs.dismissible=!1),m("div",{className:M("Modal modal-dialog fade",this.className())},m("div",{className:"Modal-content"},this.dismissibleOptions.viaCloseButton&&m("div",{className:"Modal-close App-backControl"},m(yt,{icon:"fas fa-times",onclick:function(){return t.hide()},className:"Button Button--icon Button--link","aria-label":v.translator.trans("core.lib.modal.close")})),m("form",{onsubmit:this.onsubmit.bind(this)},m("div",{className:"Modal-header"},m("h3",{className:"App-titleControl App-titleControl--text"},this.title())),!!this.alertAttrs&&m("div",{className:"Modal-alert"},m(Ft,this.alertAttrs)),this.content())))},n.onsubmit=function(t){},n.onready=function(){this.$().find("input, select, textarea").first().trigger("focus").trigger("select")},n.hide=function(){this.attrs.animateHide()},n.loaded=function(){this.loading=!1,m.redraw()},n.onerror=function(t){var e;this.alertAttrs=t.alert,m.redraw(),422===t.status&&null!=(e=t.response)&&e.errors?this.$("form [name="+t.response.errors[0].source.pointer.replace("/data/attributes/","")+"]").trigger("select"):this.onready()},F(e,[{key:"dismissibleOptions",get:function(){return this.constructor.dismissibleOptions}}],[{key:"dismissibleOptions",get:function(){return this.isDismissible?{isDismissible:!0,viaCloseButton:this.isDismissibleViaCloseButton,viaEscKey:this.isDismissibleViaEscKey,viaBackdropClick:this.isDismissibleViaBackdropClick}:{isDismissible:!1,viaCloseButton:!1,viaEscKey:!1,viaBackdropClick:!1}}}]),e}(E);_t.isDismissible=!0,_t.isDismissibleViaCloseButton=!0,_t.isDismissibleViaEscKey=!0,_t.isDismissibleViaBackdropClick=!0;var Pt=n(30);const Bt=n.n(Pt)();var It=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}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.email=Bt(this.attrs.email||"")},n.className=function(){return"ForgotPasswordModal Modal--small"},n.title=function(){return Wi.translator.trans("core.forum.forgot_password.title")},n.content=function(){return this.success?m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},Wi.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)},Wi.translator.trans("core.forum.forgot_password.dismiss_button"))))):m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("p",{className:"helpText"},Wi.translator.trans("core.forum.forgot_password.text")),this.fields().toArray()))},n.fields=function(){var t=new B,e=ot(Wi.translator.trans("core.forum.forgot_password.email_placeholder"));return t.add("email",m("div",{className:"Form-group"},m("input",{className:"FormControl",name:"email",type:"email",placeholder:e,"aria-label":e,bidi:this.email,disabled:this.loading})),50),t.add("submit",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Wi.translator.trans("core.forum.forgot_password.submit_button"))),-10),t},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0,Wi.request({method:"POST",url:Wi.forum.attribute("apiUrl")+"/forgot",body:this.requestParams(),errorHandler:this.onerror.bind(this)}).then((function(){e.success=!0,e.alertAttrs=null})).catch((function(){})).then(this.loaded.bind(this))},n.requestParams=function(){return{email:this.email()}},n.onerror=function(e){404===e.status&&e.alert&&(e.alert.content=Wi.translator.trans("core.forum.forgot_password.not_found_message")),t.prototype.onerror.call(this,e)},e}(_t),Ot=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){return m("div",{className:"LogInButtons"},this.items().toArray())},n.items=function(){return new B},e}(E),Lt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).username=void 0,e.email=void 0,e.password=void 0,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.username=Bt(this.attrs.username||""),this.email=Bt(this.attrs.email||""),this.password=Bt(this.attrs.password||"")},n.className=function(){return"Modal--small SignUpModal"},n.title=function(){return Wi.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(Ot,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]},n.fields=function(){var t=new B,e=ot(Wi.translator.trans("core.forum.sign_up.username_placeholder")),n=ot(Wi.translator.trans("core.forum.sign_up.email_placeholder")),r=ot(Wi.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},Wi.translator.trans("core.forum.sign_up.submit_button"))),-10),t},n.footer=function(){return[m("p",{className:"SignUpModal-logIn"},Wi.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()};Wi.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();Wi.request({url:Wi.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 D({username:this.username(),email:this.email()},t)},e}(_t),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}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.identification=Bt(this.attrs.identification||""),this.password=Bt(this.attrs.password||""),this.remember=Bt(!!this.attrs.remember)},n.className=function(){return"LogInModal Modal--small"},n.title=function(){return Wi.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(Ot,null),m("div",{className:"Form Form--centered"},this.fields().toArray())]},n.fields=function(){var t=new B,e=ot(Wi.translator.trans("core.forum.log_in.username_or_email_placeholder")),n=ot(Wi.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}),Wi.translator.trans("core.forum.log_in.remember_me_label")))),10),t.add("submit",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Wi.translator.trans("core.forum.log_in.submit_button"))),-10),t},n.footer=function(){return m("[",null,m("p",{className:"LogInModal-forgotPassword"},m("a",{onclick:this.forgotPassword.bind(this)},Wi.translator.trans("core.forum.log_in.forgot_password_link"))),Wi.forum.attribute("allowSignUp")&&m("p",{className:"LogInModal-signUp"},Wi.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;Wi.modal.show(It,e)},n.signUp=function(){var t,e=this.identification(),n=((t={})[e.includes("@")?"email":"username"]=e,t);Wi.modal.show(Lt,n)},n.onready=function(){this.$("[name="+(this.identification()?"password":"identification")+"]").trigger("select")},n.onsubmit=function(t){t.preventDefault(),this.loading=!0,Wi.session.login(this.loginParams(),{errorHandler:this.onerror.bind(this)}).then((function(){return window.location.reload()}),this.loaded.bind(this))},n.loginParams=function(){return{identification:this.identification(),password:this.password(),remember:this.remember()}},n.onerror=function(e){401===e.status&&e.alert&&(e.alert.content=Wi.translator.trans("core.forum.log_in.invalid_login_message"),this.password("")),t.prototype.onerror.call(this,e)},e}(_t),$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).discussion=void 0,e.currentTitle=void 0,e.newTitle=void 0,e}w(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=Bt(this.currentTitle)},n.className=function(){return"RenameDiscussionModal Modal--small"},n.title=function(){return Wi.translator.trans("core.forum.rename_discussion.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("input",{className:"FormControl",bidi:this.newTitle,type:"text"})),m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Wi.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(){Wi.viewingDiscussion(e.discussion)&&Wi.current.get("stream").update(),m.redraw(),e.hide()})).catch((function(){e.loading=!1,m.redraw()}));this.hide()},e}(_t);const jt={controls:function(t,e){var n=this,r=new B;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(O,null)))})),r},userControls:function(t,e){var n=this,r=new B;return e instanceof ae&&r.add("reply",!Wi.session.user||t.canReply()?m(yt,{icon:"fas fa-reply",onclick:function(){return n.replyAction.bind(t)(!0,!1).catch((function(){}))}},Wi.translator.trans(Wi.session.user?"core.forum.discussion_controls.reply_button":"core.forum.discussion_controls.log_in_to_reply_button")):m(yt,{icon:"fas fa-reply",className:"disabled",title:ot(Wi.translator.trans("core.forum.discussion_controls.cannot_reply_text"))},Wi.translator.trans("core.forum.discussion_controls.cannot_reply_button"))),r},moderationControls:function(t){var e=new B;return t.canRename()&&e.add("rename",m(yt,{icon:"fas fa-pencil-alt",onclick:this.renameAction.bind(t)},Wi.translator.trans("core.forum.discussion_controls.rename_button"))),e},destructiveControls:function(t){var e=new B;return t.isHidden()?(t.canHide()&&e.add("restore",m(yt,{icon:"fas fa-reply",onclick:this.restoreAction.bind(t)},Wi.translator.trans("core.forum.discussion_controls.restore_button"))),t.canDelete()&&e.add("delete",m(yt,{icon:"fas fa-times",onclick:this.deleteAction.bind(t)},Wi.translator.trans("core.forum.discussion_controls.delete_forever_button")))):t.canHide()&&e.add("hide",m(yt,{icon:"far fa-trash-alt",onclick:this.hideAction.bind(t)},Wi.translator.trans("core.forum.discussion_controls.delete_button"))),e},replyAction:function(t,e){var n=this;return new Promise((function(r,i){return Wi.session.user?n.canReply()?(Wi.composer.composingReplyTo(n)&&!e||Wi.composer.load(Tt,{user:Wi.session.user,discussion:n}),Wi.composer.show(),t&&Wi.viewingDiscussion(n)&&!Wi.composer.isFullScreen()&&Wi.current.get("stream").goToNumber("reply"),r(Wi.composer)):i():(Wi.modal.show(Mt),i())}))},hideAction:function(){return this.pushData({attributes:{hiddenAt:new Date},relationships:{hiddenUser:Wi.session.user}}),this.save({isHidden:!0})},restoreAction:function(){return this.pushData({attributes:{hiddenAt:null},relationships:{hiddenUser:null}}),this.save({isHidden:!1})},deleteAction:function(){var t=this;if(confirm(ot(Wi.translator.trans("core.forum.discussion_controls.delete_confirmation"))))return Wi.viewingDiscussion(this)&&Wi.history.back(),this.delete().then((function(){return Wi.discussions.removeDiscussion(t)}))},renameAction:function(){return Wi.modal.show($t,{currentTitle:this.title(),discussion:this})}};function Rt(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 Ht=/[.*+?^${}()|[\]\\]/g;function Ut(t){return t.replace(Ht,"\\$&")}var qt=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).subtree=void 0,e.highlightRegExp=void 0,e}w(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=Wi.session.user&&Wi.session.user.markedAllAsReadAt();return t&&t.getTime()}),(function(){return n.active()}))},n.elementAttrs=function(){return{className:M("DiscussionListItem",{active:this.active(),"DiscussionListItem--hidden":this.attrs.discussion.isHidden(),Slidable:"ontouchstart"in window})}},n.view=function(){var t=this.elementAttrs();return m("div",t,this.viewItems().toArray())},n.viewItems=function(){var t=new B,e=this.attrs.discussion,n=jt.controls(e,this).toArray();return t.add("controls",this.controlsView(n),100),t.add("slidableUnderneath",this.slidableUnderneathView(),90),t.add("content",this.contentView(),80),t},n.controlsView=function(t){return m("[",null,!!t.length&&m(ut,{icon:"fas fa-ellipsis-v",className:"DiscussionListItem-controls",buttonClassName:"Button Button--icon Button--flat Slidable-underneath Slidable-underneath--right",accessibleToggleLabel:Wi.translator.trans("core.forum.discussion_controls.toggle_dropdown_accessible_label")},t))},n.slidableUnderneathView=function(){var t=this.attrs.discussion.isUnread();return m("span",{className:M("Slidable-underneath Slidable-underneath--left Slidable-underneath--elastic",{disabled:!t}),onclick:this.markAsRead.bind(this)},nt("fas fa-check"))},n.contentView=function(){var t=this.attrs.discussion,e=t.isUnread(),n=t.isRead();return m("div",{className:M("DiscussionListItem-content","Slidable-content",{unread:e,read:n})},this.contentItems().toArray())},n.contentItems=function(){var t=new B;return t.add("authorAvatar",this.authorAvatarView(),100),t.add("badges",this.badgesView(),90),t.add("main",this.mainView(),80),t.add("replyCount",this.replyCountItem(),70),t},n.authorAvatarView=function(){var t=this.attrs.discussion,e=t.user();return m(Et,{text:Wi.translator.trans("core.forum.discussion_list.started_text",{user:e,ago:st(t.createdAt())}),position:"right"},m(G,{className:"DiscussionListItem-author",href:e?Wi.route.user(e):"#"},Y(e||null,{title:""})))},n.badgesView=function(){var t=this.attrs.discussion;return m("ul",{className:"DiscussionListItem-badges badges"},H(t.badges().toArray()))},n.mainView=function(){var t=this.attrs.discussion,e=this.getJumpTo();return m(G,{href:Wi.route.discussion(t,e),className:"DiscussionListItem-main"},this.mainItems().toArray())},n.mainItems=function(){var t=new B,e=this.attrs.discussion;return t.add("title",m("h2",{className:"DiscussionListItem-title"},et(e.title(),this.highlightRegExp)),100),t.add("info",m("ul",{className:"DiscussionListItem-info"},H(this.infoItems().toArray())),90),t},n.getJumpTo=function(){var t=this.attrs.discussion,e=0;if(this.attrs.params.q){var n=t.mostRelevantPost();n&&(e=n.number());var r=Ut(this.attrs.params.q);this.highlightRegExp=new RegExp(r+"|"+r.trim().replace(/\s+/g,"|"),"gi")}else{var i;e=Math.min(null!=(i=t.lastPostNumber())?i:0,(t.lastReadPostNumber()||0)+1)}return e},n.oncreate=function(e){if(t.prototype.oncreate.call(this,e),"ontouchstart"in window){var n=Rt(this.element);this.$(".DiscussionListItem-controls").on("hidden.bs.dropdown",(function(){return n.reset()}))}},n.onbeforeupdate=function(e){return t.prototype.onbeforeupdate.call(this,e),this.subtree.needsRebuild()},n.active=function(){return Wi.current.matches(ae,{discussion:this.attrs.discussion})},n.showFirstPost=function(){var t;return["newest","oldest"].includes(null!=(t=this.attrs.params.sort)?t:"")},n.showRepliesCount=function(){return"replies"===this.attrs.params.sort},n.markAsRead=function(){var t=this.attrs.discussion;t.isUnread()&&(t.save({lastReadPostNumber:t.lastPostNumber()}),m.redraw())},n.infoItems=function(){var t=new B;if(this.attrs.params.q){var e=this.attrs.discussion.mostRelevantPost()||this.attrs.discussion.firstPost();if(e&&"comment"===e.contentType()){var n,r=et(null!=(n=e.contentPlain())?n:"",this.highlightRegExp,175);t.add("excerpt",r,-100)}}else t.add("terminalPost",m(ct,{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",{className:"visually-hidden"},Wi.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",{className:"visually-hidden"},Wi.translator.trans("core.forum.discussion_list.total_replies_a11y_label",{count:t.replyCount()})))},e}(E),zt=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(){return m("div",{className:"Placeholder"},m("p",null,this.attrs.text))},e}(E),Vt=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(){var t,e=this.attrs.state,n=e.getParams(),r=e.isInitialLoading()||e.isLoadingNext();if(r?t=m(ft,null):e.hasNext()&&(t=m(yt,{className:"Button",onclick:e.loadNext.bind(e)},Wi.translator.trans("core.forum.discussion_list.load_more_button"))),e.isEmpty()){var i=Wi.translator.trans("core.forum.discussion_list.empty_text");return m("div",{className:"DiscussionList"},m(zt,{text:i}))}var o=e.pageSize;return m("div",{className:M("DiscussionList",{"DiscussionList--searchResults":e.isSearchResults()})},m("ul",{role:"feed","aria-busy":r,className:"DiscussionList-discussions"},e.getPages().map((function(t,e){return t.items.map((function(t,r){return m("li",{key:t.id(),"data-id":t.id(),role:"article","aria-setsize":"-1","aria-posinset":e*o+r},m(qt,{discussion:t,params:n}))}))}))),m("div",{className:"DiscussionList-loadMore"},t))},e}(E),Wt=function(t){t.pageX<10&&Wi.pane.show()},Gt=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){if(this.attrs.state.hasItems())return m("aside",{className:"DiscussionPage-list"},this.enoughSpace()&&m(Vt,{state:this.attrs.state}))},n.oncreate=function(e){t.prototype.oncreate.call(this,e);var n=$(e.dom),r=Wi.pane;if(n.hover(r.show.bind(r),r.onmouseleave.bind(r)),$(document).on("mousemove",Wt),Wi.previous.matches(ae)){var i=Wi.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){Wi.cache.discussionListPaneScrollTop=$(t.dom).scrollTop(),$(document).off("mousemove",Wt)},n.enoughSpace=function(){return!$(".App-navigation").is(":visible")},e}(E),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 w(e,t),e.prototype.view=function(){return m("div",{className:"Post CommentPost LoadingPost"},m("header",{className:"Post-header"},Y(null,{className:"PostUser-avatar"}),m("div",{className:"fakeText"})),m("div",{className:"Post-body"},m("div",{className:"fakeText"}),m("div",{className:"fakeText"}),m("div",{className:"fakeText"})))},e}(E);function Xt(t){var e=t&&t.displayName()||v.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}w(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}(E),Qt=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){var t=this;return Wi.composer.composingReplyTo(this.attrs.discussion)?m("article",{className:"Post CommentPost editing","aria-busy":"true"},m("header",{className:"Post-header"},m("div",{className:"PostUser"},m("h3",{className:"PostUser-name"},Y(Wi.session.user,{className:"PostUser-avatar"}),Xt(Wi.session.user)),m("ul",{className:"PostUser-badges badges"},H(Wi.session.user.badges().toArray())))),m(Jt,{className:"Post-body",composer:Wi.composer,surround:this.anchorPreview.bind(this)})):m("button",{className:"Post ReplyPlaceholder",onclick:function(){jt.replyAction.call(t.attrs.discussion,!0).catch((function(){}))}},m("span",{className:"Post-header"},Y(Wi.session.user,{className:"PostUser-avatar"})," ",Wi.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}(E),Zt=function(t){function e(){return t.apply(this,arguments)||this}w(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=Wi.postComponents[n.contentType()];s=!!l&&m(l,{post:n}),a.key="post"+n.id(),a.oncreate=o,a["data-time"]=u.toISOString(),a["data-number"]=n.number(),a["data-id"]=n.id(),a["data-type"]=n.contentType();var c=u-t;c>3456e5&&(s=[m("div",{className:"PostStream-timeGap"},m("span",null,Wi.translator.trans("core.forum.post_stream.time_lapsed_text",{period:dayjs().add(c,"ms").fromNow(!0)}))),s]),t=u}else a.key="post"+i[e.stream.visibleStart+r],s=m(Kt,null);var d=m("div",Object.assign({className:"PostStream-item"},a),s);return 0===r&&e.afterFirstPostItems().toArray().length>0?m.fragment(D({},a),[d,m("div",{className:"PostStream-item PostStream-afterFirstPost",key:"afterFirstPost"},e.afterFirstPostItems().toArray())]):d}));return!n&&r[this.stream.visibleEnd-this.stream.visibleStart-1]&&s.push(m("div",{className:"PostStream-loadMore",key:"loadMore"},m(yt,{className:"Button",onclick:this.stream.loadNext.bind(this.stream)},Wi.translator.trans("core.forum.post_stream.load_more_button")))),n&&s.push.apply(s,this.endItems().toArray()),!n||Wi.session.user&&!this.discussion.canReply()||s.push(m("div",{className:"PostStream-item",key:"reply","data-index":this.stream.count(),oncreate:o},m(Qt,{discussion:this.discussion}))),m("div",{className:"PostStream",role:"feed","aria-live":"off","aria-busy":this.stream.pagesLoading?"true":"false"},s)},n.afterFirstPostItems=function(){return new B},n.endItems=function(){return new B},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(ot(Wi.translator.trans("core.lib.datetime_formats.scrubber"))))},n.calculatePosition=function(t){void 0===t&&(t=window.pageYOffset);var e,n,r=this.getMarginTop(),i=$(window),o=i.height()-r,s=i.scrollTop()+r,a=t+r;this.$(".PostStream-item").each((function(){var t=$(this),r=t.offset().top,i=t.outerHeight(!0),u=Math.max(0,a-r);if(void 0===e&&(u/i<.75||(i-u)/o>.25)&&(e=t.data("number")),r+i>s){if(!(r+i<s+o))return!1;t.data("number")&&(n=t.data("number"))}})),e&&this.attrs.onPositionChange(e||1,n,e)},n.getMarginTop=function(){var t="phone"===Wi.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()+Wi.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()+Wi.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}(E);function te(t,e){return void 0===e&&(e=v.data.locale),new Intl.NumberFormat(e).format(t)}var ee=function(t){function e(){return t.apply(this,arguments)||this}w(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=Wi.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+"%",opacity:r?1:0};t.state.oldStyle?e.stop(!0).css(t.state.oldStyle).animate(n):e.css(n),t.state.oldStyle=n}var o=["PostStreamScrubber","Dropdown"];return this.attrs.className&&o.push(this.attrs.className),m("div",{className:o.join(" ")},m("button",{className:"Button Dropdown-toggle","data-toggle":"dropdown"},e," ",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")," ",this.firstPostLabel()),m("div",{className:"Scrubber-scrollbar"},m("div",{className:"Scrubber-before"}),m("div",{className:"Scrubber-handle"},m("div",{className:"Scrubber-bar"}),m("div",{className:"Scrubber-info"},m("strong",null,e),m("span",{className:"Scrubber-description"}))),m("div",{className:"Scrubber-after"}),m("div",{className:"Scrubber-unread",oncreate:i,onupdate:i},this.unreadLabel(n))),m("a",{className:"Scrubber-last",onclick:this.goToLast.bind(this)},nt("fas fa-angle-double-down")," ",this.lastPostLabel()))))},n.firstPostLabel=function(){return Wi.translator.trans("core.forum.post_scrubber.original_post_link")},n.unreadLabel=function(t){return Wi.translator.trans("core.forum.post_scrubber.unread_text",{count:t})},n.lastPostLabel=function(){return Wi.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}(E),ne=function(t){function e(){return t.apply(this,arguments)||this}w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=M(e.className,"Dropdown--split"),e.menuClassName=M(e.menuClassName,"Dropdown-menu--right")};var n=e.prototype;return n.getButton=function(t){var e=this.getFirstChild(t),n=Object.assign({},null==e?void 0:e.attrs);return n.className=M(n.className,"SplitDropdown-button Button",this.attrs.buttonClassName),m("[",null,m(yt,n,e.children),m("button",{className:"Dropdown-toggle Button Button--icon "+this.attrs.buttonClassName,"aria-haspopup":"menu","aria-label":this.attrs.accessibleToggleLabel,"data-toggle":"dropdown"},this.attrs.icon?nt(this.attrs.icon,{className:"Button-icon"}):null,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=void 0,this.paused=!1,this.loadPageTimeouts={},this.pagesLoading=0,this.index=0,this.number=1,this.visible=1,this.visibleStart=0,this.visibleEnd=0,this.animateScroll=!1,this.needsScroll=!1,this.targetPost=null,this.description="",this.forceUpdateScrubber=!1,this.loadPromise=null,this.loadNext=void 0,this.loadPrevious=void 0,this.discussion=t,this.loadNext=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=D({},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(),Wi.store.find("posts",{filter:{discussion:this.discussion.id()},page:{near:t}}).then(this.show.bind(this)))},e.loadNearIndex=function(e){if(e>=this.visibleStart&&e<this.visibleEnd)return Promise.resolve();var n=this.sanitizeIndex(e-t.loadCount/2),r=n+t.loadCount;return this.reset(n,r),this.loadRange(n,r).then(this.show.bind(this))},e._loadNext=function(){var e=this.visibleEnd,n=this.visibleEnd=this.sanitizeIndex(this.visibleEnd+t.loadCount),r=e-2*t.loadCount;r>this.visibleStart&&r>=0&&(this.visibleStart=r+t.loadCount+1,this.loadPageTimeouts[r]&&(clearTimeout(this.loadPageTimeouts[r]),delete this.loadPageTimeouts[r],this.pagesLoading--)),this.loadPage(e,n)},e._loadPrevious=function(){var e=this.visibleStart,n=this.visibleStart=this.sanitizeIndex(this.visibleStart-t.loadCount),r=n+2*t.loadCount;r<this.visibleEnd&&r<=this.count()&&(this.visibleEnd=r,this.loadPageTimeouts[r]&&(clearTimeout(this.loadPageTimeouts[r]),delete this.loadPageTimeouts[r],this.pagesLoading--)),this.loadPage(n,e,!0)},e.loadPage=function(t,e,n){var r=this;void 0===n&&(n=!1),this.pagesLoading++;var i=function(){t<r.visibleStart||e>r.visibleEnd||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--})),delete r.loadPageTimeouts[t]}),this.pagesLoading-1?1e3:0)},e.loadRange=function(t,e){var n=[],r=[];return this.discussion.postIds().slice(t,e).forEach((function(t){var e=Wi.store.getById("posts",t);e&&e.discussion()&&void 0!==e.canEdit()?r.push(e):n.push(t)})),n.length?Wi.store.find("posts",n).then((function(t){return r.concat(t).sort((function(t,e){return t.number()-e.number()}))})):Promise.resolve(r)},e.show=function(t){var e;this.visibleStart=t.length?this.discussion.postIds().indexOf(null!=(e=t[0].id())?e:"0"):0,this.visibleEnd=this.sanitizeIndex(this.visibleStart+t.length)},e.reset=function(e,n){this.visibleStart=e||0,this.visibleEnd=this.sanitizeIndex(n||t.loadCount)},e.posts=function(){return this.discussion.postIds().slice(this.visibleStart,this.visibleEnd).map((function(t){var e=Wi.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;var ae=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}w(e,t);var n=e.prototype;return n.oninit=function(e){var n,r;t.prototype.oninit.call(this,e),this.load(),(Wi.discussions.hasItems()||Wi.discussions.isLoading())&&(null==(n=Wi.pane)||n.enable(),null==(r=Wi.pane)||r.hide()),this.bodyClass="App--discussion"},n.onremove=function(e){var n,r,i;t.prototype.onremove.call(this,e),null==(n=Wi.pane)||n.disable(),!this.discussion||!Wi.composer.composingReplyTo(this.discussion)||null!=(r=Wi.composer)&&null!=(i=r.fields)&&i.content()?Wi.composer.minimize():Wi.composer.hide()},n.view=function(){return m("div",{className:"DiscussionPage"},this.viewItems().toArray())},n.viewItems=function(){var t=new B;return t.add("pane",m(Gt,{state:Wi.discussions}),100),t.add("discussions",m("div",{className:"DiscussionPage-discussion"},this.discussion?this.pageContent().toArray():this.loadingItems().toArray()),90),t},n.loadingItems=function(){var t=new B;return t.add("spinner",m(ft,null),100),t},n.sidebar=function(){return m("nav",{className:"DiscussionPage-nav"},m("ul",null,H(this.sidebarItems().toArray())))},n.hero=function(){return m(U,{discussion:this.discussion})},n.pageContent=function(){var t=new B;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 B;return t.add("sidebar",this.sidebar(),100),t.add("poststream",m("div",{className:"DiscussionPage-stream"},m(Zt,{discussion:this.discussion,stream:this.stream,onPositionChange:this.positionChanged.bind(this)})),10),t},n.load=function(){var t=Wi.preloadedApiDocument();if(t)setTimeout(this.show.bind(this,t),0);else{var e=this.requestParams();Wi.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;Wi.history.push("discussion",t.title()),Wi.setTitle(t.title()),Wi.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 Wi.store.getById("posts",t.id)})).sort((function(t,e){return t.number()-e.number()})).slice(0,20)}this.stream=new se(t,i);var s=m.route.param("near"),a="reply"===s?"reply":parseInt(s);this.stream.goToNumber(a||(null!=(e=null==(n=i[0])?void 0:n.number())?e:0),!0).then((function(){r.discussion=t,Wi.current.set("discussion",t),Wi.current.set("stream",r.stream)}))},n.sidebarItems=function(){var t=new B;return this.discussion&&t.add("controls",m(ne,{icon:"fas fa-ellipsis-v",className:"App-primaryControl",buttonClassName:"Button--primary",accessibleToggleLabel:Wi.translator.trans("core.forum.discussion_controls.toggle_dropdown_accessible_label")},jt.controls(this.discussion,this).toArray()),100),t.add("scrubber",m(ee,{stream:this.stream,className:"App-titleControl"}),-100),t},n.positionChanged=function(t,e){var n=this.discussion;if(n){var r=Wi.route.discussion(n,this.near=t);window.history.replaceState(null,document.title,r),Wi.history.push("discussion",n.title()),Wi.session.user&&e>(n.lastReadPostNumber()||0)&&(n.save({lastReadPostNumber:e}),m.redraw())}},e}(S),ue=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},H(this.items().toArray()))},n.items=function(){return new B},e}(E),le=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.active=this.isActive(e),void 0===e.force&&(e.force=!0)},e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return n.tag=G,n.attrs.active=String(n.attrs.active),delete n.attrs.type,n},e.isActive=function(t){var e,n;return void 0!==t.active?t.active:(null==(e=m.route.get())?void 0:e.split("?")[0])===(null==(n=t.href)?void 0:n.split("?")[0])},e}(yt),ce=function(t){function e(){return t.apply(this,arguments)||this}w(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=ot(Wi.translator.trans("core.forum.header.session_dropdown_accessible_label"))};var n=e.prototype;return n.view=function(e){return t.prototype.view.call(this,D({},e,{children:this.items().toArray()}))},n.getButtonContent=function(){var t=Wi.session.user;return[Y(t)," ",m("span",{className:"Button-label"},Xt(t))]},n.items=function(){var t=new B,e=Wi.session.user;return t.add("profile",m(le,{icon:"fas fa-user",href:Wi.route.user(e)},Wi.translator.trans("core.forum.header.profile_button")),100),t.add("settings",m(le,{icon:"fas fa-cog",href:Wi.route("settings")},Wi.translator.trans("core.forum.header.settings_button")),50),Wi.forum.attribute("adminUrl")&&t.add("administration",m(le,{icon:"fas fa-wrench",href:Wi.forum.attribute("adminUrl"),target:"_blank"},Wi.translator.trans("core.forum.header.admin_button")),0),t.add("separator",m(O,null),-90),t.add("logOut",m(yt,{icon:"fas fa-sign-out-alt",onclick:Wi.session.logout.bind(Wi.session)},Wi.translator.trans("core.forum.header.log_out_button")),-100),t},e}(ut);function de(t){if(!t||"object"!=typeof t||t instanceof Array)return!1;var e=t.tag;return("string"!=typeof e||"a"===e||"button"===e)&&("object"!=typeof e&&"function"!=typeof e||!("initAttrs"in e)||e.initAttrs(t.attrs),"object"!=typeof e&&"function"!=typeof e||!("isActive"in e)?t.attrs.active:e.isActive(t.attrs))}var he=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.initAttrs=function(e){null!=e.caretIcon||(e.caretIcon="fas fa-sort"),t.initAttrs.call(this,e),e.className=M(e.className,"Dropdown--select")},e.prototype.getButtonContent=function(t){var e=t.find(de),n=e&&"object"==typeof e&&"children"in e&&e.children||this.attrs.defaultLabel;return Array.isArray(n)&&(n=n[0]),[m("span",{className:"Button-label"},n),this.attrs.caretIcon?nt(this.attrs.caretIcon,{className:"Button-caret"}):null]},e}(ut),fe=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e=v.store),this.data={},this.freshness=new Date,this.exists=!1,this.store=void 0,this.data=t,this.store=e}var e=t.prototype;return e.id=function(){return"id"in this.data?this.data.id:void 0},e.attribute=function(t){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){if("id"in e&&(this.data.id=e.id),"type"in e&&(this.data.type=e.type),"attributes"in e){var n;for(var r in(n=this.data).attributes||(n.attributes={}),e.attributes){var i=e.attributes[r];i&&i instanceof t&&(vt("Providing models as attributes to `Model.pushData()` or `Model.pushAttributes()` is deprecated.","3249"),delete e.attributes[r],e.relationships||(e.relationships={}),e.relationships[r]={data:t.getIdentifier(i)})}Object.assign(this.data.attributes,e.attributes)}if("relationships"in e){var o,s=null!=(o=this.data.relationships)?o:{};for(var a in e.relationships){var u=e.relationships[a];if(null!==u){var l;l=u instanceof t?{data:t.getIdentifier(u)}:u instanceof Array?{data:u.map(t.getIdentifier)}:u,e.relationships[a]=l,s[a]=l}else delete s[a],delete e.relationships[a]}this.data.relationships=s}return this.freshness=new Date,this},e.pushAttributes=function(t){this.pushData({attributes:t})},e.save=function(e,n){var r=this;void 0===n&&(n={});var i={type:this.data.type,attributes:e};if("id"in this.data&&(i.id=this.data.id),e.relationships){for(var o in i.relationships={},e.relationships){var s=e.relationships[o];null!==s&&(i.relationships[o]={data:s instanceof Array?s.map(t.getIdentifier):t.getIdentifier(s)})}delete e.relationships}var a=this.copyData();this.pushData(i);var u={data:i,meta:n.meta||void 0};return v.request(D({method:this.exists?"PATCH":"POST",url:v.forum.attribute("apiUrl")+this.apiEndpoint(),body:u},n)).then((function(t){return r.store.pushPayload(t)}),(function(t){throw r.pushData(a),m.redraw(),t}))},e.delete=function(t,e){var n=this;return void 0===t&&(t={}),void 0===e&&(e={}),this.exists?v.request(D({method:"DELETE",url:v.forum.attribute("apiUrl")+this.apiEndpoint(),body:t},e)).then((function(){n.exists=!1,n.store.remove(n)})):Promise.resolve()},e.apiEndpoint=function(){return"/"+this.data.type+("id"in this.data?"/"+this.data.id:"")},e.copyData=function(){return JSON.parse(JSON.stringify(this.data))},e.rawRelationship=function(t){var e,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 pe(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i=e.slice(0,-1),o=e.slice(-1)[0],s={};return function(){var t=this,e=!1;return i.forEach((function(n){var r=t[n],i="function"==typeof r?r.call(t):r;s[n]!==i&&(e=!0,s[n]=i)})),e&&(r=o.apply(this,i.map((function(t){return s[t]})))),r}}function me(t){if(!t||t.length<4)return!1;var e=t.replace("#","");return 3===e.length&&(e+=e),(299*parseInt(e.slice(0,2),16)+587*parseInt(e.slice(2,4),16)+114*parseInt(e.slice(4,6),16))/1e3<(parseInt(getComputedStyle(document.body).getPropertyValue("--yiq-threshold").trim())||128)}function ve(t){return t?me(t)?"text-contrast--light":"text-contrast--dark":"text-contrast--unchanged"}var ge,ye=["type","icon","label","color","style"],be=function(t){function e(){return t.apply(this,arguments)||this}return w(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=q(t,ye),u=M("Badge",[e&&"Badge--"+e],a.className,ve(i)),l=n?nt(n,{className:"Badge-icon"}):m.trust("&nbsp;"),c=D({},s,{"--badge-bg":i}),d=D({},a,{className:u,style:c}),h=m("div",d,l);return r?m(Et,{text:r},h):h},e}(E),we=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.title=function(){return fe.attribute("title").call(this)},n.slug=function(){return fe.attribute("slug").call(this)},n.createdAt=function(){return fe.attribute("createdAt",fe.transformDate).call(this)},n.user=function(){return fe.hasOne("user").call(this)},n.firstPost=function(){return fe.hasOne("firstPost").call(this)},n.lastPostedAt=function(){return fe.attribute("lastPostedAt",fe.transformDate).call(this)},n.lastPostedUser=function(){return fe.hasOne("lastPostedUser").call(this)},n.lastPost=function(){return fe.hasOne("lastPost").call(this)},n.lastPostNumber=function(){return fe.attribute("lastPostNumber").call(this)},n.commentCount=function(){return fe.attribute("commentCount").call(this)},n.replyCount=function(){return pe("commentCount",(function(t){var e;return Math.max(0,(null!=(e=t)?e:0)-1)})).call(this)},n.posts=function(){return fe.hasMany("posts").call(this)},n.mostRelevantPost=function(){return fe.hasOne("mostRelevantPost").call(this)},n.lastReadAt=function(){return fe.attribute("lastReadAt",fe.transformDate).call(this)},n.lastReadPostNumber=function(){return fe.attribute("lastReadPostNumber").call(this)},n.isUnread=function(){return pe("unreadCount",(function(t){return!!t})).call(this)},n.isRead=function(){return pe("unreadCount",(function(t){return!(!v.session.user||t)})).call(this)},n.hiddenAt=function(){return fe.attribute("hiddenAt",fe.transformDate).call(this)},n.hiddenUser=function(){return fe.hasOne("hiddenUser").call(this)},n.isHidden=function(){return pe("hiddenAt",(function(t){return!!t})).call(this)},n.canReply=function(){return fe.attribute("canReply").call(this)},n.canRename=function(){return fe.attribute("canRename").call(this)},n.canHide=function(){return fe.attribute("canHide").call(this)},n.canDelete=function(){return fe.attribute("canDelete").call(this)},n.removePost=function(t){var e=this.rawRelationship("posts");e&&e.some((function(n,r){return t===n.id&&(e.splice(r,1),!0)}))},n.unreadCount=function(){var t,e,n,r=v.session.user;if(r&&(null!=(t=null==(e=r.markedAllAsReadAt())?void 0:e.getTime())?t:0)<(null==(n=this.lastPostedAt())?void 0:n.getTime())){var i,o,s=Math.max(0,(null!=(i=this.lastPostNumber())?i:0)-(this.lastReadPostNumber()||0));return Math.min(s,null!=(o=this.commentCount())?o:0)}return 0},n.badges=function(){var t=new B;return this.isHidden()&&t.add("hidden",m(be,{type:"hidden",icon:"fas fa-trash",label:v.translator.trans("core.lib.badge.hidden_tooltip")})),t},n.postIds=function(){var t,e;return null!=(t=null==(e=this.rawRelationship("posts"))?void 0:e.map((function(t){return t.id})))?t:[]},e}(fe),De=function(t){function e(){return t.apply(this,arguments)||this}w(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"},Wi.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 B,e=this.attrs.state;return t.add("mark_all_as_read",m(Et,{text:Wi.translator.trans("core.forum.notifications.mark_all_as_read_tooltip")},m(yt,{className:"Button Button--link","data-container":".NotificationList",icon:"fas fa-check",title:Wi.translator.trans("core.forum.notifications.mark_all_as_read_tooltip"),onclick:e.markAllAsRead.bind(e)})),70),t.add("delete_all",m(Et,{text:Wi.translator.trans("core.forum.notifications.delete_all_tooltip")},m(yt,{className:"Button Button--link","data-container":".NotificationList",icon:"fas fa-trash-alt",title:Wi.translator.trans("core.forum.notifications.delete_all_tooltip"),onclick:function(){confirm(Wi.translator.trans("core.forum.notifications.delete_all_confirm"))&&e.deleteAll.call(e)}})),50),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 we?i=r:r&&r.discussion&&(i=r.discussion());var o=i?i.id():0;n[o]=n[o]||{discussion:i,notifications:[]},n[o].notifications.push(t),-1===e.indexOf(n[o])&&e.push(n[o])}})),e.map((function(t){var e=t.discussion&&t.discussion.badges().toArray();return m("div",{className:"NotificationGroup"},t.discussion?m(G,{className:"NotificationGroup-header",href:Wi.route.discussion(t.discussion)},e&&!!e.length&&m("ul",{className:"NotificationGroup-badges badges"},H(e)),m("span",null,t.discussion.title())):m("div",{className:"NotificationGroup-header"},Wi.forum.attribute("title")),m("ul",{className:"NotificationGroup-content"},t.notifications.map((function(t){var e=Wi.notificationComponents[t.contentType()];return!!e&&m("li",null,m(e,{notification:t}))}))))}))})):m("div",{className:"NotificationList-empty"},Wi.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}(E),xe=function(t){function e(){return t.apply(this,arguments)||this}w(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=ot(Wi.translator.trans("core.forum.notifications.tooltip"))),e.icon||(e.icon="fas fa-bell"),e.accessibleToggleLabel||(e.accessibleToggleLabel=ot(Wi.translator.trans("core.forum.notifications.toggle_dropdown_accessible_label"))),t.initAttrs.call(this,e)};var n=e.prototype;return n.getButton=function(e){var n=this.getNewCount(),r=t.prototype.getButton.call(this,e);return r.attrs.title=this.attrs.label,r.attrs.className=M(r.attrs.className,[n&&"new"]),r.attrs.onclick=this.onclick.bind(this),r},n.getButtonContent=function(){var t=this.getUnreadCount();return[this.attrs.icon?nt(this.attrs.icon,{className:"Button-icon"}):null,0!==t&&m("span",{className:"NotificationsDropdown-unread"},t),m("span",{className:"Button-label"},this.attrs.label)]},n.getMenu=function(){return m("div",{className:M("Dropdown-menu",this.attrs.menuClassName),onclick:this.menuClick.bind(this)},this.showing&&m(De,{state:this.attrs.state}))},n.onclick=function(){Wi.drawer.isOpen()?this.goToRoute():this.attrs.state.load()},n.goToRoute=function(){m.route.set(Wi.route("notifications"))},n.getUnreadCount=function(){return Wi.session.user.unreadNotificationCount()},n.getNewCount=function(){return Wi.session.user.newNotificationCount()},n.menuClick=function(t){(t.shiftKey||t.metaKey||t.ctrlKey||1===t.button)&&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"}(ge||(ge={}));var Ce=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(ge.ArrowUp,(function(e){e.preventDefault(),t(e)})),this},e.onDown=function(t){return this.callbacks.set(ge.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(ge.Tab,n),this.callbacks.set(ge.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(ge.Escape,(function(e){e.stopPropagation(),e.preventDefault(),t(e)})),this},e.onRemove=function(t){return this.callbacks.set(ge.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 Ae(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 Ee(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function s(t){Ae(o,r,i,s,a,"next",t)}function a(t){Ae(o,r,i,s,a,"throw",t)}s(void 0)}))}}var Ne=n(2507),ke=n.n(Ne),Se=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).query=void 0,e.discussion=void 0,e.mostRelevantPost=void 0,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.query=this.attrs.query,this.discussion=this.attrs.discussion,this.mostRelevantPost=this.attrs.mostRelevantPost},n.view=function(){return m("li",{className:"DiscussionSearchResult","data-index":"discussions"+this.discussion.id()},m(G,{href:Wi.route.discussion(this.discussion,this.mostRelevantPost&&this.mostRelevantPost.number()||0)},this.viewItems().toArray()))},n.discussionTitle=function(){return this.discussion.title()},n.mostRelevantPostContent=function(){var t;return null==(t=this.mostRelevantPost)?void 0:t.contentPlain()},n.viewItems=function(){var t,e=new B;return e.add("discussion-title",m("div",{className:"DiscussionSearchResult-title"},et(this.discussionTitle(),this.query)),90),this.mostRelevantPost&&e.add("most-relevant",m("div",{className:"DiscussionSearchResult-excerpt"},et(null!=(t=this.mostRelevantPostContent())?t:"",this.query,100)),80),e},e}(E),Te=function(){function t(){this.results=new Map,this.queryString=null}var e=t.prototype;return e.search=function(){var t=Ee(ke().mark((function t(e){var n,r=this;return ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=e.toLowerCase(),this.results.set(e,[]),this.setQueryString(e),n={filter:{q:this.queryString||e},page:{limit:this.limit()},include:this.includes().join(",")},t.abrupt("return",Wi.store.find("discussions",n).then((function(t){r.results.set(e,t),m.redraw()})));case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),e.view=function(t){t=t.toLowerCase(),this.setQueryString(t);var e=(this.results.get(t)||[]).map((function(e){var n=e.mostRelevantPost();return m(Se,{query:t,discussion:e,mostRelevantPost:n})}));return[m("li",{className:"Dropdown-header"},Wi.translator.trans("core.forum.search.discussions_heading")),m("li",null,m(le,{icon:"fas fa-search",href:Wi.route("index",{q:this.queryString})},Wi.translator.trans("core.forum.search.all_discussions_button",{query:t})))].concat(e)},e.includes=function(){return["mostRelevantPost"]},e.limit=function(){return 3},e.queryMutators=function(){return[]},e.setQueryString=function(t){this.queryString=t+" "+this.queryMutators().join(" ")},t}(),Fe=function(){function t(){this.results=new Map}var e=t.prototype;return e.search=function(){var t=Ee(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",Wi.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(Wi.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"},Wi.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(G,{href:Wi.route.user(e)},Y(e),D({},n,{text:void 0,children:r})))}))):[]},t}(),_e=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}w(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=ot(Wi.translator.trans("core.forum.header.search_placeholder")),r=!!e,i=!(!this.searchState.getValue()||!this.hasFocus),o=!(this.loadingSources||!this.searchState.getValue());return m("div",{role:"search","aria-label":Wi.translator.trans("core.forum.header.search_role_label"),className:M("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":Wi.translator.trans("core.forum.header.search_clear_button_accessible_label"),type:"button"},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 Ce,this.navigator.onUp((function(){return r.setIndex(r.getCurrentNumericIndex()-1,!0)})).onDown((function(){return r.setIndex(r.getCurrentNumericIndex()+1,!0)})).onSelect(this.selectResult.bind(this),!0).onCancel(this.clear.bind(this)).bindTo(s),s.on("input focus",(function(){var t=this.value.toLowerCase();t&&(i.searchTimeout&&clearTimeout(i.searchTimeout),i.searchTimeout=window.setTimeout((function(){var e;o.isCached(t)||(t.length>=i.constructor.MIN_SEARCH_LEN&&(null==(e=i.sources)||e.map((function(e){e.search&&(i.loadingSources++,e.search(t).then((function(){i.loadingSources=Math.max(0,i.loadingSources-1),m.redraw()})))}))),o.cache(t),m.redraw())}),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 B;return Wi.forum.attribute("canViewForum")&&t.add("discussions",new Te),Wi.forum.attribute("canSearchUsers")&&t.add("users",new Fe),t},n.selectableItems=function(){return this.$(".Search-results > li:not(.Dropdown-header)")},n.getCurrentNumericIndex=function(){return Math.max(0,this.selectableItems().index(this.getItem(this.index)))},n.getItem=function(t){var e=this.selectableItems(),n=e.filter('[data-index="'+t+'"]');return n.length||(n=e.eq(t)),n},n.setIndex=function(t,e){void 0===e&&(e=!1);var n=this.selectableItems(),r=n.parent(),i=t;t<0?i=n.length-1:t>=n.length&&(i=0);var o=n.removeClass("active").eq(i).addClass("active");if(this.index=parseInt(o.attr("data-index"))||i,e){var s,a=r.scrollTop(),u=r.offset().top,l=u+r.outerHeight(),c=o.offset().top,d=c+o.outerHeight();c<u?s=a-u+c-parseInt(r.css("padding-top"),10):d>l&&(s=a-l+d+parseInt(r.css("padding-bottom"),10)),void 0!==s&&r.stop(!0).animate({scrollTop:s},100)}},F(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}(E);_e.MIN_SEARCH_LEN=3;var Pe=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){return m("ul",{className:"Header-controls"},H(this.items().toArray()))},n.items=function(){var t=new B;if(t.add("search",m(_e,{state:Wi.search}),30),Wi.forum.attribute("showLanguageSelector")&&Object.keys(Wi.data.locales).length>1){var e=[],n=function(t){e.push(m(yt,{active:Wi.data.locale===t,icon:Wi.data.locale!==t||"fas fa-check",onclick:function(){Wi.session.user?Wi.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())}},Wi.data.locales[t]))};for(var r in Wi.data.locales)n(r);t.add("locale",m(he,{buttonClassName:"Button Button--link",accessibleToggleLabel:Wi.translator.trans("core.forum.header.locale_dropdown_accessible_label")},e),20)}return Wi.session.user?(t.add("notifications",m(xe,{state:Wi.notifications}),10),t.add("session",m(ce,null),0)):(Wi.forum.attribute("allowSignUp")&&t.add("signUp",m(yt,{className:"Button Button--link",onclick:function(){return Wi.modal.show(Lt)}},Wi.translator.trans("core.forum.header.sign_up_link")),10),t.add("logIn",m(yt,{className:"Button Button--link",onclick:function(){return Wi.modal.show(Mt)}},Wi.translator.trans("core.forum.header.log_in_link")),0)),t},e}(E),Be=function(t){function e(){return t.apply(this,arguments)||this}return w(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:Bt("")},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={}),!!N(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"===Wi.screen()},e.composingReplyTo=function(t){return this.isVisible()&&this.bodyMatches(Tt,{discussion:t})},e.preventExit=function(){if(this.isVisible()&&this.onExit)return this.onExit.callback()?!confirm(this.onExit.message):void 0},e.preventClosingWhen=function(t,e){this.onExit={callback:t,message:e}},e.minimumHeight=function(){return 200},e.maximumHeight=function(){return $(window).height()-$("#header").outerHeight()},e.computedHeight=function(){return this.position===t.Position.MINIMIZED?"":this.position===t.Position.FULLSCREEN?$(window).height():Math.max(this.minimumHeight(),Math.min(this.height,this.maximumHeight()))},t}();Ie.Position={HIDDEN:"hidden",NORMAL:"normal",MINIMIZED:"minimized",FULLSCREEN:"fullScreen"};const Oe=Ie;var Le=function(t){function e(){return t.apply(this,arguments)||this}w(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,r=t.componentClass;return m("div",{className:"Composer "+M(e)},m("div",{className:"Composer-handle",oncreate:this.configHandle.bind(this)}),m("ul",{className:"Composer-controls"},H(this.controlItems().toArray())),m("div",{className:"Composer-content",onclick:n},r&&m(r,Object.assign({},t.attrs,{composer:this.state,disabled:e.minimized}))))},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.state.position===this.prevPosition?this.updateHeight():(this.animatePositionChange(),this.prevPosition=this.state.position)},n.oncreate=function(e){var n=this;t.prototype.oncreate.call(this,e),this.initializeHeight(),this.$().hide().css("bottom",-this.state.computedHeight()),this.$().on("focus blur",":input,.TextEditor-editorContainer",(function(t){n.active="focusin"===t.type,m.redraw()})),this.$().on("keydown",":input,.TextEditor-editorContainer","esc",(function(){return n.state.close()})),this.handlers={},$(window).on("resize",this.handlers.onresize=this.updateHeight.bind(this)).resize(),$(document).on("mousemove",this.handlers.onmousemove=this.onmousemove.bind(this)).on("mouseup",this.handlers.onmouseup=this.onmouseup.bind(this))},n.onremove=function(e){t.prototype.onremove.call(this,e),$(window).off("resize",this.handlers.onresize),$(document).off("mousemove",this.handlers.onmousemove).off("mouseup",this.handlers.onmouseup)},n.configHandle=function(t){var e=this;$(t.dom).css("cursor","row-resize").bind("dragstart mousedown",(function(t){return t.preventDefault()})).mousedown((function(t){e.mouseStart=t.clientY,e.heightStart=e.$().height(),e.handle=$(this),$("body").css("cursor","row-resize")}))},n.onmousemove=function(t){if(this.handle){var e=this.mouseStart-t.clientY;this.changeHeight(this.heightStart+e);var n=$(window).scrollTop(),r=n>0&&n+$(window).height()>=$(document).height();this.updateBodyPadding(r)}},n.onmouseup=function(){this.handle&&(this.handle=null,$("body").css("cursor",""))},n.focus=function(){this.$(".Composer-content :input:enabled:visible, .TextEditor-editor").first().focus()},n.updateHeight=function(){var t=this.state.computedHeight(),e=this.$(".Composer-flexible");if(this.$().height(t),e.length){var n=e.offset().top-this.$().offset().top,r=parseInt(e.css("padding-bottom"),10),i=this.$(".Composer-footer").outerHeight(!0);e.height(this.$().outerHeight()-n-r-i)}},n.updateBodyPadding=function(){var t=this.state.position!==Oe.Position.HIDDEN&&this.state.position!==Oe.Position.MINIMIZED&&"phone"!==Wi.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"===Wi.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 B;return this.state.position===Oe.Position.FULLSCREEN?t.add("exitFullScreen",m(Be,{icon:"fas fa-compress",title:Wi.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",m(Be,{icon:"fas fa-minus minimize",title:Wi.translator.trans("core.forum.composer.minimize_tooltip"),onclick:this.state.minimize.bind(this.state),itemClassName:"App-backControl"})),t.add("fullScreen",m(Be,{icon:"fas fa-expand",title:Wi.translator.trans("core.forum.composer.full_screen_tooltip"),onclick:this.state.fullScreen.bind(this.state)}))),t.add("close",m(Be,{icon:"fas fa-times",title:Wi.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}(E),Me=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(t){var e,n,r,i,o,s=this,a=this.attrs.notification,u=null!=(e=null==(n=this.href)?void 0:n.call(this))?e:"",l=a.fromUser();return m(G,{className:M("Notification","Notification--"+a.contentType(),[!a.isRead()&&"unread"]),href:u,external:u.includes("://"),onclick:this.markAsRead.bind(this)},Y(l||null),nt(null==(r=this.icon)?void 0:r.call(this),{className:"Notification-icon"}),m("span",{className:"Notification-title"},m("span",{className:"Notification-content"},null==(i=this.content)?void 0:i.call(this)),m("span",{className:"Notification-title-spring"}),lt(a.createdAt())),!a.isRead()&&m(yt,{className:"Notification-action Button Button--link",icon:"fas fa-check",title:Wi.translator.trans("core.forum.notifications.mark_as_read_tooltip"),onclick:function(t){t.preventDefault(),t.stopPropagation(),s.markAsRead()}}),m("div",{className:"Notification-excerpt"},null==(o=this.excerpt)?void 0:o.call(this)))},n.markAsRead=function(){var t,e;this.attrs.notification.isRead()||(null==(t=Wi.session.user)||t.pushAttributes({unreadNotificationCount:(null!=(e=Wi.session.user.unreadNotificationCount())?e:1)-1}),this.attrs.notification.save({isRead:!0}))},e}(E),$e=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-pencil-alt"},n.href=function(){var t=this.attrs.notification,e=t.subject();return e?Wi.route.discussion(e,t.content().postNumber):"#"},n.content=function(){return Wi.translator.trans("core.forum.notifications.discussion_renamed_text",{user:this.attrs.notification.fromUser()})},n.excerpt=function(){return null},e}(Me);function je(t){Wi.composer.isFullScreen()&&(Wi.composer.minimize(),t.stopPropagation())}var Re=function(t){function e(){return t.apply(this,arguments)||this}w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.submitLabel=e.submitLabel||Wi.translator.trans("core.forum.composer_edit.submit_button"),e.confirmExit=e.confirmExit||Wi.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(G,{href:Wi.route.discussion(n.discussion(),n.number()),onclick:je},Wi.translator.trans("core.forum.composer_edit.post_link",{number:n.number(),discussion:n.discussion().title()})))),e},n.jumpToPreview=function(t){je(t),m.route.set(Wi.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(Wi.viewingDiscussion(e))Wi.current.get("stream").goToNumber(n.number());else var r=Wi.alerts.show({type:"success",controls:[m(yt,{className:"Button Button--link",onclick:function(){m.route.set(Wi.route.post(n)),Wi.alerts.dismiss(r)}},Wi.translator.trans("core.forum.composer_edit.view_button"))]},Wi.translator.trans("core.forum.composer_edit.edited_message"));t.composer.hide()}),this.loaded.bind(this))},e}(kt);const He={controls:function(t,e){var n=this,r=new B;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(O,null)))})),r},userControls:function(t,e){return new B},moderationControls:function(t,e){var n=new B;return"comment"===t.contentType()&&t.canEdit()&&(t.isHidden()||n.add("edit",m(yt,{icon:"fas fa-pencil-alt",onclick:this.editAction.bind(t)},Wi.translator.trans("core.forum.post_controls.edit_button")))),n},destructiveControls:function(t,e){var n=new B;return"comment"!==t.contentType()||t.isHidden()?("comment"===t.contentType()&&t.canHide()&&n.add("restore",m(yt,{icon:"fas fa-reply",onclick:this.restoreAction.bind(t)},Wi.translator.trans("core.forum.post_controls.restore_button"))),t.canDelete()&&n.add("delete",m(yt,{icon:"fas fa-times",onclick:this.deleteAction.bind(t,e)},Wi.translator.trans("core.forum.post_controls.delete_forever_button")))):t.canHide()&&n.add("hide",m(yt,{icon:"far fa-trash-alt",onclick:this.hideAction.bind(t)},Wi.translator.trans("core.forum.post_controls.delete_button"))),n},editAction:function(){var t=this;return new Promise((function(e){return Wi.composer.load(Re,{post:t}),Wi.composer.show(),e()}))},hideAction:function(){if(confirm(ot(Wi.translator.trans("core.forum.post_controls.hide_confirmation"))))return this.pushData({attributes:{hiddenAt:new Date},relationships:{hiddenUser:Wi.session.user}}),this.save({isHidden:!0}).then((function(){return m.redraw()}))},restoreAction:function(){return this.pushData({attributes:{hiddenAt:null},relationships:{hiddenUser:null}}),this.save({isHidden:!1}).then((function(){return m.redraw()}))},deleteAction:function(t){var e=this;if(confirm(ot(Wi.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||(Wi.discussions.removeDiscussion(t),Wi.viewingDiscussion(t)&&Wi.history.back())})).catch((function(){})).then((function(){t&&(t.loading=!1),m.redraw()}))}};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).loading=!1,e.subtree=void 0,e}w(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}))},n.view=function(t){var 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.viewItems(n,r).toArray()))},n.viewItems=function(t,e){var n=this,r=new B;return r.add("content",this.loading?m(ft,null):this.content(),100),r.add("actions",m("aside",{className:"Post-actions"},m("ul",null,H(this.actionItems().toArray()),!!t.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 n.$(".Post-controls").addClass("open")},onhide:function(){return n.$(".Post-controls").removeClass("open")},accessibleToggleLabel:Wi.translator.trans("core.forum.post_controls.toggle_dropdown_accessible_label")},t)))),90),r.add("footer",m("footer",{className:"Post-footer"},e.length>0?m("ul",null,H(e)):null),80),r},n.onbeforeupdate=function(e){return t.prototype.onbeforeupdate.call(this,e),this.subtree.needsRebuild()},n.onupdate=function(e){t.prototype.onupdate.call(this,e);var n=this.$(".Post-actions"),r=this.$(".Post-controls");n.toggleClass("openWithin",r.hasClass("open"))},n.elementAttrs=function(){return{}},n.content=function(){return[]},n.classes=function(t){var e=(t||"").split(" ").concat(["Post"]),n=this.attrs.post.user(),r=this.attrs.post.discussion();return this.loading&&e.push("Post--loading"),n&&n===Wi.session.user&&e.push("Post--by-actor"),n&&n===r.user()&&e.push("Post--by-start-user"),e},n.actionItems=function(){return new B},n.footerItems=function(){return new B},e}(E),qe=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.group&&(e.icon=e.group.icon()||"",e.color=e.group.color()||"",e.label=void 0===e.label?e.group.nameSingular():e.label,e.type="group--"+e.group.id(),delete e.group)},e}(be),ze=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.nameSingular=function(){return fe.attribute("nameSingular").call(this)},n.namePlural=function(){return fe.attribute("namePlural").call(this)},n.color=function(){return fe.attribute("color").call(this)},n.icon=function(){return fe.attribute("icon").call(this)},n.isHidden=function(){return fe.attribute("isHidden").call(this)},e}(fe);ze.ADMINISTRATOR_ID="1",ze.GUEST_ID="2",ze.MEMBER_ID="3";var Ve=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}w(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=Bt(r.username()||""),this.email=Bt(r.email()||""),this.isEmailConfirmed=Bt(r.isEmailConfirmed()||!1),this.setPassword=Bt(!1),this.password=Bt(r.password()||"");var i=r.groups()||[];v.store.all("groups").filter((function(t){return![ze.GUEST_ID,ze.MEMBER_ID].includes(t.id())})).forEach((function(t){return n.groups[t.id()]=Bt(i.includes(t))}))},n.className=function(){return"EditUserModal Modal--small"},n.title=function(){return v.translator.trans("core.lib.edit_user.title")},n.content=function(){var t=this.fields().toArray();return m("div",{className:"Modal-body"},t.length>1?m("div",{className:"Form"},this.fields().toArray()):v.translator.trans("core.lib.edit_user.nothing_available"))},n.fields=function(){var t=this,e=new B;return this.attrs.user.canEditCredentials()&&(e.add("username",m("div",{className:"Form-group"},m("label",null,v.translator.trans("core.lib.edit_user.username_heading")),m("input",{className:"FormControl",placeholder:ot(v.translator.trans("core.lib.edit_user.username_label")),bidi:this.username,disabled:this.nonAdminEditingAdmin()})),40),v.session.user!==this.attrs.user&&(e.add("email",m("div",{className:"Form-group"},m("label",null,v.translator.trans("core.lib.edit_user.email_heading")),m("div",null,m("input",{className:"FormControl",placeholder:ot(v.translator.trans("core.lib.edit_user.email_label")),bidi:this.email,disabled:this.nonAdminEditingAdmin()})),!this.isEmailConfirmed()&&this.userIsAdmin(v.session.user)&&m("div",null,m(yt,{className:"Button Button--block",loading:this.loading,onclick:this.activate.bind(this)},v.translator.trans("core.lib.edit_user.activate_button")))),30),e.add("password",m("div",{className:"Form-group"},m("label",null,v.translator.trans("core.lib.edit_user.password_heading")),m("div",null,m("label",{className:"checkbox"},m("input",{type:"checkbox",onchange:function(e){var n=e.target;t.setPassword(n.checked),m.redraw.sync(),n.checked&&t.$("[name=password]").select(),e.redraw=!1},disabled:this.nonAdminEditingAdmin()}),v.translator.trans("core.lib.edit_user.set_password_label")),this.setPassword()&&m("input",{className:"FormControl",type:"password",name:"password",placeholder:ot(v.translator.trans("core.lib.edit_user.password_label")),bidi:this.password,disabled:this.nonAdminEditingAdmin()}))),20))),this.attrs.user.canEditGroups()&&e.add("groups",m("div",{className:"Form-group EditUserModal-groups"},m("label",null,v.translator.trans("core.lib.edit_user.groups_heading")),m("div",null,Object.keys(this.groups).map((function(t){return v.store.getById("groups",t)})).filter(Boolean).map((function(e){return e&&m("label",{className:"checkbox"},m("input",{type:"checkbox",bidi:t.groups[e.id()],disabled:e.id()===ze.ADMINISTRATOR_ID&&(t.attrs.user===v.session.user||!t.userIsAdmin(v.session.user))}),m(qe,{group:e,label:null})," ",e.nameSingular())})))),10),e.add("submit",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary",type:"submit",loading:this.loading},v.translator.trans("core.lib.edit_user.submit_button"))),-10),e},n.activate=function(){var t=this;this.loading=!0;var e={username:this.username(),isEmailConfirmed:!0};this.attrs.user.save(e,{errorHandler:this.onerror.bind(this)}).then((function(){t.isEmailConfirmed(!0),t.loading=!1,m.redraw()})).catch((function(){t.loading=!1,m.redraw()}))},n.data=function(){var t=this,e={},n={};return this.attrs.user.canEditCredentials()&&!this.nonAdminEditingAdmin()&&(e.username=this.username(),v.session.user!==this.attrs.user&&(e.email=this.email()),this.setPassword()&&(e.password=this.password())),this.attrs.user.canEditGroups()&&(n.groups=Object.keys(this.groups).filter((function(e){return t.groups[e]()})).map((function(t){return v.store.getById("groups",t)})).filter((function(t){return t instanceof ze}))),e.relationships=n,e},n.onsubmit=function(t){var e=this;t.preventDefault(),this.loading=!0,this.attrs.user.save(this.data(),{errorHandler:this.onerror.bind(this)}).then(this.hide.bind(this)).catch((function(){e.loading=!1,m.redraw()}))},n.nonAdminEditingAdmin=function(){return this.userIsAdmin(this.attrs.user)&&!this.userIsAdmin(v.session.user)},n.userIsAdmin=function(t){return!!((null==t?void 0:t.groups())||[]).some((function(t){return(null==t?void 0:t.id())===ze.ADMINISTRATOR_ID}))},e}(_t),We=function(t){function e(){return t.apply(this,arguments)||this}w(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}(E),Ge=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).user=null,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.bodyClass="App--user"},n.view=function(){return m("div",{className:"UserPage"},this.user?[m(Xe,{user:this.user,className:"Hero UserHero",editable:this.user.canEdit()||this.user===Wi.session.user,controlsButtonClassName:"Button"}),m("div",{className:"container"},m("div",{className:"sideNavContainer"},m(We,null,m("nav",{className:"sideNav UserPage-nav"},m("ul",null,H(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,Wi.current.set("user",t),Wi.setTitle(t.displayName()),m.redraw()},n.loadUser=function(t){var e=this,n=t.toLowerCase();Wi.preloadedApiDocument(),Wi.store.all("users").some((function(r){return!(r.username().toLowerCase()!==n&&r.id()!==t||!r.joinTime()||(e.show(r),0))})),this.user||Wi.store.find("users",t,{bySlug:!0}).then(this.show.bind(this))},n.sidebarItems=function(){var t=new B;return t.add("nav",m(he,{className:"App-titleControl",buttonClassName:"Button"},this.navItems().toArray())),t},n.navItems=function(){var t=new B,e=this.user,n=Wi.session.user===e;return t.add("posts",m(le,{href:Wi.route("user.posts",{username:e.slug()}),icon:"far fa-comment"},Wi.translator.trans("core.forum.user.posts_link")," ",m("span",{className:"Button-badge"},e.commentCount())),100),t.add("discussions",m(le,{href:Wi.route("user.discussions",{username:e.slug()}),icon:"fas fa-bars"},Wi.translator.trans("core.forum.user.discussions_link")," ",m("span",{className:"Button-badge"},e.discussionCount())),90),n&&(t.add("separator",m(O,null),-90),t.add("settings",m(le,{href:Wi.route("settings"),icon:"fas fa-cog"},Wi.translator.trans("core.forum.user.settings_link")),-100)),(n||Wi.forum.attribute("canModerateAccessTokens"))&&(n||t.add("security-separator",m(O,null),-90),t.add("security",m(le,{href:Wi.route("user.security",{username:e.slug()}),icon:"fas fa-shield-alt"},Wi.translator.trans("core.forum.user.security_link")),-100)),t},e}(S);const Ye={controls:function(t,e){var n=this,r=new B;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(O,null)))})),r},userControls:function(){return new B},moderationControls:function(t){var e=new B;return(t.canEdit()||t.canEditCredentials()||t.canEditGroups())&&e.add("edit",m(yt,{icon:"fas fa-pencil-alt",onclick:this.editAction.bind(this,t)},Wi.translator.trans("core.forum.user_controls.edit_button"))),e},destructiveControls:function(t){var e=new B;return"1"!==t.id()&&t.canDelete()&&e.add("delete",m(yt,{icon:"fas fa-times",onclick:this.deleteAction.bind(this,t)},Wi.translator.trans("core.forum.user_controls.delete_button"))),e},deleteAction:function(t){var e=this;confirm(Wi.translator.trans("core.forum.user_controls.delete_confirmation"))&&t.delete().then((function(){e.showDeletionAlert(t,"success"),Wi.current.matches(Ge,{user:t})?Wi.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];Wi.alerts.show({type:e},Wi.translator.trans(n,{user:t,email:t.email()}))},editAction:function(t){Wi.modal.show(Ve,{user:t})}};var Ke=function(t){function e(){return t.apply(this,arguments)||this}w(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:M(["AvatarEditor","Dropdown",this.attrs.className,this.loading&&"loading",this.isDraggedOver&&"dragover"])},Y(t,{loading:"eager"}),m("a",{className:t.avatarUrl()?"Dropdown-toggle":"Dropdown-toggle AvatarEditor--noAvatar",title:Wi.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"},H(this.controlItems().toArray())))},n.controlItems=function(){var t=new B;return t.add("upload",m(yt,{icon:"fas fa-upload",onclick:this.openPicker.bind(this)},Wi.translator.trans("core.forum.user.avatar_upload_button"))),t.add("remove",m(yt,{icon:"fas fa-times",onclick:this.remove.bind(this)},Wi.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(),Wi.request({method:"POST",url:Wi.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(),Wi.request({method:"DELETE",url:Wi.forum.attribute("apiUrl")+"/users/"+t.id()+"/avatar"}).then(this.success.bind(this),this.failure.bind(this))},n.success=function(t){Wi.store.pushPayload(t),delete this.attrs.user.avatarColor,this.loading=!1,m.redraw()},n.failure=function(t){this.loading=!1,m.redraw()},e}(E),Xe=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.user,e=Ye.controls(t,this).toArray(),n=t.color(),r=t.badges().toArray();return m("div",{className:M("UserCard",this.attrs.className),style:n&&{"--usercard-bg":n}},m("div",{className:"darkenBackground"},m("div",{className:"container"},!!e.length&&m(ut,{className:"UserCard-controls App-primaryControl",menuClassName:"Dropdown-menu--right",buttonClassName:this.attrs.controlsButtonClassName,label:Wi.translator.trans("core.forum.user_controls.button"),accessibleToggleLabel:Wi.translator.trans("core.forum.user_controls.toggle_dropdown_accessible_label"),icon:"fas fa-ellipsis-v"},e),m("div",{className:"UserCard-profile"},m("h1",{className:"UserCard-identity"},this.attrs.editable?m("[",null,m(Ke,{user:t,className:"UserCard-avatar"})," ",Xt(t)):m(G,{href:Wi.route.user(t)},m("div",{className:"UserCard-avatar"},Y(t,{loading:"eager"})),Xt(t))),!!r.length&&m("ul",{className:"UserCard-badges badges"},H(r)),m("ul",{className:"UserCard-info"},H(this.infoItems().toArray()))))))},n.infoItems=function(){var t=new B,e=this.attrs.user,n=e.lastSeenAt();if(n){var r=e.isOnline();t.add("lastSeen",m("span",{className:M("UserCard-lastSeen",{online:r})},r?[nt("fas fa-circle")," ",Wi.translator.trans("core.forum.user.online_text")]:[nt("far fa-clock")," ",st(n)]),100)}return t.add("joined",Wi.translator.trans("core.forum.user.joined_date_text",{ago:st(e.joinTime())}),90),t},e}(E);function Je(t){return t.lastSeenAt()&&t.isOnline()?m("span",{className:"UserOnline"},nt("fas fa-circle")):null}var Qe=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.post,e=t.user();return e?m("div",{className:"PostUser"},m("h3",{className:"PostUser-name"},m(G,{href:Wi.route.user(e)},Y(e,{className:"PostUser-avatar"}),Je(e),Xt(e))),m("ul",{className:"PostUser-badges badges"},H(e.badges().toArray())),!t.isHidden()&&this.attrs.cardVisible&&m(Xe,{user:e,className:"UserCard--popover",controlsButtonClassName:"Button Button--icon Button--flat"})):m("div",{className:"PostUser"},m("h3",{className:"PostUser-name"},Y(e,{className:"PostUser-avatar"})," ",Xt(e)))},n.oncreate=function(e){var n,r=this;t.prototype.oncreate.call(this,e),this.$().on("mouseover",".PostUser-name a, .UserCard",(function(){clearTimeout(n),n=setTimeout(r.showCard.bind(r),500)})).on("mouseout",".PostUser-name a, .UserCard",(function(){clearTimeout(n),n=setTimeout(r.hideCard.bind(r),250)}))},n.showCard=function(){var t=this;this.attrs.oncardshow(),setTimeout((function(){return t.$(".UserCard").addClass("in")}))},n.hideCard=function(){var t=this;this.$(".UserCard").removeClass("in").one("transitionend webkitTransitionEnd oTransitionEnd",(function(){t.attrs.oncardhide()}))},e}(E);function Ze(t){var e=it()(t),n=e.format(),r=e.format("LLLL");return m("time",{pubdate:!0,datetime:n},r)}var tn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).ip=void 0,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.ip=this.attrs.ip||""},n.view=function(){return m("span",{className:"IPAddress"},this.viewItems().toArray())},n.viewItems=function(){var t=new B;return t.add("ip",m("span",null,this.ip),100),t},e}(E),en=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){return m("div",{className:"Dropdown PostMeta"},this.viewItems().toArray())},n.getPermalink=function(t){return Wi.forum.attribute("baseOrigin")+Wi.route.post(t)},n.selectPermalink=function(t){var e=this;setTimeout((function(){return $(e.element).parent().find(".PostMeta-permalink").select()})),t.redraw=!1},n.viewItems=function(){var t=this,e=new B,n=this.attrs.post.createdAt();return e.add("time",m("a",{className:"Dropdown-toggle",onclick:function(e){return t.selectPermalink(e)},"data-toggle":"dropdown"},lt(n)),100),e.add("meta-dropdown",m("div",{className:"Dropdown-menu dropdown-menu"},this.metaItems().toArray()),90),e},n.metaItems=function(){var t=new B,e=this.attrs.post,n="ontouchstart"in document.documentElement,r=this.getPermalink(e),i=e.createdAt();return t.add("post-number",m("span",{className:"PostMeta-number"},Wi.translator.trans("core.forum.post.number_tooltip",{number:e.number()})," "),100),t.add("post-time",m("span",{className:"PostMeta-time"},Ze(i)),90),t.add("post-ip",m("span",{className:"PostMeta-ip"},m(tn,{ip:e.data.attributes.ipAddress})),80),t.add("permalink",n?m("a",{className:"Button PostMeta-permalink",href:r},r):m("input",{className:"FormControl PostMeta-permalink",value:r,onclick:function(t){return t.stopPropagation()}}),0),t},e}(E),nn=function(t){function e(){return t.apply(this,arguments)||this}w(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=Wi.translator.trans("core.forum.post.edited_tooltip",{user:e,ago:st(t.editedAt())});return m(Et,{text:n},m("span",{className:"PostEdited"},Wi.translator.trans("core.forum.post.edited_text")))},n.oncreate=function(e){t.prototype.oncreate.call(this,e)},e}(E),rn=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.revealContent=!1,this.cardVisible=!1,this.subtree.check((function(){return n.cardVisible}),(function(){return n.isEditing()}),(function(){return n.revealContent}))},n.content=function(){return t.prototype.content.call(this).concat(this.contentItems().toArray())},n.contentItems=function(){var t=new B;return t.add("header",m("header",{className:"Post-header"},m("ul",null,H(this.headerItems().toArray()))),100),t.add("body",m("div",{className:"Post-body"},this.bodyItems().toArray()),90),t},n.bodyItems=function(){var t=new B;return t.add("content",this.isEditing()?m(Jt,{className:"Post-preview",composer:Wi.composer}):m.trust(this.attrs.post.contentHtml()),100),t},n.refreshContent=function(){var t=this.isEditing()?"":this.attrs.post.contentHtml();this.contentHtml!==t&&this.$(".Post-body script").each((function(){var t=document.createElement("script");t.textContent=this.textContent,Array.from(this.attributes).forEach((function(e){return t.setAttribute(e.name,e.value)})),this.parentNode.replaceChild(t,this)})),this.contentHtml=t},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.refreshContent()},n.onupdate=function(e){t.prototype.onupdate.call(this,e),this.refreshContent()},n.isEditing=function(){return Wi.composer.bodyMatches(Re,{post:this.attrs.post})},n.elementAttrs=function(){var e=this.attrs.post,n=t.prototype.elementAttrs.call(this);return n.className=M(n.className,"CommentPost",{"Post--renderFailed":e.renderFailed(),"Post--hidden":e.isHidden(),"Post--edited":e.isEdited(),revealContent:this.revealContent,editing:this.isEditing()}),this.isEditing()&&(n["aria-busy"]="true"),n},n.toggleContent=function(){this.revealContent=!this.revealContent},n.headerItems=function(){var t=this,e=new B,n=this.attrs.post;return e.add("user",m(Qe,{post:n,cardVisible:this.cardVisible,oncardshow:function(){t.cardVisible=!0,m.redraw()},oncardhide:function(){t.cardVisible=!1,m.redraw()}}),100),e.add("meta",m(en,{post:n})),n.isEdited()&&!n.isHidden()&&e.add("edited",m(nn,{post:n})),n.isHidden()&&e.add("toggle",m(yt,{className:"Button Button--default Button--more",icon:"fas fa-ellipsis-h",onclick:this.toggleContent.bind(this)})),e},e}(Ue),on=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.elementAttrs=function(){var e=t.prototype.elementAttrs.call(this);return e.className=M(e.className,"EventPost",Q(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(G,{className:"EventPost-user",href:Wi.route.user(e)},n):n,time:lt(this.attrs.post.createdAt())});return t.prototype.content.call(this).concat([nt(this.icon(),{className:"EventPost-icon"}),m("div",{className:"EventPost-info"},this.description(r))])},n.icon=function(){return""},n.description=function(t){return Wi.translator.trans(this.descriptionKey(),t)},n.descriptionKey=function(){return""},n.descriptionData=function(){return{}},e}(Ue),sn=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-pencil-alt"},n.description=function(t){var e=Wi.translator.trans("core.forum.post_stream.discussion_renamed_text",t);return m("span",null,e)},n.descriptionData=function(){var t=this.attrs.post,e=t.content()[0],n=t.content()[1];return{new:m(Et,{text:ot(Wi.translator.trans("core.forum.post_stream.discussion_renamed_old_tooltip",{old:e}))},m("strong",{className:"DiscussionRenamedPost-new"},n))}},e}(on),an="welcomeHidden",un=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}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e)},n.view=function(t){return this.isHidden()?null:m("header",{className:"Hero WelcomeHero"},m("div",{className:"container"},this.viewItems().toArray()))},n.hide=function(){localStorage.setItem(an,"true")},n.isHidden=function(){var t;return null==(t=Wi.forum.attribute("welcomeTitle"))||!t.trim()||!!localStorage.getItem(an)||!!this.hidden},n.viewItems=function(){var t=this,e=new B;return e.add("dismiss-button",m(yt,{icon:"fas fa-times",onclick:function(){t.$().slideUp(t.hide.bind(t))},className:"Hero-close Button Button--icon Button--link","aria-label":Wi.translator.trans("core.forum.welcome_hero.hide")}),100),e.add("content",m("div",{className:"containerNarrow"},this.contentItems().toArray()),80),e},n.contentItems=function(){var t=new B;return t.add("title",m("h1",{className:"Hero-title"},Wi.forum.attribute("welcomeTitle")),100),t.add("subtitle",m("div",{className:"Hero-subtitle"},m.trust(Wi.forum.attribute("welcomeMessage")))),t},e}(E),ln=function(t){function e(){return t.apply(this,arguments)||this}w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.placeholder=e.placeholder||ot(Wi.translator.trans("core.forum.composer_discussion.body_placeholder")),e.submitLabel=e.submitLabel||Wi.translator.trans("core.forum.composer_discussion.submit_button"),e.confirmExit=e.confirmExit||ot(Wi.translator.trans("core.forum.composer_discussion.discard_confirmation")),e.titlePlaceholder=e.titlePlaceholder||ot(Wi.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||Bt(""),this.title=this.composer.fields.title},n.headerItems=function(){var e=t.prototype.headerItems.call(this);return e.add("title",m("h3",null,Wi.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();Wi.store.createRecord("discussions").save(e).then((function(e){t.composer.hide(),Wi.discussions.refresh(),m.route.set(Wi.route.discussion(e))}),this.loaded.bind(this))},e}(kt),cn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).lastDiscussion=void 0,e}w(e,t);var n=e.prototype;return n.oninit=function(n){t.prototype.oninit.call(this,n),Wi.previous.matches(ae)&&(this.lastDiscussion=Wi.previous.get("discussion")),Wi.previous.matches(e)&&Wi.discussions.clear(),Wi.discussions.refreshParams(Wi.search.params(),m.route.param("page")&&Number(m.route.param("page"))||1),Wi.history.push("index",ot(Wi.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,H(this.sidebarItems().toArray()))),m("div",{className:"IndexPage-results sideNavOffset"},this.contentItems().toArray()))))},n.contentItems=function(){var t=new B;return t.add("toolbar",m("div",{className:"IndexPage-toolbar"},this.toolbarItems().toArray()),100),t.add("discussionList",m(Vt,{state:Wi.discussions}),90),t},n.toolbarItems=function(){var t=new B;return t.add("view",m("ul",{className:"IndexPage-toolbar-view"},H(this.viewItems().toArray())),100),t.add("action",m("ul",{className:"IndexPage-toolbar-action"},H(this.actionItems().toArray())),90),t},n.setTitle=function(){Wi.setTitle(ot(Wi.translator.trans("core.forum.index.meta_title_text"))),Wi.setTitleCount(0)},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.setTitle();var n=Wi.cache.heroHeight,r=Wi.cache.heroHeight=this.$(".Hero").outerHeight()||0,i=Wi.cache.scrollTop;if($("#app").css("min-height",($(window).height()||0)+r),null!=Wi.previous.type&&(this.lastDiscussion?$(window).scrollTop(i-n+r):$(window).scrollTop(0),this.lastDiscussion)){var o=this.$('li[data-id="'+this.lastDiscussion.id()+'"] .DiscussionListItem');if(o.length){var s=$("#header").outerHeight()||0,a=$(window).height()||0,u=o.offset(),l=u&&u.top||0,c=l+(o.outerHeight()||0);(l<i+s||c>i+a)&&$(window).scrollTop(l-s)}}},n.onbeforeremove=function(e){t.prototype.onbeforeremove.call(this,e),Wi.cache.scrollTop=$(window).scrollTop()},n.onremove=function(e){t.prototype.onremove.call(this,e),$("#app").css("min-height","")},n.hero=function(){return m(un,null)},n.sidebarItems=function(){var t=this,e=new B,n=Wi.forum.attribute("canStartDiscussion")||!Wi.session.user;return e.add("newDiscussion",m(yt,{icon:"fas fa-edit",className:"Button Button--primary IndexPage-newDiscussion",itemClassName:"App-primaryControl",onclick:function(){return t.newDiscussionAction().catch((function(){}))},disabled:!n},Wi.translator.trans("core.forum.index."+(n?"start_discussion_button":"cannot_start_discussion_button")))),e.add("nav",m(he,{buttonClassName:"Button",className:"App-titleControl",accessibleToggleLabel:Wi.translator.trans("core.forum.index.toggle_sidenav_dropdown_accessible_label")},this.navItems().toArray())),e},n.navItems=function(){var t=new B,e=Wi.search.stickyParams();return t.add("allDiscussions",m(le,{href:Wi.route("index",e),icon:"far fa-comments"},Wi.translator.trans("core.forum.index.all_discussions_link")),100),t},n.viewItems=function(){var t=new B,e=Wi.discussions.sortMap(),n=Object.keys(e).reduce((function(t,e){return t[e]=Wi.translator.trans("core.forum.index_sort."+e+"_button"),t}),{});return t.add("sort",m(ut,{buttonClassName:"Button",label:n[Wi.search.params().sort]||Object.keys(e).map((function(t){return n[t]}))[0],accessibleToggleLabel:Wi.translator.trans("core.forum.index_sort.toggle_dropdown_accessible_label")},Object.keys(n).map((function(t){var r=n[t],i=(Wi.search.params().sort||Object.keys(e)[0])===t;return m(yt,{icon:!i||"fas fa-check",onclick:Wi.search.changeSort.bind(Wi.search,t),active:i},r)})))),t},n.actionItems=function(){var t=new B;return t.add("refresh",m(yt,{title:Wi.translator.trans("core.forum.index.refresh_tooltip"),icon:"fas fa-sync",className:"Button Button--icon",onclick:function(){Wi.discussions.refresh(),Wi.session.user&&(Wi.store.find("users",Wi.session.user.id()),m.redraw())}})),Wi.session.user&&t.add("markAllAsRead",m(yt,{title:Wi.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 Wi.session.user?(Wi.composer.load(ln,{user:Wi.session.user}),Wi.composer.show(),t(Wi.composer)):(Wi.modal.show(Mt),e())}))},n.markAllAsRead=function(){var t;confirm(ot(Wi.translator.trans("core.forum.index.mark_all_as_read_confirmation")))&&(null==(t=Wi.session.user)||t.save({markedAllAsReadAt:new Date}))},e}(S);cn.providesInitialSearch=!0;var dn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).loading=!0,e.moreResults=!1,e.posts=[],e.loadLimit=20,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.loadUser(m.route.param("username"))},n.content=function(){var t,e=this;return 0!==this.posts.length||this.loading?(this.loading?t=m(ft,null):this.moreResults&&(t=m("div",{className:"PostsUserPage-loadMore"},m(yt,{className:"Button",onclick:this.loadMore.bind(this)},Wi.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"},Wi.translator.trans("core.forum.user.in_discussion_text",{discussion:m(G,{href:Wi.route.post(t)},e.discussionTitle(t))})),m(rn,{post:t}))}))),m("div",{className:"PostsUserPage-loadMore"},t))):m("div",{className:"PostsUserPage"},m(zt,{text:Wi.translator.trans("core.forum.user.posts_empty_text")}))},n.show=function(e){t.prototype.show.call(this,e),this.refresh()},n.refresh=function(){this.loading=!0,this.posts=[],m.redraw(),this.loadResults().then(this.parseResults.bind(this))},n.loadResults=function(t){return void 0===t&&(t=0),Wi.store.find("posts",{filter:{author:this.user.username(),type:"comment"},page:{offset:t,limit:this.loadLimit},sort:"-createdAt"})},n.loadMore=function(){this.loading=!0,this.loadResults(this.posts.length).then(this.parseResults.bind(this))},n.parseResults=function(t){var e;return this.loading=!1,(e=this.posts).push.apply(e,t),this.moreResults=t.length>=this.loadLimit,m.redraw(),t},n.discussionTitle=function(t){return t.discussion().title()},e}(Ge),hn=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=D({},e,{page:D({},e.page,{offset:this.pageSize*(t-1)}),include:n});return v.store.find(this.type,r)},e.requestParams=function(){return this.params},e.refreshParams=function(t,e){return this.isEmpty()||this.paramsChanged(t)?(this.params=t,this.refresh(e)):Promise.resolve()},e.refresh=function(t){var e=this;return void 0===t&&(t=1),this.initialLoading=!0,this.loadingPrev=!1,this.loadingNext=!1,this.clear(),this.location={page:t},this.loadPage().then((function(t){e.pages=[],e.parseResults(e.location.page,t)})).finally((function(){return e.initialLoading=!1}))},e.getPages=function(){return this.pages},e.getLocation=function(){return this.location},e.isLoading=function(){return this.initialLoading||this.loadingNext||this.loadingPrev},e.isInitialLoading=function(){return this.initialLoading},e.isLoadingPrev=function(){return this.loadingPrev},e.isLoadingNext=function(){return this.loadingNext},e.hasItems=function(){return!!this.getAllItems().length},e.isEmpty=function(){return!this.isInitialLoading()&&!this.hasItems()},e.hasPrev=function(){var t;return!(null==(t=this.pages[0])||!t.hasPrev)},e.hasNext=function(){var t;return!(null==(t=this.pages[this.pages.length-1])||!t.hasNext)},e.getParams=function(){return this.params},e.getNextPageNumber=function(){var t,e=null==(t=this.pages[this.pages.length-1])?void 0:t.number;return e&&!isNaN(e)?e+1:this.location.page},e.getPrevPageNumber=function(){var t,e=null==(t=this.pages[0])?void 0:t.number;return e&&!isNaN(e)?Math.max(e-1,1):this.location.page},e.paramsChanged=function(t){var e=this;return Object.keys(t).some((function(n){return e.getParams()[n]!==t[n]}))},e.getAllItems=function(){return this.getPages().map((function(t){return t.items})).flat()},t}(),fn=function(){function t(){this.events={},this.events={}}var e=t.prototype;return e.on=function(t,e){return this.events[t]||(this.events[t]=[]),this.events[t].push(e),this},e.emit=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.events[t]&&this.events[t].forEach((function(t){return t.apply(void 0,n)}))},t}();function pn(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 mn=new fn,vn=function(t){function e(e,n){var r;return void 0===n&&(n=1),(r=t.call(this,e,n,20)||this).extraDiscussions=[],r.eventEmitter=void 0,r.eventEmitter=mn.on("discussion.deleted",r.deleteDiscussion.bind(y(r))),r}w(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=Wi.preloadedApiDocument();return n?(this.initialLoading=!1,Promise.resolve(n)):t.prototype.loadPage.call(this,e)},n.clear=function(){t.prototype.clear.call(this),this.extraDiscussions=[]},n.sortMap=function(){var t={};return this.params.q&&(t.relevance=""),t.latest="-lastPostedAt",t.top="-commentCount",t.newest="-createdAt",t.oldest="createdAt",t},n.isSearchResults=function(){return!!this.params.q},n.removeDiscussion=function(t){this.eventEmitter.emit("discussion.deleted",t)},n.deleteDiscussion=function(t){for(var e,n=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return pn(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)?pn(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},F(e,[{key:"type",get:function(){return"discussions"}}]),e}(hn),gn=function(t){function e(){return t.apply(this,arguments)||this}w(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 vn({filter:{author:e.username()},sort:"newest"}),this.state.refresh()},n.content=function(){return m("div",{className:"DiscussionsUserPage"},m(Vt,{state:this.state}))},e}(Ge);const yn=function(t,e){return function(){e(this.getAttribute(t)||this[t])}};var bn=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(t){var e=M(["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:yn("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}(E),wn=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e),e.className=M(e.className,"Checkbox--switch")},e.prototype.getDisplay=function(){return!!this.attrs.loading&&t.prototype.getDisplay.call(this)},e}(bn),Dn=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(t){return m("fieldset",{className:this.attrs.className},m("legend",null,this.attrs.label),m("ul",null,H(t.children)))},e}(E),xn=function(t){function e(){return t.apply(this,arguments)||this}w(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(bn,{state:!!e[i],loading:t.loading[i],disabled:!(i in e),onchange:t.toggle.bind(t,[i])},m("span",{className:"sr-only"},Wi.translator.trans("core.forum.settings.notification_checkbox_a11y_label_template",{description:n.label,method:r.label}))))})))}))))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.$("thead .NotificationGrid-groupToggle").bind("mouseenter mouseleave",(function(t){var e=parseInt($(this).index(),10)+1;$(this).parents("table").find("td:nth-child("+e+")").toggleClass("highlighted","mouseenter"===t.type)})),this.$("tbody .NotificationGrid-groupToggle").bind("mouseenter mouseleave",(function(t){$(this).parent().find("td").toggleClass("highlighted","mouseenter"===t.type)}))},n.toggle=function(t){var e=this,n=this.attrs.user,r=n.preferences(),i=!r[t[0]];t.forEach((function(t){e.loading[t]=!0,r[t]=i})),m.redraw(),n.save({preferences:r}).then((function(){t.forEach((function(t){return e.loading[t]=!1})),m.redraw()}))},n.toggleMethod=function(t){var e=this,n=this.types.map((function(n){return e.preferenceKey(n.name,t)})).filter((function(t){return t in e.attrs.user.preferences()}));this.toggle(n)},n.toggleType=function(t){var e=this,n=this.methods.map((function(n){return e.preferenceKey(t,n.name)})).filter((function(t){return t in e.attrs.user.preferences()}));this.toggle(n)},n.preferenceKey=function(t,e){return"notify_"+t+"_"+e},n.notificationMethods=function(){var t=new B;return t.add("alert",{name:"alert",icon:"fas fa-bell",label:Wi.translator.trans("core.forum.settings.notify_by_web_heading")}),t.add("email",{name:"email",icon:"far fa-envelope",label:Wi.translator.trans("core.forum.settings.notify_by_email_heading")}),t},n.notificationTypes=function(){var t=new B;return t.add("discussionRenamed",{name:"discussionRenamed",icon:"fas fa-pencil-alt",label:Wi.translator.trans("core.forum.settings.notify_discussion_renamed_label")}),t},e}(E),Cn=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.className=function(){return"ChangePasswordModal Modal--small"},n.title=function(){return Wi.translator.trans("core.forum.change_password.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},this.fields().toArray()))},n.fields=function(){var t=new B;return t.add("help",m("p",{className:"helpText"},Wi.translator.trans("core.forum.change_password.text"))),t.add("submit",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Wi.translator.trans("core.forum.change_password.send_button")))),t},n.onsubmit=function(t){t.preventDefault(),this.loading=!0,Wi.request({method:"POST",url:Wi.forum.attribute("apiUrl")+"/forgot",body:this.requestBody()}).then(this.hide.bind(this),this.loaded.bind(this))},n.requestBody=function(){return{email:Wi.session.user.email()}},e}(_t),An=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).email=void 0,e.password=void 0,e.success=!1,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.email=Bt(Wi.session.user.email()||""),this.password=Bt("")},n.className=function(){return"ChangeEmailModal Modal--small"},n.title=function(){return Wi.translator.trans("core.forum.change_email.title")},n.content=function(){return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},this.fields().toArray()))},n.fields=function(){var t=new B;return this.success?(t.add("help",m("p",{className:"helpText"},Wi.translator.trans("core.forum.change_email.confirmation_message",{email:m("strong",null,this.email())}))),t.add("dismiss",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",onclick:this.hide.bind(this)},Wi.translator.trans("core.forum.change_email.dismiss_button"))))):(t.add("email",m("div",{className:"Form-group"},m("input",{type:"email",name:"email",className:"FormControl",placeholder:Wi.session.user.email(),bidi:this.email,disabled:this.loading}))),t.add("password",m("div",{className:"Form-group"},m("input",{type:"password",name:"password",className:"FormControl",autocomplete:"current-password",placeholder:Wi.translator.trans("core.forum.change_email.confirm_password_placeholder"),bidi:this.password,disabled:this.loading}))),t.add("submit",m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Wi.translator.trans("core.forum.change_email.submit_button"))))),t},n.onsubmit=function(t){var e=this;t.preventDefault(),this.email()!==Wi.session.user.email()?(this.loading=!0,this.alertAttrs=null,Wi.session.user.save(this.requestAttributes(),{errorHandler:this.onerror.bind(this),meta:{password:this.password()}}).then((function(){e.success=!0})).catch((function(){})).then(this.loaded.bind(this))):this.hide()},n.requestAttributes=function(){return{email:this.email()}},n.onerror=function(e){401===e.status&&e.alert&&(e.alert.content=Wi.translator.trans("core.forum.change_email.incorrect_password_message")),t.prototype.onerror.call(this,e)},e}(_t),En=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).discloseOnlineLoading=void 0,e}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.show(Wi.session.user),Wi.setTitle(ot(Wi.translator.trans("core.forum.settings.title")))},n.content=function(){return m("div",{className:"SettingsPage"},m("ul",null,H(this.settingsItems().toArray())))},n.settingsItems=function(){var t=this,e=new B;return["account","notifications","privacy"].forEach((function(n,r){var i=n+"Items";e.add(n,m(Dn,{className:"Settings-"+n,label:Wi.translator.trans("core.forum.settings."+n+"_heading")},t[i]().toArray()),100-10*r)})),e},n.accountItems=function(){var t=new B;return t.add("changePassword",m(yt,{className:"Button",onclick:function(){return Wi.modal.show(Cn)}},Wi.translator.trans("core.forum.settings.change_password_button")),100),t.add("changeEmail",m(yt,{className:"Button",onclick:function(){return Wi.modal.show(An)}},Wi.translator.trans("core.forum.settings.change_email_button")),90),t},n.notificationsItems=function(){var t=new B;return t.add("notificationGrid",m(xn,{user:this.user}),100),t},n.privacyItems=function(){var t,e=this,n=new B;return n.add("discloseOnline",m(wn,{state:null==(t=this.user.preferences())?void 0:t.discloseOnline,onchange:function(t){e.discloseOnlineLoading=!0,e.user.savePreferences({discloseOnline:t}).then((function(){e.discloseOnlineLoading=!1,m.redraw()}))},loading:this.discloseOnlineLoading},Wi.translator.trans("core.forum.settings.privacy_disclose_online_label")),100),n},e}(Ge),Nn=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),Wi.history.push("notifications",ot(Wi.translator.trans("core.forum.notifications.title"))),Wi.notifications.load(),this.bodyClass="App--notifications"},n.view=function(){return m("div",{className:"NotificationsPage"},m(De,{state:Wi.notifications}))},e}(S),kn=function(){function t(t,e){this.component=void 0,this.routeName=void 0,this.component=t,this.routeName=e}var e=t.prototype;return e.makeKey=function(){return this.routeName+JSON.stringify(m.route.param())},e.makeAttrs=function(t){return D({},t.attrs,{routeName:this.routeName})},e.onmatch=function(t,e,n){return this.component},e.render=function(t){return[D({},t,{attrs:this.makeAttrs(t),key:this.makeKey()})]},t}(),Sn=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.canonicalizeDiscussionSlug=function(t){if(t)return t.split("-")[0]},n.makeKey=function(){var t=D({},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 Wi.current.matches(ae)&&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 Wi.current.get("stream").goToNumber(r)})),e.scrollToPostNumber=null}return t.prototype.render.call(this,n)},e}(kn);Sn.scrollToPostNumber=null;var Tn=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(t){return m("div",{className:"LabelValue"},m("div",{className:"LabelValue-label"},v.translator.trans("core.lib.data_segment.label",{label:this.attrs.label})),m("div",{className:"LabelValue-value"},this.attrs.value))},e}(E),Fn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).loading={},e.showingTokens={},e}w(e,t);var n=e.prototype;return n.view=function(t){return m("div",{className:"AccessTokensList"},this.attrs.tokens.length?this.attrs.tokens.map(this.tokenView.bind(this)):m("div",{className:"AccessTokensList--empty"},Wi.translator.trans("core.forum.security.empty_text")))},n.tokenView=function(t){return m("div",{className:M("AccessTokensList-item",{"AccessTokensList-item--active":t.isCurrent()}),key:t.id()},this.tokenViewItems(t).toArray())},n.tokenViewItems=function(t){var e=new B;return e.add("icon",m("div",{className:"AccessTokensList-item-icon"},nt(this.attrs.icon||"fas fa-key")),50),e.add("info",m("div",{className:"AccessTokensList-item-info"},this.tokenInfoItems(t).toArray()),40),e.add("actions",m("div",{className:"AccessTokensList-item-actions"},this.tokenActionItems(t).toArray()),30),e},n.tokenInfoItems=function(t){var e=new B;return"session"===this.attrs.type?e.add("title",m("div",{className:"AccessTokensList-item-title"},m("span",{className:"AccessTokensList-item-title-main"},t.device()),t.isCurrent()&&[" — ",m("span",{className:"AccessTokensList-item-title-sub"},Wi.translator.trans("core.forum.security.current_active_session"))])):e.add("title",m("div",{className:"AccessTokensList-item-title"},m("span",{className:"AccessTokensList-item-title-main"},this.generateTokenTitle(t)))),e.add("createdAt",m("div",{className:"AccessTokensList-item-createdAt"},m(Tn,{label:Wi.translator.trans("core.forum.security.created"),value:lt(t.createdAt())}))),e.add("lastActivityAt",m("div",{className:"AccessTokensList-item-lastActivityAt"},m(Tn,{label:Wi.translator.trans("core.forum.security.last_activity"),value:t.lastActivityAt()?m("[",null,lt(t.lastActivityAt()),t.lastIpAddress()&&m("span",null," ","— ",m(tn,{ip:t.lastIpAddress()})),"developer_token"===this.attrs.type&&t.device()&&m("[",null," ","— ",m("span",{className:"AccessTokensList-item-title-sub"},t.device()))):Wi.translator.trans("core.forum.security.never")}))),e},n.tokenActionItems=function(t){var e=this,n=new B,r={session:"terminate_session",developer_token:"revoke_access_token"}[this.attrs.type];if("developer_token"===this.attrs.type){var i=!this.showingTokens[t.id()],o=i?"show_access_token":"hide_access_token";n.add("toggleDisplay",m(yt,{className:"Button Button--inverted",icon:i?"fas fa-eye":"fas fa-eye-slash",onclick:function(){e.showingTokens[t.id()]=i,m.redraw()}},Wi.translator.trans("core.forum.security."+o)))}var s=m(yt,{className:"Button Button--danger",disabled:t.isCurrent(),loading:!!this.loading[t.id()],onclick:function(){return e.revoke(t)}},Wi.translator.trans("core.forum.security."+r));return t.isCurrent()&&(s=m(Et,{text:Wi.translator.trans("core.forum.security.cannot_terminate_current_session")},m("div",{tabindex:"0"},s))),n.add("revoke",s),n},n.revoke=function(){var t=Ee(ke().mark((function t(e){var n,r,i;return ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(confirm(ot(Wi.translator.trans("core.forum.security.revoke_access_token_confirmation")))){t.next=2;break}return t.abrupt("return");case 2:return this.loading[e.id()]=!0,t.next=5,e.delete();case 5:this.loading[e.id()]=!1,null==(n=(r=this.attrs).ondelete)||n.call(r,e),i="session"===this.attrs.type?"session_terminated":"token_revoked",Wi.alerts.show({type:"success"},Wi.translator.trans("core.forum.security."+i,{count:1})),m.redraw();case 10:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}(),n.generateTokenTitle=function(t){var e=t.title()||Wi.translator.trans("core.forum.security.token_title_placeholder"),n=this.tokenValueDisplay(t);return Wi.translator.trans("core.forum.security.token_item_title",{title:e,token:n})},n.tokenValueDisplay=function(t){var e=Array(12).fill("*").join(""),n=this.showingTokens[t.id()]?t.token():e;return m("code",{className:"AccessTokensList-item-token"},n)},e}(E),_n=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).titleInput=Bt(""),e}w(e,t);var n=e.prototype;return n.className=function(){return"Modal--small NewAccessTokenModal"},n.title=function(){return Wi.translator.trans("core.forum.security.new_access_token_modal.title")},n.content=function(){var t=Wi.translator.trans("core.forum.security.new_access_token_modal.title_placeholder");return m("div",{className:"Modal-body"},m("div",{className:"Form Form--centered"},m("div",{className:"Form-group"},m("input",{type:"text",className:"FormControl",bidi:this.titleInput,placeholder:t,"aria-label":t})),m("div",{className:"Form-group"},m(yt,{className:"Button Button--primary Button--block",type:"submit",loading:this.loading},Wi.translator.trans("core.forum.security.new_access_token_modal.submit_button")))))},n.submitData=function(){return{title:this.titleInput()}},n.onsubmit=function(e){var n=this;t.prototype.onsubmit.call(this,e),e.preventDefault(),this.loading=!0,Wi.store.createRecord("access-tokens").save(this.submitData()).then((function(t){n.attrs.onsuccess(t),Wi.modal.close()})).finally(this.loaded.bind(this))},e}(_t),Pn=function(){function t(){this.tokens=null,this.loadingTerminateSessions=!1,this.loadingGlobalLogout=!1}var e=t.prototype;return e.hasLoadedTokens=function(){return null!==this.tokens},e.getTokens=function(){return this.tokens},e.setTokens=function(t){this.tokens=t},e.pushToken=function(t){var e;null==(e=this.tokens)||e.push(t)},e.removeToken=function(t){this.tokens=this.tokens.filter((function(e){return e!==t}))},e.getSessionTokens=function(){var t;return(null==(t=this.tokens)?void 0:t.filter((function(t){return t.isSessionToken()})).sort((function(t,e){return e.isCurrent()?1:-1})))||[]},e.getDeveloperTokens=function(){var t;return(null==(t=this.tokens)?void 0:t.filter((function(t){return!t.isSessionToken()})))||null},e.getOtherSessionTokens=function(){var t;return(null==(t=this.tokens)?void 0:t.filter((function(t){return t.isSessionToken()&&!t.isCurrent()})))||[]},e.hasOtherActiveSessions=function(){return(this.getOtherSessionTokens()||[]).length>0},e.removeOtherSessionTokens=function(){this.tokens=this.tokens.filter((function(t){return!t.isSessionToken()||t.isCurrent()}))},t}(),Bn=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).state=new Pn,e}w(e,t);var n=e.prototype;return n.oninit=function(e){var n;t.prototype.oninit.call(this,e);var r=m.route.param("username");r===(null==(n=Wi.session.user)?void 0:n.slug())||Wi.forum.attribute("canModerateAccessTokens")||m.route.set("/"),this.loadUser(r),Wi.setTitle(ot(Wi.translator.trans("core.forum.security.title"))),this.loadTokens()},n.content=function(){return m("div",{className:"UserSecurityPage"},m("ul",null,H(this.settingsItems().toArray())))},n.settingsItems=function(){var t,e=new B;return Wi.forum.attribute("canCreateAccessToken")||Wi.forum.attribute("canModerateAccessTokens")||this.state.hasLoadedTokens()&&null!=(t=this.state.getDeveloperTokens())&&t.length?e.add("developerTokens",m(Dn,{className:"UserSecurityPage-developerTokens",label:Wi.translator.trans("core.forum.security.developer_tokens_heading")},this.developerTokensItems().toArray())):this.state.hasLoadedTokens()||e.add("developerTokens",m(ft,null)),e.add("sessions",m(Dn,{className:"UserSecurityPage-sessions",label:Wi.translator.trans("core.forum.security.sessions_heading")},this.sessionsItems().toArray())),this.user.id()===Wi.session.user.id()&&e.add("globalLogout",m(Dn,{className:"UserSecurityPage-globalLogout",label:Wi.translator.trans("core.forum.security.global_logout.heading")},m("span",{className:"helpText"},Wi.translator.trans("core.forum.security.global_logout.help_text")),m(yt,{className:"Button",icon:"fas fa-sign-out-alt",onclick:this.globalLogout.bind(this),loading:this.state.loadingGlobalLogout,disabled:this.state.loadingTerminateSessions},Wi.translator.trans("core.forum.security.global_logout.log_out_button")))),e},n.developerTokensItems=function(){var t=this,e=new B;return e.add("accessTokenList",this.state.hasLoadedTokens()?m(Fn,{type:"developer_token",ondelete:function(e){t.state.removeToken(e),m.redraw()},tokens:this.state.getDeveloperTokens(),icon:"fas fa-key",hideTokens:!1}):m(ft,null)),this.user.id()===Wi.session.user.id()&&e.add("newAccessToken",m(yt,{className:"Button",disabled:!Wi.forum.attribute("canCreateAccessToken"),onclick:function(){return Wi.modal.show(_n,{onsuccess:function(e){t.state.pushToken(e),m.redraw()}})}},Wi.translator.trans("core.forum.security.new_access_token_button"))),e},n.sessionsItems=function(){var t=this,e=new B;if(e.add("sessionsList",this.state.hasLoadedTokens()?m(Fn,{type:"session",ondelete:function(e){t.state.removeToken(e),m.redraw()},tokens:this.state.getSessionTokens(),icon:"fas fa-laptop",hideTokens:!0}):m(ft,null)),this.user.id()===Wi.session.user.id()){var n=!this.state.hasOtherActiveSessions(),r=m(yt,{className:"Button",onclick:this.terminateAllOtherSessions.bind(this),loading:this.state.loadingTerminateSessions,disabled:this.state.loadingGlobalLogout||n},Wi.translator.trans("core.forum.security.terminate_all_other_sessions"));n&&(r=m(Et,{text:Wi.translator.trans("core.forum.security.cannot_terminate_current_session")},m("span",{tabindex:"0"},r))),e.add("terminateAllOtherSessions",r)}return e},n.loadTokens=function(){var t=this;return Wi.store.find("access-tokens",{filter:{user:this.user.id()}}).then((function(e){t.state.setTokens(e),m.redraw()}))},n.terminateAllOtherSessions=function(){var t=this;if(confirm(ot(Wi.translator.trans("core.forum.security.terminate_all_other_sessions_confirmation"))))return this.state.loadingTerminateSessions=!0,Wi.request({method:"DELETE",url:Wi.forum.attribute("apiUrl")+"/sessions"}).then((function(){var e=t.state.getOtherSessionTokens().length;t.state.removeOtherSessionTokens(),Wi.alerts.show({type:"success"},Wi.translator.trans("core.forum.security.session_terminated",{count:e}))})).catch((function(){Wi.alerts.show({type:"error"},Wi.translator.trans("core.forum.security.session_termination_failed"))})).finally((function(){t.state.loadingTerminateSessions=!1,m.redraw()}))},n.globalLogout=function(){var t=this;return this.state.loadingGlobalLogout=!0,Wi.request({method:"POST",url:Wi.forum.attribute("baseUrl")+"/global-logout"}).then((function(){return window.location.reload()})).finally((function(){t.state.loadingGlobalLogout=!1,m.redraw()}))},e}(Ge);function In(t){t.routes={index:{path:"/all",component:cn},discussion:{path:"/d/:id",component:ae,resolverClass:Sn},"discussion.near":{path:"/d/:id/:near",component:ae,resolverClass:Sn},user:{path:"/u/:username",component:dn},"user.posts":{path:"/u/:username",component:dn},"user.discussions":{path:"/u/:username/discussions",component:gn},settings:{path:"/settings",component:En},"user.security":{path:"/u/:username/security",component:Bn},notifications:{path:"/notifications",component:Nn}}}function On(t){var e=t.session.user;if(e&&!e.isEmailConfirmed()){var n=function(n){function r(){return n.apply(this,arguments)||this}w(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,{className:"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}(E),r=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return D({},n,{children:[m("div",{className:"container"},n.children)]})},e}(Ft);m.mount($('<div className="App-notices"/>').insertBefore("#content")[0],{view:function(){return m(r,{dismissible:!1,controls:[m(n,null)],className:"Alert--emailConfirmation"},t.translator.trans("core.forum.user_email_confirmation.alert_message",{email:m("strong",null,e.email())}))}})}}var Ln=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],Mn=Ln.join(","),$n="undefined"==typeof Element,jn=$n?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Rn=!$n&&Element.prototype.getRootNode?function(t){return t.getRootNode()}:function(t){return t.ownerDocument},Hn=function(t,e,n){var r=Array.prototype.slice.apply(t.querySelectorAll(Mn));return e&&jn.call(t,Mn)&&r.unshift(t),r.filter(n)},Un=function t(e,n,r){for(var i=[],o=Array.from(e);o.length;){var s=o.shift();if("SLOT"===s.tagName){var a=s.assignedElements(),u=t(a.length?a:s.children,!0,r);r.flatten?i.push.apply(i,u):i.push({scope:s,candidates:u})}else{jn.call(s,Mn)&&r.filter(s)&&(n||!e.includes(s))&&i.push(s);var l=s.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(s),c=!r.shadowRootFilter||r.shadowRootFilter(s);if(l&&c){var d=t(!0===l?s.children:l.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scope:s,candidates:d})}else o.unshift.apply(o,s.children)}}return i},qn=function(t,e){return t.tabIndex<0&&(e||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||t.isContentEditable)&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},zn=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},Vn=function(t){return"INPUT"===t.tagName},Wn=function(t){var e=t.getBoundingClientRect(),n=e.width,r=e.height;return 0===n&&0===r},Gn=function(t,e){return!(e.disabled||function(t){return Vn(t)&&"hidden"===t.type}(e)||function(t,e){var n=e.displayCheck,r=e.getShadowRoot;if("hidden"===getComputedStyle(t).visibility)return!0;var i=jn.call(t,"details>summary:first-of-type")?t.parentElement:t;if(jn.call(i,"details:not([open]) *"))return!0;var o=Rn(t).host,s=(null==o?void 0:o.ownerDocument.contains(o))||t.ownerDocument.contains(t);if(n&&"full"!==n){if("non-zero-area"===n)return Wn(t)}else{if("function"==typeof r){for(var a=t;t;){var u=t.parentElement,l=Rn(t);if(u&&!u.shadowRoot&&!0===r(u))return Wn(t);t=t.assignedSlot?t.assignedSlot:u||l===t.ownerDocument?u:l.host}t=a}if(s)return!t.getClientRects().length}return!1}(e,t)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var n=0;n<e.children.length;n++){var r=e.children.item(n);if("LEGEND"===r.tagName)return!!jn.call(e,"fieldset[disabled] *")||!r.contains(t)}return!0}e=e.parentElement}return!1}(e))},Yn=function(t,e){return!(function(t){return function(t){return Vn(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,n=t.form||Rn(t),r=function(t){return n.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=r(window.CSS.escape(t.name));else try{e=r(t.name)}catch(t){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message),!1}var i=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]}(e,t.form);return!i||i===t}(t)}(e)||qn(e)<0||!Gn(t,e))},Kn=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},Xn=function t(e){var n=[],r=[];return e.forEach((function(e,i){var o=!!e.scope,s=o?e.scope:e,a=qn(s,o),u=o?t(e.candidates):s;0===a?o?n.push.apply(n,u):n.push(s):r.push({documentOrder:i,tabIndex:a,item:e,isScope:o,content:u})})),r.sort(zn).reduce((function(t,e){return e.isScope?t.push.apply(t,e.content):t.push(e.content),t}),[]).concat(n)},Jn=function(t,e){var n;return n=(e=e||{}).getShadowRoot?Un([t],e.includeContainer,{filter:Yn.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:Kn}):Hn(t,e.includeContainer,Yn.bind(null,e)),Xn(n)},Qn=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==jn.call(t,Mn)&&Yn(e,t)},Zn=Ln.concat("iframe").join(","),tr=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==jn.call(t,Zn)&&Gn(e,t)};function er(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 nr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?er(Object(n),!0).forEach((function(e){rr(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):er(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function rr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ir,or=(ir=[],{activateTrap:function(t){if(ir.length>0){var e=ir[ir.length-1];e!==t&&e.pause()}var n=ir.indexOf(t);-1===n||ir.splice(n,1),ir.push(t)},deactivateTrap:function(t){var e=ir.indexOf(t);-1!==e&&ir.splice(e,1),ir.length>0&&ir[ir.length-1].unpause()}}),sr=function(t){return setTimeout(t,0)},ar=function(t,e){var n=-1;return t.every((function(t,r){return!e(t)||(n=r,!1)})),n},ur=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},lr=function(t){return t.target.shadowRoot&&"function"==typeof t.composedPath?t.composedPath()[0]:t.target},cr=function(t,e){var n,r=(null==e?void 0:e.document)||document,i=nr({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},e),o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},s=function(t,e,n){return t&&void 0!==t[e]?t[e]:i[n||e]},a=function(t){return o.containerGroups.findIndex((function(e){var n=e.container,r=e.tabbableNodes;return n.contains(t)||r.find((function(e){return e===t}))}))},u=function(t){var e=i[t];if("function"==typeof e){for(var n=arguments.length,o=new Array(n>1?n-1:0),s=1;s<n;s++)o[s-1]=arguments[s];e=e.apply(void 0,o)}if(!0===e&&(e=void 0),!e){if(void 0===e||!1===e)return e;throw new Error("`".concat(t,"` was specified but was not a node, or did not return a node"))}var a=e;if("string"==typeof e&&!(a=r.querySelector(e)))throw new Error("`".concat(t,"` as selector refers to no known node"));return a},l=function(){var t=u("initialFocus");if(!1===t)return!1;if(void 0===t)if(a(r.activeElement)>=0)t=r.activeElement;else{var e=o.tabbableGroups[0];t=e&&e.firstTabbableNode||u("fallbackFocus")}if(!t)throw new Error("Your focus-trap needs to have at least one focusable element");return t},c=function(){if(o.containerGroups=o.containers.map((function(t){var e,n,r=Jn(t,i.tabbableOptions),o=(e=t,(n=(n=i.tabbableOptions)||{}).getShadowRoot?Un([e],n.includeContainer,{filter:Gn.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):Hn(e,n.includeContainer,Gn.bind(null,n)));return{container:t,tabbableNodes:r,focusableNodes:o,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=o.findIndex((function(e){return e===t}));if(!(n<0))return e?o.slice(n+1).find((function(t){return Qn(t,i.tabbableOptions)})):o.slice(0,n).reverse().find((function(t){return Qn(t,i.tabbableOptions)}))}}})),o.tabbableGroups=o.containerGroups.filter((function(t){return t.tabbableNodes.length>0})),o.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},d=function t(e){!1!==e&&e!==r.activeElement&&(e&&e.focus?(e.focus({preventScroll:!!i.preventScroll}),o.mostRecentlyFocusedNode=e,function(t){return t.tagName&&"input"===t.tagName.toLowerCase()&&"function"==typeof t.select}(e)&&e.select()):t(l()))},h=function(t){var e=u("setReturnFocus",t);return e||!1!==e&&t},f=function(t){var e=lr(t);a(e)>=0||(ur(i.clickOutsideDeactivates,t)?n.deactivate({returnFocus:i.returnFocusOnDeactivate&&!tr(e,i.tabbableOptions)}):ur(i.allowOutsideClick,t)||t.preventDefault())},p=function(t){var e=lr(t),n=a(e)>=0;n||e instanceof Document?n&&(o.mostRecentlyFocusedNode=e):(t.stopImmediatePropagation(),d(o.mostRecentlyFocusedNode||l()))},m=function(t){if(function(t){return"Escape"===t.key||"Esc"===t.key||27===t.keyCode}(t)&&!1!==ur(i.escapeDeactivates,t))return t.preventDefault(),void n.deactivate();(function(t){return"Tab"===t.key||9===t.keyCode})(t)&&function(t){var e=lr(t);c();var n=null;if(o.tabbableGroups.length>0){var r=a(e),s=r>=0?o.containerGroups[r]:void 0;if(r<0)n=t.shiftKey?o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:o.tabbableGroups[0].firstTabbableNode;else if(t.shiftKey){var l=ar(o.tabbableGroups,(function(t){var n=t.firstTabbableNode;return e===n}));if(l<0&&(s.container===e||tr(e,i.tabbableOptions)&&!Qn(e,i.tabbableOptions)&&!s.nextTabbableNode(e,!1))&&(l=r),l>=0){var h=0===l?o.tabbableGroups.length-1:l-1;n=o.tabbableGroups[h].lastTabbableNode}}else{var f=ar(o.tabbableGroups,(function(t){var n=t.lastTabbableNode;return e===n}));if(f<0&&(s.container===e||tr(e,i.tabbableOptions)&&!Qn(e,i.tabbableOptions)&&!s.nextTabbableNode(e))&&(f=r),f>=0){var p=f===o.tabbableGroups.length-1?0:f+1;n=o.tabbableGroups[p].firstTabbableNode}}}else n=u("fallbackFocus");n&&(t.preventDefault(),d(n))}(t)},v=function(t){var e=lr(t);a(e)>=0||ur(i.clickOutsideDeactivates,t)||ur(i.allowOutsideClick,t)||(t.preventDefault(),t.stopImmediatePropagation())},g=function(){if(o.active)return or.activateTrap(n),o.delayInitialFocusTimer=i.delayInitialFocus?sr((function(){d(l())})):d(l()),r.addEventListener("focusin",p,!0),r.addEventListener("mousedown",f,{capture:!0,passive:!1}),r.addEventListener("touchstart",f,{capture:!0,passive:!1}),r.addEventListener("click",v,{capture:!0,passive:!1}),r.addEventListener("keydown",m,{capture:!0,passive:!1}),n},y=function(){if(o.active)return r.removeEventListener("focusin",p,!0),r.removeEventListener("mousedown",f,!0),r.removeEventListener("touchstart",f,!0),r.removeEventListener("click",v,!0),r.removeEventListener("keydown",m,!0),n};return(n={get active(){return o.active},get paused(){return o.paused},activate:function(t){if(o.active)return this;var e=s(t,"onActivate"),n=s(t,"onPostActivate"),i=s(t,"checkCanFocusTrap");i||c(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=r.activeElement,e&&e();var a=function(){i&&c(),g(),n&&n()};return i?(i(o.containers.concat()).then(a,a),this):(a(),this)},deactivate:function(t){if(!o.active)return this;var e=nr({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},t);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,y(),o.active=!1,o.paused=!1,or.deactivateTrap(n);var r=s(e,"onDeactivate"),a=s(e,"onPostDeactivate"),u=s(e,"checkCanReturnFocus"),l=s(e,"returnFocus","returnFocusOnDeactivate");r&&r();var c=function(){sr((function(){l&&d(h(o.nodeFocusedBeforeActivation)),a&&a()}))};return l&&u?(u(h(o.nodeFocusedBeforeActivation)).then(c,c),this):(c(),this)},pause:function(){return o.paused||!o.active||(o.paused=!0,y()),this},unpause:function(){return o.paused&&o.active?(o.paused=!1,c(),g(),this):this},updateContainerElements:function(t){var e=[].concat(t).filter(Boolean);return o.containers=e.map((function(t){return"string"==typeof t?r.querySelector(t):t})),o.active&&c(),this}}).updateContainerElements(t),n};function dr(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e[1]=D({escapeDeactivates:!1},e[1]),cr.apply(void 0,e)}var hr=!1;if("undefined"!=typeof window){var fr={get passive(){hr=!0}};window.addEventListener("testPassive",null,fr),window.removeEventListener("testPassive",null,fr)}var pr,mr="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),vr=[],gr=!1,yr=-1,br=void 0,wr=void 0,Dr=void 0,xr=function(t){return vr.some((function(e){return!(!e.options.allowTouchMove||!e.options.allowTouchMove(t))}))},Cr=function(t){var e=t||window.event;return!!xr(e.target)||e.touches.length>1||(e.preventDefault&&e.preventDefault(),!1)},Ar=function(){mr&&(vr.forEach((function(t){t.targetElement.ontouchstart=null,t.targetElement.ontouchmove=null})),gr&&(document.removeEventListener("touchmove",Cr,hr?{passive:!1}:void 0),gr=!1),yr=-1),mr?function(){if(void 0!==wr){var t=-parseInt(document.body.style.top,10),e=-parseInt(document.body.style.left,10);document.body.style.position=wr.position,document.body.style.top=wr.top,document.body.style.left=wr.left,window.scrollTo(e,t),wr=void 0}}():(void 0!==Dr&&(document.body.style.paddingRight=Dr,Dr=void 0),void 0!==br&&(document.body.style.overflow=br,br=void 0)),vr=[]},Er=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=t.call.apply(t,[this].concat(r))||this).focusTrap=void 0,e.lastSetFocusTrap=void 0,e.modalClosing=!1,e.keyUpListener=null,e}w(e,t);var n=e.prototype;return n.view=function(t){var e=this;return m("[",null,this.attrs.state.modalList.map((function(t,n){var r=null==t?void 0:t.componentClass;return m("div",{key:t.key,className:"ModalManager modal","data-modal-key":t.key,"data-modal-number":n,role:"dialog","aria-modal":"true",style:{"--modal-number":n},"aria-hidden":e.attrs.state.modal!==t&&"true"},!!r&&[m(r,Object.assign({key:t.key},t.attrs,{animateShow:e.animateShow.bind(e),animateHide:e.animateHide.bind(e),state:e.attrs.state})),m("div",{key:t.key,className:"ModalManager-invisibleBackdrop",onclick:e.handlePossibleBackdropClick.bind(e)})])})),this.attrs.state.backdropShown&&m("div",{className:"Modal-backdrop backdrop",ontransitionend:this.onBackdropTransitionEnd.bind(this),"data-showing":!!this.attrs.state.modalList.length,style:{"--modal-count":this.attrs.state.modalList.length}}))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),this.keyUpListener=this.handleEscPress.bind(this),document.body.addEventListener("keyup",this.keyUpListener)},n.onbeforeremove=function(e){t.prototype.onbeforeremove.call(this,e),this.keyUpListener&&document.body.removeEventListener("keyup",this.keyUpListener),this.keyUpListener=null},n.onupdate=function(e){var n=this;t.prototype.onupdate.call(this,e),requestAnimationFrame((function(){try{var t,e;if(!n.attrs.state.isModalOpen())return null==(e=document.getElementById("app"))||e.setAttribute("aria-hidden","false"),null==n.focusTrap.deactivate||n.focusTrap.deactivate(),void Ar();null==(t=document.getElementById("app"))||t.setAttribute("aria-hidden","true");var r=n.attrs.state.modal.key;n.focusTrap&&n.lastSetFocusTrap!==r&&(null==n.focusTrap.deactivate||n.focusTrap.deactivate(),Ar()),n.activeDialogElement&&n.lastSetFocusTrap!==r&&(n.focusTrap=dr(n.activeDialogElement,{allowOutsideClick:!0}),null==n.focusTrap.activate||n.focusTrap.activate(),function(t,e){if(t){if(!vr.some((function(e){return e.targetElement===t}))){var n={targetElement:t,options:e||{}};vr=[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(vr),[n]),mr?window.requestAnimationFrame((function(){if(void 0===wr){wr={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var t=window,e=t.scrollY,n=t.scrollX,r=t.innerHeight;document.body.style.position="fixed",document.body.style.top=-e,document.body.style.left=-n,setTimeout((function(){return window.requestAnimationFrame((function(){var t=r-window.innerHeight;t&&e>=r&&(document.body.style.top=-(e+t))}))}),300)}})):function(t){if(void 0===Dr){var e=!!t&&!0===t.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;if(e&&n>0){var r=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);Dr=document.body.style.paddingRight,document.body.style.paddingRight=r+n+"px"}}void 0===br&&(br=document.body.style.overflow,document.body.style.overflow="hidden")}(e),mr&&(t.ontouchstart=function(t){1===t.targetTouches.length&&(yr=t.targetTouches[0].clientY)},t.ontouchmove=function(e){1===e.targetTouches.length&&function(t,e){var n=t.targetTouches[0].clientY-yr;!xr(t.target)&&(e&&0===e.scrollTop&&n>0||function(t){return!!t&&t.scrollHeight-t.scrollTop<=t.clientHeight}(e)&&n<0?Cr(t):t.stopPropagation())}(e,t)},gr||(document.addEventListener("touchmove",Cr,hr?{passive:!1}:void 0),gr=!0))}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")}(n.activeDialogManagerElement,{reserveScrollBarGap:!0})),n.lastSetFocusTrap=r}catch(t){}}))},n.animateShow=function(t){var e=this;void 0===t&&(t=function(){}),this.attrs.state.modal&&(this.activeDialogElement.addEventListener("transitionend",(function(){t()}),{once:!0}),requestAnimationFrame((function(){e.activeDialogElement.classList.add("in")})))},n.animateHide=function(t){var e=this;void 0===t&&(t=function(){}),this.modalClosing||(this.modalClosing=!0,this.activeDialogElement.addEventListener("transitionend",(function(){e.modalClosing=!1,e.attrs.state.close(),t()}),{once:!0}),this.activeDialogElement.classList.remove("in"),this.activeDialogElement.classList.add("out"))},n.handleEscPress=function(t){if(this.attrs.state.modal){var e=this.attrs.state.modal.componentClass.dismissibleOptions;"Escape"===t.key&&e.viaEscKey&&(t.preventDefault(),this.animateHide())}},n.handlePossibleBackdropClick=function(t){this.attrs.state.modal&&this.attrs.state.modal.componentClass.dismissibleOptions.viaBackdropClick&&this.animateHide()},n.onBackdropTransitionEnd=function(t){"opacity"===t.propertyName&&null===t.currentTarget.getAttribute("data-showing")&&(this.attrs.state.backdropShown=!1,m.redraw())},F(e,[{key:"activeDialogElement",get:function(){var t;return document.body.querySelector('.ModalManager[data-modal-key="'+(null==(t=this.attrs.state.modal)?void 0:t.key)+'"] .Modal')}},{key:"activeDialogManagerElement",get:function(){var t;return document.body.querySelector('.ModalManager[data-modal-key="'+(null==(t=this.attrs.state.modal)?void 0:t.key)+'"]')}}]),e}(E),Nr=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.oninit=function(e){t.prototype.oninit.call(this,e),this.state=this.attrs.state},n.view=function(){var t=this,e=this.state.getActiveAlerts();return m("div",{className:"AlertManager"},Object.keys(e).map(Number).map((function(n){var r=e[n],i="error"===r.attrs.type;return m("div",{className:"AlertManager-alert",role:"alert","aria-live":i?"assertive":"polite"},m(r.componentClass,Object.assign({},r.attrs,{ondismiss:t.state.dismiss.bind(t.state,n)}),r.children))})))},e}(E),kr=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.className=function(){return"RequestErrorModal Modal--large"},n.title=function(){return!!this.attrs.error.xhr&&this.attrs.error.xhr.status+" "+this.attrs.error.xhr.statusText},n.content=function(){var t,e=this.attrs,n=e.error,r=e.formattedError;return t=r.length?r.join("\n\n"):n.response?JSON.stringify(n.response,null,2):n.responseText,m("div",{className:"Modal-body"},m("pre",null,this.attrs.error.options.method," ",this.attrs.error.options.url,m("br",null),m("br",null),t))},e}(_t),Sr=n(5387),Tr=n.n(Sr),Fr=n(1904),_r=n.n(Fr),Pr=n(8213),Br=n.n(Pr),Ir=n(2061),Or=n.n(Ir),Lr=n(8974),Mr=n.n(Lr),$r=n(9767),jr=n.n($r),Rr=n(402),Hr=n.n(Rr);function Ur(t){return t.reduce((function(t,e){return t.concat(Array.isArray(e)?Ur(e):e)}),[])}function qr(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 zr(t){for(var e=function(t){return/\s/.test(t)},n=[],r={},i=0,o=null,s=!1,a=0;a<t.length;){if(s&&(e(t[a])||"{"===t[a]))s=!1,o=t.slice(i,a),"{"===t[a]&&a--;else if(!s&&!e(t[a])){var u="{"===t[a];if(o&&u){var l=Vr(t,a);if(-1===l)throw new Error('Unbalanced curly braces in string: "'.concat(t,'"'));r[o]=t.slice(a+1,l),a=l,o=null}else o&&(n.push(o),o=null),s=!0,i=a}a++}return s&&(o=t.slice(i)),o&&n.push(o),{args:n,cases:r}}function Vr(t,e){for(var n=0,r=e+1;r<t.length;r++){var i=t.charAt(r);if("}"===i){if(0===n)return r;n--}else"{"===i&&n++}return-1}function Wr(t){return Gr(t.slice(1,-1),",",3)}function Gr(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(!t)return r;if(1===n)return r.push(t),r;var i=t.indexOf(e);if(-1===i)return r.push(t),r;var o=t.substring(0,i).trim(),s=t.substring(i+e.length+1).trim();return r.push(o),Gr(s,e,n-1,r)}function Yr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Kr(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Yr(Object(n),!0).forEach((function(e){Hr()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Xr=0,Jr="other";function Qr(t,e){for(var n=0,r="",i=0,o={};n<t.length;){if("#"!==t[n]||i)r+=t[n];else{var s="__hashToken".concat(Xr++);r+="{".concat(s,", number}"),o[s]=e}"{"===t[n]?i++:"}"===t[n]&&i--,n++}return{caseBody:r,numberValues:o}}function Zr(t){var e=arguments.length>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=zr(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!==pr&&pr.resolvedOptions().locale===n||(pr=new Intl.PluralRules(n));var c=pr.select(u);c!==Jr&&l.push(c)}1===u&&l.push("one"),l.push("=".concat(u),Jr);for(var d=0;d<l.length;d++){var h=l[d];if(h in a){var f=Qr(a[h],u),p=f.caseBody,m=f.numberValues;return i(p,Kr(Kr({},r),m))}}return t}var ti="other";function ei(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=zr(e),o=i.cases;return t in o?r(o[t],n):ti in o?r(o.other,n):t}function ni(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=[],o=function(r,o,s,a,u,l){if(o)return{break:!0};var c=ri(t,s,a,u);if(!c)return i;var d=c.segmentIndex===a,h=t[c.segmentIndex],f=[];if(d)f.push(r.slice(u+1,c.segmentStart));else{f.push(r.slice(u+1));for(var p=a+1;p<c.segmentIndex;p++)f.push(t[p]);f.push(h.slice(0,c.segmentStart))}return i.push(r.slice(0,l)),i.push(n(s,e,ni(f.filter((function(t){return""!==t})),e,n))),t.splice(c.segmentIndex+1,0,h.slice(c.segmentEnd+1)),{processedSegment:!0,newSegmentIndex:c.segmentIndex,break:!0}};return ii(t,0,0,i,o),i.filter((function(t){return""!==t})).map((function(t,e){return r.includes(e)?t:si(t)}))}function ri(t,e,n,r){var i,o=1;return ii(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}function ii(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 oi(t){return Object.keys(t).reduce((function(e,n){return e[n]=ai(t[n]),e}),{})}function si(t){return"string"!=typeof t?t:t.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#039;/g,"'").replace(/&amp;/g,"&")}function ai(t){return"string"==typeof t||t instanceof String?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"):Array.isArray(t)?t.map(ai):t}function ui(t,e,n){return"<".concat(t,">").concat(si(n),"</").concat(t,">")}var li=function(t){Or()(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=jr()(e);if(n){var i=jr()(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return Mr()(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 _r()(this,i),(e=r.call(this,t,n)).richHandler=o||ui,e}return Br()(i,[{key:"rich",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=oi(e),r=Ur(this.process(t,n)),i=Math.random().toString(36)+Math.random().toString(36)+Math.random().toString(36),o=Object.fromEntries(Object.entries(e).map((function(t){var e=Tr()(t,2),n=e[0];return e[1],[n,i]}))),s=Ur(this.process(t,o)),a=ni(s,o,(function(){return i})),u=a.map((function(t,e){return t===i?null:e})).filter((function(t){return null!==t}));return ni(r,n,this.richHandler,u)}}]),i}(function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_r()(this,t),Hr()(this,"format",qr((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ur(n.process(t,e)).join("")}))),this.locale=e,this.typeHandlers=r}return Br()(t,[{key:"process",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)return[];var n=t.indexOf("{");if(-1!==n){var r=Vr(t,n);if(-1===r)throw new Error('Unbalanced curly braces in string: "'.concat(t,'"'));var i=t.substring(n,r+1);if(i){var o=[],s=t.substring(0,n);s&&o.push(s);var a=Wr(i),u=Tr()(a,3),l=u[0],c=u[1],d=u[2],h=e[l];null==h&&(h="");var f=c&&this.typeHandlers[c];o.push(f?f(h,d,this.locale,e,this.process.bind(this)):h);var p=t.substring(r+1);return p&&o.push(this.process(p,e)),o}}return[t]}}]),t}());function ci(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 di(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ci(Object(n),!0).forEach((function(e){Hr()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ci(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function hi(t,e,n){var r=e[t]||m(t),i=si(m.fragment(n).children);return di(di({},r),{},{children:i})}var fi=function(){function t(){this.translations={},this.formatter=new li(null,this.formatterTypeHandlers(),hi)}var e=t.prototype;return e.setLocale=function(t){this.formatter.locale=t},e.getLocale=function(){return this.formatter.locale},e.addTranslations=function(t){Object.assign(this.translations,t)},e.formatterTypeHandlers=function(){return{plural:Zr,select:ei}},e.preprocessParameters=function(t){if("user"in t){var e=z(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 pi(t){return Array.isArray(t.data)}var mi=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=Ee(ke().mark((function t(e,n,r,i){var o,s,a=this;return ke().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return void 0===r&&(r={}),void 0===i&&(i={}),o=r,s=v.forum.attribute("apiUrl")+"/"+e,n instanceof Array?s+="?filter[id]="+n.join(","):"object"==typeof n?o=n:n&&(s+="/"+n),t.abrupt("return",v.request(D({method:"GET",url:s,params:o},i)).then((function(t){return pi(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}(),vi=function(){function t(t,e){this.user=void 0,this.csrfToken=void 0,this.user=t,this.csrfToken=e}var e=t.prototype;return e.login=function(t,e){return void 0===e&&(e={}),v.request(D({method:"POST",url:v.forum.attribute("baseUrl")+"/login",body:t},e))},e.logout=function(){window.location.href=v.forum.attribute("baseUrl")+"/logout?token="+this.csrfToken},t}(),gi=function(){function t(){var t=this;this.focusTrap=void 0,this.appElement=void 0,this.resizeHandler=function(e){!e.matches&&t.isOpen()&&t.hide()}.bind(this),this.drawerAvailableMediaQuery=void 0,document.getElementById("content").addEventListener("click",(function(e){t.isOpen()&&(e.preventDefault(),t.hide())})),this.appElement=document.getElementById("app"),this.focusTrap=dr("#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 yi(t,e){void 0===e&&(e="");var n={};for(var r in t){var i=t[r];if("resolver"in i)n[e+i.path]=i.resolver;else{if(!("component"in i))throw new Error("Either a resolver or a component must be provided for the route ["+r+"]");var o="resolverClass"in i?i.resolverClass:kn;n[e+i.path]=new o(i.component,r)}}return n}var bi=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 wi(){$("[data-humantime]").each((function(){var t=$(this),e=st(t.attr("datetime"));t.html(e)}))}function Di(){setInterval(wi,1e4)}function xi(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 Ci(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 Ai=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.apiEndpoint=function(){return"/"},e}(fe),Ei=n(2898),Ni=n.n(Ei);function ki(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 Si=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}w(e,t);var n=e.prototype;return n.username=function(){return fe.attribute("username").call(this)},n.slug=function(){return fe.attribute("slug").call(this)},n.displayName=function(){return fe.attribute("displayName").call(this)},n.email=function(){return fe.attribute("email").call(this)},n.isEmailConfirmed=function(){return fe.attribute("isEmailConfirmed").call(this)},n.password=function(){return fe.attribute("password").call(this)},n.avatarUrl=function(){return fe.attribute("avatarUrl").call(this)},n.preferences=function(){return fe.attribute("preferences").call(this)},n.groups=function(){return fe.hasMany("groups").call(this)},n.isAdmin=function(){return fe.attribute("isAdmin").call(this)},n.joinTime=function(){return fe.attribute("joinTime",fe.transformDate).call(this)},n.lastSeenAt=function(){return fe.attribute("lastSeenAt",fe.transformDate).call(this)},n.markedAllAsReadAt=function(){return fe.attribute("markedAllAsReadAt",fe.transformDate).call(this)},n.unreadNotificationCount=function(){return fe.attribute("unreadNotificationCount").call(this)},n.newNotificationCount=function(){return fe.attribute("newNotificationCount").call(this)},n.discussionCount=function(){return fe.attribute("discussionCount").call(this)},n.commentCount=function(){return fe.attribute("commentCount").call(this)},n.canEdit=function(){return fe.attribute("canEdit").call(this)},n.canEditCredentials=function(){return fe.attribute("canEditCredentials").call(this)},n.canEditGroups=function(){return fe.attribute("canEditGroups").call(this)},n.canDelete=function(){return fe.attribute("canDelete").call(this)},n.color=function(){var t=this;return pe("displayName","avatarUrl","avatarColor",(function(e,n,r){return r?"rgb("+r.join(", ")+")":n?(t.calculateAvatarColor(),""):"#"+ki(e)})).call(this)},n.isOnline=function(){return dayjs().subtract(5,"minutes").isBefore(this.lastSeenAt())},n.badges=function(){var t=new B,e=this.groups();return e&&e.forEach((function(e){t.add("group"+(null==e?void 0:e.id()),m(qe,{group:e}))})),t},n.calculateAvatarColor=function(){var t,e=new Image,n=this;e.addEventListener("load",(function(){try{var t=new(Ni());n.avatarColor=t.getColor(this)}catch(t){if(!(t instanceof TypeError))throw t;n.avatarColor=[255,255,255]}n.freshness=new Date,m.redraw()})),e.crossOrigin="anonymous",e.src=null!=(t=this.avatarUrl())?t:""},n.savePreferences=function(t){var e=this.preferences();return Object.assign(null!=e?e:{},t),this.save({preferences:e})},e}(fe),Ti=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.number=function(){return fe.attribute("number").call(this)},n.discussion=function(){return fe.hasOne("discussion").call(this)},n.createdAt=function(){return fe.attribute("createdAt",fe.transformDate).call(this)},n.user=function(){return fe.hasOne("user").call(this)},n.contentType=function(){return fe.attribute("contentType").call(this)},n.content=function(){return fe.attribute("content").call(this)},n.contentHtml=function(){return fe.attribute("contentHtml").call(this)},n.renderFailed=function(){return fe.attribute("renderFailed").call(this)},n.contentPlain=function(){return pe("contentHtml",(function(t){return"string"==typeof t?J(t):t})).call(this)},n.editedAt=function(){return fe.attribute("editedAt",fe.transformDate).call(this)},n.editedUser=function(){return fe.hasOne("editedUser").call(this)},n.isEdited=function(){return pe("editedAt",(function(t){return!!t})).call(this)},n.hiddenAt=function(){return fe.attribute("hiddenAt",fe.transformDate).call(this)},n.hiddenUser=function(){return fe.hasOne("hiddenUser").call(this)},n.isHidden=function(){return pe("hiddenAt",(function(t){return!!t})).call(this)},n.canEdit=function(){return fe.attribute("canEdit").call(this)},n.canHide=function(){return fe.attribute("canHide").call(this)},n.canDelete=function(){return fe.attribute("canDelete").call(this)},e}(fe),Fi=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.contentType=function(){return fe.attribute("contentType").call(this)},n.content=function(){return fe.attribute("content").call(this)},n.createdAt=function(){return fe.attribute("createdAt",fe.transformDate).call(this)},n.isRead=function(){return fe.attribute("isRead").call(this)},n.user=function(){return fe.hasOne("user").call(this)},n.fromUser=function(){return fe.hasOne("fromUser").call(this)},n.subject=function(){return fe.hasOne("subject").call(this)},e}(fe),_i=function(){function t(){this.modal=null,this.modalList=[],this.backdropShown=!1,this.key=0}var e=t.prototype;return e.show=function(t,e,n){var r=this;if(void 0===e&&(e={}),void 0===n&&(n=!1),!(t.prototype instanceof _t)){var i="The ModalManager can only show Modals.";throw console.error(i),new Error(i)}this.backdropShown=!0,m.redraw.sync(),requestAnimationFrame((function(){r.modal={componentClass:t,attrs:e,key:r.key++},n?r.modalList.push(r.modal):r.modalList=[r.modal],m.redraw()}))},e.close=function(){this.modal&&(this.modalList.length>1?(this.modalList.pop(),this.modal=this.modalList[this.modalList.length-1]):(this.modal=null,this.modalList=[]),m.redraw())},e.isModalOpen=function(){return!!this.modal},t}(),Pi=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=Ft,o={};return 1==arguments.length?r=t:2==arguments.length?(o=t,r=e):3==arguments.length&&(i=t,o=e,r=n),this.activeAlerts[++this.alertId]={children:r,attrs:o,componentClass:i},m.redraw(),this.alertId},e.dismiss=function(t){t&&t in this.activeAlerts&&(delete this.activeAlerts[t],m.redraw())},e.clear=function(){this.activeAlerts={},m.redraw()},t}();function Bi(t,e,n){var r,i;console.group("%c"+e,"background-color: #d83e3e; color: #ffffff; font-weight: bold;"),console.error(n),console.groupEnd(),null!=(r=v.session)&&null!=(i=r.user)&&i.isAdmin()&&v.alerts.show({type:"error"},""+t)}var Ii=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.token=function(){return fe.attribute("token").call(this)},n.userId=function(){return fe.attribute("userId").call(this)},n.title=function(){return fe.attribute("title").call(this)},n.type=function(){return fe.attribute("type").call(this)},n.createdAt=function(){return fe.attribute("createdAt",fe.transformDate).call(this)},n.lastActivityAt=function(){return fe.attribute("lastActivityAt",fe.transformDate).call(this)},n.lastIpAddress=function(){return fe.attribute("lastIpAddress").call(this)},n.device=function(){return fe.attribute("device").call(this)},n.isCurrent=function(){return fe.attribute("isCurrent").call(this)},n.isSessionToken=function(){return fe.attribute("isSessionToken").call(this)},e}(fe),Oi=["background","deserialize","extract","modifyText"];function Li(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 Mi=function(){function t(){this.forum=void 0,this.routes={},this.initializers=new B,this.session=void 0,this.translator=new fi,this.store=new mi({"access-tokens":Ii,forums:Ai,users:Si,discussions:we,posts:Ti,groups:ze,notifications:Fi}),this.cache={},this.booted=!1,this.current=new k(null),this.previous=new k(null),this.modal=new _i,this.alerts=new Pi,this.drawer=void 0,this.history=null,this.pane=null,this.data=void 0,this.refs={fontawesome:"https://fontawesome.com/v5/search?o=r&m=free"},this._title="",this._titleCount=0,this.requestErrorAlert=null,this.initialRoute=void 0}var e=t.prototype;return e.load=function(t){this.data=t,this.translator.setLocale(t.locale)},e.boot=function(){var t,e=this,n=[];this.initializers.toArray().forEach((function(t){try{t(e)}catch(e){var r=t.itemName.includes("/")?t.itemName.replace(/(\/flarum-ext-)|(\/flarum-)/g,"-"):t.itemName;n.push((function(){return Bi(ot(v.translator.trans("core.lib.error.extension_initialiation_failed_message",{extension:r})),r+" failed to initialize",e)}))}})),this.store.pushPayload({data:this.data.resources}),this.forum=this.store.getById("forums","1"),this.session=new vi(null!=(t=this.store.getById("users",String(this.data.session.userId)))?t:null,this.data.session.csrfToken),this.mount(),this.initialRoute=window.location.href,n.forEach((function(t){return t()}))},e.bootExtensions=function(t){var e=this;Object.keys(t).forEach((function(n){var r=t[n];if(r.extend)for(var i,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Li(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)?Li(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r.extend.flat(1/0));!(i=o()).done;)i.value.extend(e,{name:n,exports:r})}))},e.mount=function(t){var e=this;void 0===t&&(t=""),m.mount(document.getElementById("modal"),{view:function(){return m(Er,{state:e.modal})}}),m.mount(document.getElementById("alerts"),{view:function(){return m(Nr,{state:e.alerts})}}),this.drawer=new gi,m.route(document.getElementById("content"),t+"/",yi(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"),Di()},e.preloadedApiDocument=function(){if(this.data.apiDocument&&window.location.href===this.initialRoute){var t=(pi(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?ot(v.translator.trans("core.lib.meta_titles.without_page_title",n)):ot(v.translator.trans("core.lib.meta_titles.with_page_title",n));r=t+r;var i=new DOMParser;document.title=i.parseFromString(r,"text/html").body.innerText},e.transformRequestOptions=function(t){var e=this,n=D({},t),r=n.background,i=n.deserialize,o=n.extract,s=n.modifyText,a=q(n,Oi),u=s||o,l=D({background:null==r||r,deserialize:null!=i?i:function(t){return t}},a);if(xi(l,"config",(function(t,n){n.setRequestHeader("X-CSRF-Token",e.session.csrfToken)})),l.method&&!["GET","POST"].includes(l.method)){var c=l.method;xi(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 bi(n,""+e,l,t);if(t.getResponseHeader){var r=t.getResponseHeader("X-CSRF-Token");r&&(v.session.csrfToken=r)}try{return""===e?null:JSON.parse(e)}catch(n){throw new bi(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=v.translator.trans("core.lib.error.permission_denied_message");break;case 404:case 410:o=v.translator.trans("core.lib.error.not_found_message");break;case 413:o=v.translator.trans("core.lib.error.payload_too_large_message");break;case 429:o=v.translator.trans("core.lib.error.rate_limit_exceeded_message");break;default:o=this.requestWasCrossOrigin(t)?v.translator.trans("core.lib.error.generic_cross_origin_message"):v.translator.trans("core.lib.error.generic_message")}var a=v.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)},v.translator.trans("core.lib.debug_button"))]},e?e(t):this.requestErrorDefaultHandler(t,a,s),Promise.reject(t)},e.requestWasCrossOrigin=function(t){return new URL(t.options.url,document.baseURI).origin!==window.location.origin},e.requestErrorDefaultHandler=function(t,e,n){if(!(t instanceof bi))throw t;if(e&&t.xhr){var r,i=t.options,o=i.method,s=i.url,a=t.xhr.status,u=void 0===a?"":a;console.group(o+" "+s+" "+u),n.length?(r=console).error.apply(r,n):console.error(t),console.groupEnd()}t.alert&&(this.requestErrorAlert=this.alerts.show(t.alert,t.alert.content))},e.showDebug=function(t,e){null!==this.requestErrorAlert&&this.alerts.dismiss(this.requestErrorAlert),this.modal.show(kr,{error:t,formattedError:e})},e.route=function(t,e){void 0===e&&(e={});var n=this.routes[t];if(!n)throw new Error("Route '"+t+"' does not exist");var r=n.path.replace(/:([^\/]+)/g,(function(t,n){return""+z(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:"")},F(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}(),$i=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){var t=v.history,e=v.pane;return m("div",{className:M("Navigation ButtonGroup",this.attrs.className),onmouseenter:e&&e.show.bind(e),onmouseleave:e&&e.onmouseleave.bind(e)},null!=t&&t.canGoBack()?[this.getBackButton(),this.getPaneButton()]:this.getDrawerButton())},n.getBackButton=function(){var t=v.history,e=null==t?void 0:t.getPrevious();return m(le,{className:"Button Navigation-back Button--icon",href:null==t?void 0:t.backUrl(),icon:"fas fa-chevron-left","aria-label":null==e?void 0:e.title,onclick:function(e){e.shiftKey||e.ctrlKey||e.metaKey||2===e.which||(e.preventDefault(),null==t||t.back())}})},n.getPaneButton=function(){var t=v.pane;return t&&t.active?m(yt,{className:M("Button Button--icon Navigation-pin",{active:t.pinned}),onclick:t.togglePinned.bind(t),icon:"fas fa-thumbtack"}):null},n.getDrawerButton=function(){if(!this.attrs.drawer)return null;var t=v.drawer,e=v.session.user;return m(yt,{className:M("Button Button--icon Navigation-drawer",{new:null==e?void 0:e.newNotificationCount()}),onclick:function(e){e.stopPropagation(),t.show()},icon:"fas fa-bars","aria-label":v.translator.trans("core.lib.nav.drawer_button")})},e}(E),ji=function(t){function e(){return t.call(this,{},1,20)||this}w(e,t);var n=e.prototype;return n.load=function(){var e,n;return null!=(e=Wi.session.user)&&e.newNotificationCount()&&(this.pages=[],this.location={page:1}),this.pages.length>0?Promise.resolve():(null==(n=Wi.session.user)||n.pushAttributes({newNotificationCount:0}),t.prototype.loadNext.call(this))},n.markAllAsRead=function(){var t;if(0!==this.pages.length)return null==(t=Wi.session.user)||t.pushAttributes({unreadNotificationCount:0}),this.pages.forEach((function(t){t.items.forEach((function(t){return t.pushAttributes({isRead:!0})}))})),Wi.request({url:Wi.forum.attribute("apiUrl")+"/notifications/read",method:"POST"})},n.deleteAll=function(){var t;if(0!==this.pages.length)return null==(t=Wi.session.user)||t.pushAttributes({unreadNotificationCount:0}),this.pages=[],Wi.request({url:Wi.forum.attribute("apiUrl")+"/notifications",method:"DELETE"})},F(e,[{key:"type",get:function(){return"notifications"}}]),e}(hn),Ri=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}(),Hi=["q"],Ui=function(t){function e(e){var n;return void 0===e&&(e=[]),(n=t.call(this,e)||this).initialValueSet=!1,n}w(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 Wi.current.type&&Wi.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,q(t,Hi));x(Wi.route(Wi.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(Wi.discussions.sortMap())[0]?delete e.sort:e.sort=t,x(Wi.route(Wi.current.get("routeName"),e))},e}(Ri);function qi(){return"ontouchstart"in window&&null!=navigator.vendor&&navigator.vendor.includes("Apple")&&null!=navigator.userAgent&&!navigator.userAgent.includes("CriOS")&&!navigator.userAgent.includes("FxiOS")}var zi=function(t){function e(){var e;return(e=t.call(this)||this).notificationComponents={discussionRenamed:$e},e.postComponents={comment:rn,discussionRenamed:sn},e.pane=null,e.history=new C,e.notifications=new ji,e.search=new Ui,e.composer=new Oe,e.discussions=new vn({}),e.route=void 0,e.data=void 0,In(y(e)),e.route=Object.assign(Object.getPrototypeOf(Object.getPrototypeOf(y(e))).route.bind(y(e)),function(t){return{discussion:function(t){function e(e,n){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(e,n){return t.route(n&&1!==n?"discussion.near":"discussion",{id:e.slug(),near:n&&1!==n?n:void 0})})),post:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(e){return t.route.discussion(e.discussion(),e.number())})),user:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(e){return t.route("user",{username:e.slug()})}))}}(y(e))),e}w(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,ot(this.translator.trans("core.forum.header.back_to_index_tooltip")),"/"),this.pane=new A(document.getElementById("app")),m.route.prefix="",t.prototype.mount.call(this,this.forum.attribute("basePath")),m.mount(document.getElementById("app-navigation"),{view:function(){return m($i,{className:"App-backControl",drawer:!0})}}),m.mount(document.getElementById("header-navigation"),$i),m.mount(document.getElementById("header-primary"),ue),m.mount(document.getElementById("header-secondary"),Pe),m.mount(document.getElementById("composer"),{view:function(){return m(Le,{state:e.composer})}}),On(this),document.getElementById("home-link").addEventListener("click",(function(t){var e;if(!t.ctrlKey&&!t.metaKey&&1!==t.button){t.preventDefault(),Wi.history.home();var n=null==(e=Wi.session.user)?void 0:e.id();n&&(Wi.store.find("users",n),m.redraw())}})),qi()&&$((function(){$(".App").addClass("mobile-safari")}))},n.viewingDiscussion=function(t){return this.current.matches(ae,{discussion:t})},n.authenticationComplete=function(t){t.loggedIn?window.location.reload():this.modal.show(Lt,t)},e}(Mi),Vi=new zi;window.app=Vi;const Wi=Vi;function Gi(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 Yi=function(){function t(t){this.model=void 0,this.callbacks=[],this.model=t}var e=t.prototype;return e.attribute=function(t,e){var n=this;return void 0===e&&(e=null),this.callbacks.push((function(){n.model.prototype[t]=e?fe.attribute(t,e):fe.attribute(t)})),this},e.hasOne=function(t){var e=this;return this.callbacks.push((function(){e.model.prototype[t]=fe.hasOne(t)})),this},e.hasMany=function(t){var e=this;return this.callbacks.push((function(){e.model.prototype[t]=fe.hasMany(t)})),this},e.extend=function(t,e){for(var n,r=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Gi(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)?Gi(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.callbacks);!(n=r()).done;)n.value.call(this)},t}(),Ki=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}(),Xi=function(){function t(){this.routes={},this.helpers={}}var e=t.prototype;return e.add=function(t,e,n){return this.routes[t]={path:e,component:n},this},e.helper=function(t,e){return this.helpers[t]=e,this},e.extend=function(t,e){Object.assign(t.routes,this.routes),Object.assign(t.route,this.helpers)},t}(),Ji=function(){function t(){this.models={}}var e=t.prototype;return e.add=function(t,e){return this.models[t]=e,this},e.extend=function(t,e){for(var n in this.models){if(t.store.models[n])throw new Error('The model type "'+n+'" has already been registered with the class "'+t.store.models[n].name+'".');t.store.models[n]=this.models[n]}},t}();const Qi={Model:Yi,PostTypes:Ki,Routes:Xi,Store:Ji};var Zi="The `evented` util is deprecated and no longer supported.",to="2547";const eo={handlers:null,getHandlers:function(t){return vt(Zi,to),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(Zi,to),this.getHandlers(t).forEach((function(t){return t.apply(e,r)}))},on:function(t,e){vt(Zi,to),this.getHandlers(t).push(e)},one:function(t,e){vt(Zi,to),this.getHandlers(t).push((function n(){e.apply(this,arguments),this.off(t,n)}))},off:function(t,e){vt(Zi,to);var n=this.getHandlers(t),r=n.indexOf(e);-1!==r&&n.splice(r,1)}};var no={prefix:"",suffix:"",blockPrefix:"",blockSuffix:"",multiline:!1,replaceNext:"",prefixSpace:!1,scanFor:"",surroundWithNewlines:!1,orderedList:!1,unorderedList:!1,trimFirst:!1};function ro(t){return t.trim().split("\n").length>1}function io(t,e){return Array(e+1).join(t)}function oo(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=io("\n",2-a)),i.match(/\S/)&&u<2&&(n=io("\n",2-u)),null==e&&(e=""),null==n&&(n=""),{newlinesToAppend:e,newlinesToPrepend:n}}function so(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 ao(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 uo(t,e){return e?"- ":t+1+". "}var lo,co=n(8492);function ho(t,e){var n,r,i=new RegExp(String.raw(lo||(n=["(w+/)?(","|common)/"],(r=["(\\w+\\/)?(","|common)\\/"])||(r=n.slice(0)),n.raw=r,lo=n),e)),o=/(\.js|\.tsx?)$/;return new Proxy(t,{get:function(t,e){return t[e]||t[e.replace(i,"$1").replace(o,"")]}})}var fo=["className","class"],po=["options","onchange","value","disabled","className","class","wrapperAttrs"],mo=function(t){function e(){return t.apply(this,arguments)||this}return w(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=q(a,fo),d=q(t,po);return m("span",Object.assign({className:M("Select",u,l)},c),m("select",Object.assign({className:M("Select-input FormControl",o,s),onchange:n?yn("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}(E),vo=["className","id"],go=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(t){var e=this.attrs,n=e.className,r=e.id,i=q(e,vo);return i.type||(i.type="text"),4===i.value.length&&(i.value=i.value.replace(/#([a-f0-9])([a-f0-9])([a-f0-9])/,"#$1$1$2$2$3$3")),m("div",{className:"ColorInput"},m("input",Object.assign({className:M("FormControl",n),id:r},i)),m("span",{className:"ColorInput-icon",role:"presentation"},nt("fas fa-exclamation-circle")),m("input",Object.assign({className:"ColorInput-preview"},i,{type:"color"})))},e}(E),yo=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.prototype.view=function(e){var n=t.prototype.view.call(this,e);return m(Et,{text:this.attrs.tooltipText||ot(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 bo={extenders:Qi,extend:o,Session:vi,Store:mi,"utils/BasicEditorDriver":Ct,"utils/bidi":h,"utils/evented":eo,"utils/EventEmitter":fn,"utils/KeyboardNavigatable":Ce,"utils/liveHumanTimes":Di,"utils/ItemList":B,"utils/mixin":function(t){for(var e=function(t){function e(){return t.apply(this,arguments)||this}return w(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":st,"utils/computed":pe,"utils/insertText":xt,"utils/styleSelectedText":function(t,e){t.focus(),e=Object.assign({},no,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=ao((r=so(e)).text)).text:(n=so((r=ao(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""+uo(n,e.unorderedList)+t})),d=c.reduce((function(t,n,r){return t+uo(r,e.unorderedList).length}),0),h=c.reduce((function(t,n,r){return t+uo(r,!e.unorderedList).length}),0);if(a.processed)return n?i=r=Math.max(r-uo(0,e.unorderedList).length,0):(r=t.selectionStart,i=t.selectionEnd-d),{text:l,selectionStart:r,selectionEnd:i};var f=oo(t),p=f.newlinesToAppend,m=f.newlinesToPrepend,v=p+c.join("\n")+m;return n?i=r=Math.max(r+uo(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&&ro(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=oo(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=ro(h)&&i.length>0?i+"\n":n,p=ro(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=oo(t);f=b.newlinesToAppend+n,p+=b.newlinesToPrepend}if(h.startsWith(f)&&h.endsWith(p)){var w=h.slice(f.length,h.length-p.length);if(c===d){var D=c-f.length;D=Math.max(D,v),v=g=D=Math.min(D,v+w.length)}else g=v+w.length;return{text:w,selectionStart:v,selectionEnd:g}}if(y)return u.length>0&&h.match(u)?{text:f+(p=p.replace(s,h)),selectionStart:v=g=v+f.length,selectionEnd:g}:{text:f+h+p,selectionStart:v=v+f.length+h.length+p.indexOf(s),selectionEnd:g=v+s.length};var x=f+h+p;v=c+f.length,g=d+f.length;var C=h.match(/^\s*|\s*$/g);if(e.trimFirst&&C){var A=C[0]||"",E=C[1]||"";x=A+f+h.trim()+p+E,v+=A.length,g-=E.length}return{text:x,selectionStart:v,selectionEnd:g}}(t,e),xt(t,n)},"utils/Drawer":gi,"utils/EditorDriverInterface":co,"utils/anchorScroll":oe,"utils/RequestError":bi,"utils/abbreviateNumber":at,"utils/string":t,"utils/SubtreeRetainer":dt,"utils/escapeRegExp":Ut,"utils/extract":z,"utils/ScrollListener":Yt,"utils/stringToColor":ki,"utils/Stream":Bt,"utils/subclassOf":N,"utils/setRouteWithForcedRefresh":x,"utils/patchMithril":f,"utils/proxifyCompat":ho,"utils/classList":M,"utils/extractText":ot,"utils/formatNumber":te,"utils/mapRoutes":yi,"utils/withAttr":yn,"utils/throttleDebounce":s,"utils/isObject":_,"utils/focusTrap":i,"utils/isDark":me,"models/AccessToken":Ii,"models/Notification":Fi,"models/User":Si,"models/Post":Ti,"models/Discussion":we,"models/Group":ze,"models/Forum":Ai,Component:E,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:fi,"components/AlertManager":Nr,"components/Page":S,"components/Switch":wn,"components/Badge":be,"components/LoadingIndicator":ft,"components/Placeholder":zt,"components/Separator":O,"components/Dropdown":ut,"components/SplitDropdown":ne,"components/RequestErrorModal":kr,"components/FieldSet":Dn,"components/Select":mo,"components/Navigation":$i,"components/Alert":Ft,"components/Link":G,"components/LinkButton":le,"components/Checkbox":bn,"components/ColorPreviewInput":go,"components/ConfirmDocumentUnload":pt,"components/SelectDropdown":he,"components/ModalManager":Er,"components/Button":yt,"components/Modal":_t,"components/GroupBadge":qe,"components/TextEditor":Nt,"components/TextEditorButton":yo,"components/Tooltip":Et,"components/EditUserModal":Ve,"components/LabelValue":Tn,"components/IPAddress":tn,Model:fe,Application:Mi,"helpers/fullTime":Ze,"helpers/avatar":Y,"helpers/fireApplicationError":Bi,"helpers/fireDebugWarning":e,"helpers/icon":nt,"helpers/humanTime":lt,"helpers/punctuateSeries":function(t){if(2===t.length)return v.translator.trans("core.lib.series.two_text",{first:t[0],second:t[1]});if(t.length>=3){var e=t.slice(1,t.length-1).reduce((function(t,e){return t.concat([e,v.translator.trans("core.lib.series.glue_text")])}),[]).slice(0,-1);return v.translator.trans("core.lib.series.three_text",{first:t[0],second:e,third:t[t.length-1]})}return t},"helpers/highlight":et,"helpers/username":Xt,"helpers/userOnline":Je,"helpers/listItems":H,"helpers/textContrastClass":ve,"resolvers/DefaultResolver":kn,"states/PaginatedListState":hn,"states/AlertManagerState":Pi,"states/ModalManagerState":_i,"states/PageState":k};var wo=function(t){function e(){return t.apply(this,arguments)||this}return w(e,t),e.initAttrs=function(e){e.className=M(e.className,"LogInButton"),e.onclick=function(){var t=$(window);window.open(Wi.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),Do=function(t){function e(){return t.apply(this,arguments)||this}w(e,t);var n=e.prototype;return n.view=function(){var t=this.attrs.post,e=t.user();return m(G,{className:"PostPreview",href:Wi.route.post(t),onclick:this.attrs.onclick},m("span",{className:"PostPreview-content"},Y(e),Xt(e)," ",m("span",{className:"PostPreview-excerpt"},this.excerpt())))},n.content=function(){return"comment"===this.attrs.post.contentType()&&this.attrs.post.contentPlain()},n.excerpt=function(){return this.content()?et(this.content(),this.attrs.highlight,300):""},e}(E);const xo=Object.assign(bo,{"utils/PostControls":He,"utils/KeyboardNavigatable":Ce,"utils/slidable":Rt,"utils/History":C,"utils/DiscussionControls":jt,"utils/alertEmailConfirmation":On,"utils/UserControls":Ye,"utils/Pane":A,"utils/BasicEditorDriver":Ct,"utils/isSafariMobile":qi,"states/ComposerState":Oe,"states/DiscussionListState":vn,"states/GlobalSearchState":Ui,"states/NotificationListState":ji,"states/PostStreamState":se,"states/SearchState":Ri,"states/UserSecurityPageState":Pn,"components/AffixedSidebar":We,"components/DiscussionPage":ae,"components/DiscussionListPane":Gt,"components/LogInModal":Mt,"components/NewAccessTokenModal":_n,"components/ComposerBody":kt,"components/ForgotPasswordModal":It,"components/Notification":Me,"components/LogInButton":wo,"components/DiscussionsUserPage":gn,"components/Composer":Le,"components/SessionDropdown":ce,"components/HeaderPrimary":ue,"components/PostEdited":nn,"components/PostStream":Zt,"components/ChangePasswordModal":Cn,"components/IndexPage":cn,"components/DiscussionRenamedNotification":$e,"components/DiscussionsSearchSource":Te,"components/DiscussionsSearchItem":Se,"components/HeaderSecondary":Pe,"components/ComposerButton":Be,"components/DiscussionList":Vt,"components/ReplyPlaceholder":Qt,"components/AvatarEditor":Ke,"components/Post":Ue,"components/SettingsPage":En,"components/TerminalPost":ct,"components/ChangeEmailModal":An,"components/NotificationsDropdown":xe,"components/UserPage":Ge,"components/PostUser":Qe,"components/UserCard":Xe,"components/UsersSearchSource":Fe,"components/UserSecurityPage":Bn,"components/NotificationGrid":xn,"components/PostPreview":Do,"components/EventPost":on,"components/DiscussionHero":U,"components/PostMeta":en,"components/DiscussionRenamedPost":sn,"components/DiscussionComposer":ln,"components/LogInButtons":Ot,"components/NotificationList":De,"components/WelcomeHero":un,"components/SignUpModal":Lt,"components/CommentPost":rn,"components/ComposerPostPreview":Jt,"components/ReplyComposer":Tt,"components/NotificationsPage":Nn,"components/PostStreamScrubber":ee,"components/EditPostComposer":Re,"components/RenameDiscussionModal":$t,"components/Search":_e,"components/DiscussionListItem":qt,"components/LoadingPost":Kt,"components/PostsUserPage":dn,"components/AccessTokensList":Fn,"resolvers/DiscussionPageResolver":Sn,routes:In,ForumApplication:zi});xo.app=Wi;var Co=ho(xo,"forum")})(),flarum.core=r})();
 //# sourceMappingURL=forum.js.map
\ No newline at end of file
diff --git a/framework/core/js/dist/forum.js.map b/framework/core/js/dist/forum.js.map
index 66f847badb..f66a472a71 100644
--- a/framework/core/js/dist/forum.js.map
+++ b/framework/core/js/dist/forum.js.map
@@ -1 +1 @@
-{"version":3,"file":"forum.js","mappings":";mCAOKA,MAAMC,UAAgB,OACzBD,MAAMC,UAAgB,KAAI,SAASC,EAAuCC,GAExE,OAAa,MAALA,EAAAA,EAAS,GAAK,EAElBH,MAAMC,UAAUG,OAAOC,KAAKC,MAAM,SAACC,EAAKC,GAAG,OAAYD,EAAIE,OAAOT,MAAMU,QAAQF,GAAON,EAAKG,KAAKG,EAAKL,EAAQ,GAAKK,EAAI,GAAE,IAGzH,UACIF,KACV,eCRD,SAAUK,GACT,aAKA,IAAIC,EAAQ,SAARA,EAAkBC,EAASC,GAC7BR,KAAKQ,QAAUH,EAAEI,OAAO,CAAC,EAAGH,EAAMI,SAAUF,GAE5C,IAAIG,EAASX,KAAKQ,QAAQG,SAAWL,EAAMI,SAASC,OAASN,EAAEL,KAAKQ,QAAQG,QAAUN,EAAEO,UAAUC,KAAKb,KAAKQ,QAAQG,QAEpHX,KAAKc,QAAUH,EACZI,GAAG,2BAA4BV,EAAEW,MAAMhB,KAAKiB,cAAejB,OAC3De,GAAG,0BAA4BV,EAAEW,MAAMhB,KAAKkB,2BAA4BlB,OAE3EA,KAAKmB,SAAed,EAAEE,GACtBP,KAAKoB,QAAe,KACpBpB,KAAKqB,MAAe,KACpBrB,KAAKsB,aAAe,KAEpBtB,KAAKiB,eACP,EA0FA,SAASM,EAAOC,GACd,OAAOxB,KAAKyB,MAAK,WACf,IAAIC,EAAUrB,EAAEL,MACZ2B,EAAUD,EAAMC,KAAK,YACrBnB,EAA2B,iBAAVgB,GAAsBA,EAEtCG,GAAMD,EAAMC,KAAK,WAAaA,EAAO,IAAIrB,EAAMN,KAAMQ,IACrC,iB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BoK,GACvB,sBAAuBiC,GACvB,sBAAuBhC,GACvB,+BAAgC7F,GAChC,8BAA+BwS,GAC/B,8BAA+BpE,GAC/B,yBAA0BmmB,GAC1B,uBAAwB5qB,GACxB,4BAA6B7vB,EAC7B,sBAAuBwuB,GACvB,mCAAoCyB,GACpC,gCAAiCM,GACjC,0BAA2BvkB,GAC3B,8BAA+ByU,GAC/B,yBAA0B6P,GAC1B,yBAA0BrkB,GAC1B,yBAA0BkjB,GAC1B,iCAAkCrb,GAClC,2BAA4B/J,GAC5B,+BAAgC4rB,GAChC,gCAAiCzd,GACjC,8BAA+B6R,GAC/B,mCAAoC3c,GACpC,oBAAqBiX,GACrB,gCAAiCzU,GACjC,yBAA0BiE,GAC1B,2BAA4B2d,GAC5B,8BAA+B4E,GAC/B,mCAAoCJ,GACpClzC,OAAQA,GACR6wD,iBAAkBA,KCnJpB+G,GAAAA,IAAgBn/C,GAET,IAAMq7C,GAASD,GAAc+D,GAAW","sources":["webpack://@flarum/core/./src/common/utils/arrayFlatPolyfill.ts","webpack://@flarum/core/../../../node_modules/bootstrap/js/affix.js","webpack://@flarum/core/../../../node_modules/bootstrap/js/dropdown.js","webpack://@flarum/core/../../../node_modules/bootstrap/js/tooltip.js","webpack://@flarum/core/../../../node_modules/bootstrap/js/transition.js","webpack://@flarum/core/../../../node_modules/color-thief-browser/dist/color-thief.min.js","webpack://@flarum/core/../../../node_modules/dayjs/dayjs.min.js","webpack://@flarum/core/../../../node_modules/dayjs/plugin/localizedFormat.js","webpack://@flarum/core/../../../node_modules/dayjs/plugin/relativeTime.js","webpack://@flarum/core/../../../node_modules/expose-loader/dist/runtime/getGlobalThis.js","webpack://@flarum/core/../../../node_modules/jquery.hotkeys/jquery.hotkeys.js","webpack://@flarum/core/../../../node_modules/jquery/dist/jquery.js","webpack://@flarum/core/../../../node_modules/mithril/api/mount-redraw.js","webpack://@flarum/core/../../../node_modules/mithril/api/router.js","webpack://@flarum/core/../../../node_modules/mithril/hyperscript.js","webpack://@flarum/core/../../../node_modules/mithril/index.js","webpack://@flarum/core/../../../node_modules/mithril/mount-redraw.js","webpack://@flarum/core/../../../node_modules/mithril/pathname/assign.js","webpack://@flarum/core/../../../node_modules/mithril/pathname/build.js","webpack://@flarum/core/../../../node_modules/mithril/pathname/compileTemplate.js","webpack://@flarum/core/../../../node_modules/mithril/pathname/parse.js","webpack://@flarum/core/../../../node_modules/mithril/promise/polyfill.js","webpack://@flarum/core/../../../node_modules/mithril/promise/promise.js","webpack://@flarum/core/../../../node_modules/mithril/querystring/build.js","webpack://@flarum/core/../../../node_modules/mithril/querystring/parse.js","webpack://@flarum/core/../../../node_modules/mithril/render.js","webpack://@flarum/core/../../../node_modules/mithril/render/fragment.js","webpack://@flarum/core/../../../node_modules/mithril/render/hyperscript.js","webpack://@flarum/core/../../../node_modules/mithril/render/hyperscriptVnode.js","webpack://@flarum/core/../../../node_modules/mithril/render/render.js","webpack://@flarum/core/../../../node_modules/mithril/render/trust.js","webpack://@flarum/core/../../../node_modules/mithril/render/vnode.js","webpack://@flarum/core/../../../node_modules/mithril/request.js","webpack://@flarum/core/../../../node_modules/mithril/request/request.js","webpack://@flarum/core/../../../node_modules/mithril/route.js","webpack://@flarum/core/../../../node_modules/mithril/stream.js","webpack://@flarum/core/../../../node_modules/mithril/stream/stream.js","webpack://@flarum/core/../../../node_modules/punycode/punycode.es6.js","webpack://@flarum/core/../../../node_modules/textarea-caret/index.js","webpack://@flarum/core/../../../node_modules/jquery/dist/jquery-exposed.js","webpack://@flarum/core/../../../node_modules/color-thief-browser/dist/color-thief.min-exposed.js","webpack://@flarum/core/../../../node_modules/dayjs/dayjs.min-exposed.js","webpack://@flarum/core/../../../node_modules/mithril/index-exposed.js","webpack://@flarum/core/../../../node_modules/punycode/punycode.es6-exposed.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/classCallCheck.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/createClass.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/defineProperty.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/inherits.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/slicedToArray.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/typeof.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/regenerator/index.js","webpack://@flarum/core/webpack/bootstrap","webpack://@flarum/core/webpack/runtime/compat get default export","webpack://@flarum/core/webpack/runtime/define property getters","webpack://@flarum/core/webpack/runtime/global","webpack://@flarum/core/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/core/webpack/runtime/make namespace object","webpack://@flarum/core/./src/common/utils/bidi.js","webpack://@flarum/core/./src/common/utils/patchMithril.js","webpack://@flarum/core/./src/common/app.ts","webpack://@flarum/core/./src/common/index.ts","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/core/./src/common/utils/setRouteWithForcedRefresh.ts","webpack://@flarum/core/./src/forum/utils/History.ts","webpack://@flarum/core/./src/forum/utils/Pane.js","webpack://@flarum/core/./src/common/Component.ts","webpack://@flarum/core/./src/common/utils/subclassOf.js","webpack://@flarum/core/./src/common/states/PageState.js","webpack://@flarum/core/./src/common/components/Page.tsx","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://@flarum/core/./src/common/utils/isObject.ts","webpack://@flarum/core/./src/common/utils/ItemList.ts","webpack://@flarum/core/./src/common/components/Separator.js","webpack://@flarum/core/../../../node_modules/clsx/dist/clsx.m.js","webpack://@flarum/core/./src/common/utils/classList.ts","webpack://@flarum/core/./src/common/helpers/listItems.tsx","webpack://@flarum/core/./src/forum/components/DiscussionHero.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://@flarum/core/./src/common/utils/extract.ts","webpack://@flarum/core/./src/common/utils/string.ts","webpack://@flarum/core/./src/common/components/Link.js","webpack://@flarum/core/./src/common/helpers/avatar.tsx","webpack://@flarum/core/./src/common/helpers/highlight.tsx","webpack://@flarum/core/./src/common/helpers/icon.tsx","webpack://@flarum/core/./src/common/utils/extractText.ts","webpack://@flarum/core/./src/common/utils/humanTime.ts","webpack://@flarum/core/./src/common/utils/abbreviateNumber.ts","webpack://@flarum/core/./src/common/components/Dropdown.tsx","webpack://@flarum/core/./src/common/helpers/humanTime.tsx","webpack://@flarum/core/./src/forum/components/TerminalPost.js","webpack://@flarum/core/./src/common/utils/SubtreeRetainer.ts","webpack://@flarum/core/./src/common/components/LoadingIndicator.tsx","webpack://@flarum/core/./src/common/components/ConfirmDocumentUnload.js","webpack://@flarum/core/./src/common/helpers/fireDebugWarning.ts","webpack://@flarum/core/./src/common/components/Button.tsx","webpack://@flarum/core/./src/common/utils/insertText.ts","webpack://@flarum/core/./src/common/utils/BasicEditorDriver.ts","webpack://@flarum/core/./src/common/components/Tooltip.tsx","webpack://@flarum/core/./src/common/components/TextEditor.js","webpack://@flarum/core/./src/forum/components/ComposerBody.js","webpack://@flarum/core/./src/forum/components/ReplyComposer.js","webpack://@flarum/core/./src/common/components/Alert.tsx","webpack://@flarum/core/./src/common/components/Modal.tsx","webpack://@flarum/core/./src/common/utils/Stream.ts","webpack://@flarum/core/./src/forum/components/ForgotPasswordModal.tsx","webpack://@flarum/core/./src/forum/components/LogInButtons.js","webpack://@flarum/core/./src/forum/components/SignUpModal.tsx","webpack://@flarum/core/./src/forum/components/LogInModal.tsx","webpack://@flarum/core/./src/forum/components/RenameDiscussionModal.tsx","webpack://@flarum/core/./src/forum/utils/DiscussionControls.js","webpack://@flarum/core/./src/forum/utils/slidable.js","webpack://@flarum/core/./src/common/utils/escapeRegExp.ts","webpack://@flarum/core/./src/forum/components/DiscussionListItem.tsx","webpack://@flarum/core/./src/common/components/Placeholder.js","webpack://@flarum/core/./src/forum/components/DiscussionList.js","webpack://@flarum/core/./src/forum/components/DiscussionListPane.js","webpack://@flarum/core/./src/common/utils/ScrollListener.js","webpack://@flarum/core/./src/forum/components/LoadingPost.js","webpack://@flarum/core/./src/common/helpers/username.tsx","webpack://@flarum/core/./src/forum/components/ComposerPostPreview.js","webpack://@flarum/core/./src/forum/components/ReplyPlaceholder.js","webpack://@flarum/core/./src/forum/components/PostStream.js","webpack://@flarum/core/./src/common/utils/formatNumber.ts","webpack://@flarum/core/./src/forum/components/PostStreamScrubber.js","webpack://@flarum/core/./src/common/components/SplitDropdown.tsx","webpack://@flarum/core/../throttle.js","webpack://@flarum/core/../debounce.js","webpack://@flarum/core/./src/common/utils/anchorScroll.js","webpack://@flarum/core/./src/forum/states/PostStreamState.ts","webpack://@flarum/core/./src/forum/components/DiscussionPage.tsx","webpack://@flarum/core/./src/forum/components/HeaderPrimary.js","webpack://@flarum/core/./src/common/components/LinkButton.js","webpack://@flarum/core/./src/forum/components/SessionDropdown.tsx","webpack://@flarum/core/./src/common/components/SelectDropdown.tsx","webpack://@flarum/core/./src/common/Model.ts","webpack://@flarum/core/./src/common/utils/computed.ts","webpack://@flarum/core/./src/common/utils/isDark.ts","webpack://@flarum/core/./src/common/helpers/textContrastClass.ts","webpack://@flarum/core/./src/common/utils/KeyboardNavigatable.ts","webpack://@flarum/core/./src/common/components/Badge.tsx","webpack://@flarum/core/./src/common/models/Discussion.tsx","webpack://@flarum/core/./src/forum/components/NotificationList.js","webpack://@flarum/core/./src/forum/components/NotificationsDropdown.tsx","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@flarum/core/./src/forum/components/DiscussionsSearchItem.tsx","webpack://@flarum/core/./src/forum/components/DiscussionsSearchSource.tsx","webpack://@flarum/core/./src/forum/components/UsersSearchSource.tsx","webpack://@flarum/core/./src/forum/components/Search.tsx","webpack://@flarum/core/./src/forum/components/HeaderSecondary.js","webpack://@flarum/core/./src/forum/components/ComposerButton.js","webpack://@flarum/core/./src/forum/states/ComposerState.js","webpack://@flarum/core/./src/forum/components/Composer.js","webpack://@flarum/core/./src/forum/components/Notification.tsx","webpack://@flarum/core/./src/forum/components/DiscussionRenamedNotification.tsx","webpack://@flarum/core/./src/forum/components/EditPostComposer.js","webpack://@flarum/core/./src/forum/utils/PostControls.js","webpack://@flarum/core/./src/forum/components/Post.tsx","webpack://@flarum/core/./src/common/components/GroupBadge.tsx","webpack://@flarum/core/./src/common/models/Group.ts","webpack://@flarum/core/./src/common/components/EditUserModal.tsx","webpack://@flarum/core/./src/forum/components/AffixedSidebar.js","webpack://@flarum/core/./src/forum/components/UserPage.tsx","webpack://@flarum/core/./src/forum/utils/UserControls.js","webpack://@flarum/core/./src/forum/components/AvatarEditor.js","webpack://@flarum/core/./src/forum/components/UserCard.js","webpack://@flarum/core/./src/common/helpers/userOnline.tsx","webpack://@flarum/core/./src/forum/components/PostUser.js","webpack://@flarum/core/./src/common/helpers/fullTime.tsx","webpack://@flarum/core/./src/common/components/IPAddress.tsx","webpack://@flarum/core/./src/forum/components/PostMeta.js","webpack://@flarum/core/./src/forum/components/PostEdited.js","webpack://@flarum/core/./src/forum/components/CommentPost.js","webpack://@flarum/core/./src/forum/components/EventPost.js","webpack://@flarum/core/./src/forum/components/DiscussionRenamedPost.js","webpack://@flarum/core/./src/forum/components/WelcomeHero.tsx","webpack://@flarum/core/./src/forum/components/DiscussionComposer.js","webpack://@flarum/core/./src/forum/components/IndexPage.tsx","webpack://@flarum/core/./src/forum/components/PostsUserPage.tsx","webpack://@flarum/core/./src/common/states/PaginatedListState.ts","webpack://@flarum/core/./src/common/utils/EventEmitter.ts","webpack://@flarum/core/./src/forum/states/DiscussionListState.ts","webpack://@flarum/core/./src/forum/components/DiscussionsUserPage.tsx","webpack://@flarum/core/./src/common/utils/withAttr.ts","webpack://@flarum/core/./src/common/components/Checkbox.tsx","webpack://@flarum/core/./src/common/components/Switch.tsx","webpack://@flarum/core/./src/common/components/FieldSet.js","webpack://@flarum/core/./src/forum/components/NotificationGrid.js","webpack://@flarum/core/./src/forum/components/ChangePasswordModal.tsx","webpack://@flarum/core/./src/forum/components/ChangeEmailModal.tsx","webpack://@flarum/core/./src/forum/components/SettingsPage.tsx","webpack://@flarum/core/./src/forum/components/NotificationsPage.tsx","webpack://@flarum/core/./src/common/resolvers/DefaultResolver.ts","webpack://@flarum/core/./src/forum/resolvers/DiscussionPageResolver.ts","webpack://@flarum/core/./src/common/components/LabelValue.tsx","webpack://@flarum/core/./src/forum/components/AccessTokensList.tsx","webpack://@flarum/core/./src/forum/components/NewAccessTokenModal.tsx","webpack://@flarum/core/./src/forum/states/UserSecurityPageState.ts","webpack://@flarum/core/./src/forum/components/UserSecurityPage.tsx","webpack://@flarum/core/./src/forum/routes.ts","webpack://@flarum/core/./src/forum/utils/alertEmailConfirmation.js","webpack://@flarum/core/../src/index.js","webpack://@flarum/core/../index.js","webpack://@flarum/core/./src/common/utils/focusTrap.ts","webpack://@flarum/core/../../../node_modules/body-scroll-lock/lib/bodyScrollLock.esm.js","webpack://@flarum/core/../source/pluralTypeHandler.js","webpack://@flarum/core/./src/common/components/ModalManager.tsx","webpack://@flarum/core/./src/common/components/AlertManager.tsx","webpack://@flarum/core/./src/common/components/RequestErrorModal.tsx","webpack://@flarum/core/array-utils.js","webpack://@flarum/core/function-utils.js","webpack://@flarum/core/../source/utilities.js","webpack://@flarum/core/../source/selectTypeHandler.js","webpack://@flarum/core/../source/defaultRichHandler.js","webpack://@flarum/core/../source/RichMessageFormatter.js","webpack://@flarum/core/../source/MessageFormatter.js","webpack://@flarum/core/../source/mithrilRichHandler.js","webpack://@flarum/core/./src/common/Translator.tsx","webpack://@flarum/core/./src/common/Store.ts","webpack://@flarum/core/./src/common/Session.ts","webpack://@flarum/core/./src/common/utils/Drawer.js","webpack://@flarum/core/./src/common/utils/mapRoutes.ts","webpack://@flarum/core/./src/common/utils/RequestError.ts","webpack://@flarum/core/./src/common/utils/liveHumanTimes.ts","webpack://@flarum/core/./src/common/extend.ts","webpack://@flarum/core/./src/common/models/Forum.ts","webpack://@flarum/core/./src/common/utils/stringToColor.ts","webpack://@flarum/core/./src/common/models/User.tsx","webpack://@flarum/core/./src/common/models/Post.ts","webpack://@flarum/core/./src/common/models/Notification.ts","webpack://@flarum/core/./src/common/states/ModalManagerState.ts","webpack://@flarum/core/./src/common/states/AlertManagerState.ts","webpack://@flarum/core/./src/common/helpers/fireApplicationError.ts","webpack://@flarum/core/./src/common/models/AccessToken.ts","webpack://@flarum/core/./src/common/Application.tsx","webpack://@flarum/core/./src/common/components/Navigation.tsx","webpack://@flarum/core/./src/forum/states/NotificationListState.ts","webpack://@flarum/core/./src/forum/states/SearchState.ts","webpack://@flarum/core/./src/forum/states/GlobalSearchState.ts","webpack://@flarum/core/./src/forum/utils/isSafariMobile.ts","webpack://@flarum/core/./src/forum/ForumApplication.tsx","webpack://@flarum/core/./src/forum/app.ts","webpack://@flarum/core/./src/common/extenders/Model.ts","webpack://@flarum/core/./src/common/extenders/PostTypes.ts","webpack://@flarum/core/./src/common/extenders/Routes.ts","webpack://@flarum/core/./src/common/extenders/Store.ts","webpack://@flarum/core/./src/common/extenders/index.ts","webpack://@flarum/core/./src/common/utils/evented.js","webpack://@flarum/core/./src/common/utils/styleSelectedText.ts","webpack://@flarum/core/./src/common/utils/proxifyCompat.ts","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js","webpack://@flarum/core/./src/common/components/Select.js","webpack://@flarum/core/./src/common/components/ColorPreviewInput.tsx","webpack://@flarum/core/./src/common/components/TextEditorButton.js","webpack://@flarum/core/./src/common/compat.ts","webpack://@flarum/core/./src/common/utils/mixin.js","webpack://@flarum/core/./src/common/Fragment.ts","webpack://@flarum/core/./src/common/helpers/punctuateSeries.js","webpack://@flarum/core/./src/forum/components/LogInButton.js","webpack://@flarum/core/./src/forum/components/PostPreview.js","webpack://@flarum/core/./src/forum/compat.ts","webpack://@flarum/core/./src/forum/index.ts"],"sourcesContent":["// Based off of the polyfill on MDN\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat#reduce_concat_isarray_recursivity\n//\n// Needed to provide support for Safari on iOS < 12\n\n// ts-ignored because we can afford to encapsulate some messy logic behind the clean typings.\n\nif (!Array.prototype['flat']) {\n  Array.prototype['flat'] = function flat<A, D extends number = 1>(this: A, depth?: D | unknown): any[] {\n    // @ts-ignore\n    return (depth ?? 1) > 0\n      ? // @ts-ignore\n        Array.prototype.reduce.call(this, (acc, val): any[] => acc.concat(Array.isArray(val) ? flat.call(val, depth - 1) : val), [])\n      : // If no depth is provided, or depth is 0, just return a copy of\n        // the array. Spread is supported in all major browsers (iOS 8+)\n        // @ts-ignore\n        [...this];\n  };\n}\n","/* ========================================================================\n * Bootstrap: affix.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#affix\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // AFFIX CLASS DEFINITION\n  // ======================\n\n  var Affix = function (element, options) {\n    this.options = $.extend({}, Affix.DEFAULTS, options)\n\n    var target = this.options.target === Affix.DEFAULTS.target ? $(this.options.target) : $(document).find(this.options.target)\n\n    this.$target = target\n      .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))\n      .on('click.bs.affix.data-api',  $.proxy(this.checkPositionWithEventLoop, this))\n\n    this.$element     = $(element)\n    this.affixed      = null\n    this.unpin        = null\n    this.pinnedOffset = null\n\n    this.checkPosition()\n  }\n\n  Affix.VERSION  = '3.4.1'\n\n  Affix.RESET    = 'affix affix-top affix-bottom'\n\n  Affix.DEFAULTS = {\n    offset: 0,\n    target: window\n  }\n\n  Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {\n    var scrollTop    = this.$target.scrollTop()\n    var position     = this.$element.offset()\n    var targetHeight = this.$target.height()\n\n    if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false\n\n    if (this.affixed == 'bottom') {\n      if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'\n      return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'\n    }\n\n    var initializing   = this.affixed == null\n    var colliderTop    = initializing ? scrollTop : position.top\n    var colliderHeight = initializing ? targetHeight : height\n\n    if (offsetTop != null && scrollTop <= offsetTop) return 'top'\n    if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'\n\n    return false\n  }\n\n  Affix.prototype.getPinnedOffset = function () {\n    if (this.pinnedOffset) return this.pinnedOffset\n    this.$element.removeClass(Affix.RESET).addClass('affix')\n    var scrollTop = this.$target.scrollTop()\n    var position  = this.$element.offset()\n    return (this.pinnedOffset = position.top - scrollTop)\n  }\n\n  Affix.prototype.checkPositionWithEventLoop = function () {\n    setTimeout($.proxy(this.checkPosition, this), 1)\n  }\n\n  Affix.prototype.checkPosition = function () {\n    if (!this.$element.is(':visible')) return\n\n    var height       = this.$element.height()\n    var offset       = this.options.offset\n    var offsetTop    = offset.top\n    var offsetBottom = offset.bottom\n    var scrollHeight = Math.max($(document).height(), $(document.body).height())\n\n    if (typeof offset != 'object')         offsetBottom = offsetTop = offset\n    if (typeof offsetTop == 'function')    offsetTop    = offset.top(this.$element)\n    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)\n\n    var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)\n\n    if (this.affixed != affix) {\n      if (this.unpin != null) this.$element.css('top', '')\n\n      var affixType = 'affix' + (affix ? '-' + affix : '')\n      var e         = $.Event(affixType + '.bs.affix')\n\n      this.$element.trigger(e)\n\n      if (e.isDefaultPrevented()) return\n\n      this.affixed = affix\n      this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null\n\n      this.$element\n        .removeClass(Affix.RESET)\n        .addClass(affixType)\n        .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')\n    }\n\n    if (affix == 'bottom') {\n      this.$element.offset({\n        top: scrollHeight - height - offsetBottom\n      })\n    }\n  }\n\n\n  // AFFIX PLUGIN DEFINITION\n  // =======================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.affix')\n      var options = typeof option == 'object' && option\n\n      if (!data) $this.data('bs.affix', (data = new Affix(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  var old = $.fn.affix\n\n  $.fn.affix             = Plugin\n  $.fn.affix.Constructor = Affix\n\n\n  // AFFIX NO CONFLICT\n  // =================\n\n  $.fn.affix.noConflict = function () {\n    $.fn.affix = old\n    return this\n  }\n\n\n  // AFFIX DATA-API\n  // ==============\n\n  $(window).on('load', function () {\n    $('[data-spy=\"affix\"]').each(function () {\n      var $spy = $(this)\n      var data = $spy.data()\n\n      data.offset = data.offset || {}\n\n      if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom\n      if (data.offsetTop    != null) data.offset.top    = data.offsetTop\n\n      Plugin.call($spy, data)\n    })\n  })\n\n}(jQuery);\n","/* ========================================================================\n * Bootstrap: dropdown.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#dropdowns\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // DROPDOWN CLASS DEFINITION\n  // =========================\n\n  var backdrop = '.dropdown-backdrop'\n  var toggle   = '[data-toggle=\"dropdown\"]'\n  var Dropdown = function (element) {\n    $(element).on('click.bs.dropdown', this.toggle)\n  }\n\n  Dropdown.VERSION = '3.4.1'\n\n  function getParent($this) {\n    var selector = $this.attr('data-target')\n\n    if (!selector) {\n      selector = $this.attr('href')\n      selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\\s]*$)/, '') // strip for ie7\n    }\n\n    var $parent = selector !== '#' ? $(document).find(selector) : null\n\n    return $parent && $parent.length ? $parent : $this.parent()\n  }\n\n  function clearMenus(e) {\n    if (e && e.which === 3) return\n    $(backdrop).remove()\n    $(toggle).each(function () {\n      var $this         = $(this)\n      var $parent       = getParent($this)\n      var relatedTarget = { relatedTarget: this }\n\n      if (!$parent.hasClass('open')) return\n\n      if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return\n\n      $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))\n\n      if (e.isDefaultPrevented()) return\n\n      $this.attr('aria-expanded', 'false')\n      $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))\n    })\n  }\n\n  Dropdown.prototype.toggle = function (e) {\n    var $this = $(this)\n\n    if ($this.is('.disabled, :disabled')) return\n\n    var $parent  = getParent($this)\n    var isActive = $parent.hasClass('open')\n\n    clearMenus()\n\n    if (!isActive) {\n      if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {\n        // if mobile we use a backdrop because click events don't delegate\n        $(document.createElement('div'))\n          .addClass('dropdown-backdrop')\n          .insertAfter($(this))\n          .on('click', clearMenus)\n      }\n\n      var relatedTarget = { relatedTarget: this }\n      $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))\n\n      if (e.isDefaultPrevented()) return\n\n      $this\n        .trigger('focus')\n        .attr('aria-expanded', 'true')\n\n      $parent\n        .toggleClass('open')\n        .trigger($.Event('shown.bs.dropdown', relatedTarget))\n    }\n\n    return false\n  }\n\n  Dropdown.prototype.keydown = function (e) {\n    if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return\n\n    var $this = $(this)\n\n    e.preventDefault()\n    e.stopPropagation()\n\n    if ($this.is('.disabled, :disabled')) return\n\n    var $parent  = getParent($this)\n    var isActive = $parent.hasClass('open')\n\n    if (!isActive && e.which != 27 || isActive && e.which == 27) {\n      if (e.which == 27) $parent.find(toggle).trigger('focus')\n      return $this.trigger('click')\n    }\n\n    var desc = ' li:not(.disabled):visible a'\n    var $items = $parent.find('.dropdown-menu' + desc)\n\n    if (!$items.length) return\n\n    var index = $items.index(e.target)\n\n    if (e.which == 38 && index > 0)                 index--         // up\n    if (e.which == 40 && index < $items.length - 1) index++         // down\n    if (!~index)                                    index = 0\n\n    $items.eq(index).trigger('focus')\n  }\n\n\n  // DROPDOWN PLUGIN DEFINITION\n  // ==========================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this = $(this)\n      var data  = $this.data('bs.dropdown')\n\n      if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n      if (typeof option == 'string') data[option].call($this)\n    })\n  }\n\n  var old = $.fn.dropdown\n\n  $.fn.dropdown             = Plugin\n  $.fn.dropdown.Constructor = Dropdown\n\n\n  // DROPDOWN NO CONFLICT\n  // ====================\n\n  $.fn.dropdown.noConflict = function () {\n    $.fn.dropdown = old\n    return this\n  }\n\n\n  // APPLY TO STANDARD DROPDOWN ELEMENTS\n  // ===================================\n\n  $(document)\n    .on('click.bs.dropdown.data-api', clearMenus)\n    .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })\n    .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)\n    .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)\n    .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)\n\n}(jQuery);\n","/* ========================================================================\n * Bootstrap: tooltip.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#tooltip\n * Inspired by the original jQuery.tipsy by Jason Frame\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n+function ($) {\n  'use strict';\n\n  var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn']\n\n  var uriAttrs = [\n    'background',\n    'cite',\n    'href',\n    'itemtype',\n    'longdesc',\n    'poster',\n    'src',\n    'xlink:href'\n  ]\n\n  var ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i\n\n  var DefaultWhitelist = {\n    // Global attributes allowed on any supplied element below.\n    '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n    a: ['target', 'href', 'title', 'rel'],\n    area: [],\n    b: [],\n    br: [],\n    col: [],\n    code: [],\n    div: [],\n    em: [],\n    hr: [],\n    h1: [],\n    h2: [],\n    h3: [],\n    h4: [],\n    h5: [],\n    h6: [],\n    i: [],\n    img: ['src', 'alt', 'title', 'width', 'height'],\n    li: [],\n    ol: [],\n    p: [],\n    pre: [],\n    s: [],\n    small: [],\n    span: [],\n    sub: [],\n    sup: [],\n    strong: [],\n    u: [],\n    ul: []\n  }\n\n  /**\n   * A pattern that recognizes a commonly useful subset of URLs that are safe.\n   *\n   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n   */\n  var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi\n\n  /**\n   * A pattern that matches safe data URLs. Only matches image, video and audio types.\n   *\n   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n   */\n  var DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i\n\n  function allowedAttribute(attr, allowedAttributeList) {\n    var attrName = attr.nodeName.toLowerCase()\n\n    if ($.inArray(attrName, allowedAttributeList) !== -1) {\n      if ($.inArray(attrName, uriAttrs) !== -1) {\n        return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN))\n      }\n\n      return true\n    }\n\n    var regExp = $(allowedAttributeList).filter(function (index, value) {\n      return value instanceof RegExp\n    })\n\n    // Check if a regular expression validates the attribute.\n    for (var i = 0, l = regExp.length; i < l; i++) {\n      if (attrName.match(regExp[i])) {\n        return true\n      }\n    }\n\n    return false\n  }\n\n  function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {\n    if (unsafeHtml.length === 0) {\n      return unsafeHtml\n    }\n\n    if (sanitizeFn && typeof sanitizeFn === 'function') {\n      return sanitizeFn(unsafeHtml)\n    }\n\n    // IE 8 and below don't support createHTMLDocument\n    if (!document.implementation || !document.implementation.createHTMLDocument) {\n      return unsafeHtml\n    }\n\n    var createdDocument = document.implementation.createHTMLDocument('sanitization')\n    createdDocument.body.innerHTML = unsafeHtml\n\n    var whitelistKeys = $.map(whiteList, function (el, i) { return i })\n    var elements = $(createdDocument.body).find('*')\n\n    for (var i = 0, len = elements.length; i < len; i++) {\n      var el = elements[i]\n      var elName = el.nodeName.toLowerCase()\n\n      if ($.inArray(elName, whitelistKeys) === -1) {\n        el.parentNode.removeChild(el)\n\n        continue\n      }\n\n      var attributeList = $.map(el.attributes, function (el) { return el })\n      var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || [])\n\n      for (var j = 0, len2 = attributeList.length; j < len2; j++) {\n        if (!allowedAttribute(attributeList[j], whitelistedAttributes)) {\n          el.removeAttribute(attributeList[j].nodeName)\n        }\n      }\n    }\n\n    return createdDocument.body.innerHTML\n  }\n\n  // TOOLTIP PUBLIC CLASS DEFINITION\n  // ===============================\n\n  var Tooltip = function (element, options) {\n    this.type       = null\n    this.options    = null\n    this.enabled    = null\n    this.timeout    = null\n    this.hoverState = null\n    this.$element   = null\n    this.inState    = null\n\n    this.init('tooltip', element, options)\n  }\n\n  Tooltip.VERSION  = '3.4.1'\n\n  Tooltip.TRANSITION_DURATION = 150\n\n  Tooltip.DEFAULTS = {\n    animation: true,\n    placement: 'top',\n    selector: false,\n    template: '<div class=\"tooltip\" role=\"tooltip\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\"></div></div>',\n    trigger: 'hover focus',\n    title: '',\n    delay: 0,\n    html: false,\n    container: false,\n    viewport: {\n      selector: 'body',\n      padding: 0\n    },\n    sanitize : true,\n    sanitizeFn : null,\n    whiteList : DefaultWhitelist\n  }\n\n  Tooltip.prototype.init = function (type, element, options) {\n    this.enabled   = true\n    this.type      = type\n    this.$element  = $(element)\n    this.options   = this.getOptions(options)\n    this.$viewport = this.options.viewport && $(document).find($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))\n    this.inState   = { click: false, hover: false, focus: false }\n\n    if (this.$element[0] instanceof document.constructor && !this.options.selector) {\n      throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')\n    }\n\n    var triggers = this.options.trigger.split(' ')\n\n    for (var i = triggers.length; i--;) {\n      var trigger = triggers[i]\n\n      if (trigger == 'click') {\n        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))\n      } else if (trigger != 'manual') {\n        var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focusin'\n        var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'\n\n        this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))\n        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))\n      }\n    }\n\n    this.options.selector ?\n      (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :\n      this.fixTitle()\n  }\n\n  Tooltip.prototype.getDefaults = function () {\n    return Tooltip.DEFAULTS\n  }\n\n  Tooltip.prototype.getOptions = function (options) {\n    var dataAttributes = this.$element.data()\n\n    for (var dataAttr in dataAttributes) {\n      if (dataAttributes.hasOwnProperty(dataAttr) && $.inArray(dataAttr, DISALLOWED_ATTRIBUTES) !== -1) {\n        delete dataAttributes[dataAttr]\n      }\n    }\n\n    options = $.extend({}, this.getDefaults(), dataAttributes, options)\n\n    if (options.delay && typeof options.delay == 'number') {\n      options.delay = {\n        show: options.delay,\n        hide: options.delay\n      }\n    }\n\n    if (options.sanitize) {\n      options.template = sanitizeHtml(options.template, options.whiteList, options.sanitizeFn)\n    }\n\n    return options\n  }\n\n  Tooltip.prototype.getDelegateOptions = function () {\n    var options  = {}\n    var defaults = this.getDefaults()\n\n    this._options && $.each(this._options, function (key, value) {\n      if (defaults[key] != value) options[key] = value\n    })\n\n    return options\n  }\n\n  Tooltip.prototype.enter = function (obj) {\n    var self = obj instanceof this.constructor ?\n      obj : $(obj.currentTarget).data('bs.' + this.type)\n\n    if (!self) {\n      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())\n      $(obj.currentTarget).data('bs.' + this.type, self)\n    }\n\n    if (obj instanceof $.Event) {\n      self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true\n    }\n\n    if (self.tip().hasClass('in') || self.hoverState == 'in') {\n      self.hoverState = 'in'\n      return\n    }\n\n    clearTimeout(self.timeout)\n\n    self.hoverState = 'in'\n\n    if (!self.options.delay || !self.options.delay.show) return self.show()\n\n    self.timeout = setTimeout(function () {\n      if (self.hoverState == 'in') self.show()\n    }, self.options.delay.show)\n  }\n\n  Tooltip.prototype.isInStateTrue = function () {\n    for (var key in this.inState) {\n      if (this.inState[key]) return true\n    }\n\n    return false\n  }\n\n  Tooltip.prototype.leave = function (obj) {\n    var self = obj instanceof this.constructor ?\n      obj : $(obj.currentTarget).data('bs.' + this.type)\n\n    if (!self) {\n      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())\n      $(obj.currentTarget).data('bs.' + this.type, self)\n    }\n\n    if (obj instanceof $.Event) {\n      self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false\n    }\n\n    if (self.isInStateTrue()) return\n\n    clearTimeout(self.timeout)\n\n    self.hoverState = 'out'\n\n    if (!self.options.delay || !self.options.delay.hide) return self.hide()\n\n    self.timeout = setTimeout(function () {\n      if (self.hoverState == 'out') self.hide()\n    }, self.options.delay.hide)\n  }\n\n  Tooltip.prototype.show = function () {\n    var e = $.Event('show.bs.' + this.type)\n\n    if (this.hasContent() && this.enabled) {\n      this.$element.trigger(e)\n\n      var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])\n      if (e.isDefaultPrevented() || !inDom) return\n      var that = this\n\n      var $tip = this.tip()\n\n      var tipId = this.getUID(this.type)\n\n      this.setContent()\n      $tip.attr('id', tipId)\n      this.$element.attr('aria-describedby', tipId)\n\n      if (this.options.animation) $tip.addClass('fade')\n\n      var placement = typeof this.options.placement == 'function' ?\n        this.options.placement.call(this, $tip[0], this.$element[0]) :\n        this.options.placement\n\n      var autoToken = /\\s?auto?\\s?/i\n      var autoPlace = autoToken.test(placement)\n      if (autoPlace) placement = placement.replace(autoToken, '') || 'top'\n\n      $tip\n        .detach()\n        .css({ top: 0, left: 0, display: 'block' })\n        .addClass(placement)\n        .data('bs.' + this.type, this)\n\n      this.options.container ? $tip.appendTo($(document).find(this.options.container)) : $tip.insertAfter(this.$element)\n      this.$element.trigger('inserted.bs.' + this.type)\n\n      var pos          = this.getPosition()\n      var actualWidth  = $tip[0].offsetWidth\n      var actualHeight = $tip[0].offsetHeight\n\n      if (autoPlace) {\n        var orgPlacement = placement\n        var viewportDim = this.getPosition(this.$viewport)\n\n        placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top'    :\n                    placement == 'top'    && pos.top    - actualHeight < viewportDim.top    ? 'bottom' :\n                    placement == 'right'  && pos.right  + actualWidth  > viewportDim.width  ? 'left'   :\n                    placement == 'left'   && pos.left   - actualWidth  < viewportDim.left   ? 'right'  :\n                    placement\n\n        $tip\n          .removeClass(orgPlacement)\n          .addClass(placement)\n      }\n\n      var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)\n\n      this.applyPlacement(calculatedOffset, placement)\n\n      var complete = function () {\n        var prevHoverState = that.hoverState\n        that.$element.trigger('shown.bs.' + that.type)\n        that.hoverState = null\n\n        if (prevHoverState == 'out') that.leave(that)\n      }\n\n      $.support.transition && this.$tip.hasClass('fade') ?\n        $tip\n          .one('bsTransitionEnd', complete)\n          .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :\n        complete()\n    }\n  }\n\n  Tooltip.prototype.applyPlacement = function (offset, placement) {\n    var $tip   = this.tip()\n    var width  = $tip[0].offsetWidth\n    var height = $tip[0].offsetHeight\n\n    // manually read margins because getBoundingClientRect includes difference\n    var marginTop = parseInt($tip.css('margin-top'), 10)\n    var marginLeft = parseInt($tip.css('margin-left'), 10)\n\n    // we must check for NaN for ie 8/9\n    if (isNaN(marginTop))  marginTop  = 0\n    if (isNaN(marginLeft)) marginLeft = 0\n\n    offset.top  += marginTop\n    offset.left += marginLeft\n\n    // $.fn.offset doesn't round pixel values\n    // so we use setOffset directly with our own function B-0\n    $.offset.setOffset($tip[0], $.extend({\n      using: function (props) {\n        $tip.css({\n          top: Math.round(props.top),\n          left: Math.round(props.left)\n        })\n      }\n    }, offset), 0)\n\n    $tip.addClass('in')\n\n    // check to see if placing tip in new offset caused the tip to resize itself\n    var actualWidth  = $tip[0].offsetWidth\n    var actualHeight = $tip[0].offsetHeight\n\n    if (placement == 'top' && actualHeight != height) {\n      offset.top = offset.top + height - actualHeight\n    }\n\n    var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)\n\n    if (delta.left) offset.left += delta.left\n    else offset.top += delta.top\n\n    var isVertical          = /top|bottom/.test(placement)\n    var arrowDelta          = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight\n    var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'\n\n    $tip.offset(offset)\n    this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)\n  }\n\n  Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {\n    this.arrow()\n      .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')\n      .css(isVertical ? 'top' : 'left', '')\n  }\n\n  Tooltip.prototype.setContent = function () {\n    var $tip  = this.tip()\n    var title = this.getTitle()\n\n    if (this.options.html) {\n      if (this.options.sanitize) {\n        title = sanitizeHtml(title, this.options.whiteList, this.options.sanitizeFn)\n      }\n\n      $tip.find('.tooltip-inner').html(title)\n    } else {\n      $tip.find('.tooltip-inner').text(title)\n    }\n\n    $tip.removeClass('fade in top bottom left right')\n  }\n\n  Tooltip.prototype.hide = function (callback) {\n    var that = this\n    var $tip = $(this.$tip)\n    var e    = $.Event('hide.bs.' + this.type)\n\n    function complete() {\n      if (that.hoverState != 'in') $tip.detach()\n      if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.\n        that.$element\n          .removeAttr('aria-describedby')\n          .trigger('hidden.bs.' + that.type)\n      }\n      callback && callback()\n    }\n\n    this.$element.trigger(e)\n\n    if (e.isDefaultPrevented()) return\n\n    $tip.removeClass('in')\n\n    $.support.transition && $tip.hasClass('fade') ?\n      $tip\n        .one('bsTransitionEnd', complete)\n        .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :\n      complete()\n\n    this.hoverState = null\n\n    return this\n  }\n\n  Tooltip.prototype.fixTitle = function () {\n    var $e = this.$element\n    if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {\n      $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')\n    }\n  }\n\n  Tooltip.prototype.hasContent = function () {\n    return this.getTitle()\n  }\n\n  Tooltip.prototype.getPosition = function ($element) {\n    $element   = $element || this.$element\n\n    var el     = $element[0]\n    var isBody = el.tagName == 'BODY'\n\n    var elRect    = el.getBoundingClientRect()\n    if (elRect.width == null) {\n      // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093\n      elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })\n    }\n    var isSvg = window.SVGElement && el instanceof window.SVGElement\n    // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.\n    // See https://github.com/twbs/bootstrap/issues/20280\n    var elOffset  = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())\n    var scroll    = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }\n    var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null\n\n    return $.extend({}, elRect, scroll, outerDims, elOffset)\n  }\n\n  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {\n    return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2 } :\n           placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :\n           placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :\n        /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }\n\n  }\n\n  Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {\n    var delta = { top: 0, left: 0 }\n    if (!this.$viewport) return delta\n\n    var viewportPadding = this.options.viewport && this.options.viewport.padding || 0\n    var viewportDimensions = this.getPosition(this.$viewport)\n\n    if (/right|left/.test(placement)) {\n      var topEdgeOffset    = pos.top - viewportPadding - viewportDimensions.scroll\n      var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight\n      if (topEdgeOffset < viewportDimensions.top) { // top overflow\n        delta.top = viewportDimensions.top - topEdgeOffset\n      } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow\n        delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset\n      }\n    } else {\n      var leftEdgeOffset  = pos.left - viewportPadding\n      var rightEdgeOffset = pos.left + viewportPadding + actualWidth\n      if (leftEdgeOffset < viewportDimensions.left) { // left overflow\n        delta.left = viewportDimensions.left - leftEdgeOffset\n      } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow\n        delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset\n      }\n    }\n\n    return delta\n  }\n\n  Tooltip.prototype.getTitle = function () {\n    var title\n    var $e = this.$element\n    var o  = this.options\n\n    title = $e.attr('data-original-title')\n      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)\n\n    return title\n  }\n\n  Tooltip.prototype.getUID = function (prefix) {\n    do prefix += ~~(Math.random() * 1000000)\n    while (document.getElementById(prefix))\n    return prefix\n  }\n\n  Tooltip.prototype.tip = function () {\n    if (!this.$tip) {\n      this.$tip = $(this.options.template)\n      if (this.$tip.length != 1) {\n        throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')\n      }\n    }\n    return this.$tip\n  }\n\n  Tooltip.prototype.arrow = function () {\n    return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))\n  }\n\n  Tooltip.prototype.enable = function () {\n    this.enabled = true\n  }\n\n  Tooltip.prototype.disable = function () {\n    this.enabled = false\n  }\n\n  Tooltip.prototype.toggleEnabled = function () {\n    this.enabled = !this.enabled\n  }\n\n  Tooltip.prototype.toggle = function (e) {\n    var self = this\n    if (e) {\n      self = $(e.currentTarget).data('bs.' + this.type)\n      if (!self) {\n        self = new this.constructor(e.currentTarget, this.getDelegateOptions())\n        $(e.currentTarget).data('bs.' + this.type, self)\n      }\n    }\n\n    if (e) {\n      self.inState.click = !self.inState.click\n      if (self.isInStateTrue()) self.enter(self)\n      else self.leave(self)\n    } else {\n      self.tip().hasClass('in') ? self.leave(self) : self.enter(self)\n    }\n  }\n\n  Tooltip.prototype.destroy = function () {\n    var that = this\n    clearTimeout(this.timeout)\n    this.hide(function () {\n      that.$element.off('.' + that.type).removeData('bs.' + that.type)\n      if (that.$tip) {\n        that.$tip.detach()\n      }\n      that.$tip = null\n      that.$arrow = null\n      that.$viewport = null\n      that.$element = null\n    })\n  }\n\n  Tooltip.prototype.sanitizeHtml = function (unsafeHtml) {\n    return sanitizeHtml(unsafeHtml, this.options.whiteList, this.options.sanitizeFn)\n  }\n\n  // TOOLTIP PLUGIN DEFINITION\n  // =========================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.tooltip')\n      var options = typeof option == 'object' && option\n\n      if (!data && /destroy|hide/.test(option)) return\n      if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  var old = $.fn.tooltip\n\n  $.fn.tooltip             = Plugin\n  $.fn.tooltip.Constructor = Tooltip\n\n\n  // TOOLTIP NO CONFLICT\n  // ===================\n\n  $.fn.tooltip.noConflict = function () {\n    $.fn.tooltip = old\n    return this\n  }\n\n}(jQuery);\n","/* ========================================================================\n * Bootstrap: transition.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#transitions\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // CSS TRANSITION SUPPORT (Shoutout: https://modernizr.com/)\n  // ============================================================\n\n  function transitionEnd() {\n    var el = document.createElement('bootstrap')\n\n    var transEndEventNames = {\n      WebkitTransition : 'webkitTransitionEnd',\n      MozTransition    : 'transitionend',\n      OTransition      : 'oTransitionEnd otransitionend',\n      transition       : 'transitionend'\n    }\n\n    for (var name in transEndEventNames) {\n      if (el.style[name] !== undefined) {\n        return { end: transEndEventNames[name] }\n      }\n    }\n\n    return false // explicit for ie8 (  ._.)\n  }\n\n  // https://blog.alexmaccaw.com/css-transitions\n  $.fn.emulateTransitionEnd = function (duration) {\n    var called = false\n    var $el = this\n    $(this).one('bsTransitionEnd', function () { called = true })\n    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }\n    setTimeout(callback, duration)\n    return this\n  }\n\n  $(function () {\n    $.support.transition = transitionEnd()\n\n    if (!$.support.transition) return\n\n    $.event.special.bsTransitionEnd = {\n      bindType: $.support.transition.end,\n      delegateType: $.support.transition.end,\n      handle: function (e) {\n        if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)\n      }\n    }\n  })\n\n}(jQuery);\n","/*!\r\n * Color Thief v2.0\r\n * by Lokesh Dhakar - http://www.lokeshdhakar.com\r\n *\r\n * Thanks\r\n * ------\r\n * Nick Rabinowitz - For creating quantize.js.\r\n * John Schulz - For clean up and optimization. @JFSIII\r\n * Nathan Spady - For adding drag and drop support to the demo page.\r\n *\r\n * License\r\n * -------\r\n * Copyright 2011, 2015 Lokesh Dhakar\r\n * Released under the MIT license\r\n * https://raw.githubusercontent.com/lokesh/color-thief/master/LICENSE\r\n *\r\n */\r\nvar CanvasImage=function(a){this.canvas=document.createElement(\"canvas\"),this.context=this.canvas.getContext(\"2d\"),document.body.appendChild(this.canvas),this.width=this.canvas.width=a.width,this.height=this.canvas.height=a.height,this.context.drawImage(a,0,0,this.width,this.height)};CanvasImage.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},CanvasImage.prototype.update=function(a){this.context.putImageData(a,0,0)},CanvasImage.prototype.getPixelCount=function(){return this.width*this.height},CanvasImage.prototype.getImageData=function(){return this.context.getImageData(0,0,this.width,this.height)},CanvasImage.prototype.removeCanvas=function(){this.canvas.parentNode.removeChild(this.canvas)};var ColorThief=function(){};/*!\r\n * quantize.js Copyright 2008 Nick Rabinowitz.\r\n * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php\r\n */\r\n/*!\r\n * Block below copied from Protovis: http://mbostock.github.com/protovis/\r\n * Copyright 2010 Stanford Visualization Group\r\n * Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php\r\n */\r\nif(ColorThief.prototype.getColor=function(a,b){var c=this.getPalette(a,5,b),d=c[0];return d},ColorThief.prototype.getPalette=function(a,b,c){\"undefined\"==typeof b&&(b=10),(\"undefined\"==typeof c||1>c)&&(c=10);for(var d,e,f,g,h,i=new CanvasImage(a),j=i.getImageData(),k=j.data,l=i.getPixelCount(),m=[],n=0;l>n;n+=c)d=4*n,e=k[d+0],f=k[d+1],g=k[d+2],h=k[d+3],h>=125&&(e>250&&f>250&&g>250||m.push([e,f,g]));var o=MMCQ.quantize(m,b),p=o?o.palette():null;return i.removeCanvas(),p},!pv)var pv={map:function(a,b){var c={};return b?a.map(function(a,d){return c.index=d,b.call(c,a)}):a.slice()},naturalOrder:function(a,b){return b>a?-1:a>b?1:0},sum:function(a,b){var c={};return a.reduce(b?function(a,d,e){return c.index=e,a+b.call(c,d)}:function(a,b){return a+b},0)},max:function(a,b){return Math.max.apply(null,b?pv.map(a,b):a)}};var MMCQ=function(){function a(a,b,c){return(a<<2*i)+(b<<i)+c}function b(a){function b(){c.sort(a),d=!0}var c=[],d=!1;return{push:function(a){c.push(a),d=!1},peek:function(a){return d||b(),void 0===a&&(a=c.length-1),c[a]},pop:function(){return d||b(),c.pop()},size:function(){return c.length},map:function(a){return c.map(a)},debug:function(){return d||b(),c}}}function c(a,b,c,d,e,f,g){var h=this;h.r1=a,h.r2=b,h.g1=c,h.g2=d,h.b1=e,h.b2=f,h.histo=g}function d(){this.vboxes=new b(function(a,b){return pv.naturalOrder(a.vbox.count()*a.vbox.volume(),b.vbox.count()*b.vbox.volume())})}function e(b){var c,d,e,f,g=1<<3*i,h=new Array(g);return b.forEach(function(b){d=b[0]>>j,e=b[1]>>j,f=b[2]>>j,c=a(d,e,f),h[c]=(h[c]||0)+1}),h}function f(a,b){var d,e,f,g=1e6,h=0,i=1e6,k=0,l=1e6,m=0;return a.forEach(function(a){d=a[0]>>j,e=a[1]>>j,f=a[2]>>j,g>d?g=d:d>h&&(h=d),i>e?i=e:e>k&&(k=e),l>f?l=f:f>m&&(m=f)}),new c(g,h,i,k,l,m,b)}function g(b,c){function d(a){var b,d,e,f,g,h=a+\"1\",j=a+\"2\",k=0;for(i=c[h];i<=c[j];i++)if(o[i]>n/2){for(e=c.copy(),f=c.copy(),b=i-c[h],d=c[j]-i,g=d>=b?Math.min(c[j]-1,~~(i+d/2)):Math.max(c[h],~~(i-1-b/2));!o[g];)g++;for(k=p[g];!k&&o[g-1];)k=p[--g];return e[j]=g,f[h]=e[j]+1,[e,f]}}if(c.count()){var e=c.r2-c.r1+1,f=c.g2-c.g1+1,g=c.b2-c.b1+1,h=pv.max([e,f,g]);if(1==c.count())return[c.copy()];var i,j,k,l,m,n=0,o=[],p=[];if(h==e)for(i=c.r1;i<=c.r2;i++){for(l=0,j=c.g1;j<=c.g2;j++)for(k=c.b1;k<=c.b2;k++)m=a(i,j,k),l+=b[m]||0;n+=l,o[i]=n}else if(h==f)for(i=c.g1;i<=c.g2;i++){for(l=0,j=c.r1;j<=c.r2;j++)for(k=c.b1;k<=c.b2;k++)m=a(j,i,k),l+=b[m]||0;n+=l,o[i]=n}else for(i=c.b1;i<=c.b2;i++){for(l=0,j=c.r1;j<=c.r2;j++)for(k=c.g1;k<=c.g2;k++)m=a(j,k,i),l+=b[m]||0;n+=l,o[i]=n}return o.forEach(function(a,b){p[b]=n-a}),d(h==e?\"r\":h==f?\"g\":\"b\")}}function h(a,c){function h(a,b){for(var c,d=1,e=0;k>e;)if(c=a.pop(),c.count()){var f=g(i,c),h=f[0],j=f[1];if(!h)return;if(a.push(h),j&&(a.push(j),d++),d>=b)return;if(e++>k)return}else a.push(c),e++}if(!a.length||2>c||c>256)return!1;var i=e(a),j=0;i.forEach(function(){j++});var m=f(a,i),n=new b(function(a,b){return pv.naturalOrder(a.count(),b.count())});n.push(m),h(n,l*c);for(var o=new b(function(a,b){return pv.naturalOrder(a.count()*a.volume(),b.count()*b.volume())});n.size();)o.push(n.pop());h(o,c-o.size());for(var p=new d;o.size();)p.push(o.pop());return p}var i=5,j=8-i,k=1e3,l=.75;return c.prototype={volume:function(a){var b=this;return(!b._volume||a)&&(b._volume=(b.r2-b.r1+1)*(b.g2-b.g1+1)*(b.b2-b.b1+1)),b._volume},count:function(b){var c=this,d=c.histo;if(!c._count_set||b){var e,f,g,h=0;for(e=c.r1;e<=c.r2;e++)for(f=c.g1;f<=c.g2;f++)for(g=c.b1;g<=c.b2;g++)index=a(e,f,g),h+=d[index]||0;c._count=h,c._count_set=!0}return c._count},copy:function(){var a=this;return new c(a.r1,a.r2,a.g1,a.g2,a.b1,a.b2,a.histo)},avg:function(b){var c=this,d=c.histo;if(!c._avg||b){var e,f,g,h,j,k=0,l=1<<8-i,m=0,n=0,o=0;for(f=c.r1;f<=c.r2;f++)for(g=c.g1;g<=c.g2;g++)for(h=c.b1;h<=c.b2;h++)j=a(f,g,h),e=d[j]||0,k+=e,m+=e*(f+.5)*l,n+=e*(g+.5)*l,o+=e*(h+.5)*l;k?c._avg=[~~(m/k),~~(n/k),~~(o/k)]:c._avg=[~~(l*(c.r1+c.r2+1)/2),~~(l*(c.g1+c.g2+1)/2),~~(l*(c.b1+c.b2+1)/2)]}return c._avg},contains:function(a){var b=this,c=a[0]>>j;return gval=a[1]>>j,bval=a[2]>>j,c>=b.r1&&c<=b.r2&&gval>=b.g1&&gval<=b.g2&&bval>=b.b1&&bval<=b.b2}},d.prototype={push:function(a){this.vboxes.push({vbox:a,color:a.avg()})},palette:function(){return this.vboxes.map(function(a){return a.color})},size:function(){return this.vboxes.size()},map:function(a){for(var b=this.vboxes,c=0;c<b.size();c++)if(b.peek(c).vbox.contains(a))return b.peek(c).color;return this.nearest(a)},nearest:function(a){for(var b,c,d,e=this.vboxes,f=0;f<e.size();f++)c=Math.sqrt(Math.pow(a[0]-e.peek(f).color[0],2)+Math.pow(a[1]-e.peek(f).color[1],2)+Math.pow(a[2]-e.peek(f).color[2],2)),(b>c||void 0===b)&&(b=c,d=e.peek(f).color);return d},forcebw:function(){var a=this.vboxes;a.sort(function(a,b){return pv.naturalOrder(pv.sum(a.color),pv.sum(b.color))});var b=a[0].color;b[0]<5&&b[1]<5&&b[2]<5&&(a[0].color=[0,0,0]);var c=a.length-1,d=a[c].color;d[0]>251&&d[1]>251&&d[2]>251&&(a[c].color=[255,255,255])}},{quantize:h}}();\r\nmodule.exports = ColorThief;\r\n","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",f=\"month\",h=\"quarter\",c=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(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,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},g=\"en\",D={};D[g]=M;var p=function(t){return t instanceof _},S=function t(e,n,r){var i;if(!e)return g;if(\"string\"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split(\"-\");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.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($);if(r){var i=r[2]-1||0,s=(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,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.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()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),l=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return O.w(n.toDate()[t].apply(n.toDate(\"s\"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v=\"set\"+(this.$u?\"UTC\":\"\");switch(h){case c:return r?l(1,0):l(31,11);case f:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+\"Hours\",0);case u:return $(v+\"Minutes\",1);case s:return $(v+\"Seconds\",2);case i:return $(v+\"Milliseconds\",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h=\"set\"+(this.$u?\"UTC\":\"\"),l=(n={},n[a]=h+\"Date\",n[d]=h+\"Date\",n[f]=h+\"Month\",n[c]=h+\"FullYear\",n[u]=h+\"Hours\",n[s]=h+\"Minutes\",n[i]=h+\"Seconds\",n[r]=h+\"Milliseconds\",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,l=this;r=Number(r);var $=O.p(h),y=function(t){var e=w(l);return O.w(e.date(e.date()+Math.round(t*r)),l)};if($===f)return this.set(f,this.$M+r);if($===c)return this.set(c,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||\"YYYY-MM-DDTHH:mm:ssZ\",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},c=function(t){return O.s(s%12||12,t,\"0\")},d=n.meridiem||function(t,e,n){var r=t<12?\"AM\":\"PM\";return n?r.toLowerCase():r},$={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,\"0\"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,\"0\"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,\"0\"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,\"0\"),s:String(this.$s),ss:O.s(this.$s,2,\"0\"),SSS:O.s(this.$ms,3,\"0\"),Z:i};return r.replace(y,(function(t,e){return e||$[t]||i.replace(\":\",\"\")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,v=this-M,g=O.m(this,M);return g=($={},$[c]=g/12,$[f]=g,$[h]=g/3,$[o]=(v-m)/6048e5,$[a]=(v-m)/864e5,$[u]=v/n,$[s]=v/e,$[i]=v/t,$)[y]||v,l?g:O.a(g)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),T=_.prototype;return w.prototype=T,[[\"$ms\",r],[\"$s\",i],[\"$m\",s],[\"$H\",u],[\"$W\",a],[\"$M\",f],[\"$y\",c],[\"$D\",d]].forEach((function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[g],w.Ls=D,w.p={},w}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_localizedFormat=t()}(this,(function(){\"use strict\";var e={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(t,o,n){var r=o.prototype,i=r.format;n.en.formats=e,r.format=function(t){void 0===t&&(t=\"YYYY-MM-DDTHH:mm:ssZ\");var o=this.$locale().formats,n=function(t,o){return t.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var i=r&&r.toUpperCase();return n||o[r]||e[r]||o[i].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,o){return t||o.slice(1)}))}))}(t,void 0===o?{}:o);return i.call(this,n)}}}));","!function(r,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(r=\"undefined\"!=typeof globalThis?globalThis:r||self).dayjs_plugin_relativeTime=e()}(this,(function(){\"use strict\";return function(r,e,t){r=r||{};var n=e.prototype,o={future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.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\"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(\"\"+p)),a=\"string\"==typeof v?v.replace(\"%d\",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return\"function\"==typeof M?M(a):M.replace(\"%s\",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)}}}));","\"use strict\";\n\n// eslint-disable-next-line func-names\nmodule.exports = function () {\n  if (typeof globalThis === \"object\") {\n    return globalThis;\n  }\n\n  var g;\n\n  try {\n    // This works if eval is allowed (see CSP)\n    // eslint-disable-next-line no-new-func\n    g = this || new Function(\"return this\")();\n  } catch (e) {\n    // This works if the window reference is available\n    if (typeof window === \"object\") {\n      return window;\n    } // This works if the self reference is available\n\n\n    if (typeof self === \"object\") {\n      return self;\n    } // This works if the global reference is available\n\n\n    if (typeof global !== \"undefined\") {\n      return global;\n    }\n  }\n\n  return g;\n}();","/*jslint browser: true*/\r\n/*jslint jquery: true*/\r\n\r\n/*\r\n * jQuery Hotkeys Plugin\r\n * Copyright 2010, John Resig\r\n * Dual licensed under the MIT or GPL Version 2 licenses.\r\n *\r\n * Based upon the plugin by Tzury Bar Yochay:\r\n * https://github.com/tzuryby/jquery.hotkeys\r\n *\r\n * Original idea by:\r\n * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/\r\n */\r\n\r\n/*\r\n * One small change is: now keys are passed by object { keys: '...' }\r\n * Might be useful, when you want to pass some other data to your handler\r\n */\r\n\r\n(function(jQuery) {\r\n\r\n  jQuery.hotkeys = {\r\n    version: \"0.2.0\",\r\n\r\n    specialKeys: {\r\n      8: \"backspace\",\r\n      9: \"tab\",\r\n      10: \"return\",\r\n      13: \"return\",\r\n      16: \"shift\",\r\n      17: \"ctrl\",\r\n      18: \"alt\",\r\n      19: \"pause\",\r\n      20: \"capslock\",\r\n      27: \"esc\",\r\n      32: \"space\",\r\n      33: \"pageup\",\r\n      34: \"pagedown\",\r\n      35: \"end\",\r\n      36: \"home\",\r\n      37: \"left\",\r\n      38: \"up\",\r\n      39: \"right\",\r\n      40: \"down\",\r\n      45: \"insert\",\r\n      46: \"del\",\r\n      59: \";\",\r\n      61: \"=\",\r\n      96: \"0\",\r\n      97: \"1\",\r\n      98: \"2\",\r\n      99: \"3\",\r\n      100: \"4\",\r\n      101: \"5\",\r\n      102: \"6\",\r\n      103: \"7\",\r\n      104: \"8\",\r\n      105: \"9\",\r\n      106: \"*\",\r\n      107: \"+\",\r\n      109: \"-\",\r\n      110: \".\",\r\n      111: \"/\",\r\n      112: \"f1\",\r\n      113: \"f2\",\r\n      114: \"f3\",\r\n      115: \"f4\",\r\n      116: \"f5\",\r\n      117: \"f6\",\r\n      118: \"f7\",\r\n      119: \"f8\",\r\n      120: \"f9\",\r\n      121: \"f10\",\r\n      122: \"f11\",\r\n      123: \"f12\",\r\n      144: \"numlock\",\r\n      145: \"scroll\",\r\n      173: \"-\",\r\n      186: \";\",\r\n      187: \"=\",\r\n      188: \",\",\r\n      189: \"-\",\r\n      190: \".\",\r\n      191: \"/\",\r\n      192: \"`\",\r\n      219: \"[\",\r\n      220: \"\\\\\",\r\n      221: \"]\",\r\n      222: \"'\"\r\n    },\r\n\r\n    shiftNums: {\r\n      \"`\": \"~\",\r\n      \"1\": \"!\",\r\n      \"2\": \"@\",\r\n      \"3\": \"#\",\r\n      \"4\": \"$\",\r\n      \"5\": \"%\",\r\n      \"6\": \"^\",\r\n      \"7\": \"&\",\r\n      \"8\": \"*\",\r\n      \"9\": \"(\",\r\n      \"0\": \")\",\r\n      \"-\": \"_\",\r\n      \"=\": \"+\",\r\n      \";\": \": \",\r\n      \"'\": \"\\\"\",\r\n      \",\": \"<\",\r\n      \".\": \">\",\r\n      \"/\": \"?\",\r\n      \"\\\\\": \"|\"\r\n    },\r\n\r\n    // excludes: button, checkbox, file, hidden, image, password, radio, reset, search, submit, url\r\n    textAcceptingInputTypes: [\r\n      \"text\", \"password\", \"number\", \"email\", \"url\", \"range\", \"date\", \"month\", \"week\", \"time\", \"datetime\",\r\n      \"datetime-local\", \"search\", \"color\", \"tel\"],\r\n\r\n    // default input types not to bind to unless bound directly\r\n    textInputTypes: /textarea|input|select/i,\r\n\r\n    options: {\r\n      filterInputAcceptingElements: true,\r\n      filterTextInputs: true,\r\n      filterContentEditable: true\r\n    }\r\n  };\r\n\r\n  function keyHandler(handleObj) {\r\n    if (typeof handleObj.data === \"string\") {\r\n      handleObj.data = {\r\n        keys: handleObj.data\r\n      };\r\n    }\r\n\r\n    // Only care when a possible input has been specified\r\n    if (!handleObj.data || !handleObj.data.keys || typeof handleObj.data.keys !== \"string\") {\r\n      return;\r\n    }\r\n\r\n    var origHandler = handleObj.handler,\r\n      keys = handleObj.data.keys.toLowerCase().split(\" \");\r\n\r\n    handleObj.handler = function(event) {\r\n      //      Don't fire in text-accepting inputs that we didn't directly bind to\r\n      if (this !== event.target &&\r\n        (jQuery.hotkeys.options.filterInputAcceptingElements &&\r\n          jQuery.hotkeys.textInputTypes.test(event.target.nodeName) ||\r\n          (jQuery.hotkeys.options.filterContentEditable && jQuery(event.target).attr('contenteditable')) ||\r\n          (jQuery.hotkeys.options.filterTextInputs &&\r\n            jQuery.inArray(event.target.type, jQuery.hotkeys.textAcceptingInputTypes) > -1))) {\r\n        return;\r\n      }\r\n\r\n      var special = event.type !== \"keypress\" && jQuery.hotkeys.specialKeys[event.which],\r\n        character = String.fromCharCode(event.which).toLowerCase(),\r\n        modif = \"\",\r\n        possible = {};\r\n\r\n      jQuery.each([\"alt\", \"ctrl\", \"shift\"], function(index, specialKey) {\r\n\r\n        if (event[specialKey + 'Key'] && special !== specialKey) {\r\n          modif += specialKey + '+';\r\n        }\r\n      });\r\n\r\n      // metaKey is triggered off ctrlKey erronously\r\n      if (event.metaKey && !event.ctrlKey && special !== \"meta\") {\r\n        modif += \"meta+\";\r\n      }\r\n\r\n      if (event.metaKey && special !== \"meta\" && modif.indexOf(\"alt+ctrl+shift+\") > -1) {\r\n        modif = modif.replace(\"alt+ctrl+shift+\", \"hyper+\");\r\n      }\r\n\r\n      if (special) {\r\n        possible[modif + special] = true;\r\n      }\r\n      else {\r\n        possible[modif + character] = true;\r\n        possible[modif + jQuery.hotkeys.shiftNums[character]] = true;\r\n\r\n        // \"$\" can be triggered as \"Shift+4\" or \"Shift+$\" or just \"$\"\r\n        if (modif === \"shift+\") {\r\n          possible[jQuery.hotkeys.shiftNums[character]] = true;\r\n        }\r\n      }\r\n\r\n      for (var i = 0, l = keys.length; i < l; i++) {\r\n        if (possible[keys[i]]) {\r\n          return origHandler.apply(this, arguments);\r\n        }\r\n      }\r\n    };\r\n  }\r\n\r\n  jQuery.each([\"keydown\", \"keyup\", \"keypress\"], function() {\r\n    jQuery.event.special[this] = {\r\n      add: keyHandler\r\n    };\r\n  });\r\n\r\n})(jQuery || this.jQuery || window.jQuery);\r\n","/*!\n * jQuery JavaScript Library v3.6.1\n * https://jquery.com/\n *\n * Includes Sizzle.js\n * https://sizzlejs.com/\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2022-08-26T17:52Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket trac-14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar flat = arr.flat ? function( array ) {\n\treturn arr.flat.call( array );\n} : function( array ) {\n\treturn arr.concat.apply( [], array );\n};\n\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n\t\t// Support: Chrome <=57, Firefox <=52\n\t\t// In some browsers, typeof returns \"function\" for HTML <object> elements\n\t\t// (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n\t\t// We don't want to classify *any* DOM node as a function.\n\t\t// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5\n\t\t// Plus for old WebKit, typeof returns \"function\" for HTML collections\n\t\t// (e.g., `typeof document.getElementsByTagName(\"div\") === \"function\"`). (gh-4756)\n\t\treturn typeof obj === \"function\" && typeof obj.nodeType !== \"number\" &&\n\t\t\ttypeof obj.item !== \"function\";\n\t};\n\n\nvar isWindow = function isWindow( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t};\n\n\nvar document = window.document;\n\n\n\n\tvar preservedScriptAttributes = {\n\t\ttype: true,\n\t\tsrc: true,\n\t\tnonce: true,\n\t\tnoModule: true\n\t};\n\n\tfunction DOMEval( code, node, doc ) {\n\t\tdoc = doc || document;\n\n\t\tvar i, val,\n\t\t\tscript = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tif ( node ) {\n\t\t\tfor ( i in preservedScriptAttributes ) {\n\n\t\t\t\t// Support: Firefox 64+, Edge 18+\n\t\t\t\t// Some browsers don't support the \"nonce\" property on scripts.\n\t\t\t\t// On the other hand, just using `getAttribute` is not enough as\n\t\t\t\t// the `nonce` attribute is reset to an empty string whenever it\n\t\t\t\t// becomes browsing-context connected.\n\t\t\t\t// See https://github.com/whatwg/html/issues/2369\n\t\t\t\t// See https://html.spec.whatwg.org/#nonce-attributes\n\t\t\t\t// The `node.getAttribute` check was added for the sake of\n\t\t\t\t// `jQuery.globalEval` so that it can fake a nonce-containing node\n\t\t\t\t// via an object.\n\t\t\t\tval = node[ i ] || node.getAttribute && node.getAttribute( i );\n\t\t\t\tif ( val ) {\n\t\t\t\t\tscript.setAttribute( i, val );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n\n\nfunction toType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\t// Support: Android <=2.3 only (functionish RegExp)\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar\n\tversion = \"3.6.1\",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teven: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn ( i + 1 ) % 2;\n\t\t} ) );\n\t},\n\n\todd: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn i % 2;\n\t\t} ) );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent Object.prototype pollution\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( name === \"__proto__\" || target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\n\t\t\t\t\tsrc = target[ name ];\n\n\t\t\t\t\t// Ensure proper type for the source value\n\t\t\t\t\tif ( copyIsArray && !Array.isArray( src ) ) {\n\t\t\t\t\t\tclone = [];\n\t\t\t\t\t} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {\n\t\t\t\t\t\tclone = {};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src;\n\t\t\t\t\t}\n\t\t\t\t\tcopyIsArray = false;\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t// Evaluates a script in a provided context; falls back to the global one\n\t// if not specified.\n\tglobalEval: function( code, options, doc ) {\n\t\tDOMEval( code, { nonce: options && options.nonce }, doc );\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn flat( ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\n\tfunction( _i, name ) {\n\t\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n\t} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = toType( obj );\n\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.3.6\n * https://sizzlejs.com/\n *\n * Copyright JS Foundation and other contributors\n * Released under the MIT license\n * https://js.foundation/\n *\n * Date: 2021-02-16\n */\n( function( window ) {\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tnonnativeSelectorCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// Instance methods\n\thasOwn = ( {} ).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpushNative = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\n\t// Use a stripped-down indexOf as it's faster than native\n\t// https://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[ i ] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|\" +\n\t\t\"ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\n\t// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram\n\tidentifier = \"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\n\t\t// \"Attribute values must be CSS identifiers [capture 5]\n\t\t// or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" +\n\t\twhitespace + \"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" +\n\t\twhitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace +\n\t\t\"*\" ),\n\trdescend = new RegExp( whitespace + \"|>\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" +\n\t\t\twhitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" +\n\t\t\twhitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace +\n\t\t\t\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" + whitespace +\n\t\t\t\"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trhtml = /HTML$/i,\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace + \"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\", \"g\" ),\n\tfunescape = function( escape, nonHex ) {\n\t\tvar high = \"0x\" + escape.slice( 1 ) - 0x10000;\n\n\t\treturn nonHex ?\n\n\t\t\t// Strip the backslash prefix from a non-hex escape sequence\n\t\t\tnonHex :\n\n\t\t\t// Replace a hexadecimal escape sequence with the encoded Unicode code point\n\t\t\t// Support: IE <=11+\n\t\t\t// For values outside the Basic Multilingual Plane (BMP), manually construct a\n\t\t\t// surrogate pair\n\t\t\thigh < 0 ?\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// CSS string/identifier serialization\n\t// https://drafts.csswg.org/cssom/#common-serializing-idioms\n\trcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,\n\tfcssescape = function( ch, asCodePoint ) {\n\t\tif ( asCodePoint ) {\n\n\t\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\t\tif ( ch === \"\\0\" ) {\n\t\t\t\treturn \"\\uFFFD\";\n\t\t\t}\n\n\t\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\t\treturn ch.slice( 0, -1 ) + \"\\\\\" +\n\t\t\t\tch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t\t}\n\n\t\t// Other potentially-special ASCII characters get backslash-escaped\n\t\treturn \"\\\\\" + ch;\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tinDisabledFieldset = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && elem.nodeName.toLowerCase() === \"fieldset\";\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t( arr = slice.call( preferredDoc.childNodes ) ),\n\t\tpreferredDoc.childNodes\n\t);\n\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\t// eslint-disable-next-line no-unused-expressions\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpushNative.apply( target, slice.call( els ) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( ( target[ j++ ] = els[ i++ ] ) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\t\tsetDocument( context );\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( ( m = match[ 1 ] ) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( ( elem = context.getElementById( m ) ) ) {\n\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && ( elem = newContext.getElementById( m ) ) &&\n\t\t\t\t\t\t\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[ 2 ] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( ( m = match[ 3 ] ) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( support.qsa &&\n\t\t\t\t!nonnativeSelectorCache[ selector + \" \" ] &&\n\t\t\t\t( !rbuggyQSA || !rbuggyQSA.test( selector ) ) &&\n\n\t\t\t\t// Support: IE 8 only\n\t\t\t\t// Exclude object elements\n\t\t\t\t( nodeType !== 1 || context.nodeName.toLowerCase() !== \"object\" ) ) {\n\n\t\t\t\tnewSelector = selector;\n\t\t\t\tnewContext = context;\n\n\t\t\t\t// qSA considers elements outside a scoping root when evaluating child or\n\t\t\t\t// descendant combinators, which is not what we want.\n\t\t\t\t// In such cases, we work around the behavior by prefixing every selector in the\n\t\t\t\t// list with an ID selector referencing the scope context.\n\t\t\t\t// The technique has to be used as well when a leading combinator is used\n\t\t\t\t// as such selectors are not recognized by querySelectorAll.\n\t\t\t\t// Thanks to Andrew Dupont for this technique.\n\t\t\t\tif ( nodeType === 1 &&\n\t\t\t\t\t( rdescend.test( selector ) || rcombinators.test( selector ) ) ) {\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\n\t\t\t\t\t// We can use :scope instead of the ID hack if the browser\n\t\t\t\t\t// supports it & if we're not changing the context.\n\t\t\t\t\tif ( newContext !== context || !support.scope ) {\n\n\t\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\t\tif ( ( nid = context.getAttribute( \"id\" ) ) ) {\n\t\t\t\t\t\t\tnid = nid.replace( rcssescape, fcssescape );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontext.setAttribute( \"id\", ( nid = expando ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[ i ] = ( nid ? \"#\" + nid : \":scope\" ) + \" \" +\n\t\t\t\t\t\t\ttoSelector( groups[ i ] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\tnonnativeSelectorCache( selector, true );\n\t\t\t\t} finally {\n\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn ( cache[ key + \" \" ] = value );\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement( \"fieldset\" );\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch ( e ) {\n\t\treturn false;\n\t} finally {\n\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\n\t\t// release memory in IE\n\t\tel = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split( \"|\" ),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[ i ] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\ta.sourceIndex - b.sourceIndex;\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( ( cur = cur.nextSibling ) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn ( name === \"input\" || name === \"button\" ) && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\t/* jshint -W018 */\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\tinDisabledFieldset( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction( function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction( function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ ( j = matchIndexes[ i ] ) ] ) {\n\t\t\t\t\tseed[ j ] = !( matches[ j ] = seed[ j ] );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\tvar namespace = elem && elem.namespaceURI,\n\t\tdocElem = elem && ( elem.ownerDocument || elem ).documentElement;\n\n\t// Support: IE <=8\n\t// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes\n\t// https://bugs.jquery.com/ticket/4833\n\treturn !rhtml.test( namespace || docElem && docElem.nodeName || \"HTML\" );\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( preferredDoc != document &&\n\t\t( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 11, Edge\n\t\tif ( subWindow.addEventListener ) {\n\t\t\tsubWindow.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( subWindow.attachEvent ) {\n\t\t\tsubWindow.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t// Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only,\n\t// Safari 4 - 5 only, Opera <=11.6 - 12.x only\n\t// IE/Edge & older browsers don't support the :scope pseudo-class.\n\t// Support: Safari 6.0 only\n\t// Safari 6.0 supports :scope but it's an alias of :root there.\n\tsupport.scope = assert( function( el ) {\n\t\tdocElem.appendChild( el ).appendChild( document.createElement( \"div\" ) );\n\t\treturn typeof el.querySelectorAll !== \"undefined\" &&\n\t\t\t!el.querySelectorAll( \":scope fieldset div\" ).length;\n\t} );\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert( function( el ) {\n\t\tel.className = \"i\";\n\t\treturn !el.getAttribute( \"className\" );\n\t} );\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert( function( el ) {\n\t\tel.appendChild( document.createComment( \"\" ) );\n\t\treturn !el.getElementsByTagName( \"*\" ).length;\n\t} );\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert( function( el ) {\n\t\tdocElem.appendChild( el ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t} );\n\n\t// ID filter and find\n\tif ( support.getById ) {\n\t\tExpr.filter[ \"ID\" ] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute( \"id\" ) === attrId;\n\t\t\t};\n\t\t};\n\t\tExpr.find[ \"ID\" ] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\n\t\tExpr.filter[ \"ID\" ] =  function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode( \"id\" );\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find[ \"ID\" ] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( ( elem = elems[ i++ ] ) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[ \"TAG\" ] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[ \"CLASS\" ] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See https://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) {\n\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert( function( el ) {\n\n\t\t\tvar input;\n\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// https://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( el ).innerHTML = \"<a id='\" + expando + \"'></a>\" +\n\t\t\t\t\"<select id='\" + expando + \"-\\r\\\\' msallowcapture=''>\" +\n\t\t\t\t\"<option selected=''></option></select>\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( el.querySelectorAll( \"[msallowcapture^='']\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !el.querySelectorAll( \"[selected]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"~=\" );\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 15 - 18+\n\t\t\t// IE 11/Edge don't find elements on a `[name='']` query in some cases.\n\t\t\t// Adding a temporary attribute to the document before the selection works\n\t\t\t// around the issue.\n\t\t\t// Interestingly, IE 10 & older don't seem to have the issue.\n\t\t\tinput = document.createElement( \"input\" );\n\t\t\tinput.setAttribute( \"name\", \"\" );\n\t\t\tel.appendChild( input );\n\t\t\tif ( !el.querySelectorAll( \"[name='']\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*name\" + whitespace + \"*=\" +\n\t\t\t\t\twhitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !el.querySelectorAll( \":checked\" ).length ) {\n\t\t\t\trbuggyQSA.push( \":checked\" );\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push( \".#.+[+~]\" );\n\t\t\t}\n\n\t\t\t// Support: Firefox <=3.6 - 5 only\n\t\t\t// Old Firefox doesn't throw on a badly-escaped identifier.\n\t\t\tel.querySelectorAll( \"\\\\\\f\" );\n\t\t\trbuggyQSA.push( \"[\\\\r\\\\n\\\\f]\" );\n\t\t} );\n\n\t\tassert( function( el ) {\n\t\t\tel.innerHTML = \"<a href='' disabled='disabled'></a>\" +\n\t\t\t\t\"<select disabled='disabled'><option/></select>\";\n\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement( \"input\" );\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( el.querySelectorAll( \"[name=d]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( el.querySelectorAll( \":enabled\" ).length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: IE9-11+\n\t\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t\tdocElem.appendChild( el ).disabled = true;\n\t\t\tif ( el.querySelectorAll( \":disabled\" ).length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: Opera 10 - 11 only\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tel.querySelectorAll( \"*,:x\" );\n\t\t\trbuggyQSA.push( \",.*:\" );\n\t\t} );\n\t}\n\n\tif ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector ) ) ) ) {\n\n\t\tassert( function( el ) {\n\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( el, \"*\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( el, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t} );\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( \"|\" ) );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( \"|\" ) );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t) );\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( ( b = b.parentNode ) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = hasCompare ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tcompare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( a == document || a.ownerDocument == preferredDoc &&\n\t\t\t\tcontains( preferredDoc, a ) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( b == document || b.ownerDocument == preferredDoc &&\n\t\t\t\tcontains( preferredDoc, b ) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\tif ( !aup || !bup ) {\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t/* eslint-disable eqeqeq */\n\t\t\treturn a == document ? -1 :\n\t\t\t\tb == document ? 1 :\n\t\t\t\t/* eslint-enable eqeqeq */\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( ( cur = cur.parentNode ) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( ( cur = cur.parentNode ) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[ i ] === bp[ i ] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[ i ], bp[ i ] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t/* eslint-disable eqeqeq */\n\t\t\tap[ i ] == preferredDoc ? -1 :\n\t\t\tbp[ i ] == preferredDoc ? 1 :\n\t\t\t/* eslint-enable eqeqeq */\n\t\t\t0;\n\t};\n\n\treturn document;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\tsetDocument( elem );\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t!nonnativeSelectorCache[ expr + \" \" ] &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\n\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t// fragment in IE 9\n\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch ( e ) {\n\t\t\tnonnativeSelectorCache( expr, true );\n\t\t}\n\t}\n\n\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( context.ownerDocument || context ) != document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( elem.ownerDocument || elem ) != document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val !== undefined ?\n\t\tval :\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t( val = elem.getAttributeNode( name ) ) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull;\n};\n\nSizzle.escape = function( sel ) {\n\treturn ( sel + \"\" ).replace( rcssescape, fcssescape );\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\n\t\t// If no nodeType, this is expected to be an array\n\t\twhile ( ( node = elem[ i++ ] ) ) {\n\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[ 1 ] = match[ 1 ].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[ 3 ] = ( match[ 3 ] || match[ 4 ] ||\n\t\t\t\tmatch[ 5 ] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[ 2 ] === \"~=\" ) {\n\t\t\t\tmatch[ 3 ] = \" \" + match[ 3 ] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[ 1 ] = match[ 1 ].toLowerCase();\n\n\t\t\tif ( match[ 1 ].slice( 0, 3 ) === \"nth\" ) {\n\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[ 3 ] ) {\n\t\t\t\t\tSizzle.error( match[ 0 ] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[ 4 ] = +( match[ 4 ] ?\n\t\t\t\t\tmatch[ 5 ] + ( match[ 6 ] || 1 ) :\n\t\t\t\t\t2 * ( match[ 3 ] === \"even\" || match[ 3 ] === \"odd\" ) );\n\t\t\t\tmatch[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === \"odd\" );\n\n\t\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[ 3 ] ) {\n\t\t\t\tSizzle.error( match[ 0 ] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[ 6 ] && match[ 2 ];\n\n\t\t\tif ( matchExpr[ \"CHILD\" ].test( match[ 0 ] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[ 3 ] ) {\n\t\t\t\tmatch[ 2 ] = match[ 4 ] || match[ 5 ] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t( excess = tokenize( unquoted, true ) ) &&\n\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t( excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length ) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[ 0 ] = match[ 0 ].slice( 0, excess );\n\t\t\t\tmatch[ 2 ] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() {\n\t\t\t\t\treturn true;\n\t\t\t\t} :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t( pattern = new RegExp( \"(^|\" + whitespace +\n\t\t\t\t\t\")\" + className + \"(\" + whitespace + \"|$)\" ) ) && classCache(\n\t\t\t\t\t\tclassName, function( elem ) {\n\t\t\t\t\t\t\treturn pattern.test(\n\t\t\t\t\t\t\t\ttypeof elem.className === \"string\" && elem.className ||\n\t\t\t\t\t\t\t\ttypeof elem.getAttribute !== \"undefined\" &&\n\t\t\t\t\t\t\t\t\telem.getAttribute( \"class\" ) ||\n\t\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t\t);\n\t\t\t\t} );\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\t/* eslint-disable max-len */\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t\t/* eslint-enable max-len */\n\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": function( type, what, _argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tvar cache, uniqueCache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( ( node = node[ dir ] ) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\n\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\tnode = parent;\n\t\t\t\t\t\t\touterCache = node[ expando ] || ( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\n\t\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\touterCache = node[ expando ] || ( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t\"PSEUDO\": function( pseudo, argument ) {\n\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction( function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf( seed, matched[ i ] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[ i ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} ) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\n\t\t// Potentially complex pseudos\n\t\t\"not\": markFunction( function( selector ) {\n\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction( function( seed, matches, _context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\t\t\t\t\tseed[ i ] = !( matches[ i ] = elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} ) :\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tinput[ 0 ] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\n\t\t\t\t\t// Don't keep the element (issue #299)\n\t\t\t\t\tinput[ 0 ] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t} ),\n\n\t\t\"has\": markFunction( function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t} ),\n\n\t\t\"contains\": markFunction( function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t} ),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test( lang || \"\" ) ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( ( elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute( \"xml:lang\" ) || elem.getAttribute( \"lang\" ) ) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t} ),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement &&\n\t\t\t\t( !document.hasFocus || document.hasFocus() ) &&\n\t\t\t\t!!( elem.type || elem.href || ~elem.tabIndex );\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": createDisabledPseudo( false ),\n\t\t\"disabled\": createDisabledPseudo( true ),\n\n\t\t\"checked\": function( elem ) {\n\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn ( nodeName === \"input\" && !!elem.checked ) ||\n\t\t\t\t( nodeName === \"option\" && !!elem.selected );\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t//   but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[ \"empty\" ]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\n\t\t\t\t// Support: IE<8\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\n\t\t\t\t( ( attr = elem.getAttribute( \"type\" ) ) == null ||\n\t\t\t\t\tattr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo( function() {\n\t\t\treturn [ 0 ];\n\t\t} ),\n\n\t\t\"last\": createPositionalPseudo( function( _matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t} ),\n\n\t\t\"eq\": createPositionalPseudo( function( _matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t} ),\n\n\t\t\"even\": createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\t\"odd\": createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\t\"lt\": createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ?\n\t\t\t\targument + length :\n\t\t\t\targument > length ?\n\t\t\t\t\tlength :\n\t\t\t\t\targument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\t\"gt\": createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} )\n\t}\n};\n\nExpr.pseudos[ \"nth\" ] = Expr.pseudos[ \"eq\" ];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || ( match = rcomma.exec( soFar ) ) ) {\n\t\t\tif ( match ) {\n\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[ 0 ].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( ( tokens = [] ) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( ( match = rcombinators.exec( soFar ) ) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push( {\n\t\t\t\tvalue: matched,\n\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[ 0 ].replace( rtrim, \" \" )\n\t\t\t} );\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||\n\t\t\t\t( match = preFilters[ type ]( match ) ) ) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push( {\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t} );\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n};\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[ i ].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tskip = combinator.next,\n\t\tkey = skip || dir,\n\t\tcheckNonElements = base && key === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, uniqueCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\n\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\tuniqueCache = outerCache[ elem.uniqueID ] ||\n\t\t\t\t\t\t\t( outerCache[ elem.uniqueID ] = {} );\n\n\t\t\t\t\t\tif ( skip && skip === elem.nodeName.toLowerCase() ) {\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\n\t\t\t\t\t\t} else if ( ( oldCache = uniqueCache[ key ] ) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn ( newCache[ 2 ] = oldCache[ 2 ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\tuniqueCache[ key ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[ i ]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[ 0 ];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[ i ], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction( function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts(\n\t\t\t\tselector || \"*\",\n\t\t\t\tcontext.nodeType ? [ context ] : context,\n\t\t\t\t[]\n\t\t\t),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( ( elem = temp[ i ] ) ) {\n\t\t\t\t\tmatcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) ) {\n\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( ( matcherIn[ i ] = elem ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, ( matcherOut = [] ), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) &&\n\t\t\t\t\t\t( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) {\n\n\t\t\t\t\t\tseed[ temp ] = !( results[ temp ] = elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t} );\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[ 0 ].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[ \" \" ],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\tvar ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t( checkContext = context ).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\n\t\t\t// Avoid hanging onto element (issue #299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {\n\t\t\tmatchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[ j ].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\n\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\ttokens\n\t\t\t\t\t\t.slice( 0, i - 1 )\n\t\t\t\t\t\t.concat( { value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" } )\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find[ \"TAG\" ]( \"*\", outermost ),\n\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\n\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\toutermostContext = context == document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: IE<9, Safari\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching elements by id\n\t\t\tfor ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( !context && elem.ownerDocument != document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( ( matcher = elementMatchers[ j++ ] ) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml ) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( ( elem = !matcher && elem ) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( ( matcher = setMatchers[ j++ ] ) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !( unmatched[ i ] || setMatched[ i ] ) ) {\n\t\t\t\t\t\t\t\tsetMatched[ i ] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[ i ] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache(\n\t\t\tselector,\n\t\t\tmatcherFromGroupMatchers( elementMatchers, setMatchers )\n\t\t);\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n};\n\n/**\n * A low-level selection function that works with Sizzle's compiled\n *  selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n *  selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nselect = Sizzle.select = function( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( ( selector = compiled.selector || selector ) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[ 0 ] = match[ 0 ].slice( 0 );\n\t\tif ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === \"ID\" &&\n\t\t\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {\n\n\t\t\tcontext = ( Expr.find[ \"ID\" ]( token.matches[ 0 ]\n\t\t\t\t.replace( runescape, funescape ), context ) || [] )[ 0 ];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr[ \"needsContext\" ].test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[ i ];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ ( type = token.type ) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( ( find = Expr.find[ type ] ) ) {\n\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( ( seed = find(\n\t\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext\n\t\t\t\t) ) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n};\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split( \"\" ).sort( sortOrder ).join( \"\" ) === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert( function( el ) {\n\n\t// Should return 1, but returns 4 (following)\n\treturn el.compareDocumentPosition( document.createElement( \"fieldset\" ) ) & 1;\n} );\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert( function( el ) {\n\tel.innerHTML = \"<a href='#'></a>\";\n\treturn el.firstChild.getAttribute( \"href\" ) === \"#\";\n} ) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t} );\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert( function( el ) {\n\tel.innerHTML = \"<input/>\";\n\tel.firstChild.setAttribute( \"value\", \"\" );\n\treturn el.firstChild.getAttribute( \"value\" ) === \"\";\n} ) ) {\n\taddHandle( \"value\", function( elem, _name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t} );\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert( function( el ) {\n\treturn el.getAttribute( \"disabled\" ) == null;\n} ) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\n\t\t\t\t( val = elem.getAttributeNode( name ) ) && val.specified ?\n\t\t\t\t\tval.value :\n\t\t\t\t\tnull;\n\t\t}\n\t} );\n}\n\nreturn Sizzle;\n\n} )( window );\n\n\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\n\n// Deprecated\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\njQuery.escapeSelector = Sizzle.escape;\n\n\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\n\n\nfunction nodeName( elem, name ) {\n\n\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\n}\nvar rsingleTag = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\n\n\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\t}\n\n\t// Single element\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\t}\n\n\t// Arraylike of elements (jQuery, arguments, Array)\n\tif ( typeof qualifier !== \"string\" ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t\t} );\n\t}\n\n\t// Filtered directly for both simple and complex selectors\n\treturn jQuery.filter( qualifier, elements, not );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\tif ( elems.length === 1 && elem.nodeType === 1 ) {\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\n\t}\n\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\treturn elem.nodeType === 1;\n\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i, ret,\n\t\t\tlen = this.length,\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tret = this.pushStack( [] );\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\treturn len > 1 ? jQuery.uniqueSort( ret ) : ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521)\n\t// Strict HTML recognition (trac-11290: must start with <)\n\t// Shortcut simple #id case for speed\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\n\n\t\t// Positional selectors never match, since there's no _selection_ context\n\t\tif ( !rneedsContext.test( selectors ) ) {\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t\t// Always skip document fragments\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\n\n\t\t\t\t\t\t// Don't pass non-elements to Sizzle\n\t\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\tif ( elem.contentDocument != null &&\n\n\t\t\t// Support: IE 11+\n\t\t\t// <object> elements with no `data` attribute has an object\n\t\t\t// `contentDocument` with a `null` prototype.\n\t\t\tgetProto( elem.contentDocument ) ) {\n\n\t\t\treturn elem.contentDocument;\n\t\t}\n\n\t\t// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\n\t\t// Treat the template element as a regular one in browsers that\n\t\t// don't support it.\n\t\tif ( nodeName( elem, \"template\" ) ) {\n\t\t\telem = elem.content || elem;\n\t\t}\n\n\t\treturn jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = locked || options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && toType( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory && !firing ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\nfunction Identity( v ) {\n\treturn v;\n}\nfunction Thrower( ex ) {\n\tthrow ex;\n}\n\nfunction adoptValue( value, resolve, reject, noValue ) {\n\tvar method;\n\n\ttry {\n\n\t\t// Check for promise aspect first to privilege synchronous behavior\n\t\tif ( value && isFunction( ( method = value.promise ) ) ) {\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\n\n\t\t// Other thenables\n\t\t} else if ( value && isFunction( ( method = value.then ) ) ) {\n\t\t\tmethod.call( value, resolve, reject );\n\n\t\t// Other non-thenables\n\t\t} else {\n\n\t\t\t// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\n\t\t\t// * false: [ value ].slice( 0 ) => resolve( value )\n\t\t\t// * true: [ value ].slice( 1 ) => resolve()\n\t\t\tresolve.apply( undefined, [ value ].slice( noValue ) );\n\t\t}\n\n\t// For Promises/A+, convert exceptions into rejections\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\n\t// Deferred#then to conditionally suppress rejection.\n\t} catch ( value ) {\n\n\t\t// Support: Android 4.0 only\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\treject.apply( undefined, [ value ] );\n\t}\n}\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, callbacks,\n\t\t\t\t// ... .then handlers, argument index, [final state]\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\t\"catch\": function( fn ) {\n\t\t\t\t\treturn promise.then( null, fn );\n\t\t\t\t},\n\n\t\t\t\t// Keep pipe for back-compat\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( _i, tuple ) {\n\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\n\t\t\t\t\t\t\tvar fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\n\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\n\t\t\t\t\tvar maxDepth = 0;\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar that = this,\n\t\t\t\t\t\t\t\targs = arguments,\n\t\t\t\t\t\t\t\tmightThrow = function() {\n\t\t\t\t\t\t\t\t\tvar returned, then;\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\n\t\t\t\t\t\t\t\t\tthen = returned &&\n\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\n\t\t\t\t\t\t\t\t\t\treturned.then;\n\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\n\t\t\t\t\t\t\t\t\tif ( isFunction( then ) ) {\n\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\n\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\n\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Handle all other returned values\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Process the value(s)\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\n\t\t\t\t\t\t\t\tprocess = special ?\n\t\t\t\t\t\t\t\t\tmightThrow :\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.stackTrace );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\n\t\t\t\t\t\t\t// subsequent errors\n\t\t\t\t\t\t\tif ( depth ) {\n\t\t\t\t\t\t\t\tprocess();\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Call an optional hook to record the stack, in case of exception\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getStackHook ) {\n\t\t\t\t\t\t\t\t\tprocess.stackTrace = jQuery.Deferred.getStackHook();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\n\t\t\t\t\t\t// progress_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onProgress ) ?\n\t\t\t\t\t\t\t\t\tonProgress :\n\t\t\t\t\t\t\t\t\tIdentity,\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// fulfilled_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onFulfilled ) ?\n\t\t\t\t\t\t\t\t\tonFulfilled :\n\t\t\t\t\t\t\t\t\tIdentity\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// rejected_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onRejected ) ?\n\t\t\t\t\t\t\t\t\tonRejected :\n\t\t\t\t\t\t\t\t\tThrower\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 5 ];\n\n\t\t\t// promise.progress = list.add\n\t\t\t// promise.done = list.add\n\t\t\t// promise.fail = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(\n\t\t\t\t\tfunction() {\n\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\n\t\t\t\t\t\t// state = \"rejected\"\n\t\t\t\t\t\tstate = stateString;\n\t\t\t\t\t},\n\n\t\t\t\t\t// rejected_callbacks.disable\n\t\t\t\t\t// fulfilled_callbacks.disable\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\n\n\t\t\t\t\t// rejected_handlers.disable\n\t\t\t\t\t// fulfilled_handlers.disable\n\t\t\t\t\ttuples[ 3 - i ][ 3 ].disable,\n\n\t\t\t\t\t// progress_callbacks.lock\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock,\n\n\t\t\t\t\t// progress_handlers.lock\n\t\t\t\t\ttuples[ 0 ][ 3 ].lock\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// progress_handlers.fire\n\t\t\t// fulfilled_handlers.fire\n\t\t\t// rejected_handlers.fire\n\t\t\tlist.add( tuple[ 3 ].fire );\n\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\t// deferred.notifyWith = list.fireWith\n\t\t\t// deferred.resolveWith = list.fireWith\n\t\t\t// deferred.rejectWith = list.fireWith\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( singleValue ) {\n\t\tvar\n\n\t\t\t// count of uncompleted subordinates\n\t\t\tremaining = arguments.length,\n\n\t\t\t// count of unprocessed arguments\n\t\t\ti = remaining,\n\n\t\t\t// subordinate fulfillment data\n\t\t\tresolveContexts = Array( i ),\n\t\t\tresolveValues = slice.call( arguments ),\n\n\t\t\t// the primary Deferred\n\t\t\tprimary = jQuery.Deferred(),\n\n\t\t\t// subordinate callback factory\n\t\t\tupdateFunc = function( i ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tresolveContexts[ i ] = this;\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( !( --remaining ) ) {\n\t\t\t\t\t\tprimary.resolveWith( resolveContexts, resolveValues );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t// Single- and empty arguments are adopted like Promise.resolve\n\t\tif ( remaining <= 1 ) {\n\t\t\tadoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,\n\t\t\t\t!remaining );\n\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\n\t\t\tif ( primary.state() === \"pending\" ||\n\t\t\t\tisFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\n\n\t\t\t\treturn primary.then();\n\t\t\t}\n\t\t}\n\n\t\t// Multiple arguments are aggregated like Promise.all array elements\n\t\twhile ( i-- ) {\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );\n\t\t}\n\n\t\treturn primary.promise();\n\t}\n} );\n\n\n// These usually indicate a programmer mistake during development,\n// warn about them ASAP rather than swallowing them by default.\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\n\njQuery.Deferred.exceptionHook = function( error, stack ) {\n\n\t// Support: IE 8 - 9 only\n\t// Console exists when dev tools are open, which can happen at any time\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message, error.stack, stack );\n\t}\n};\n\n\n\n\njQuery.readyException = function( error ) {\n\twindow.setTimeout( function() {\n\t\tthrow error;\n\t} );\n};\n\n\n\n\n// The deferred used on DOM ready\nvar readyList = jQuery.Deferred();\n\njQuery.fn.ready = function( fn ) {\n\n\treadyList\n\t\t.then( fn )\n\n\t\t// Wrap jQuery.readyException in a function so that the lookup\n\t\t// happens at the time of error handling instead of callback\n\t\t// registration.\n\t\t.catch( function( error ) {\n\t\t\tjQuery.readyException( error );\n\t\t} );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See trac-6781\n\treadyWait: 1,\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\t}\n} );\n\njQuery.ready.then = readyList.then;\n\n// The ready event handler and self cleanup method\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\n// Catch cases where $(document).ready() is called\n// after the browser event has already occurred.\n// Support: IE <=9 - 10 only\n// Older IE sometimes signals \"interactive\" too soon\nif ( document.readyState === \"complete\" ||\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\twindow.setTimeout( jQuery.ready );\n\n} else {\n\n\t// Use the handy event callback\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t// A fallback to window.onload, that will always work\n\twindow.addEventListener( \"load\", completed );\n}\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( toType( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, _key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\t\tvalue :\n\t\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( chainable ) {\n\t\treturn elems;\n\t}\n\n\t// Gets\n\tif ( bulk ) {\n\t\treturn fn.call( elems );\n\t}\n\n\treturn len ? fn( elems[ 0 ], key ) : emptyGet;\n};\n\n\n// Matches dashed string for camelizing\nvar rmsPrefix = /^-ms-/,\n\trdashAlpha = /-([a-z])/g;\n\n// Used by camelCase as callback to replace()\nfunction fcamelCase( _all, letter ) {\n\treturn letter.toUpperCase();\n}\n\n// Convert dashed to camelCase; used by the css and data modules\n// Support: IE <=9 - 11, Edge 12 - 15\n// Microsoft forgot to hump their vendor prefix (trac-9572)\nfunction camelCase( string ) {\n\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n}\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t//  - Node\n\t//    - Node.ELEMENT_NODE\n\t//    - Node.DOCUMENT_NODE\n\t//  - Object\n\t//    - Any\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tcache: function( owner ) {\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see trac-8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\t// Always use camelCase key (gh-2257)\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ camelCase( data ) ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ camelCase( prop ) ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\n\t\t\t// Always use camelCase key (gh-2257)\n\t\t\towner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];\n\t},\n\taccess: function( owner, key, value ) {\n\n\t\t// In cases where either:\n\t\t//\n\t\t//   1. No key was specified\n\t\t//   2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t//   1. The entire cache object\n\t\t//   2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\treturn this.get( owner, key );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t//   1. An object of properties\n\t\t//   2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key !== undefined ) {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( Array.isArray( key ) ) {\n\n\t\t\t\t// If key is an array of keys...\n\t\t\t\t// We always set camelCase keys, so remove that.\n\t\t\t\tkey = key.map( camelCase );\n\t\t\t} else {\n\t\t\t\tkey = camelCase( key );\n\n\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\tkey = key in cache ?\n\t\t\t\t\t[ key ] :\n\t\t\t\t\t( key.match( rnothtmlwhite ) || [] );\n\t\t\t}\n\n\t\t\ti = key.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ key[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <=35 - 45\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction getData( data ) {\n\tif ( data === \"true\" ) {\n\t\treturn true;\n\t}\n\n\tif ( data === \"false\" ) {\n\t\treturn false;\n\t}\n\n\tif ( data === \"null\" ) {\n\t\treturn null;\n\t}\n\n\t// Only convert to a number if it doesn't change the string\n\tif ( data === +data + \"\" ) {\n\t\treturn +data;\n\t}\n\n\tif ( rbrace.test( data ) ) {\n\t\treturn JSON.parse( data );\n\t}\n\n\treturn data;\n}\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = getData( data );\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE 11 only\n\t\t\t\t\t\t// The attrs elements can be null (trac-14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// The key will always be camelCased in Data\n\t\t\t\tdata = dataUser.get( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tthis.each( function() {\n\n\t\t\t\t// We always store the camelCased key\n\t\t\t\tdataUser.set( this, key, value );\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || Array.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar documentElement = document.documentElement;\n\n\n\n\tvar isAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem );\n\t\t},\n\t\tcomposed = { composed: true };\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only\n\t// Check attachment across shadow DOM boundaries when possible (gh-3504)\n\t// Support: iOS 10.0-10.2 only\n\t// Early iOS 10 versions support `attachShadow` but not `getRootNode`,\n\t// leading to errors. We need to check for `getRootNode`.\n\tif ( documentElement.getRootNode ) {\n\t\tisAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem ) ||\n\t\t\t\telem.getRootNode( composed ) === elem.ownerDocument;\n\t\t};\n\t}\nvar isHiddenWithinTree = function( elem, el ) {\n\n\t\t// isHiddenWithinTree might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\n\t\t// Inline style trumps all\n\t\treturn elem.style.display === \"none\" ||\n\t\t\telem.style.display === \"\" &&\n\n\t\t\t// Otherwise, check computed style\n\t\t\t// Support: Firefox <=43 - 45\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\n\t\t\t// in the document.\n\t\t\tisAttached( elem ) &&\n\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted, scale,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() {\n\t\t\t\treturn tween.cur();\n\t\t\t} :\n\t\t\tfunction() {\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\n\t\t\t},\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = elem.nodeType &&\n\t\t\t( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Support: Firefox <=54\n\t\t// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\n\t\tinitial = initial / 2;\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\twhile ( maxIterations-- ) {\n\n\t\t\t// Evaluate and update our best guess (doubling guesses that zero out).\n\t\t\t// Finish if the scale equals or crosses 1 (making the old*new product non-positive).\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\t\t\tif ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {\n\t\t\t\tmaxIterations = 0;\n\t\t\t}\n\t\t\tinitialInUnit = initialInUnit / scale;\n\n\t\t}\n\n\t\tinitialInUnit = initialInUnit * 2;\n\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\nvar defaultDisplayMap = {};\n\nfunction getDefaultDisplay( elem ) {\n\tvar temp,\n\t\tdoc = elem.ownerDocument,\n\t\tnodeName = elem.nodeName,\n\t\tdisplay = defaultDisplayMap[ nodeName ];\n\n\tif ( display ) {\n\t\treturn display;\n\t}\n\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\n\tdisplay = jQuery.css( temp, \"display\" );\n\n\ttemp.parentNode.removeChild( temp );\n\n\tif ( display === \"none\" ) {\n\t\tdisplay = \"block\";\n\t}\n\tdefaultDisplayMap[ nodeName ] = display;\n\n\treturn display;\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\t// Determine new display value for elements that need to change\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\n\t\t\t// inline or about-to-be-restored)\n\t\t\tif ( display === \"none\" ) {\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\n\t\t\t\tif ( !values[ index ] ) {\n\t\t\t\t\telem.style.display = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( display !== \"none\" ) {\n\t\t\t\tvalues[ index ] = \"none\";\n\n\t\t\t\t// Remember what we're overwriting\n\t\t\t\tdataPriv.set( elem, \"display\", display );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of the elements in a second loop to avoid constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\tif ( values[ index ] != null ) {\n\t\t\telements[ index ].style.display = values[ index ];\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend( {\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHiddenWithinTree( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i );\n\nvar rscriptType = ( /^$|^module$|\\/(?:java|ecma)script/i );\n\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0 - 4.3 only\n\t// Check state lost if the name is set (trac-11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (trac-14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Android <=4.1 only\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE <=11 only\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n\n\t// Support: IE <=9 only\n\t// IE <=9 replaces <option> tags with their contents when inserted outside of\n\t// the select element.\n\tdiv.innerHTML = \"<option></option>\";\n\tsupport.option = !!div.lastChild;\n} )();\n\n\n// We have to close these tags to support XHTML (trac-13200)\nvar wrapMap = {\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting <tbody> or other required elements.\n\tthead: [ 1, \"<table>\", \"</table>\" ],\n\tcol: [ 2, \"<table><colgroup>\", \"</colgroup></table>\" ],\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// Support: IE <=9 only\nif ( !support.option ) {\n\twrapMap.optgroup = wrapMap.option = [ 1, \"<select multiple='multiple'>\", \"</select>\" ];\n}\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE <=9 - 11 only\n\t// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)\n\tvar ret;\n\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\tret = context.getElementsByTagName( tag || \"*\" );\n\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\n\t\tret = context.querySelectorAll( tag || \"*\" );\n\n\t} else {\n\t\tret = [];\n\t}\n\n\tif ( tag === undefined || tag && nodeName( context, tag ) ) {\n\t\treturn jQuery.merge( [ context ], ret );\n\t}\n\n\treturn ret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, attached, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( toType( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (trac-12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tattached = isAttached( elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( attached ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\nvar rtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\n// Support: IE <=9 - 11+\n// focus() and blur() are asynchronous, except when they are no-op.\n// So expect focus to be synchronous when the element is already active,\n// and blur to be synchronous when the element is not already active.\n// (focus and blur are always synchronous in other supported browsers,\n// this just defines when we can count on it).\nfunction expectSync( elem, type ) {\n\treturn ( elem === safeActiveElement() ) === ( type === \"focus\" );\n}\n\n// Support: IE <=9 only\n// Accessing document.activeElement can throw unexpectedly\n// https://bugs.jquery.com/ticket/13393\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Only attach events to objects that accept data\n\t\tif ( !acceptData( elem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Ensure that invalid selectors throw exceptions at attach time\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\n\t\tif ( selector ) {\n\t\t\tjQuery.find.matchesSelector( documentElement, selector );\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = Object.create( null );\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( nativeEvent ) {\n\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\n\t\t\targs = new Array( arguments.length ),\n\n\t\t\t// Make a writable jQuery.Event from the native event object\n\t\t\tevent = jQuery.event.fix( nativeEvent ),\n\n\t\t\thandlers = (\n\t\t\t\tdataPriv.get( this, \"events\" ) || Object.create( null )\n\t\t\t)[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// If the event is namespaced, then each handler is only invoked if it is\n\t\t\t\t// specially universal or its namespaces are a superset of the event's.\n\t\t\t\tif ( !event.rnamespace || handleObj.namespace === false ||\n\t\t\t\t\tevent.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, handleObj, sel, matchedHandlers, matchedSelectors,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\tif ( delegateCount &&\n\n\t\t\t// Support: IE <=9\n\t\t\t// Black-hole SVG <use> instance trees (trac-13180)\n\t\t\tcur.nodeType &&\n\n\t\t\t// Support: Firefox <=42\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n\t\t\t// Support: IE 11 only\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\n\t\t\t!( event.type === \"click\" && event.button >= 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (trac-13208)\n\t\t\t\t// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)\n\t\t\t\tif ( cur.nodeType === 1 && !( event.type === \"click\" && cur.disabled === true ) ) {\n\t\t\t\t\tmatchedHandlers = [];\n\t\t\t\t\tmatchedSelectors = {};\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (trac-13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatchedSelectors[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] ) {\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matchedHandlers.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tcur = this;\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\taddProp: function( name, hook ) {\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget: isFunction( hook ) ?\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn hook( this.originalEvent );\n\t\t\t\t\t}\n\t\t\t\t} :\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn this.originalEvent[ name ];\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\tset: function( value ) {\n\t\t\t\tObject.defineProperty( this, name, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: value\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\tfix: function( originalEvent ) {\n\t\treturn originalEvent[ jQuery.expando ] ?\n\t\t\toriginalEvent :\n\t\t\tnew jQuery.Event( originalEvent );\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tclick: {\n\n\t\t\t// Utilize native event to ensure correct state for checkable inputs\n\t\t\tsetup: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Claim the first handler\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\t// dataPriv.set( el, \"click\", ... )\n\t\t\t\t\tleverageNative( el, \"click\", returnTrue );\n\t\t\t\t}\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\ttrigger: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Force setup before triggering a click\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\tleverageNative( el, \"click\" );\n\t\t\t\t}\n\n\t\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, suppress native .click() on links\n\t\t\t// Also prevent it if we're currently inside a leveraged native-event stack\n\t\t\t_default: function( event ) {\n\t\t\t\tvar target = event.target;\n\t\t\t\treturn rcheckableType.test( target.type ) &&\n\t\t\t\t\ttarget.click && nodeName( target, \"input\" ) &&\n\t\t\t\t\tdataPriv.get( target, \"click\" ) ||\n\t\t\t\t\tnodeName( target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Ensure the presence of an event listener that handles manually-triggered\n// synthetic events by interrupting progress until reinvoked in response to\n// *native* events that it fires directly, ensuring that state changes have\n// already occurred before other listeners are invoked.\nfunction leverageNative( el, type, expectSync ) {\n\n\t// Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add\n\tif ( !expectSync ) {\n\t\tif ( dataPriv.get( el, type ) === undefined ) {\n\t\t\tjQuery.event.add( el, type, returnTrue );\n\t\t}\n\t\treturn;\n\t}\n\n\t// Register the controller as a special universal handler for all event namespaces\n\tdataPriv.set( el, type, false );\n\tjQuery.event.add( el, type, {\n\t\tnamespace: false,\n\t\thandler: function( event ) {\n\t\t\tvar notAsync, result,\n\t\t\t\tsaved = dataPriv.get( this, type );\n\n\t\t\tif ( ( event.isTrigger & 1 ) && this[ type ] ) {\n\n\t\t\t\t// Interrupt processing of the outer synthetic .trigger()ed event\n\t\t\t\t// Saved data should be false in such cases, but might be a leftover capture object\n\t\t\t\t// from an async native handler (gh-4350)\n\t\t\t\tif ( !saved.length ) {\n\n\t\t\t\t\t// Store arguments for use when handling the inner native event\n\t\t\t\t\t// There will always be at least one argument (an event object), so this array\n\t\t\t\t\t// will not be confused with a leftover capture object.\n\t\t\t\t\tsaved = slice.call( arguments );\n\t\t\t\t\tdataPriv.set( this, type, saved );\n\n\t\t\t\t\t// Trigger the native event and capture its result\n\t\t\t\t\t// Support: IE <=9 - 11+\n\t\t\t\t\t// focus() and blur() are asynchronous\n\t\t\t\t\tnotAsync = expectSync( this, type );\n\t\t\t\t\tthis[ type ]();\n\t\t\t\t\tresult = dataPriv.get( this, type );\n\t\t\t\t\tif ( saved !== result || notAsync ) {\n\t\t\t\t\t\tdataPriv.set( this, type, false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult = {};\n\t\t\t\t\t}\n\t\t\t\t\tif ( saved !== result ) {\n\n\t\t\t\t\t\t// Cancel the outer synthetic event\n\t\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t// Support: Chrome 86+\n\t\t\t\t\t\t// In Chrome, if an element having a focusout handler is blurred by\n\t\t\t\t\t\t// clicking outside of it, it invokes the handler synchronously. If\n\t\t\t\t\t\t// that handler calls `.remove()` on the element, the data is cleared,\n\t\t\t\t\t\t// leaving `result` undefined. We need to guard against this.\n\t\t\t\t\t\treturn result && result.value;\n\t\t\t\t\t}\n\n\t\t\t\t// If this is an inner synthetic event for an event with a bubbling surrogate\n\t\t\t\t// (focus or blur), assume that the surrogate already propagated from triggering the\n\t\t\t\t// native event and prevent that from happening again here.\n\t\t\t\t// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the\n\t\t\t\t// bubbling surrogate propagates *after* the non-bubbling base), but that seems\n\t\t\t\t// less bad than duplication.\n\t\t\t\t} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\n\t\t\t// If this is a native event triggered above, everything is now in order\n\t\t\t// Fire an inner synthetic event with the original arguments\n\t\t\t} else if ( saved.length ) {\n\n\t\t\t\t// ...and capture the result\n\t\t\t\tdataPriv.set( this, type, {\n\t\t\t\t\tvalue: jQuery.event.trigger(\n\n\t\t\t\t\t\t// Support: IE <=9 - 11+\n\t\t\t\t\t\t// Extend with the prototype to reset the above stopImmediatePropagation()\n\t\t\t\t\t\tjQuery.extend( saved[ 0 ], jQuery.Event.prototype ),\n\t\t\t\t\t\tsaved.slice( 1 ),\n\t\t\t\t\t\tthis\n\t\t\t\t\t)\n\t\t\t\t} );\n\n\t\t\t\t// Abort handling of the native event\n\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t}\n\t\t}\n\t} );\n}\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android <=2.3 only\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t\t// Create target properties\n\t\t// Support: Safari <=6 - 7 only\n\t\t// Target should not be a text node (trac-504, trac-13143)\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\n\t\t\tsrc.target.parentNode :\n\t\t\tsrc.target;\n\n\t\tthis.currentTarget = src.currentTarget;\n\t\tthis.relatedTarget = src.relatedTarget;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || Date.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Includes all common event props including KeyEvent and MouseEvent specific props\njQuery.each( {\n\taltKey: true,\n\tbubbles: true,\n\tcancelable: true,\n\tchangedTouches: true,\n\tctrlKey: true,\n\tdetail: true,\n\teventPhase: true,\n\tmetaKey: true,\n\tpageX: true,\n\tpageY: true,\n\tshiftKey: true,\n\tview: true,\n\t\"char\": true,\n\tcode: true,\n\tcharCode: true,\n\tkey: true,\n\tkeyCode: true,\n\tbutton: true,\n\tbuttons: true,\n\tclientX: true,\n\tclientY: true,\n\toffsetX: true,\n\toffsetY: true,\n\tpointerId: true,\n\tpointerType: true,\n\tscreenX: true,\n\tscreenY: true,\n\ttargetTouches: true,\n\ttoElement: true,\n\ttouches: true,\n\twhich: true\n}, jQuery.event.addProp );\n\njQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( type, delegateType ) {\n\tjQuery.event.special[ type ] = {\n\n\t\t// Utilize native event if possible so blur/focus sequence is correct\n\t\tsetup: function() {\n\n\t\t\t// Claim the first handler\n\t\t\t// dataPriv.set( this, \"focus\", ... )\n\t\t\t// dataPriv.set( this, \"blur\", ... )\n\t\t\tleverageNative( this, type, expectSync );\n\n\t\t\t// Return false to allow normal processing in the caller\n\t\t\treturn false;\n\t\t},\n\t\ttrigger: function() {\n\n\t\t\t// Force setup before trigger\n\t\t\tleverageNative( this, type );\n\n\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\treturn true;\n\t\t},\n\n\t\t// Suppress native focus or blur if we're currently inside\n\t\t// a leveraged native-event stack\n\t\t_default: function( event ) {\n\t\t\treturn dataPriv.get( event.target, type );\n\t\t},\n\n\t\tdelegateType: delegateType\n\t};\n} );\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://bugs.chromium.org/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event )  dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\n\t// Support: IE <=10 - 11, Edge 12 - 13 only\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /<script|<style|<link/i,\n\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\n\trcleanScript = /^\\s*<!\\[CDATA\\[|\\]\\]>\\s*$/g;\n\n// Prefer a tbody over its parent table for containing new rows\nfunction manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tif ( ( elem.type || \"\" ).slice( 0, 5 ) === \"true/\" ) {\n\t\telem.type = elem.type.slice( 5 );\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.get( src );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdataPriv.remove( dest, \"handle events\" );\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = flat( args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tvalueIsFunction = isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( valueIsFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (trac-8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Reenable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src && ( node.type || \"\" ).toLowerCase()  !== \"module\" ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl && !node.noModule ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src, {\n\t\t\t\t\t\t\t\t\tnonce: node.nonce || node.getAttribute( \"nonce\" )\n\t\t\t\t\t\t\t\t}, doc );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Unwrap a CDATA section containing script contents. This shouldn't be\n\t\t\t\t\t\t\t// needed as in XML documents they're already not visible when\n\t\t\t\t\t\t\t// inspecting element contents and in HTML documents they have no\n\t\t\t\t\t\t\t// meaning but we're preserving that logic for backwards compatibility.\n\t\t\t\t\t\t\t// This will be removed completely in 4.0. See gh-4904.\n\t\t\t\t\t\t\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), node, doc );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && isAttached( node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html;\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = isAttached( elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar rcustomProp = /^--/;\n\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\nvar swap = function( elem, options, callback ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.call( elem );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar rboxStyle = new RegExp( cssExpand.join( \"|\" ), \"i\" );\n\nvar whitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\";\n\n\nvar rtrimCSS = new RegExp(\n\t\"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\",\n\t\"g\"\n);\n\n\n\n\n( function() {\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\tdiv.style.cssText =\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"width:60%;top:1%\";\n\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.right = \"60%\";\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t// Support: IE 9 - 11 only\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t// Support: IE 9 only\n\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t// Support: Chrome <=64\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\tdiv.style.position = \"absolute\";\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}\n\n\tfunction roundPixelMeasures( measure ) {\n\t\treturn Math.round( parseFloat( measure ) );\n\t}\n\n\tvar pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,\n\t\treliableTrDimensionsVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE <=9 - 11 only\n\t// Style of cloned element affects source element cloned (trac-8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tjQuery.extend( support, {\n\t\tboxSizingReliable: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelBoxStyles: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelBoxStylesVal;\n\t\t},\n\t\tpixelPosition: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn reliableMarginLeftVal;\n\t\t},\n\t\tscrollboxSize: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn scrollboxSizeVal;\n\t\t},\n\n\t\t// Support: IE 9 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Behavior in IE 9 is more subtle than in newer versions & it passes\n\t\t// some versions of this test; make sure not to make it pass there!\n\t\t//\n\t\t// Support: Firefox 70+\n\t\t// Only Firefox includes border widths\n\t\t// in computed dimensions. (gh-4529)\n\t\treliableTrDimensions: function() {\n\t\t\tvar table, tr, trChild, trStyle;\n\t\t\tif ( reliableTrDimensionsVal == null ) {\n\t\t\t\ttable = document.createElement( \"table\" );\n\t\t\t\ttr = document.createElement( \"tr\" );\n\t\t\t\ttrChild = document.createElement( \"div\" );\n\n\t\t\t\ttable.style.cssText = \"position:absolute;left:-11111px;border-collapse:separate\";\n\t\t\t\ttr.style.cssText = \"border:1px solid\";\n\n\t\t\t\t// Support: Chrome 86+\n\t\t\t\t// Height set through cssText does not get applied.\n\t\t\t\t// Computed height then comes back as 0.\n\t\t\t\ttr.style.height = \"1px\";\n\t\t\t\ttrChild.style.height = \"9px\";\n\n\t\t\t\t// Support: Android 8 Chrome 86+\n\t\t\t\t// In our bodyBackground.html iframe,\n\t\t\t\t// display for all div elements is set to \"inline\",\n\t\t\t\t// which causes a problem only in Android 8 Chrome 86.\n\t\t\t\t// Ensuring the div is display: block\n\t\t\t\t// gets around this issue.\n\t\t\t\ttrChild.style.display = \"block\";\n\n\t\t\t\tdocumentElement\n\t\t\t\t\t.appendChild( table )\n\t\t\t\t\t.appendChild( tr )\n\t\t\t\t\t.appendChild( trChild );\n\n\t\t\t\ttrStyle = window.getComputedStyle( tr );\n\t\t\t\treliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderTopWidth, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;\n\n\t\t\t\tdocumentElement.removeChild( table );\n\t\t\t}\n\t\t\treturn reliableTrDimensionsVal;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\t\tisCustomProp = rcustomProp.test( name ),\n\n\t\t// Support: Firefox 51+\n\t\t// Retrieving style before computed somehow\n\t\t// fixes an issue with getting wrong values\n\t\t// on detached elements\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\n\t// getPropertyValue is needed for:\n\t//   .css('filter') (IE 9 only, trac-12537)\n\t//   .css('--customProperty) (gh-3144)\n\tif ( computed ) {\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\n\t\t// trim whitespace for custom property (issue gh-4926)\n\t\tif ( isCustomProp ) {\n\n\t\t\t// rtrim treats U+000D CARRIAGE RETURN and U+000C FORM FEED\n\t\t\t// as whitespace while CSS does not, but this is not a problem\n\t\t\t// because CSS preprocessing replaces them with U+000A LINE FEED\n\t\t\t// (which *is* CSS whitespace)\n\t\t\t// https://www.w3.org/TR/css-syntax-3/#input-preprocessing\n\t\t\tret = ret.replace( rtrimCSS, \"$1\" );\n\t\t}\n\n\t\tif ( ret === \"\" && !isAttached( elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// https://drafts.csswg.org/cssom/#resolved-values\n\t\tif ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE <=9 - 11 only\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar cssPrefixes = [ \"Webkit\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style,\n\tvendorProps = {};\n\n// Return a vendor-prefixed property or undefined\nfunction vendorPropName( name ) {\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\n// Return a potentially-mapped jQuery.cssProps or vendor prefixed property\nfunction finalPropName( name ) {\n\tvar final = jQuery.cssProps[ name ] || vendorProps[ name ];\n\n\tif ( final ) {\n\t\treturn final;\n\t}\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\treturn vendorProps[ name ] = vendorPropName( name ) || name;\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t};\n\nfunction setPositiveNumber( _elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {\n\tvar i = dimension === \"width\" ? 1 : 0,\n\t\textra = 0,\n\t\tdelta = 0;\n\n\t// Adjustment may not be necessary\n\tif ( box === ( isBorderBox ? \"border\" : \"content\" ) ) {\n\t\treturn 0;\n\t}\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin\n\t\tif ( box === \"margin\" ) {\n\t\t\tdelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\t// If we get here with a content-box, we're seeking \"padding\" or \"border\" or \"margin\"\n\t\tif ( !isBorderBox ) {\n\n\t\t\t// Add padding\n\t\t\tdelta += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// For \"border\" or \"margin\", add border\n\t\t\tif ( box !== \"padding\" ) {\n\t\t\t\tdelta += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\n\t\t\t// But still keep track of it otherwise\n\t\t\t} else {\n\t\t\t\textra += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\n\t\t// If we get here with a border-box (content + padding + border), we're seeking \"content\" or\n\t\t// \"padding\" or \"margin\"\n\t\t} else {\n\n\t\t\t// For \"content\", subtract padding\n\t\t\tif ( box === \"content\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// For \"content\" or \"padding\", subtract border\n\t\t\tif ( box !== \"margin\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Account for positive content-box scroll gutter when requested by providing computedVal\n\tif ( !isBorderBox && computedVal >= 0 ) {\n\n\t\t// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\n\t\t// Assuming integer scroll gutter, subtract the rest and round down\n\t\tdelta += Math.max( 0, Math.ceil(\n\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\tcomputedVal -\n\t\t\tdelta -\n\t\t\textra -\n\t\t\t0.5\n\n\t\t// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter\n\t\t// Use an explicit zero to avoid NaN (gh-3964)\n\t\t) ) || 0;\n\t}\n\n\treturn delta;\n}\n\nfunction getWidthOrHeight( elem, dimension, extra ) {\n\n\t// Start with computed style\n\tvar styles = getStyles( elem ),\n\n\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).\n\t\t// Fake content-box until we know it's needed to know the true value.\n\t\tboxSizingNeeded = !support.boxSizingReliable() || extra,\n\t\tisBorderBox = boxSizingNeeded &&\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\tvalueIsBorderBox = isBorderBox,\n\n\t\tval = curCSS( elem, dimension, styles ),\n\t\toffsetProp = \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );\n\n\t// Support: Firefox <=54\n\t// Return a confounding non-pixel value or feign ignorance, as appropriate.\n\tif ( rnumnonpx.test( val ) ) {\n\t\tif ( !extra ) {\n\t\t\treturn val;\n\t\t}\n\t\tval = \"auto\";\n\t}\n\n\n\t// Support: IE 9 - 11 only\n\t// Use offsetWidth/offsetHeight for when box sizing is unreliable.\n\t// In those cases, the computed value can be trusted to be border-box.\n\tif ( ( !support.boxSizingReliable() && isBorderBox ||\n\n\t\t// Support: IE 10 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Interestingly, in some cases IE 9 doesn't suffer from this issue.\n\t\t!support.reliableTrDimensions() && nodeName( elem, \"tr\" ) ||\n\n\t\t// Fall back to offsetWidth/offsetHeight when value is \"auto\"\n\t\t// This happens for inline elements with no explicit setting (gh-3571)\n\t\tval === \"auto\" ||\n\n\t\t// Support: Android <=4.1 - 4.3 only\n\t\t// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)\n\t\t!parseFloat( val ) && jQuery.css( elem, \"display\", false, styles ) === \"inline\" ) &&\n\n\t\t// Make sure the element is visible & connected\n\t\telem.getClientRects().length ) {\n\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t\t// Where available, offsetWidth/offsetHeight approximate border box dimensions.\n\t\t// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the\n\t\t// retrieved value as a content box dimension.\n\t\tvalueIsBorderBox = offsetProp in elem;\n\t\tif ( valueIsBorderBox ) {\n\t\t\tval = elem[ offsetProp ];\n\t\t}\n\t}\n\n\t// Normalize \"\" and auto\n\tval = parseFloat( val ) || 0;\n\n\t// Adjust for the element's box model\n\treturn ( val +\n\t\tboxModelAdjustment(\n\t\t\telem,\n\t\t\tdimension,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles,\n\n\t\t\t// Provide the current computed size to request scroll gutter calculation (gh-3589)\n\t\t\tval\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\t\"animationIterationCount\": true,\n\t\t\"columnCount\": true,\n\t\t\"fillOpacity\": true,\n\t\t\"flexGrow\": true,\n\t\t\"flexShrink\": true,\n\t\t\"fontWeight\": true,\n\t\t\"gridArea\": true,\n\t\t\"gridColumn\": true,\n\t\t\"gridColumnEnd\": true,\n\t\t\"gridColumnStart\": true,\n\t\t\"gridRow\": true,\n\t\t\"gridRowEnd\": true,\n\t\t\"gridRowStart\": true,\n\t\t\"lineHeight\": true,\n\t\t\"opacity\": true,\n\t\t\"order\": true,\n\t\t\"orphans\": true,\n\t\t\"widows\": true,\n\t\t\"zIndex\": true,\n\t\t\"zoom\": true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name ),\n\t\t\tstyle = elem.style;\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to query the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (trac-7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug trac-9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (trac-7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\t// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append\n\t\t\t// \"px\" to a few hardcoded values.\n\t\t\tif ( type === \"number\" && !isCustomProp ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tif ( isCustomProp ) {\n\t\t\t\t\tstyle.setProperty( name, value );\n\t\t\t\t} else {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name );\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to modify the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( _i, dimension ) {\n\tjQuery.cssHooks[ dimension ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\n\t\t\t\t\t// Support: Safari 8+\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\n\t\t\t\t\t// Support: IE <=11 only\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\n\t\t\t\t\t// in IE throws an error.\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\n\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\treturn getWidthOrHeight( elem, dimension, extra );\n\t\t\t\t\t} ) :\n\t\t\t\t\tgetWidthOrHeight( elem, dimension, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = getStyles( elem ),\n\n\t\t\t\t// Only read styles.position if the test has a chance to fail\n\t\t\t\t// to avoid forcing a reflow.\n\t\t\t\tscrollboxSizeBuggy = !support.scrollboxSize() &&\n\t\t\t\t\tstyles.position === \"absolute\",\n\n\t\t\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)\n\t\t\t\tboxSizingNeeded = scrollboxSizeBuggy || extra,\n\t\t\t\tisBorderBox = boxSizingNeeded &&\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\tsubtract = extra ?\n\t\t\t\t\tboxModelAdjustment(\n\t\t\t\t\t\telem,\n\t\t\t\t\t\tdimension,\n\t\t\t\t\t\textra,\n\t\t\t\t\t\tisBorderBox,\n\t\t\t\t\t\tstyles\n\t\t\t\t\t) :\n\t\t\t\t\t0;\n\n\t\t\t// Account for unreliable border-box dimensions by comparing offset* to computed and\n\t\t\t// faking a content-box to get border and padding (gh-3699)\n\t\t\tif ( isBorderBox && scrollboxSizeBuggy ) {\n\t\t\t\tsubtract -= Math.ceil(\n\t\t\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\t\t\tparseFloat( styles[ dimension ] ) -\n\t\t\t\t\tboxModelAdjustment( elem, dimension, \"border\", false, styles ) -\n\t\t\t\t\t0.5\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\n\n\t\t\t\telem.style[ dimension ] = value;\n\t\t\t\tvalue = jQuery.css( elem, dimension );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( prefix !== \"margin\" ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 && (\n\t\t\t\tjQuery.cssHooks[ tween.prop ] ||\n\t\t\t\t\ttween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9 only\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, inProgress,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\nfunction schedule() {\n\tif ( inProgress ) {\n\t\tif ( document.hidden === false && window.requestAnimationFrame ) {\n\t\t\twindow.requestAnimationFrame( schedule );\n\t\t} else {\n\t\t\twindow.setTimeout( schedule, jQuery.fx.interval );\n\t\t}\n\n\t\tjQuery.fx.tick();\n\t}\n}\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\n\t\tisBox = \"width\" in props || \"height\" in props,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Queue-skipping animations hijack the fx hooks\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Detect show/hide animations\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.test( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// Pretend to be hidden if this is a \"show\" and\n\t\t\t\t// there is still data from a stopped show/hide\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\n\t\t\t\t// Ignore all other no-op show/hide data\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\t\t}\n\t}\n\n\t// Bail out if this is a no-op like .hide().hide()\n\tpropTween = !jQuery.isEmptyObject( props );\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\n\t\treturn;\n\t}\n\n\t// Restrict \"overflow\" and \"display\" styles during box animations\n\tif ( isBox && elem.nodeType === 1 ) {\n\n\t\t// Support: IE <=9 - 11, Edge 12 - 15\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\n\t\t// from identically-valued overflowX and overflowY and Edge just mirrors\n\t\t// the overflowX value there.\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\n\t\trestoreDisplay = dataShow && dataShow.display;\n\t\tif ( restoreDisplay == null ) {\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\n\t\t}\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\tif ( display === \"none\" ) {\n\t\t\tif ( restoreDisplay ) {\n\t\t\t\tdisplay = restoreDisplay;\n\t\t\t} else {\n\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\t\t\tshowHide( [ elem ] );\n\t\t\t}\n\t\t}\n\n\t\t// Animate inline elements as inline-block\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\n\t\t\t\tif ( !propTween ) {\n\t\t\t\t\tanim.done( function() {\n\t\t\t\t\t\tstyle.display = restoreDisplay;\n\t\t\t\t\t} );\n\t\t\t\t\tif ( restoreDisplay == null ) {\n\t\t\t\t\t\tdisplay = style.display;\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// Implement show/hide animations\n\tpropTween = false;\n\tfor ( prop in orig ) {\n\n\t\t// General show/hide setup for this element animation\n\t\tif ( !propTween ) {\n\t\t\tif ( dataShow ) {\n\t\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\t\thidden = dataShow.hidden;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\n\t\t\t}\n\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\n\t\t\tif ( toggle ) {\n\t\t\t\tdataShow.hidden = !hidden;\n\t\t\t}\n\n\t\t\t// Show elements before animating them\n\t\t\tif ( hidden ) {\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t}\n\n\t\t\t/* eslint-disable no-loop-func */\n\n\t\t\tanim.done( function() {\n\n\t\t\t\t/* eslint-enable no-loop-func */\n\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\n\t\t\t\tif ( !hidden ) {\n\t\t\t\t\tshowHide( [ elem ] );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\t\tfor ( prop in orig ) {\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Per-property setup\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\t\tif ( !( prop in dataShow ) ) {\n\t\t\tdataShow[ prop ] = propTween.start;\n\t\t\tif ( hidden ) {\n\t\t\t\tpropTween.end = propTween.start;\n\t\t\t\tpropTween.start = 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( Array.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3 only\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\t// If there's more to do, yield\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t}\n\n\t\t\t// If this was an empty animation, synthesize a final progress notification\n\t\t\tif ( !length ) {\n\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t}\n\n\t\t\t// Resolve the animation and report its conclusion\n\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\treturn false;\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tresult.stop.bind( result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\t// Attach callbacks from options\n\tanimation\n\t\t.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\treturn animation;\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnothtmlwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tisFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !isFunction( easing ) && easing\n\t};\n\n\t// Go to the end state if fx are off\n\tif ( jQuery.fx.off ) {\n\t\topt.duration = 0;\n\n\t} else {\n\t\tif ( typeof opt.duration !== \"number\" ) {\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\n\n\t\t\t} else {\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHiddenWithinTree ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\n\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( _i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = Date.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Run the timer and safely remove it when done (allowing for external removal)\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tjQuery.fx.start();\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( inProgress ) {\n\t\treturn;\n\t}\n\n\tinProgress = true;\n\tschedule();\n};\n\njQuery.fx.stop = function() {\n\tinProgress = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: Android <=4.3 only\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE <=11 only\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: IE <=11 only\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// Attribute hooks are determined by the lowercase version\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tnodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name,\n\t\t\ti = 0,\n\n\t\t\t// Attribute names can contain non-HTML whitespace characters\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( _i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle,\n\t\t\tlowercaseName = name.toLowerCase();\n\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ lowercaseName ];\n\t\t\tattrHandle[ lowercaseName ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tlowercaseName :\n\t\t\t\tnull;\n\t\t\tattrHandle[ lowercaseName ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// Support: IE <=9 - 11 only\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// Use proper attribute retrieval (trac-12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\tif ( tabindex ) {\n\t\t\t\t\treturn parseInt( tabindex, 10 );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\n\t\t\t\t\telem.href\n\t\t\t\t) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Support: IE <=11 only\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\n// eslint rule \"no-unused-expressions\" is disabled for this code\n// since it considers such accessions noop\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\n\t// Strip and collapse whitespace according to HTML spec\n\t// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace\n\tfunction stripAndCollapse( value ) {\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\treturn tokens.join( \" \" );\n\t}\n\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\n}\n\nfunction classesToArray( value ) {\n\tif ( Array.isArray( value ) ) {\n\t\treturn value;\n\t}\n\tif ( typeof value === \"string\" ) {\n\t\treturn value.match( rnothtmlwhite ) || [];\n\t}\n\treturn [];\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + className + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += className + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + className + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + className + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar classNames, className, i, self,\n\t\t\ttype = typeof value,\n\t\t\tisValidValue = type === \"string\" || Array.isArray( value );\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\tif ( typeof stateVal === \"boolean\" && isValidValue ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\treturn this.each( function() {\n\t\t\tif ( isValidValue ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\tself = jQuery( this );\n\n\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( \"class\",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t\t\"\" :\n\t\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, valueIsFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\t// Handle most common string cases\n\t\t\t\tif ( typeof ret === \"string\" ) {\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\n\t\t\t\t}\n\n\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\treturn ret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tvalueIsFunction = isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( Array.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE <=10 - 11 only\n\t\t\t\t\t// option.text throws exceptions (trac-14686, trac-14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tstripAndCollapse( jQuery.text( elem ) );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option, i,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\",\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length;\n\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\ti = max;\n\n\t\t\t\t} else {\n\t\t\t\t\ti = one ? index : 0;\n\t\t\t\t}\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (trac-2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t!option.disabled &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t/* eslint-disable no-cond-assign */\n\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* eslint-enable no-cond-assign */\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\n\n\nsupport.focusin = \"onfocusin\" in window;\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\tstopPropagationCallback = function( e ) {\n\t\te.stopPropagation();\n\t};\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special, lastElement,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = lastElement = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (trac-9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tlastElement = cur;\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( dataPriv.get( cur, \"events\" ) || Object.create( null ) )[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (trac-6170)\n\t\t\t\tif ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.addEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\telem[ type ]();\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.removeEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\t// Used only for `focus(in | out)` events\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\n// Support: Firefox <=44\n// Firefox doesn't have focus(in | out) events\n// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n//\n// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\n// focus(in | out) events fire after focus & blur events,\n// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\nif ( !support.focusin ) {\n\tjQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler on the document while someone wants focusin/focusout\n\t\tvar handler = function( event ) {\n\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );\n\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\n\t\t\t\t// Handle: regular nodes (via `this.ownerDocument`), window\n\t\t\t\t// (via `this.document`) & document (via `this`).\n\t\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix );\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.access( doc, fix, ( attaches || 0 ) + 1 );\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix ) - 1;\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.removeEventListener( orig, handler, true );\n\t\t\t\t\tdataPriv.remove( doc, fix );\n\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.access( doc, fix, attaches );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} );\n}\nvar location = window.location;\n\nvar nonce = { guid: Date.now() };\n\nvar rquery = ( /\\?/ );\n\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml, parserErrorElem;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE throws on parseFromString with invalid input.\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {}\n\n\tparserErrorElem = xml && xml.getElementsByTagName( \"parsererror\" )[ 0 ];\n\tif ( !xml || parserErrorElem ) {\n\t\tjQuery.error( \"Invalid XML: \" + (\n\t\t\tparserErrorElem ?\n\t\t\t\tjQuery.map( parserErrorElem.childNodes, function( el ) {\n\t\t\t\t\treturn el.textContent;\n\t\t\t\t} ).join( \"\\n\" ) :\n\t\t\t\tdata\n\t\t) );\n\t}\n\treturn xml;\n};\n\n\nvar\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( Array.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && toType( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, valueOrFunction ) {\n\n\t\t\t// If value is a function, invoke it and use its return value\n\t\t\tvar value = isFunction( valueOrFunction ) ?\n\t\t\t\tvalueOrFunction() :\n\t\t\t\tvalueOrFunction;\n\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\n\t\t};\n\n\tif ( a == null ) {\n\t\treturn \"\";\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} ).filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} ).map( function( _i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\tif ( val == null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( Array.isArray( val ) ) {\n\t\t\t\treturn jQuery.map( val, function( val ) {\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\nvar\n\tr20 = /%20/g,\n\trhash = /#.*$/,\n\trantiCache = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// trac-7653, trac-8125, trac-8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t *    - BEFORE asking for a transport\n\t *    - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( \"a\" );\n\noriginAnchor.href = location.href;\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];\n\n\t\tif ( isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes trac-9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": JSON.parse,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// Request state (becomes false upon send and true upon completion)\n\t\t\tcompleted,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// uncached part of the url\n\t\t\tuncached,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( completed ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() + \" \" ] =\n\t\t\t\t\t\t\t\t\t( responseHeaders[ match[ 1 ].toLowerCase() + \" \" ] || [] )\n\t\t\t\t\t\t\t\t\t\t.concat( match[ 2 ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() + \" \" ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match.join( \", \" );\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn completed ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( completed ) {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR );\n\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (trac-10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" )\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\n\n\t\t// Alias method option to type as per ticket trac-12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = ( s.dataType || \"*\" ).toLowerCase().match( rnothtmlwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( \"a\" );\n\n\t\t\t// Support: IE <=8 - 11, Edge 12 - 15\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\n\t\t\t// e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE <=8 - 11 only\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( completed ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\t// Remove hash to simplify url manipulation\n\t\tcacheURL = s.url.replace( rhash, \"\" );\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// Remember the hash so we can put it back\n\t\t\tuncached = s.url.slice( cacheURL.length );\n\n\t\t\t// If data is available and should be processed, append data to url\n\t\t\tif ( s.data && ( s.processData || typeof s.data === \"string\" ) ) {\n\t\t\t\tcacheURL += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data;\n\n\t\t\t\t// trac-9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add or update anti-cache param if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce.guid++ ) +\n\t\t\t\t\tuncached;\n\t\t\t}\n\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\n\t\t\ts.url = cacheURL + uncached;\n\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\n\t\t} else if ( s.data && s.processData &&\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\n\t\t\ts.data = s.data.replace( r20, \"+\" );\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tcompleteDeferred.add( s.complete );\n\t\tjqXHR.done( s.success );\n\t\tjqXHR.fail( s.error );\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( completed ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tcompleted = false;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Rethrow post-completion exceptions\n\t\t\t\tif ( completed ) {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\n\t\t\t\t// Propagate others as results\n\t\t\t\tdone( -1, e );\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompleted = true;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Use a noop converter for missing script but not if jsonp\n\t\t\tif ( !isSuccess &&\n\t\t\t\tjQuery.inArray( \"script\", s.dataTypes ) > -1 &&\n\t\t\t\tjQuery.inArray( \"json\", s.dataTypes ) < 0 ) {\n\t\t\t\ts.converters[ \"text script\" ] = function() {};\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( _i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\njQuery.ajaxPrefilter( function( s ) {\n\tvar i;\n\tfor ( i in s.headers ) {\n\t\tif ( i.toLowerCase() === \"content-type\" ) {\n\t\t\ts.contentType = s.headers[ i ] || \"\";\n\t\t}\n\t}\n} );\n\n\njQuery._evalUrl = function( url, options, doc ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (trac-11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\n\t\t// Only evaluate the response if it is successful (gh-4126)\n\t\t// dataFilter is not invoked for failure responses, so using it instead\n\t\t// of the default converter is kludgy but it works.\n\t\tconverters: {\n\t\t\t\"text script\": function() {}\n\t\t},\n\t\tdataFilter: function( response ) {\n\t\t\tjQuery.globalEval( response, options, doc );\n\t\t}\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( this[ 0 ] ) {\n\t\t\tif ( isFunction( html ) ) {\n\t\t\t\thtml = html.call( this[ 0 ] );\n\t\t\t}\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar htmlIsFunction = isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function( selector ) {\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t} );\n\t\treturn this;\n\t}\n} );\n\n\njQuery.expr.pseudos.hidden = function( elem ) {\n\treturn !jQuery.expr.pseudos.visible( elem );\n};\njQuery.expr.pseudos.visible = function( elem ) {\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n};\n\n\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE <=9 only\n\t\t// trac-1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.ontimeout =\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see trac-8605, trac-14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\"  ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = xhr.ontimeout = callback( \"error\" );\n\n\t\t\t\t// Support: IE 9 only\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( \"abort\" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// trac-14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\njQuery.ajaxPrefilter( function( s ) {\n\tif ( s.crossDomain ) {\n\t\ts.contents.script = false;\n\t}\n} );\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain or forced-by-attrs requests\n\tif ( s.crossDomain || s.scriptAttrs ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( \"<script>\" )\n\t\t\t\t\t.attr( s.scriptAttrs || {} )\n\t\t\t\t\t.prop( { charset: s.scriptCharset, src: s.url } )\n\t\t\t\t\t.on( \"load error\", callback = function( evt ) {\n\t\t\t\t\t\tscript.remove();\n\t\t\t\t\t\tcallback = null;\n\t\t\t\t\t\tif ( evt ) {\n\t\t\t\t\t\t\tcomplete( evt.type === \"error\" ? 404 : 200, evt.type );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\tdocument.head.appendChild( script[ 0 ] );\n\t\t\t},\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup( {\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce.guid++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n} );\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" &&\n\t\t\t\t( s.contentType || \"\" )\n\t\t\t\t\t.indexOf( \"application/x-www-form-urlencoded\" ) === 0 &&\n\t\t\t\trjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[ \"script json\" ] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// Force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always( function() {\n\n\t\t\t// If previous value didn't exist - remove it\n\t\t\tif ( overwritten === undefined ) {\n\t\t\t\tjQuery( window ).removeProp( callbackName );\n\n\t\t\t// Otherwise restore preexisting value\n\t\t\t} else {\n\t\t\t\twindow[ callbackName ] = overwritten;\n\t\t\t}\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\n\t\t\t\t// Make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// Save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t} );\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n} );\n\n\n\n\n// Support: Safari 8 only\n// In Safari 8 documents created via document.implementation.createHTMLDocument\n// collapse sibling forms: the second one becomes a child of the first one.\n// Because of that, this security measure has to be disabled in Safari 8.\n// https://bugs.webkit.org/show_bug.cgi?id=137337\nsupport.createHTMLDocument = ( function() {\n\tvar body = document.implementation.createHTMLDocument( \"\" ).body;\n\tbody.innerHTML = \"<form></form><form></form>\";\n\treturn body.childNodes.length === 2;\n} )();\n\n\n// Argument \"data\" should be string of html\n// context (optional): If specified, the fragment will be created in this context,\n// defaults to document\n// keepScripts (optional): If true, will include scripts passed in the html string\njQuery.parseHTML = function( data, context, keepScripts ) {\n\tif ( typeof data !== \"string\" ) {\n\t\treturn [];\n\t}\n\tif ( typeof context === \"boolean\" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\n\tvar base, parsed, scripts;\n\n\tif ( !context ) {\n\n\t\t// Stop scripts or inline event handlers from being executed immediately\n\t\t// by using document.implementation\n\t\tif ( support.createHTMLDocument ) {\n\t\t\tcontext = document.implementation.createHTMLDocument( \"\" );\n\n\t\t\t// Set the base href for the created document\n\t\t\t// so any parsed elements with URLs\n\t\t\t// are based on the document's URL (gh-2965)\n\t\t\tbase = context.createElement( \"base\" );\n\t\t\tbase.href = document.location.href;\n\t\t\tcontext.head.appendChild( base );\n\t\t} else {\n\t\t\tcontext = document;\n\t\t}\n\t}\n\n\tparsed = rsingleTag.exec( data );\n\tscripts = !keepScripts && [];\n\n\t// Single tag\n\tif ( parsed ) {\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\n\t}\n\n\tparsed = buildFragment( [ data ], context, scripts );\n\n\tif ( scripts && scripts.length ) {\n\t\tjQuery( scripts ).remove();\n\t}\n\n\treturn jQuery.merge( [], parsed.childNodes );\n};\n\n\n/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf( \" \" );\n\n\tif ( off > -1 ) {\n\t\tselector = stripAndCollapse( url.slice( off ) );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax( {\n\t\t\turl: url,\n\n\t\t\t// If \"type\" variable is undefined, then \"GET\" method will be used.\n\t\t\t// Make value of this field explicit since\n\t\t\t// user can override it through ajaxSetup method\n\t\t\ttype: type || \"GET\",\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t} ).done( function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery( \"<div>\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t// If the request succeeds, this function gets \"data\", \"status\", \"jqXHR\"\n\t\t// but they are ignored because response was set above.\n\t\t// If it fails, this function gets \"jqXHR\", \"status\", \"error\"\n\t\t} ).always( callback && function( jqXHR, status ) {\n\t\t\tself.each( function() {\n\t\t\t\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t\t} );\n\t\t} );\n\t}\n\n\treturn this;\n};\n\n\n\n\njQuery.expr.pseudos.animated = function( elem ) {\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\n\t\treturn elem === fn.elem;\n\t} ).length;\n};\n\n\n\n\njQuery.offset = {\n\tsetOffset: function( elem, options, i ) {\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\n\t\t\tposition = jQuery.css( elem, \"position\" ),\n\t\t\tcurElem = jQuery( elem ),\n\t\t\tprops = {};\n\n\t\t// Set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tcurOffset = curElem.offset();\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\n\t\t\t( curCSSTop + curCSSLeft ).indexOf( \"auto\" ) > -1;\n\n\t\t// Need to be able to calculate position if either\n\t\t// top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( isFunction( options ) ) {\n\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\njQuery.fn.extend( {\n\n\t// offset() relates an element's border box to the document origin\n\toffset: function( options ) {\n\n\t\t// Preserve chaining for setter\n\t\tif ( arguments.length ) {\n\t\t\treturn options === undefined ?\n\t\t\t\tthis :\n\t\t\t\tthis.each( function( i ) {\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t\t} );\n\t\t}\n\n\t\tvar rect, win,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !elem ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Return zeros for disconnected and hidden (display: none) elements (gh-2310)\n\t\t// Support: IE <=11 only\n\t\t// Running getBoundingClientRect on a\n\t\t// disconnected node in IE throws an error\n\t\tif ( !elem.getClientRects().length ) {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t\t// Get document-relative position by adding viewport scroll to viewport-relative gBCR\n\t\trect = elem.getBoundingClientRect();\n\t\twin = elem.ownerDocument.defaultView;\n\t\treturn {\n\t\t\ttop: rect.top + win.pageYOffset,\n\t\t\tleft: rect.left + win.pageXOffset\n\t\t};\n\t},\n\n\t// position() relates an element's margin box to its offset parent's padding box\n\t// This corresponds to the behavior of CSS absolute positioning\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset, doc,\n\t\t\telem = this[ 0 ],\n\t\t\tparentOffset = { top: 0, left: 0 };\n\n\t\t// position:fixed elements are offset from the viewport, which itself always has zero offset\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\n\t\t\t// Assume position:fixed implies availability of getBoundingClientRect\n\t\t\toffset = elem.getBoundingClientRect();\n\n\t\t} else {\n\t\t\toffset = this.offset();\n\n\t\t\t// Account for the *real* offset parent, which can be the document or its root element\n\t\t\t// when a statically positioned element is identified\n\t\t\tdoc = elem.ownerDocument;\n\t\t\toffsetParent = elem.offsetParent || doc.documentElement;\n\t\t\twhile ( offsetParent &&\n\t\t\t\t( offsetParent === doc.body || offsetParent === doc.documentElement ) &&\n\t\t\t\tjQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\n\t\t\t\toffsetParent = offsetParent.parentNode;\n\t\t\t}\n\t\t\tif ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {\n\n\t\t\t\t// Incorporate borders into its offset, since they are outside its content origin\n\t\t\t\tparentOffset = jQuery( offsetParent ).offset();\n\t\t\t\tparentOffset.top += jQuery.css( offsetParent, \"borderTopWidth\", true );\n\t\t\t\tparentOffset.left += jQuery.css( offsetParent, \"borderLeftWidth\", true );\n\t\t\t}\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\treturn {\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\n\t\t};\n\t},\n\n\t// This method will return documentElement in the following cases:\n\t// 1) For the element inside the iframe without offsetParent, this method will return\n\t//    documentElement of the parent window\n\t// 2) For the hidden or detached element\n\t// 3) For body or html element, i.e. in case of the html node - it will return itself\n\t//\n\t// but those exceptions were never presented as a real life use-cases\n\t// and might be considered as more preferable results.\n\t//\n\t// This logic, however, is not guaranteed and can change at any point in the future\n\toffsetParent: function() {\n\t\treturn this.map( function() {\n\t\t\tvar offsetParent = this.offsetParent;\n\n\t\t\twhile ( offsetParent && jQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\n\t\t\treturn offsetParent || documentElement;\n\t\t} );\n\t}\n} );\n\n// Create scrollLeft and scrollTop methods\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\n\tvar top = \"pageYOffset\" === prop;\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn access( this, function( elem, method, val ) {\n\n\t\t\t// Coalesce documents and windows\n\t\t\tvar win;\n\t\t\tif ( isWindow( elem ) ) {\n\t\t\t\twin = elem;\n\t\t\t} else if ( elem.nodeType === 9 ) {\n\t\t\t\twin = elem.defaultView;\n\t\t\t}\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? win[ prop ] : elem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : win.pageXOffset,\n\t\t\t\t\ttop ? val : win.pageYOffset\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length );\n\t};\n} );\n\n// Support: Safari <=7 - 9.1, Chrome <=37 - 49\n// Add the top/left cssHooks using jQuery.fn.position\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347\n// getComputedStyle returns percent when specified for top/left/bottom/right;\n// rather than make the css module depend on the offset module, just check for it here\njQuery.each( [ \"top\", \"left\" ], function( _i, prop ) {\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\n\t\tfunction( elem, computed ) {\n\t\t\tif ( computed ) {\n\t\t\t\tcomputed = curCSS( elem, prop );\n\n\t\t\t\t// If curCSS returns percentage, fallback to offset\n\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\tcomputed;\n\t\t\t}\n\t\t}\n\t);\n} );\n\n\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( {\n\t\tpadding: \"inner\" + name,\n\t\tcontent: type,\n\t\t\"\": \"outer\" + name\n\t}, function( defaultExtra, funcName ) {\n\n\t\t// Margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( isWindow( elem ) ) {\n\n\t\t\t\t\t// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)\n\t\t\t\t\treturn funcName.indexOf( \"outer\" ) === 0 ?\n\t\t\t\t\t\telem[ \"inner\" + name ] :\n\t\t\t\t\t\telem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\n\t\t\t\t\t// whichever is greatest\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable );\n\t\t};\n\t} );\n} );\n\n\njQuery.each( [\n\t\"ajaxStart\",\n\t\"ajaxStop\",\n\t\"ajaxComplete\",\n\t\"ajaxError\",\n\t\"ajaxSuccess\",\n\t\"ajaxSend\"\n], function( _i, type ) {\n\tjQuery.fn[ type ] = function( fn ) {\n\t\treturn this.on( type, fn );\n\t};\n} );\n\n\n\n\njQuery.fn.extend( {\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ?\n\t\t\tthis.off( selector, \"**\" ) :\n\t\t\tthis.off( types, selector || \"**\", fn );\n\t},\n\n\thover: function( fnOver, fnOut ) {\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\n\t}\n} );\n\njQuery.each(\n\t( \"blur focus focusin focusout resize scroll click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup contextmenu\" ).split( \" \" ),\n\tfunction( _i, name ) {\n\n\t\t// Handle event binding\n\t\tjQuery.fn[ name ] = function( data, fn ) {\n\t\t\treturn arguments.length > 0 ?\n\t\t\t\tthis.on( name, null, data, fn ) :\n\t\t\t\tthis.trigger( name );\n\t\t};\n\t}\n);\n\n\n\n\n// Support: Android <=4.0 only\n// Make sure we trim BOM and NBSP\n// Require that the \"whitespace run\" starts from a non-whitespace\n// to avoid O(N^2) behavior when the engine would try matching \"\\s+$\" at each space position.\nvar rtrim = /^[\\s\\uFEFF\\xA0]+|([^\\s\\uFEFF\\xA0])[\\s\\uFEFF\\xA0]+$/g;\n\n// Bind a function to a context, optionally partially applying any\n// arguments.\n// jQuery.proxy is deprecated to promote standards (specifically Function#bind)\n// However, it is not slated for removal any time soon\njQuery.proxy = function( fn, context ) {\n\tvar tmp, args, proxy;\n\n\tif ( typeof context === \"string\" ) {\n\t\ttmp = fn[ context ];\n\t\tcontext = fn;\n\t\tfn = tmp;\n\t}\n\n\t// Quick check to determine if target is callable, in the spec\n\t// this throws a TypeError, but we will just return undefined.\n\tif ( !isFunction( fn ) ) {\n\t\treturn undefined;\n\t}\n\n\t// Simulated bind\n\targs = slice.call( arguments, 2 );\n\tproxy = function() {\n\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t};\n\n\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\treturn proxy;\n};\n\njQuery.holdReady = function( hold ) {\n\tif ( hold ) {\n\t\tjQuery.readyWait++;\n\t} else {\n\t\tjQuery.ready( true );\n\t}\n};\njQuery.isArray = Array.isArray;\njQuery.parseJSON = JSON.parse;\njQuery.nodeName = nodeName;\njQuery.isFunction = isFunction;\njQuery.isWindow = isWindow;\njQuery.camelCase = camelCase;\njQuery.type = toType;\n\njQuery.now = Date.now;\n\njQuery.isNumeric = function( obj ) {\n\n\t// As of jQuery 3.0, isNumeric is limited to\n\t// strings and numbers (primitives or objects)\n\t// that can be coerced to finite numbers (gh-2662)\n\tvar type = jQuery.type( obj );\n\treturn ( type === \"number\" || type === \"string\" ) &&\n\n\t\t// parseFloat NaNs numeric-cast false positives (\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t!isNaN( obj - parseFloat( obj ) );\n};\n\njQuery.trim = function( text ) {\n\treturn text == null ?\n\t\t\"\" :\n\t\t( text + \"\" ).replace( rtrim, \"$1\" );\n};\n\n\n\n// Register as a named AMD module, since jQuery can be concatenated with other\n// files that may use define, but not via a proper concatenation script that\n// understands anonymous AMD modules. A named AMD is safest and most robust\n// way to register. Lowercase jquery is used because AMD module names are\n// derived from file names, and jQuery is normally delivered in a lowercase\n// file name. Do this after creating the global so that if an AMD module wants\n// to call noConflict to hide this version of jQuery, it will work.\n\n// Note that for maximum portability, libraries that are not jQuery should\n// declare themselves as anonymous modules, and avoid setting a global if an\n// AMD loader is present. jQuery is a special case. For more information, see\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\n\nif ( typeof define === \"function\" && define.amd ) {\n\tdefine( \"jquery\", [], function() {\n\t\treturn jQuery;\n\t} );\n}\n\n\n\n\nvar\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$;\n\njQuery.noConflict = function( deep ) {\n\tif ( window.$ === jQuery ) {\n\t\twindow.$ = _$;\n\t}\n\n\tif ( deep && window.jQuery === jQuery ) {\n\t\twindow.jQuery = _jQuery;\n\t}\n\n\treturn jQuery;\n};\n\n// Expose jQuery and $ identifiers, even in AMD\n// (trac-7102#comment:10, https://github.com/jquery/jquery/pull/557)\n// and CommonJS for browser emulators (trac-13566)\nif ( typeof noGlobal === \"undefined\" ) {\n\twindow.jQuery = window.$ = jQuery;\n}\n\n\n\n\nreturn jQuery;\n} );\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function(render, schedule, console) {\n\tvar subscriptions = []\n\tvar rendering = false\n\tvar pending = false\n\n\tfunction sync() {\n\t\tif (rendering) throw new Error(\"Nested m.redraw.sync() call\")\n\t\trendering = true\n\t\tfor (var i = 0; i < subscriptions.length; i += 2) {\n\t\t\ttry { render(subscriptions[i], Vnode(subscriptions[i + 1]), redraw) }\n\t\t\tcatch (e) { console.error(e) }\n\t\t}\n\t\trendering = false\n\t}\n\n\tfunction redraw() {\n\t\tif (!pending) {\n\t\t\tpending = true\n\t\t\tschedule(function() {\n\t\t\t\tpending = false\n\t\t\t\tsync()\n\t\t\t})\n\t\t}\n\t}\n\n\tredraw.sync = sync\n\n\tfunction mount(root, component) {\n\t\tif (component != null && component.view == null && typeof component !== \"function\") {\n\t\t\tthrow new TypeError(\"m.mount(element, component) expects a component, not a vnode\")\n\t\t}\n\n\t\tvar index = subscriptions.indexOf(root)\n\t\tif (index >= 0) {\n\t\t\tsubscriptions.splice(index, 2)\n\t\t\trender(root, [], redraw)\n\t\t}\n\n\t\tif (component != null) {\n\t\t\tsubscriptions.push(root, component)\n\t\t\trender(root, Vnode(component), redraw)\n\t\t}\n\t}\n\n\treturn {mount: mount, redraw: redraw}\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar m = require(\"../render/hyperscript\")\nvar Promise = require(\"../promise/promise\")\n\nvar buildPathname = require(\"../pathname/build\")\nvar parsePathname = require(\"../pathname/parse\")\nvar compileTemplate = require(\"../pathname/compileTemplate\")\nvar assign = require(\"../pathname/assign\")\n\nvar sentinel = {}\n\nmodule.exports = function($window, mountRedraw) {\n\tvar fireAsync\n\n\tfunction setPath(path, data, options) {\n\t\tpath = buildPathname(path, data)\n\t\tif (fireAsync != null) {\n\t\t\tfireAsync()\n\t\t\tvar state = options ? options.state : null\n\t\t\tvar title = options ? options.title : null\n\t\t\tif (options && options.replace) $window.history.replaceState(state, title, route.prefix + path)\n\t\t\telse $window.history.pushState(state, title, route.prefix + path)\n\t\t}\n\t\telse {\n\t\t\t$window.location.href = route.prefix + path\n\t\t}\n\t}\n\n\tvar currentResolver = sentinel, component, attrs, currentPath, lastUpdate\n\n\tvar SKIP = route.SKIP = {}\n\n\tfunction route(root, defaultRoute, routes) {\n\t\tif (root == null) throw new Error(\"Ensure the DOM element that was passed to `m.route` is not undefined\")\n\t\t// 0 = start\n\t\t// 1 = init\n\t\t// 2 = ready\n\t\tvar state = 0\n\n\t\tvar compiled = Object.keys(routes).map(function(route) {\n\t\t\tif (route[0] !== \"/\") throw new SyntaxError(\"Routes must start with a `/`\")\n\t\t\tif ((/:([^\\/\\.-]+)(\\.{3})?:/).test(route)) {\n\t\t\t\tthrow new SyntaxError(\"Route parameter names must be separated with either `/`, `.`, or `-`\")\n\t\t\t}\n\t\t\treturn {\n\t\t\t\troute: route,\n\t\t\t\tcomponent: routes[route],\n\t\t\t\tcheck: compileTemplate(route),\n\t\t\t}\n\t\t})\n\t\tvar callAsync = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\t\tvar p = Promise.resolve()\n\t\tvar scheduled = false\n\t\tvar onremove\n\n\t\tfireAsync = null\n\n\t\tif (defaultRoute != null) {\n\t\t\tvar defaultData = parsePathname(defaultRoute)\n\n\t\t\tif (!compiled.some(function (i) { return i.check(defaultData) })) {\n\t\t\t\tthrow new ReferenceError(\"Default route doesn't match any known routes\")\n\t\t\t}\n\t\t}\n\n\t\tfunction resolveRoute() {\n\t\t\tscheduled = false\n\t\t\t// Consider the pathname holistically. The prefix might even be invalid,\n\t\t\t// but that's not our problem.\n\t\t\tvar prefix = $window.location.hash\n\t\t\tif (route.prefix[0] !== \"#\") {\n\t\t\t\tprefix = $window.location.search + prefix\n\t\t\t\tif (route.prefix[0] !== \"?\") {\n\t\t\t\t\tprefix = $window.location.pathname + prefix\n\t\t\t\t\tif (prefix[0] !== \"/\") prefix = \"/\" + prefix\n\t\t\t\t}\n\t\t\t}\n\t\t\t// This seemingly useless `.concat()` speeds up the tests quite a bit,\n\t\t\t// since the representation is consistently a relatively poorly\n\t\t\t// optimized cons string.\n\t\t\tvar path = prefix.concat()\n\t\t\t\t.replace(/(?:%[a-f89][a-f0-9])+/gim, decodeURIComponent)\n\t\t\t\t.slice(route.prefix.length)\n\t\t\tvar data = parsePathname(path)\n\n\t\t\tassign(data.params, $window.history.state)\n\n\t\t\tfunction fail() {\n\t\t\t\tif (path === defaultRoute) throw new Error(\"Could not resolve default route \" + defaultRoute)\n\t\t\t\tsetPath(defaultRoute, null, {replace: true})\n\t\t\t}\n\n\t\t\tloop(0)\n\t\t\tfunction loop(i) {\n\t\t\t\t// 0 = init\n\t\t\t\t// 1 = scheduled\n\t\t\t\t// 2 = done\n\t\t\t\tfor (; i < compiled.length; i++) {\n\t\t\t\t\tif (compiled[i].check(data)) {\n\t\t\t\t\t\tvar payload = compiled[i].component\n\t\t\t\t\t\tvar matchedRoute = compiled[i].route\n\t\t\t\t\t\tvar localComp = payload\n\t\t\t\t\t\tvar update = lastUpdate = function(comp) {\n\t\t\t\t\t\t\tif (update !== lastUpdate) return\n\t\t\t\t\t\t\tif (comp === SKIP) return loop(i + 1)\n\t\t\t\t\t\t\tcomponent = comp != null && (typeof comp.view === \"function\" || typeof comp === \"function\")? comp : \"div\"\n\t\t\t\t\t\t\tattrs = data.params, currentPath = path, lastUpdate = null\n\t\t\t\t\t\t\tcurrentResolver = payload.render ? payload : null\n\t\t\t\t\t\t\tif (state === 2) mountRedraw.redraw()\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tstate = 2\n\t\t\t\t\t\t\t\tmountRedraw.redraw.sync()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// There's no understating how much I *wish* I could\n\t\t\t\t\t\t// use `async`/`await` here...\n\t\t\t\t\t\tif (payload.view || typeof payload === \"function\") {\n\t\t\t\t\t\t\tpayload = {}\n\t\t\t\t\t\t\tupdate(localComp)\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (payload.onmatch) {\n\t\t\t\t\t\t\tp.then(function () {\n\t\t\t\t\t\t\t\treturn payload.onmatch(data.params, path, matchedRoute)\n\t\t\t\t\t\t\t}).then(update, fail)\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse update(\"div\")\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfail()\n\t\t\t}\n\t\t}\n\n\t\t// Set it unconditionally so `m.route.set` and `m.route.Link` both work,\n\t\t// even if neither `pushState` nor `hashchange` are supported. It's\n\t\t// cleared if `hashchange` is used, since that makes it automatically\n\t\t// async.\n\t\tfireAsync = function() {\n\t\t\tif (!scheduled) {\n\t\t\t\tscheduled = true\n\t\t\t\tcallAsync(resolveRoute)\n\t\t\t}\n\t\t}\n\n\t\tif (typeof $window.history.pushState === \"function\") {\n\t\t\tonremove = function() {\n\t\t\t\t$window.removeEventListener(\"popstate\", fireAsync, false)\n\t\t\t}\n\t\t\t$window.addEventListener(\"popstate\", fireAsync, false)\n\t\t} else if (route.prefix[0] === \"#\") {\n\t\t\tfireAsync = null\n\t\t\tonremove = function() {\n\t\t\t\t$window.removeEventListener(\"hashchange\", resolveRoute, false)\n\t\t\t}\n\t\t\t$window.addEventListener(\"hashchange\", resolveRoute, false)\n\t\t}\n\n\t\treturn mountRedraw.mount(root, {\n\t\t\tonbeforeupdate: function() {\n\t\t\t\tstate = state ? 2 : 1\n\t\t\t\treturn !(!state || sentinel === currentResolver)\n\t\t\t},\n\t\t\toncreate: resolveRoute,\n\t\t\tonremove: onremove,\n\t\t\tview: function() {\n\t\t\t\tif (!state || sentinel === currentResolver) return\n\t\t\t\t// Wrap in a fragment to preserve existing key semantics\n\t\t\t\tvar vnode = [Vnode(component, attrs.key, attrs)]\n\t\t\t\tif (currentResolver) vnode = currentResolver.render(vnode[0])\n\t\t\t\treturn vnode\n\t\t\t},\n\t\t})\n\t}\n\troute.set = function(path, data, options) {\n\t\tif (lastUpdate != null) {\n\t\t\toptions = options || {}\n\t\t\toptions.replace = true\n\t\t}\n\t\tlastUpdate = null\n\t\tsetPath(path, data, options)\n\t}\n\troute.get = function() {return currentPath}\n\troute.prefix = \"#!\"\n\troute.Link = {\n\t\tview: function(vnode) {\n\t\t\tvar options = vnode.attrs.options\n\t\t\t// Remove these so they don't get overwritten\n\t\t\tvar attrs = {}, onclick, href\n\t\t\tassign(attrs, vnode.attrs)\n\t\t\t// The first two are internal, but the rest are magic attributes\n\t\t\t// that need censored to not screw up rendering.\n\t\t\tattrs.selector = attrs.options = attrs.key = attrs.oninit =\n\t\t\tattrs.oncreate = attrs.onbeforeupdate = attrs.onupdate =\n\t\t\tattrs.onbeforeremove = attrs.onremove = null\n\n\t\t\t// Do this now so we can get the most current `href` and `disabled`.\n\t\t\t// Those attributes may also be specified in the selector, and we\n\t\t\t// should honor that.\n\t\t\tvar child = m(vnode.attrs.selector || \"a\", attrs, vnode.children)\n\n\t\t\t// Let's provide a *right* way to disable a route link, rather than\n\t\t\t// letting people screw up accessibility on accident.\n\t\t\t//\n\t\t\t// The attribute is coerced so users don't get surprised over\n\t\t\t// `disabled: 0` resulting in a button that's somehow routable\n\t\t\t// despite being visibly disabled.\n\t\t\tif (child.attrs.disabled = Boolean(child.attrs.disabled)) {\n\t\t\t\tchild.attrs.href = null\n\t\t\t\tchild.attrs[\"aria-disabled\"] = \"true\"\n\t\t\t\t// If you *really* do want to do this on a disabled link, use\n\t\t\t\t// an `oncreate` hook to add it.\n\t\t\t\tchild.attrs.onclick = null\n\t\t\t} else {\n\t\t\t\tonclick = child.attrs.onclick\n\t\t\t\thref = child.attrs.href\n\t\t\t\tchild.attrs.href = route.prefix + href\n\t\t\t\tchild.attrs.onclick = function(e) {\n\t\t\t\t\tvar result\n\t\t\t\t\tif (typeof onclick === \"function\") {\n\t\t\t\t\t\tresult = onclick.call(e.currentTarget, e)\n\t\t\t\t\t} else if (onclick == null || typeof onclick !== \"object\") {\n\t\t\t\t\t\t// do nothing\n\t\t\t\t\t} else if (typeof onclick.handleEvent === \"function\") {\n\t\t\t\t\t\tonclick.handleEvent(e)\n\t\t\t\t\t}\n\n\t\t\t\t\t// Adapted from React Router's implementation:\n\t\t\t\t\t// https://github.com/ReactTraining/react-router/blob/520a0acd48ae1b066eb0b07d6d4d1790a1d02482/packages/react-router-dom/modules/Link.js\n\t\t\t\t\t//\n\t\t\t\t\t// Try to be flexible and intuitive in how we handle links.\n\t\t\t\t\t// Fun fact: links aren't as obvious to get right as you\n\t\t\t\t\t// would expect. There's a lot more valid ways to click a\n\t\t\t\t\t// link than this, and one might want to not simply click a\n\t\t\t\t\t// link, but right click or command-click it to copy the\n\t\t\t\t\t// link target, etc. Nope, this isn't just for blind people.\n\t\t\t\t\tif (\n\t\t\t\t\t\t// Skip if `onclick` prevented default\n\t\t\t\t\t\tresult !== false && !e.defaultPrevented &&\n\t\t\t\t\t\t// Ignore everything but left clicks\n\t\t\t\t\t\t(e.button === 0 || e.which === 0 || e.which === 1) &&\n\t\t\t\t\t\t// Let the browser handle `target=_blank`, etc.\n\t\t\t\t\t\t(!e.currentTarget.target || e.currentTarget.target === \"_self\") &&\n\t\t\t\t\t\t// No modifier keys\n\t\t\t\t\t\t!e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey\n\t\t\t\t\t) {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\te.redraw = false\n\t\t\t\t\t\troute.set(href, null, options)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn child\n\t\t},\n\t}\n\troute.param = function(key) {\n\t\treturn attrs && key != null ? attrs[key] : attrs\n\t}\n\n\treturn route\n}\n","\"use strict\"\n\nvar hyperscript = require(\"./render/hyperscript\")\n\nhyperscript.trust = require(\"./render/trust\")\nhyperscript.fragment = require(\"./render/fragment\")\n\nmodule.exports = hyperscript\n","\"use strict\"\n\nvar hyperscript = require(\"./hyperscript\")\nvar request = require(\"./request\")\nvar mountRedraw = require(\"./mount-redraw\")\n\nvar m = function m() { return hyperscript.apply(this, arguments) }\nm.m = hyperscript\nm.trust = hyperscript.trust\nm.fragment = hyperscript.fragment\nm.mount = mountRedraw.mount\nm.route = require(\"./route\")\nm.render = require(\"./render\")\nm.redraw = mountRedraw.redraw\nm.request = request.request\nm.jsonp = request.jsonp\nm.parseQueryString = require(\"./querystring/parse\")\nm.buildQueryString = require(\"./querystring/build\")\nm.parsePathname = require(\"./pathname/parse\")\nm.buildPathname = require(\"./pathname/build\")\nm.vnode = require(\"./render/vnode\")\nm.PromisePolyfill = require(\"./promise/polyfill\")\n\nmodule.exports = m\n","\"use strict\"\n\nvar render = require(\"./render\")\n\nmodule.exports = require(\"./api/mount-redraw\")(render, requestAnimationFrame, console)\n","\"use strict\"\n\nmodule.exports = Object.assign || function(target, source) {\n\tif(source) Object.keys(source).forEach(function(key) { target[key] = source[key] })\n}\n","\"use strict\"\n\nvar buildQueryString = require(\"../querystring/build\")\nvar assign = require(\"./assign\")\n\n// Returns `path` from `template` + `params`\nmodule.exports = function(template, params) {\n\tif ((/:([^\\/\\.-]+)(\\.{3})?:/).test(template)) {\n\t\tthrow new SyntaxError(\"Template parameter names *must* be separated\")\n\t}\n\tif (params == null) return template\n\tvar queryIndex = template.indexOf(\"?\")\n\tvar hashIndex = template.indexOf(\"#\")\n\tvar queryEnd = hashIndex < 0 ? template.length : hashIndex\n\tvar pathEnd = queryIndex < 0 ? queryEnd : queryIndex\n\tvar path = template.slice(0, pathEnd)\n\tvar query = {}\n\n\tassign(query, params)\n\n\tvar resolved = path.replace(/:([^\\/\\.-]+)(\\.{3})?/g, function(m, key, variadic) {\n\t\tdelete query[key]\n\t\t// If no such parameter exists, don't interpolate it.\n\t\tif (params[key] == null) return m\n\t\t// Escape normal parameters, but not variadic ones.\n\t\treturn variadic ? params[key] : encodeURIComponent(String(params[key]))\n\t})\n\n\t// In case the template substitution adds new query/hash parameters.\n\tvar newQueryIndex = resolved.indexOf(\"?\")\n\tvar newHashIndex = resolved.indexOf(\"#\")\n\tvar newQueryEnd = newHashIndex < 0 ? resolved.length : newHashIndex\n\tvar newPathEnd = newQueryIndex < 0 ? newQueryEnd : newQueryIndex\n\tvar result = resolved.slice(0, newPathEnd)\n\n\tif (queryIndex >= 0) result += template.slice(queryIndex, queryEnd)\n\tif (newQueryIndex >= 0) result += (queryIndex < 0 ? \"?\" : \"&\") + resolved.slice(newQueryIndex, newQueryEnd)\n\tvar querystring = buildQueryString(query)\n\tif (querystring) result += (queryIndex < 0 && newQueryIndex < 0 ? \"?\" : \"&\") + querystring\n\tif (hashIndex >= 0) result += template.slice(hashIndex)\n\tif (newHashIndex >= 0) result += (hashIndex < 0 ? \"\" : \"&\") + resolved.slice(newHashIndex)\n\treturn result\n}\n","\"use strict\"\n\nvar parsePathname = require(\"./parse\")\n\n// Compiles a template into a function that takes a resolved path (without query\n// strings) and returns an object containing the template parameters with their\n// parsed values. This expects the input of the compiled template to be the\n// output of `parsePathname`. Note that it does *not* remove query parameters\n// specified in the template.\nmodule.exports = function(template) {\n\tvar templateData = parsePathname(template)\n\tvar templateKeys = Object.keys(templateData.params)\n\tvar keys = []\n\tvar regexp = new RegExp(\"^\" + templateData.path.replace(\n\t\t// I escape literal text so people can use things like `:file.:ext` or\n\t\t// `:lang-:locale` in routes. This is all merged into one pass so I\n\t\t// don't also accidentally escape `-` and make it harder to detect it to\n\t\t// ban it from template parameters.\n\t\t/:([^\\/.-]+)(\\.{3}|\\.(?!\\.)|-)?|[\\\\^$*+.()|\\[\\]{}]/g,\n\t\tfunction(m, key, extra) {\n\t\t\tif (key == null) return \"\\\\\" + m\n\t\t\tkeys.push({k: key, r: extra === \"...\"})\n\t\t\tif (extra === \"...\") return \"(.*)\"\n\t\t\tif (extra === \".\") return \"([^/]+)\\\\.\"\n\t\t\treturn \"([^/]+)\" + (extra || \"\")\n\t\t}\n\t) + \"$\")\n\treturn function(data) {\n\t\t// First, check the params. Usually, there isn't any, and it's just\n\t\t// checking a static set.\n\t\tfor (var i = 0; i < templateKeys.length; i++) {\n\t\t\tif (templateData.params[templateKeys[i]] !== data.params[templateKeys[i]]) return false\n\t\t}\n\t\t// If no interpolations exist, let's skip all the ceremony\n\t\tif (!keys.length) return regexp.test(data.path)\n\t\tvar values = regexp.exec(data.path)\n\t\tif (values == null) return false\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tdata.params[keys[i].k] = keys[i].r ? values[i + 1] : decodeURIComponent(values[i + 1])\n\t\t}\n\t\treturn true\n\t}\n}\n","\"use strict\"\n\nvar parseQueryString = require(\"../querystring/parse\")\n\n// Returns `{path, params}` from `url`\nmodule.exports = function(url) {\n\tvar queryIndex = url.indexOf(\"?\")\n\tvar hashIndex = url.indexOf(\"#\")\n\tvar queryEnd = hashIndex < 0 ? url.length : hashIndex\n\tvar pathEnd = queryIndex < 0 ? queryEnd : queryIndex\n\tvar path = url.slice(0, pathEnd).replace(/\\/{2,}/g, \"/\")\n\n\tif (!path) path = \"/\"\n\telse {\n\t\tif (path[0] !== \"/\") path = \"/\" + path\n\t\tif (path.length > 1 && path[path.length - 1] === \"/\") path = path.slice(0, -1)\n\t}\n\treturn {\n\t\tpath: path,\n\t\tparams: queryIndex < 0\n\t\t\t? {}\n\t\t\t: parseQueryString(url.slice(queryIndex + 1, queryEnd)),\n\t}\n}\n","\"use strict\"\n/** @constructor */\nvar PromisePolyfill = function(executor) {\n\tif (!(this instanceof PromisePolyfill)) throw new Error(\"Promise must be called with `new`\")\n\tif (typeof executor !== \"function\") throw new TypeError(\"executor must be a function\")\n\n\tvar self = this, resolvers = [], rejectors = [], resolveCurrent = handler(resolvers, true), rejectCurrent = handler(rejectors, false)\n\tvar instance = self._instance = {resolvers: resolvers, rejectors: rejectors}\n\tvar callAsync = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\tfunction handler(list, shouldAbsorb) {\n\t\treturn function execute(value) {\n\t\t\tvar then\n\t\t\ttry {\n\t\t\t\tif (shouldAbsorb && value != null && (typeof value === \"object\" || typeof value === \"function\") && typeof (then = value.then) === \"function\") {\n\t\t\t\t\tif (value === self) throw new TypeError(\"Promise can't be resolved w/ itself\")\n\t\t\t\t\texecuteOnce(then.bind(value))\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcallAsync(function() {\n\t\t\t\t\t\tif (!shouldAbsorb && list.length === 0) console.error(\"Possible unhandled promise rejection:\", value)\n\t\t\t\t\t\tfor (var i = 0; i < list.length; i++) list[i](value)\n\t\t\t\t\t\tresolvers.length = 0, rejectors.length = 0\n\t\t\t\t\t\tinstance.state = shouldAbsorb\n\t\t\t\t\t\tinstance.retry = function() {execute(value)}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\trejectCurrent(e)\n\t\t\t}\n\t\t}\n\t}\n\tfunction executeOnce(then) {\n\t\tvar runs = 0\n\t\tfunction run(fn) {\n\t\t\treturn function(value) {\n\t\t\t\tif (runs++ > 0) return\n\t\t\t\tfn(value)\n\t\t\t}\n\t\t}\n\t\tvar onerror = run(rejectCurrent)\n\t\ttry {then(run(resolveCurrent), onerror)} catch (e) {onerror(e)}\n\t}\n\n\texecuteOnce(executor)\n}\nPromisePolyfill.prototype.then = function(onFulfilled, onRejection) {\n\tvar self = this, instance = self._instance\n\tfunction handle(callback, list, next, state) {\n\t\tlist.push(function(value) {\n\t\t\tif (typeof callback !== \"function\") next(value)\n\t\t\telse try {resolveNext(callback(value))} catch (e) {if (rejectNext) rejectNext(e)}\n\t\t})\n\t\tif (typeof instance.retry === \"function\" && state === instance.state) instance.retry()\n\t}\n\tvar resolveNext, rejectNext\n\tvar promise = new PromisePolyfill(function(resolve, reject) {resolveNext = resolve, rejectNext = reject})\n\thandle(onFulfilled, instance.resolvers, resolveNext, true), handle(onRejection, instance.rejectors, rejectNext, false)\n\treturn promise\n}\nPromisePolyfill.prototype.catch = function(onRejection) {\n\treturn this.then(null, onRejection)\n}\nPromisePolyfill.prototype.finally = function(callback) {\n\treturn this.then(\n\t\tfunction(value) {\n\t\t\treturn PromisePolyfill.resolve(callback()).then(function() {\n\t\t\t\treturn value\n\t\t\t})\n\t\t},\n\t\tfunction(reason) {\n\t\t\treturn PromisePolyfill.resolve(callback()).then(function() {\n\t\t\t\treturn PromisePolyfill.reject(reason);\n\t\t\t})\n\t\t}\n\t)\n}\nPromisePolyfill.resolve = function(value) {\n\tif (value instanceof PromisePolyfill) return value\n\treturn new PromisePolyfill(function(resolve) {resolve(value)})\n}\nPromisePolyfill.reject = function(value) {\n\treturn new PromisePolyfill(function(resolve, reject) {reject(value)})\n}\nPromisePolyfill.all = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tvar total = list.length, count = 0, values = []\n\t\tif (list.length === 0) resolve([])\n\t\telse for (var i = 0; i < list.length; i++) {\n\t\t\t(function(i) {\n\t\t\t\tfunction consume(value) {\n\t\t\t\t\tcount++\n\t\t\t\t\tvalues[i] = value\n\t\t\t\t\tif (count === total) resolve(values)\n\t\t\t\t}\n\t\t\t\tif (list[i] != null && (typeof list[i] === \"object\" || typeof list[i] === \"function\") && typeof list[i].then === \"function\") {\n\t\t\t\t\tlist[i].then(consume, reject)\n\t\t\t\t}\n\t\t\t\telse consume(list[i])\n\t\t\t})(i)\n\t\t}\n\t})\n}\nPromisePolyfill.race = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tfor (var i = 0; i < list.length; i++) {\n\t\t\tlist[i].then(resolve, reject)\n\t\t}\n\t})\n}\n\nmodule.exports = PromisePolyfill\n","\"use strict\"\n\nvar PromisePolyfill = require(\"./polyfill\")\n\nif (typeof window !== \"undefined\") {\n\tif (typeof window.Promise === \"undefined\") {\n\t\twindow.Promise = PromisePolyfill\n\t} else if (!window.Promise.prototype.finally) {\n\t\twindow.Promise.prototype.finally = PromisePolyfill.prototype.finally\n\t}\n\tmodule.exports = window.Promise\n} else if (typeof global !== \"undefined\") {\n\tif (typeof global.Promise === \"undefined\") {\n\t\tglobal.Promise = PromisePolyfill\n\t} else if (!global.Promise.prototype.finally) {\n\t\tglobal.Promise.prototype.finally = PromisePolyfill.prototype.finally\n\t}\n\tmodule.exports = global.Promise\n} else {\n\tmodule.exports = PromisePolyfill\n}\n","\"use strict\"\n\nmodule.exports = function(object) {\n\tif (Object.prototype.toString.call(object) !== \"[object Object]\") return \"\"\n\n\tvar args = []\n\tfor (var key in object) {\n\t\tdestructure(key, object[key])\n\t}\n\n\treturn args.join(\"&\")\n\n\tfunction destructure(key, value) {\n\t\tif (Array.isArray(value)) {\n\t\t\tfor (var i = 0; i < value.length; i++) {\n\t\t\t\tdestructure(key + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse if (Object.prototype.toString.call(value) === \"[object Object]\") {\n\t\t\tfor (var i in value) {\n\t\t\t\tdestructure(key + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse args.push(encodeURIComponent(key) + (value != null && value !== \"\" ? \"=\" + encodeURIComponent(value) : \"\"))\n\t}\n}\n","\"use strict\"\n\nmodule.exports = function(string) {\n\tif (string === \"\" || string == null) return {}\n\tif (string.charAt(0) === \"?\") string = string.slice(1)\n\n\tvar entries = string.split(\"&\"), counters = {}, data = {}\n\tfor (var i = 0; i < entries.length; i++) {\n\t\tvar entry = entries[i].split(\"=\")\n\t\tvar key = decodeURIComponent(entry[0])\n\t\tvar value = entry.length === 2 ? decodeURIComponent(entry[1]) : \"\"\n\n\t\tif (value === \"true\") value = true\n\t\telse if (value === \"false\") value = false\n\n\t\tvar levels = key.split(/\\]\\[?|\\[/)\n\t\tvar cursor = data\n\t\tif (key.indexOf(\"[\") > -1) levels.pop()\n\t\tfor (var j = 0; j < levels.length; j++) {\n\t\t\tvar level = levels[j], nextLevel = levels[j + 1]\n\t\t\tvar isNumber = nextLevel == \"\" || !isNaN(parseInt(nextLevel, 10))\n\t\t\tif (level === \"\") {\n\t\t\t\tvar key = levels.slice(0, j).join()\n\t\t\t\tif (counters[key] == null) {\n\t\t\t\t\tcounters[key] = Array.isArray(cursor) ? cursor.length : 0\n\t\t\t\t}\n\t\t\t\tlevel = counters[key]++\n\t\t\t}\n\t\t\t// Disallow direct prototype pollution\n\t\t\telse if (level === \"__proto__\") break\n\t\t\tif (j === levels.length - 1) cursor[level] = value\n\t\t\telse {\n\t\t\t\t// Read own properties exclusively to disallow indirect\n\t\t\t\t// prototype pollution\n\t\t\t\tvar desc = Object.getOwnPropertyDescriptor(cursor, level)\n\t\t\t\tif (desc != null) desc = desc.value\n\t\t\t\tif (desc == null) cursor[level] = desc = isNumber ? [] : {}\n\t\t\t\tcursor = desc\n\t\t\t}\n\t\t}\n\t}\n\treturn data\n}\n","\"use strict\"\n\nmodule.exports = require(\"./render/render\")(window)\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar hyperscriptVnode = require(\"./hyperscriptVnode\")\n\nmodule.exports = function() {\n\tvar vnode = hyperscriptVnode.apply(0, arguments)\n\n\tvnode.tag = \"[\"\n\tvnode.children = Vnode.normalizeChildren(vnode.children)\n\treturn vnode\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar hyperscriptVnode = require(\"./hyperscriptVnode\")\n\nvar selectorParser = /(?:(^|#|\\.)([^#\\.\\[\\]]+))|(\\[(.+?)(?:\\s*=\\s*(\"|'|)((?:\\\\[\"'\\]]|.)*?)\\5)?\\])/g\nvar selectorCache = {}\nvar hasOwn = {}.hasOwnProperty\n\nfunction isEmpty(object) {\n\tfor (var key in object) if (hasOwn.call(object, key)) return false\n\treturn true\n}\n\nfunction compileSelector(selector) {\n\tvar match, tag = \"div\", classes = [], attrs = {}\n\twhile (match = selectorParser.exec(selector)) {\n\t\tvar type = match[1], value = match[2]\n\t\tif (type === \"\" && value !== \"\") tag = value\n\t\telse if (type === \"#\") attrs.id = value\n\t\telse if (type === \".\") classes.push(value)\n\t\telse if (match[3][0] === \"[\") {\n\t\t\tvar attrValue = match[6]\n\t\t\tif (attrValue) attrValue = attrValue.replace(/\\\\([\"'])/g, \"$1\").replace(/\\\\\\\\/g, \"\\\\\")\n\t\t\tif (match[4] === \"class\") classes.push(attrValue)\n\t\t\telse attrs[match[4]] = attrValue === \"\" ? attrValue : attrValue || true\n\t\t}\n\t}\n\tif (classes.length > 0) attrs.className = classes.join(\" \")\n\treturn selectorCache[selector] = {tag: tag, attrs: attrs}\n}\n\nfunction execSelector(state, vnode) {\n\tvar attrs = vnode.attrs\n\tvar children = Vnode.normalizeChildren(vnode.children)\n\tvar hasClass = hasOwn.call(attrs, \"class\")\n\tvar className = hasClass ? attrs.class : attrs.className\n\n\tvnode.tag = state.tag\n\tvnode.attrs = null\n\tvnode.children = undefined\n\n\tif (!isEmpty(state.attrs) && !isEmpty(attrs)) {\n\t\tvar newAttrs = {}\n\n\t\tfor (var key in attrs) {\n\t\t\tif (hasOwn.call(attrs, key)) newAttrs[key] = attrs[key]\n\t\t}\n\n\t\tattrs = newAttrs\n\t}\n\n\tfor (var key in state.attrs) {\n\t\tif (hasOwn.call(state.attrs, key) && key !== \"className\" && !hasOwn.call(attrs, key)){\n\t\t\tattrs[key] = state.attrs[key]\n\t\t}\n\t}\n\tif (className != null || state.attrs.className != null) attrs.className =\n\t\tclassName != null\n\t\t\t? state.attrs.className != null\n\t\t\t\t? String(state.attrs.className) + \" \" + String(className)\n\t\t\t\t: className\n\t\t\t: state.attrs.className != null\n\t\t\t\t? state.attrs.className\n\t\t\t\t: null\n\n\tif (hasClass) attrs.class = null\n\n\tfor (var key in attrs) {\n\t\tif (hasOwn.call(attrs, key) && key !== \"key\") {\n\t\t\tvnode.attrs = attrs\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif (Array.isArray(children) && children.length === 1 && children[0] != null && children[0].tag === \"#\") {\n\t\tvnode.text = children[0].children\n\t} else {\n\t\tvnode.children = children\n\t}\n\n\treturn vnode\n}\n\nfunction hyperscript(selector) {\n\tif (selector == null || typeof selector !== \"string\" && typeof selector !== \"function\" && typeof selector.view !== \"function\") {\n\t\tthrow Error(\"The selector must be either a string or a component.\");\n\t}\n\n\tvar vnode = hyperscriptVnode.apply(1, arguments)\n\n\tif (typeof selector === \"string\") {\n\t\tvnode.children = Vnode.normalizeChildren(vnode.children)\n\t\tif (selector !== \"[\") return execSelector(selectorCache[selector] || compileSelector(selector), vnode)\n\t}\n\n\tvnode.tag = selector\n\treturn vnode\n}\n\nmodule.exports = hyperscript\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\n// Call via `hyperscriptVnode.apply(startOffset, arguments)`\n//\n// The reason I do it this way, forwarding the arguments and passing the start\n// offset in `this`, is so I don't have to create a temporary array in a\n// performance-critical path.\n//\n// In native ES6, I'd instead add a final `...args` parameter to the\n// `hyperscript` and `fragment` factories and define this as\n// `hyperscriptVnode(...args)`, since modern engines do optimize that away. But\n// ES5 (what Mithril requires thanks to IE support) doesn't give me that luxury,\n// and engines aren't nearly intelligent enough to do either of these:\n//\n// 1. Elide the allocation for `[].slice.call(arguments, 1)` when it's passed to\n//    another function only to be indexed.\n// 2. Elide an `arguments` allocation when it's passed to any function other\n//    than `Function.prototype.apply` or `Reflect.apply`.\n//\n// In ES6, it'd probably look closer to this (I'd need to profile it, though):\n// module.exports = function(attrs, ...children) {\n//     if (attrs == null || typeof attrs === \"object\" && attrs.tag == null && !Array.isArray(attrs)) {\n//         if (children.length === 1 && Array.isArray(children[0])) children = children[0]\n//     } else {\n//         children = children.length === 0 && Array.isArray(attrs) ? attrs : [attrs, ...children]\n//         attrs = undefined\n//     }\n//\n//     if (attrs == null) attrs = {}\n//     return Vnode(\"\", attrs.key, attrs, children)\n// }\nmodule.exports = function() {\n\tvar attrs = arguments[this], start = this + 1, children\n\n\tif (attrs == null) {\n\t\tattrs = {}\n\t} else if (typeof attrs !== \"object\" || attrs.tag != null || Array.isArray(attrs)) {\n\t\tattrs = {}\n\t\tstart = this\n\t}\n\n\tif (arguments.length === start + 1) {\n\t\tchildren = arguments[start]\n\t\tif (!Array.isArray(children)) children = [children]\n\t} else {\n\t\tchildren = []\n\t\twhile (start < arguments.length) children.push(arguments[start++])\n\t}\n\n\treturn Vnode(\"\", attrs.key, attrs, children)\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function($window) {\n\tvar $doc = $window && $window.document\n\tvar currentRedraw\n\n\tvar nameSpace = {\n\t\tsvg: \"http://www.w3.org/2000/svg\",\n\t\tmath: \"http://www.w3.org/1998/Math/MathML\"\n\t}\n\n\tfunction getNameSpace(vnode) {\n\t\treturn vnode.attrs && vnode.attrs.xmlns || nameSpace[vnode.tag]\n\t}\n\n\t//sanity check to discourage people from doing `vnode.state = ...`\n\tfunction checkState(vnode, original) {\n\t\tif (vnode.state !== original) throw new Error(\"`vnode.state` must not be modified\")\n\t}\n\n\t//Note: the hook is passed as the `this` argument to allow proxying the\n\t//arguments without requiring a full array allocation to do so. It also\n\t//takes advantage of the fact the current `vnode` is the first argument in\n\t//all lifecycle methods.\n\tfunction callHook(vnode) {\n\t\tvar original = vnode.state\n\t\ttry {\n\t\t\treturn this.apply(original, arguments)\n\t\t} finally {\n\t\t\tcheckState(vnode, original)\n\t\t}\n\t}\n\n\t// IE11 (at least) throws an UnspecifiedError when accessing document.activeElement when\n\t// inside an iframe. Catch and swallow this error, and heavy-handidly return null.\n\tfunction activeElement() {\n\t\ttry {\n\t\t\treturn $doc.activeElement\n\t\t} catch (e) {\n\t\t\treturn null\n\t\t}\n\t}\n\t//create\n\tfunction createNodes(parent, vnodes, start, end, hooks, nextSibling, ns) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) {\n\t\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t}\n\tfunction createNode(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tif (typeof tag === \"string\") {\n\t\t\tvnode.state = {}\n\t\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\t\tswitch (tag) {\n\t\t\t\tcase \"#\": createText(parent, vnode, nextSibling); break\n\t\t\t\tcase \"<\": createHTML(parent, vnode, ns, nextSibling); break\n\t\t\t\tcase \"[\": createFragment(parent, vnode, hooks, ns, nextSibling); break\n\t\t\t\tdefault: createElement(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t\telse createComponent(parent, vnode, hooks, ns, nextSibling)\n\t}\n\tfunction createText(parent, vnode, nextSibling) {\n\t\tvnode.dom = $doc.createTextNode(vnode.children)\n\t\tinsertNode(parent, vnode.dom, nextSibling)\n\t}\n\tvar possibleParents = {caption: \"table\", thead: \"table\", tbody: \"table\", tfoot: \"table\", tr: \"tbody\", th: \"tr\", td: \"tr\", colgroup: \"table\", col: \"colgroup\"}\n\tfunction createHTML(parent, vnode, ns, nextSibling) {\n\t\tvar match = vnode.children.match(/^\\s*?<(\\w+)/im) || []\n\t\t// not using the proper parent makes the child element(s) vanish.\n\t\t//     var div = document.createElement(\"div\")\n\t\t//     div.innerHTML = \"<td>i</td><td>j</td>\"\n\t\t//     console.log(div.innerHTML)\n\t\t// --> \"ij\", no <td> in sight.\n\t\tvar temp = $doc.createElement(possibleParents[match[1]] || \"div\")\n\t\tif (ns === \"http://www.w3.org/2000/svg\") {\n\t\t\ttemp.innerHTML = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\" + vnode.children + \"</svg>\"\n\t\t\ttemp = temp.firstChild\n\t\t} else {\n\t\t\ttemp.innerHTML = vnode.children\n\t\t}\n\t\tvnode.dom = temp.firstChild\n\t\tvnode.domSize = temp.childNodes.length\n\t\t// Capture nodes to remove, so we don't confuse them.\n\t\tvnode.instance = []\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tvar child\n\t\twhile (child = temp.firstChild) {\n\t\t\tvnode.instance.push(child)\n\t\t\tfragment.appendChild(child)\n\t\t}\n\t\tinsertNode(parent, fragment, nextSibling)\n\t}\n\tfunction createFragment(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tif (vnode.children != null) {\n\t\t\tvar children = vnode.children\n\t\t\tcreateNodes(fragment, children, 0, children.length, hooks, null, ns)\n\t\t}\n\t\tvnode.dom = fragment.firstChild\n\t\tvnode.domSize = fragment.childNodes.length\n\t\tinsertNode(parent, fragment, nextSibling)\n\t}\n\tfunction createElement(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tvar attrs = vnode.attrs\n\t\tvar is = attrs && attrs.is\n\n\t\tns = getNameSpace(vnode) || ns\n\n\t\tvar element = ns ?\n\t\t\tis ? $doc.createElementNS(ns, tag, {is: is}) : $doc.createElementNS(ns, tag) :\n\t\t\tis ? $doc.createElement(tag, {is: is}) : $doc.createElement(tag)\n\t\tvnode.dom = element\n\n\t\tif (attrs != null) {\n\t\t\tsetAttrs(vnode, attrs, ns)\n\t\t}\n\n\t\tinsertNode(parent, element, nextSibling)\n\n\t\tif (!maybeSetContentEditable(vnode)) {\n\t\t\tif (vnode.text != null) {\n\t\t\t\tif (vnode.text !== \"\") element.textContent = vnode.text\n\t\t\t\telse vnode.children = [Vnode(\"#\", undefined, undefined, vnode.text, undefined, undefined)]\n\t\t\t}\n\t\t\tif (vnode.children != null) {\n\t\t\t\tvar children = vnode.children\n\t\t\t\tcreateNodes(element, children, 0, children.length, hooks, null, ns)\n\t\t\t\tif (vnode.tag === \"select\" && attrs != null) setLateSelectAttrs(vnode, attrs)\n\t\t\t}\n\t\t}\n\t}\n\tfunction initComponent(vnode, hooks) {\n\t\tvar sentinel\n\t\tif (typeof vnode.tag.view === \"function\") {\n\t\t\tvnode.state = Object.create(vnode.tag)\n\t\t\tsentinel = vnode.state.view\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t} else {\n\t\t\tvnode.state = void 0\n\t\t\tsentinel = vnode.tag\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t\tvnode.state = (vnode.tag.prototype != null && typeof vnode.tag.prototype.view === \"function\") ? new vnode.tag(vnode) : vnode.tag(vnode)\n\t\t}\n\t\tinitLifecycle(vnode.state, vnode, hooks)\n\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\tvnode.instance = Vnode.normalize(callHook.call(vnode.state.view, vnode))\n\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\tsentinel.$$reentrantLock$$ = null\n\t}\n\tfunction createComponent(parent, vnode, hooks, ns, nextSibling) {\n\t\tinitComponent(vnode, hooks)\n\t\tif (vnode.instance != null) {\n\t\t\tcreateNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.dom != null ? vnode.instance.domSize : 0\n\t\t}\n\t\telse {\n\t\t\tvnode.domSize = 0\n\t\t}\n\t}\n\n\t//update\n\t/**\n\t * @param {Element|Fragment} parent - the parent element\n\t * @param {Vnode[] | null} old - the list of vnodes of the last `render()` call for\n\t *                               this part of the tree\n\t * @param {Vnode[] | null} vnodes - as above, but for the current `render()` call.\n\t * @param {Function[]} hooks - an accumulator of post-render hooks (oncreate/onupdate)\n\t * @param {Element | null} nextSibling - the next DOM node if we're dealing with a\n\t *                                       fragment that is not the last item in its\n\t *                                       parent\n\t * @param {'svg' | 'math' | String | null} ns) - the current XML namespace, if any\n\t * @returns void\n\t */\n\t// This function diffs and patches lists of vnodes, both keyed and unkeyed.\n\t//\n\t// We will:\n\t//\n\t// 1. describe its general structure\n\t// 2. focus on the diff algorithm optimizations\n\t// 3. discuss DOM node operations.\n\n\t// ## Overview:\n\t//\n\t// The updateNodes() function:\n\t// - deals with trivial cases\n\t// - determines whether the lists are keyed or unkeyed based on the first non-null node\n\t//   of each list.\n\t// - diffs them and patches the DOM if needed (that's the brunt of the code)\n\t// - manages the leftovers: after diffing, are there:\n\t//   - old nodes left to remove?\n\t// \t - new nodes to insert?\n\t// \t deal with them!\n\t//\n\t// The lists are only iterated over once, with an exception for the nodes in `old` that\n\t// are visited in the fourth part of the diff and in the `removeNodes` loop.\n\n\t// ## Diffing\n\t//\n\t// Reading https://github.com/localvoid/ivi/blob/ddc09d06abaef45248e6133f7040d00d3c6be853/packages/ivi/src/vdom/implementation.ts#L617-L837\n\t// may be good for context on longest increasing subsequence-based logic for moving nodes.\n\t//\n\t// In order to diff keyed lists, one has to\n\t//\n\t// 1) match nodes in both lists, per key, and update them accordingly\n\t// 2) create the nodes present in the new list, but absent in the old one\n\t// 3) remove the nodes present in the old list, but absent in the new one\n\t// 4) figure out what nodes in 1) to move in order to minimize the DOM operations.\n\t//\n\t// To achieve 1) one can create a dictionary of keys => index (for the old list), then iterate\n\t// over the new list and for each new vnode, find the corresponding vnode in the old list using\n\t// the map.\n\t// 2) is achieved in the same step: if a new node has no corresponding entry in the map, it is new\n\t// and must be created.\n\t// For the removals, we actually remove the nodes that have been updated from the old list.\n\t// The nodes that remain in that list after 1) and 2) have been performed can be safely removed.\n\t// The fourth step is a bit more complex and relies on the longest increasing subsequence (LIS)\n\t// algorithm.\n\t//\n\t// the longest increasing subsequence is the list of nodes that can remain in place. Imagine going\n\t// from `1,2,3,4,5` to `4,5,1,2,3` where the numbers are not necessarily the keys, but the indices\n\t// corresponding to the keyed nodes in the old list (keyed nodes `e,d,c,b,a` => `b,a,e,d,c` would\n\t//  match the above lists, for example).\n\t//\n\t// In there are two increasing subsequences: `4,5` and `1,2,3`, the latter being the longest. We\n\t// can update those nodes without moving them, and only call `insertNode` on `4` and `5`.\n\t//\n\t// @localvoid adapted the algo to also support node deletions and insertions (the `lis` is actually\n\t// the longest increasing subsequence *of old nodes still present in the new list*).\n\t//\n\t// It is a general algorithm that is fireproof in all circumstances, but it requires the allocation\n\t// and the construction of a `key => oldIndex` map, and three arrays (one with `newIndex => oldIndex`,\n\t// the `LIS` and a temporary one to create the LIS).\n\t//\n\t// So we cheat where we can: if the tails of the lists are identical, they are guaranteed to be part of\n\t// the LIS and can be updated without moving them.\n\t//\n\t// If two nodes are swapped, they are guaranteed not to be part of the LIS, and must be moved (with\n\t// the exception of the last node if the list is fully reversed).\n\t//\n\t// ## Finding the next sibling.\n\t//\n\t// `updateNode()` and `createNode()` expect a nextSibling parameter to perform DOM operations.\n\t// When the list is being traversed top-down, at any index, the DOM nodes up to the previous\n\t// vnode reflect the content of the new list, whereas the rest of the DOM nodes reflect the old\n\t// list. The next sibling must be looked for in the old list using `getNextSibling(... oldStart + 1 ...)`.\n\t//\n\t// In the other scenarios (swaps, upwards traversal, map-based diff),\n\t// the new vnodes list is traversed upwards. The DOM nodes at the bottom of the list reflect the\n\t// bottom part of the new vnodes list, and we can use the `v.dom`  value of the previous node\n\t// as the next sibling (cached in the `nextSibling` variable).\n\n\n\t// ## DOM node moves\n\t//\n\t// In most scenarios `updateNode()` and `createNode()` perform the DOM operations. However,\n\t// this is not the case if the node moved (second and fourth part of the diff algo). We move\n\t// the old DOM nodes before updateNode runs because it enables us to use the cached `nextSibling`\n\t// variable rather than fetching it using `getNextSibling()`.\n\t//\n\t// The fourth part of the diff currently inserts nodes unconditionally, leading to issues\n\t// like #1791 and #1999. We need to be smarter about those situations where adjascent old\n\t// nodes remain together in the new list in a way that isn't covered by parts one and\n\t// three of the diff algo.\n\n\tfunction updateNodes(parent, old, vnodes, hooks, nextSibling, ns) {\n\t\tif (old === vnodes || old == null && vnodes == null) return\n\t\telse if (old == null || old.length === 0) createNodes(parent, vnodes, 0, vnodes.length, hooks, nextSibling, ns)\n\t\telse if (vnodes == null || vnodes.length === 0) removeNodes(parent, old, 0, old.length)\n\t\telse {\n\t\t\tvar isOldKeyed = old[0] != null && old[0].key != null\n\t\t\tvar isKeyed = vnodes[0] != null && vnodes[0].key != null\n\t\t\tvar start = 0, oldStart = 0\n\t\t\tif (!isOldKeyed) while (oldStart < old.length && old[oldStart] == null) oldStart++\n\t\t\tif (!isKeyed) while (start < vnodes.length && vnodes[start] == null) start++\n\t\t\tif (isKeyed === null && isOldKeyed == null) return // both lists are full of nulls\n\t\t\tif (isOldKeyed !== isKeyed) {\n\t\t\t\tremoveNodes(parent, old, oldStart, old.length)\n\t\t\t\tcreateNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns)\n\t\t\t} else if (!isKeyed) {\n\t\t\t\t// Don't index past the end of either list (causes deopts).\n\t\t\t\tvar commonLength = old.length < vnodes.length ? old.length : vnodes.length\n\t\t\t\t// Rewind if necessary to the first non-null index on either side.\n\t\t\t\t// We could alternatively either explicitly create or remove nodes when `start !== oldStart`\n\t\t\t\t// but that would be optimizing for sparse lists which are more rare than dense ones.\n\t\t\t\tstart = start < oldStart ? start : oldStart\n\t\t\t\tfor (; start < commonLength; start++) {\n\t\t\t\t\to = old[start]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t\tif (o === v || o == null && v == null) continue\n\t\t\t\t\telse if (o == null) createNode(parent, v, hooks, ns, getNextSibling(old, start + 1, nextSibling))\n\t\t\t\t\telse if (v == null) removeNode(parent, o)\n\t\t\t\t\telse updateNode(parent, o, v, hooks, getNextSibling(old, start + 1, nextSibling), ns)\n\t\t\t\t}\n\t\t\t\tif (old.length > commonLength) removeNodes(parent, old, start, old.length)\n\t\t\t\tif (vnodes.length > commonLength) createNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns)\n\t\t\t} else {\n\t\t\t\t// keyed diff\n\t\t\t\tvar oldEnd = old.length - 1, end = vnodes.length - 1, map, o, v, oe, ve, topSibling\n\n\t\t\t\t// bottom-up\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t\tif (oe.key !== ve.key) break\n\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldEnd--, end--\n\t\t\t\t}\n\t\t\t\t// top-down\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\to = old[oldStart]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t\tif (o.key !== v.key) break\n\t\t\t\t\toldStart++, start++\n\t\t\t\t\tif (o !== v) updateNode(parent, o, v, hooks, getNextSibling(old, oldStart, nextSibling), ns)\n\t\t\t\t}\n\t\t\t\t// swaps and list reversals\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\tif (start === end) break\n\t\t\t\t\tif (o.key !== ve.key || oe.key !== v.key) break\n\t\t\t\t\ttopSibling = getNextSibling(old, oldStart, nextSibling)\n\t\t\t\t\tmoveNodes(parent, oe, topSibling)\n\t\t\t\t\tif (oe !== v) updateNode(parent, oe, v, hooks, topSibling, ns)\n\t\t\t\t\tif (++start <= --end) moveNodes(parent, o, nextSibling)\n\t\t\t\t\tif (o !== ve) updateNode(parent, o, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldStart++; oldEnd--\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t\to = old[oldStart]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t}\n\t\t\t\t// bottom up once again\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\tif (oe.key !== ve.key) break\n\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldEnd--, end--\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t}\n\t\t\t\tif (start > end) removeNodes(parent, old, oldStart, oldEnd + 1)\n\t\t\t\telse if (oldStart > oldEnd) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)\n\t\t\t\telse {\n\t\t\t\t\t// inspired by ivi https://github.com/ivijs/ivi/ by Boris Kaul\n\t\t\t\t\tvar originalNextSibling = nextSibling, vnodesLength = end - start + 1, oldIndices = new Array(vnodesLength), li=0, i=0, pos = 2147483647, matched = 0, map, lisIndices\n\t\t\t\t\tfor (i = 0; i < vnodesLength; i++) oldIndices[i] = -1\n\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\tif (map == null) map = getKeyMap(old, oldStart, oldEnd + 1)\n\t\t\t\t\t\tve = vnodes[i]\n\t\t\t\t\t\tvar oldIndex = map[ve.key]\n\t\t\t\t\t\tif (oldIndex != null) {\n\t\t\t\t\t\t\tpos = (oldIndex < pos) ? oldIndex : -1 // becomes -1 if nodes were re-ordered\n\t\t\t\t\t\t\toldIndices[i-start] = oldIndex\n\t\t\t\t\t\t\toe = old[oldIndex]\n\t\t\t\t\t\t\told[oldIndex] = null\n\t\t\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\t\t\tmatched++\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tnextSibling = originalNextSibling\n\t\t\t\t\tif (matched !== oldEnd - oldStart + 1) removeNodes(parent, old, oldStart, oldEnd + 1)\n\t\t\t\t\tif (matched === 0) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (pos === -1) {\n\t\t\t\t\t\t\t// the indices of the indices of the items that are part of the\n\t\t\t\t\t\t\t// longest increasing subsequence in the oldIndices list\n\t\t\t\t\t\t\tlisIndices = makeLisIndices(oldIndices)\n\t\t\t\t\t\t\tli = lisIndices.length - 1\n\t\t\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\t\t\tv = vnodes[i]\n\t\t\t\t\t\t\t\tif (oldIndices[i-start] === -1) createNode(parent, v, hooks, ns, nextSibling)\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tif (lisIndices[li] === i - start) li--\n\t\t\t\t\t\t\t\t\telse moveNodes(parent, v, nextSibling)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (v.dom != null) nextSibling = vnodes[i].dom\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\t\t\tv = vnodes[i]\n\t\t\t\t\t\t\t\tif (oldIndices[i-start] === -1) createNode(parent, v, hooks, ns, nextSibling)\n\t\t\t\t\t\t\t\tif (v.dom != null) nextSibling = vnodes[i].dom\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction updateNode(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tvar oldTag = old.tag, tag = vnode.tag\n\t\tif (oldTag === tag) {\n\t\t\tvnode.state = old.state\n\t\t\tvnode.events = old.events\n\t\t\tif (shouldNotUpdate(vnode, old)) return\n\t\t\tif (typeof oldTag === \"string\") {\n\t\t\t\tif (vnode.attrs != null) {\n\t\t\t\t\tupdateLifecycle(vnode.attrs, vnode, hooks)\n\t\t\t\t}\n\t\t\t\tswitch (oldTag) {\n\t\t\t\t\tcase \"#\": updateText(old, vnode); break\n\t\t\t\t\tcase \"<\": updateHTML(parent, old, vnode, ns, nextSibling); break\n\t\t\t\t\tcase \"[\": updateFragment(parent, old, vnode, hooks, nextSibling, ns); break\n\t\t\t\t\tdefault: updateElement(old, vnode, hooks, ns)\n\t\t\t\t}\n\t\t\t}\n\t\t\telse updateComponent(parent, old, vnode, hooks, nextSibling, ns)\n\t\t}\n\t\telse {\n\t\t\tremoveNode(parent, old)\n\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t}\n\t}\n\tfunction updateText(old, vnode) {\n\t\tif (old.children.toString() !== vnode.children.toString()) {\n\t\t\told.dom.nodeValue = vnode.children\n\t\t}\n\t\tvnode.dom = old.dom\n\t}\n\tfunction updateHTML(parent, old, vnode, ns, nextSibling) {\n\t\tif (old.children !== vnode.children) {\n\t\t\tremoveHTML(parent, old)\n\t\t\tcreateHTML(parent, vnode, ns, nextSibling)\n\t\t}\n\t\telse {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t\tvnode.instance = old.instance\n\t\t}\n\t}\n\tfunction updateFragment(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tupdateNodes(parent, old.children, vnode.children, hooks, nextSibling, ns)\n\t\tvar domSize = 0, children = vnode.children\n\t\tvnode.dom = null\n\t\tif (children != null) {\n\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\tvar child = children[i]\n\t\t\t\tif (child != null && child.dom != null) {\n\t\t\t\t\tif (vnode.dom == null) vnode.dom = child.dom\n\t\t\t\t\tdomSize += child.domSize || 1\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (domSize !== 1) vnode.domSize = domSize\n\t\t}\n\t}\n\tfunction updateElement(old, vnode, hooks, ns) {\n\t\tvar element = vnode.dom = old.dom\n\t\tns = getNameSpace(vnode) || ns\n\n\t\tif (vnode.tag === \"textarea\") {\n\t\t\tif (vnode.attrs == null) vnode.attrs = {}\n\t\t\tif (vnode.text != null) {\n\t\t\t\tvnode.attrs.value = vnode.text //FIXME handle multiple children\n\t\t\t\tvnode.text = undefined\n\t\t\t}\n\t\t}\n\t\tupdateAttrs(vnode, old.attrs, vnode.attrs, ns)\n\t\tif (!maybeSetContentEditable(vnode)) {\n\t\t\tif (old.text != null && vnode.text != null && vnode.text !== \"\") {\n\t\t\t\tif (old.text.toString() !== vnode.text.toString()) old.dom.firstChild.nodeValue = vnode.text\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (old.text != null) old.children = [Vnode(\"#\", undefined, undefined, old.text, undefined, old.dom.firstChild)]\n\t\t\t\tif (vnode.text != null) vnode.children = [Vnode(\"#\", undefined, undefined, vnode.text, undefined, undefined)]\n\t\t\t\tupdateNodes(element, old.children, vnode.children, hooks, null, ns)\n\t\t\t}\n\t\t}\n\t}\n\tfunction updateComponent(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tvnode.instance = Vnode.normalize(callHook.call(vnode.state.view, vnode))\n\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\tupdateLifecycle(vnode.state, vnode, hooks)\n\t\tif (vnode.attrs != null) updateLifecycle(vnode.attrs, vnode, hooks)\n\t\tif (vnode.instance != null) {\n\t\t\tif (old.instance == null) createNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\telse updateNode(parent, old.instance, vnode.instance, hooks, nextSibling, ns)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.instance.domSize\n\t\t}\n\t\telse if (old.instance != null) {\n\t\t\tremoveNode(parent, old.instance)\n\t\t\tvnode.dom = undefined\n\t\t\tvnode.domSize = 0\n\t\t}\n\t\telse {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t}\n\t}\n\tfunction getKeyMap(vnodes, start, end) {\n\t\tvar map = Object.create(null)\n\t\tfor (; start < end; start++) {\n\t\t\tvar vnode = vnodes[start]\n\t\t\tif (vnode != null) {\n\t\t\t\tvar key = vnode.key\n\t\t\t\tif (key != null) map[key] = start\n\t\t\t}\n\t\t}\n\t\treturn map\n\t}\n\t// Lifted from ivi https://github.com/ivijs/ivi/\n\t// takes a list of unique numbers (-1 is special and can\n\t// occur multiple times) and returns an array with the indices\n\t// of the items that are part of the longest increasing\n\t// subsequece\n\tvar lisTemp = []\n\tfunction makeLisIndices(a) {\n\t\tvar result = [0]\n\t\tvar u = 0, v = 0, i = 0\n\t\tvar il = lisTemp.length = a.length\n\t\tfor (var i = 0; i < il; i++) lisTemp[i] = a[i]\n\t\tfor (var i = 0; i < il; ++i) {\n\t\t\tif (a[i] === -1) continue\n\t\t\tvar j = result[result.length - 1]\n\t\t\tif (a[j] < a[i]) {\n\t\t\t\tlisTemp[i] = j\n\t\t\t\tresult.push(i)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tu = 0\n\t\t\tv = result.length - 1\n\t\t\twhile (u < v) {\n\t\t\t\t// Fast integer average without overflow.\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tvar c = (u >>> 1) + (v >>> 1) + (u & v & 1)\n\t\t\t\tif (a[result[c]] < a[i]) {\n\t\t\t\t\tu = c + 1\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tv = c\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (a[i] < a[result[u]]) {\n\t\t\t\tif (u > 0) lisTemp[i] = result[u - 1]\n\t\t\t\tresult[u] = i\n\t\t\t}\n\t\t}\n\t\tu = result.length\n\t\tv = result[u - 1]\n\t\twhile (u-- > 0) {\n\t\t\tresult[u] = v\n\t\t\tv = lisTemp[v]\n\t\t}\n\t\tlisTemp.length = 0\n\t\treturn result\n\t}\n\n\tfunction getNextSibling(vnodes, i, nextSibling) {\n\t\tfor (; i < vnodes.length; i++) {\n\t\t\tif (vnodes[i] != null && vnodes[i].dom != null) return vnodes[i].dom\n\t\t}\n\t\treturn nextSibling\n\t}\n\n\t// This covers a really specific edge case:\n\t// - Parent node is keyed and contains child\n\t// - Child is removed, returns unresolved promise in `onbeforeremove`\n\t// - Parent node is moved in keyed diff\n\t// - Remaining children still need moved appropriately\n\t//\n\t// Ideally, I'd track removed nodes as well, but that introduces a lot more\n\t// complexity and I'm not exactly interested in doing that.\n\tfunction moveNodes(parent, vnode, nextSibling) {\n\t\tvar frag = $doc.createDocumentFragment()\n\t\tmoveChildToFrag(parent, frag, vnode)\n\t\tinsertNode(parent, frag, nextSibling)\n\t}\n\tfunction moveChildToFrag(parent, frag, vnode) {\n\t\t// Dodge the recursion overhead in a few of the most common cases.\n\t\twhile (vnode.dom != null && vnode.dom.parentNode === parent) {\n\t\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\t\tvnode = vnode.instance\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else if (vnode.tag === \"<\") {\n\t\t\t\tfor (var i = 0; i < vnode.instance.length; i++) {\n\t\t\t\t\tfrag.appendChild(vnode.instance[i])\n\t\t\t\t}\n\t\t\t} else if (vnode.tag !== \"[\") {\n\t\t\t\t// Don't recurse for text nodes *or* elements, just fragments\n\t\t\t\tfrag.appendChild(vnode.dom)\n\t\t\t} else if (vnode.children.length === 1) {\n\t\t\t\tvnode = vnode.children[0]\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else {\n\t\t\t\tfor (var i = 0; i < vnode.children.length; i++) {\n\t\t\t\t\tvar child = vnode.children[i]\n\t\t\t\t\tif (child != null) moveChildToFrag(parent, frag, child)\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\n\tfunction insertNode(parent, dom, nextSibling) {\n\t\tif (nextSibling != null) parent.insertBefore(dom, nextSibling)\n\t\telse parent.appendChild(dom)\n\t}\n\n\tfunction maybeSetContentEditable(vnode) {\n\t\tif (vnode.attrs == null || (\n\t\t\tvnode.attrs.contenteditable == null && // attribute\n\t\t\tvnode.attrs.contentEditable == null // property\n\t\t)) return false\n\t\tvar children = vnode.children\n\t\tif (children != null && children.length === 1 && children[0].tag === \"<\") {\n\t\t\tvar content = children[0].children\n\t\t\tif (vnode.dom.innerHTML !== content) vnode.dom.innerHTML = content\n\t\t}\n\t\telse if (vnode.text != null || children != null && children.length !== 0) throw new Error(\"Child node of a contenteditable must be trusted\")\n\t\treturn true\n\t}\n\n\t//remove\n\tfunction removeNodes(parent, vnodes, start, end) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) removeNode(parent, vnode)\n\t\t}\n\t}\n\tfunction removeNode(parent, vnode) {\n\t\tvar mask = 0\n\t\tvar original = vnode.state\n\t\tvar stateResult, attrsResult\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onbeforeremove === \"function\") {\n\t\t\tvar result = callHook.call(vnode.state.onbeforeremove, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\tmask = 1\n\t\t\t\tstateResult = result\n\t\t\t}\n\t\t}\n\t\tif (vnode.attrs && typeof vnode.attrs.onbeforeremove === \"function\") {\n\t\t\tvar result = callHook.call(vnode.attrs.onbeforeremove, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tmask |= 2\n\t\t\t\tattrsResult = result\n\t\t\t}\n\t\t}\n\t\tcheckState(vnode, original)\n\n\t\t// If we can, try to fast-path it and avoid all the overhead of awaiting\n\t\tif (!mask) {\n\t\t\tonremove(vnode)\n\t\t\tremoveChild(parent, vnode)\n\t\t} else {\n\t\t\tif (stateResult != null) {\n\t\t\t\tvar next = function () {\n\t\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\t\tif (mask & 1) { mask &= 2; if (!mask) reallyRemove() }\n\t\t\t\t}\n\t\t\t\tstateResult.then(next, next)\n\t\t\t}\n\t\t\tif (attrsResult != null) {\n\t\t\t\tvar next = function () {\n\t\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\t\tif (mask & 2) { mask &= 1; if (!mask) reallyRemove() }\n\t\t\t\t}\n\t\t\t\tattrsResult.then(next, next)\n\t\t\t}\n\t\t}\n\n\t\tfunction reallyRemove() {\n\t\t\tcheckState(vnode, original)\n\t\t\tonremove(vnode)\n\t\t\tremoveChild(parent, vnode)\n\t\t}\n\t}\n\tfunction removeHTML(parent, vnode) {\n\t\tfor (var i = 0; i < vnode.instance.length; i++) {\n\t\t\tparent.removeChild(vnode.instance[i])\n\t\t}\n\t}\n\tfunction removeChild(parent, vnode) {\n\t\t// Dodge the recursion overhead in a few of the most common cases.\n\t\twhile (vnode.dom != null && vnode.dom.parentNode === parent) {\n\t\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\t\tvnode = vnode.instance\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else if (vnode.tag === \"<\") {\n\t\t\t\tremoveHTML(parent, vnode)\n\t\t\t} else {\n\t\t\t\tif (vnode.tag !== \"[\") {\n\t\t\t\t\tparent.removeChild(vnode.dom)\n\t\t\t\t\tif (!Array.isArray(vnode.children)) break\n\t\t\t\t}\n\t\t\t\tif (vnode.children.length === 1) {\n\t\t\t\t\tvnode = vnode.children[0]\n\t\t\t\t\tif (vnode != null) continue\n\t\t\t\t} else {\n\t\t\t\t\tfor (var i = 0; i < vnode.children.length; i++) {\n\t\t\t\t\t\tvar child = vnode.children[i]\n\t\t\t\t\t\tif (child != null) removeChild(parent, child)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\tfunction onremove(vnode) {\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onremove === \"function\") callHook.call(vnode.state.onremove, vnode)\n\t\tif (vnode.attrs && typeof vnode.attrs.onremove === \"function\") callHook.call(vnode.attrs.onremove, vnode)\n\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\tif (vnode.instance != null) onremove(vnode.instance)\n\t\t} else {\n\t\t\tvar children = vnode.children\n\t\t\tif (Array.isArray(children)) {\n\t\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\t\tvar child = children[i]\n\t\t\t\t\tif (child != null) onremove(child)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t//attrs\n\tfunction setAttrs(vnode, attrs, ns) {\n\t\tfor (var key in attrs) {\n\t\t\tsetAttr(vnode, key, null, attrs[key], ns)\n\t\t}\n\t}\n\tfunction setAttr(vnode, key, old, value, ns) {\n\t\tif (key === \"key\" || key === \"is\" || value == null || isLifecycleMethod(key) || (old === value && !isFormAttribute(vnode, key)) && typeof value !== \"object\") return\n\t\tif (key[0] === \"o\" && key[1] === \"n\") return updateEvent(vnode, key, value)\n\t\tif (key.slice(0, 6) === \"xlink:\") vnode.dom.setAttributeNS(\"http://www.w3.org/1999/xlink\", key.slice(6), value)\n\t\telse if (key === \"style\") updateStyle(vnode.dom, old, value)\n\t\telse if (hasPropertyKey(vnode, key, ns)) {\n\t\t\tif (key === \"value\") {\n\t\t\t\t// Only do the coercion if we're actually going to check the value.\n\t\t\t\t/* eslint-disable no-implicit-coercion */\n\t\t\t\t//setting input[value] to same value by typing on focused element moves cursor to end in Chrome\n\t\t\t\tif ((vnode.tag === \"input\" || vnode.tag === \"textarea\") && vnode.dom.value === \"\" + value && vnode.dom === activeElement()) return\n\t\t\t\t//setting select[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\t\tif (vnode.tag === \"select\" && old !== null && vnode.dom.value === \"\" + value) return\n\t\t\t\t//setting option[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\t\tif (vnode.tag === \"option\" && old !== null && vnode.dom.value === \"\" + value) return\n\t\t\t\t/* eslint-enable no-implicit-coercion */\n\t\t\t}\n\t\t\t// If you assign an input type that is not supported by IE 11 with an assignment expression, an error will occur.\n\t\t\tif (vnode.tag === \"input\" && key === \"type\") vnode.dom.setAttribute(key, value)\n\t\t\telse vnode.dom[key] = value\n\t\t} else {\n\t\t\tif (typeof value === \"boolean\") {\n\t\t\t\tif (value) vnode.dom.setAttribute(key, \"\")\n\t\t\t\telse vnode.dom.removeAttribute(key)\n\t\t\t}\n\t\t\telse vnode.dom.setAttribute(key === \"className\" ? \"class\" : key, value)\n\t\t}\n\t}\n\tfunction removeAttr(vnode, key, old, ns) {\n\t\tif (key === \"key\" || key === \"is\" || old == null || isLifecycleMethod(key)) return\n\t\tif (key[0] === \"o\" && key[1] === \"n\" && !isLifecycleMethod(key)) updateEvent(vnode, key, undefined)\n\t\telse if (key === \"style\") updateStyle(vnode.dom, old, null)\n\t\telse if (\n\t\t\thasPropertyKey(vnode, key, ns)\n\t\t\t&& key !== \"className\"\n\t\t\t&& !(key === \"value\" && (\n\t\t\t\tvnode.tag === \"option\"\n\t\t\t\t|| vnode.tag === \"select\" && vnode.dom.selectedIndex === -1 && vnode.dom === activeElement()\n\t\t\t))\n\t\t\t&& !(vnode.tag === \"input\" && key === \"type\")\n\t\t) {\n\t\t\tvnode.dom[key] = null\n\t\t} else {\n\t\t\tvar nsLastIndex = key.indexOf(\":\")\n\t\t\tif (nsLastIndex !== -1) key = key.slice(nsLastIndex + 1)\n\t\t\tif (old !== false) vnode.dom.removeAttribute(key === \"className\" ? \"class\" : key)\n\t\t}\n\t}\n\tfunction setLateSelectAttrs(vnode, attrs) {\n\t\tif (\"value\" in attrs) {\n\t\t\tif(attrs.value === null) {\n\t\t\t\tif (vnode.dom.selectedIndex !== -1) vnode.dom.value = null\n\t\t\t} else {\n\t\t\t\tvar normalized = \"\" + attrs.value // eslint-disable-line no-implicit-coercion\n\t\t\t\tif (vnode.dom.value !== normalized || vnode.dom.selectedIndex === -1) {\n\t\t\t\t\tvnode.dom.value = normalized\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (\"selectedIndex\" in attrs) setAttr(vnode, \"selectedIndex\", null, attrs.selectedIndex, undefined)\n\t}\n\tfunction updateAttrs(vnode, old, attrs, ns) {\n\t\tif (attrs != null) {\n\t\t\tfor (var key in attrs) {\n\t\t\t\tsetAttr(vnode, key, old && old[key], attrs[key], ns)\n\t\t\t}\n\t\t}\n\t\tvar val\n\t\tif (old != null) {\n\t\t\tfor (var key in old) {\n\t\t\t\tif (((val = old[key]) != null) && (attrs == null || attrs[key] == null)) {\n\t\t\t\t\tremoveAttr(vnode, key, val, ns)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction isFormAttribute(vnode, attr) {\n\t\treturn attr === \"value\" || attr === \"checked\" || attr === \"selectedIndex\" || attr === \"selected\" && vnode.dom === activeElement() || vnode.tag === \"option\" && vnode.dom.parentNode === $doc.activeElement\n\t}\n\tfunction isLifecycleMethod(attr) {\n\t\treturn attr === \"oninit\" || attr === \"oncreate\" || attr === \"onupdate\" || attr === \"onremove\" || attr === \"onbeforeremove\" || attr === \"onbeforeupdate\"\n\t}\n\tfunction hasPropertyKey(vnode, key, ns) {\n\t\t// Filter out namespaced keys\n\t\treturn ns === undefined && (\n\t\t\t// If it's a custom element, just keep it.\n\t\t\tvnode.tag.indexOf(\"-\") > -1 || vnode.attrs != null && vnode.attrs.is ||\n\t\t\t// If it's a normal element, let's try to avoid a few browser bugs.\n\t\t\tkey !== \"href\" && key !== \"list\" && key !== \"form\" && key !== \"width\" && key !== \"height\"// && key !== \"type\"\n\t\t\t// Defer the property check until *after* we check everything.\n\t\t) && key in vnode.dom\n\t}\n\n\t//style\n\tvar uppercaseRegex = /[A-Z]/g\n\tfunction toLowerCase(capital) { return \"-\" + capital.toLowerCase() }\n\tfunction normalizeKey(key) {\n\t\treturn key[0] === \"-\" && key[1] === \"-\" ? key :\n\t\t\tkey === \"cssFloat\" ? \"float\" :\n\t\t\t\tkey.replace(uppercaseRegex, toLowerCase)\n\t}\n\tfunction updateStyle(element, old, style) {\n\t\tif (old === style) {\n\t\t\t// Styles are equivalent, do nothing.\n\t\t} else if (style == null) {\n\t\t\t// New style is missing, just clear it.\n\t\t\telement.style.cssText = \"\"\n\t\t} else if (typeof style !== \"object\") {\n\t\t\t// New style is a string, let engine deal with patching.\n\t\t\telement.style.cssText = style\n\t\t} else if (old == null || typeof old !== \"object\") {\n\t\t\t// `old` is missing or a string, `style` is an object.\n\t\t\telement.style.cssText = \"\"\n\t\t\t// Add new style properties\n\t\t\tfor (var key in style) {\n\t\t\t\tvar value = style[key]\n\t\t\t\tif (value != null) element.style.setProperty(normalizeKey(key), String(value))\n\t\t\t}\n\t\t} else {\n\t\t\t// Both old & new are (different) objects.\n\t\t\t// Update style properties that have changed\n\t\t\tfor (var key in style) {\n\t\t\t\tvar value = style[key]\n\t\t\t\tif (value != null && (value = String(value)) !== String(old[key])) {\n\t\t\t\t\telement.style.setProperty(normalizeKey(key), value)\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Remove style properties that no longer exist\n\t\t\tfor (var key in old) {\n\t\t\t\tif (old[key] != null && style[key] == null) {\n\t\t\t\t\telement.style.removeProperty(normalizeKey(key))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Here's an explanation of how this works:\n\t// 1. The event names are always (by design) prefixed by `on`.\n\t// 2. The EventListener interface accepts either a function or an object\n\t//    with a `handleEvent` method.\n\t// 3. The object does not inherit from `Object.prototype`, to avoid\n\t//    any potential interference with that (e.g. setters).\n\t// 4. The event name is remapped to the handler before calling it.\n\t// 5. In function-based event handlers, `ev.target === this`. We replicate\n\t//    that below.\n\t// 6. In function-based event handlers, `return false` prevents the default\n\t//    action and stops event propagation. We replicate that below.\n\tfunction EventDict() {\n\t\t// Save this, so the current redraw is correctly tracked.\n\t\tthis._ = currentRedraw\n\t}\n\tEventDict.prototype = Object.create(null)\n\tEventDict.prototype.handleEvent = function (ev) {\n\t\tvar handler = this[\"on\" + ev.type]\n\t\tvar result\n\t\tif (typeof handler === \"function\") result = handler.call(ev.currentTarget, ev)\n\t\telse if (typeof handler.handleEvent === \"function\") handler.handleEvent(ev)\n\t\tif (this._ && ev.redraw !== false) (0, this._)()\n\t\tif (result === false) {\n\t\t\tev.preventDefault()\n\t\t\tev.stopPropagation()\n\t\t}\n\t}\n\n\t//event\n\tfunction updateEvent(vnode, key, value) {\n\t\tif (vnode.events != null) {\n\t\t\tif (vnode.events[key] === value) return\n\t\t\tif (value != null && (typeof value === \"function\" || typeof value === \"object\")) {\n\t\t\t\tif (vnode.events[key] == null) vnode.dom.addEventListener(key.slice(2), vnode.events, false)\n\t\t\t\tvnode.events[key] = value\n\t\t\t} else {\n\t\t\t\tif (vnode.events[key] != null) vnode.dom.removeEventListener(key.slice(2), vnode.events, false)\n\t\t\t\tvnode.events[key] = undefined\n\t\t\t}\n\t\t} else if (value != null && (typeof value === \"function\" || typeof value === \"object\")) {\n\t\t\tvnode.events = new EventDict()\n\t\t\tvnode.dom.addEventListener(key.slice(2), vnode.events, false)\n\t\t\tvnode.events[key] = value\n\t\t}\n\t}\n\n\t//lifecycle\n\tfunction initLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.oninit === \"function\") callHook.call(source.oninit, vnode)\n\t\tif (typeof source.oncreate === \"function\") hooks.push(callHook.bind(source.oncreate, vnode))\n\t}\n\tfunction updateLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.onupdate === \"function\") hooks.push(callHook.bind(source.onupdate, vnode))\n\t}\n\tfunction shouldNotUpdate(vnode, old) {\n\t\tdo {\n\t\t\tif (vnode.attrs != null && typeof vnode.attrs.onbeforeupdate === \"function\") {\n\t\t\t\tvar force = callHook.call(vnode.attrs.onbeforeupdate, vnode, old)\n\t\t\t\tif (force !== undefined && !force) break\n\t\t\t}\n\t\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onbeforeupdate === \"function\") {\n\t\t\t\tvar force = callHook.call(vnode.state.onbeforeupdate, vnode, old)\n\t\t\t\tif (force !== undefined && !force) break\n\t\t\t}\n\t\t\treturn false\n\t\t} while (false); // eslint-disable-line no-constant-condition\n\t\tvnode.dom = old.dom\n\t\tvnode.domSize = old.domSize\n\t\tvnode.instance = old.instance\n\t\t// One would think having the actual latest attributes would be ideal,\n\t\t// but it doesn't let us properly diff based on our current internal\n\t\t// representation. We have to save not only the old DOM info, but also\n\t\t// the attributes used to create it, as we diff *that*, not against the\n\t\t// DOM directly (with a few exceptions in `setAttr`). And, of course, we\n\t\t// need to save the children and text as they are conceptually not\n\t\t// unlike special \"attributes\" internally.\n\t\tvnode.attrs = old.attrs\n\t\tvnode.children = old.children\n\t\tvnode.text = old.text\n\t\treturn true\n\t}\n\n\treturn function(dom, vnodes, redraw) {\n\t\tif (!dom) throw new TypeError(\"Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.\")\n\t\tvar hooks = []\n\t\tvar active = activeElement()\n\t\tvar namespace = dom.namespaceURI\n\n\t\t// First time rendering into a node clears it out\n\t\tif (dom.vnodes == null) dom.textContent = \"\"\n\n\t\tvnodes = Vnode.normalizeChildren(Array.isArray(vnodes) ? vnodes : [vnodes])\n\t\tvar prevRedraw = currentRedraw\n\t\ttry {\n\t\t\tcurrentRedraw = typeof redraw === \"function\" ? redraw : undefined\n\t\t\tupdateNodes(dom, dom.vnodes, vnodes, hooks, null, namespace === \"http://www.w3.org/1999/xhtml\" ? undefined : namespace)\n\t\t} finally {\n\t\t\tcurrentRedraw = prevRedraw\n\t\t}\n\t\tdom.vnodes = vnodes\n\t\t// `document.activeElement` can return null: https://html.spec.whatwg.org/multipage/interaction.html#dom-document-activeelement\n\t\tif (active != null && activeElement() !== active && typeof active.focus === \"function\") active.focus()\n\t\tfor (var i = 0; i < hooks.length; i++) hooks[i]()\n\t}\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function(html) {\n\tif (html == null) html = \"\"\n\treturn Vnode(\"<\", undefined, undefined, html, undefined, undefined)\n}\n","\"use strict\"\n\nfunction Vnode(tag, key, attrs, children, text, dom) {\n\treturn {tag: tag, key: key, attrs: attrs, children: children, text: text, dom: dom, domSize: undefined, state: undefined, events: undefined, instance: undefined}\n}\nVnode.normalize = function(node) {\n\tif (Array.isArray(node)) return Vnode(\"[\", undefined, undefined, Vnode.normalizeChildren(node), undefined, undefined)\n\tif (node == null || typeof node === \"boolean\") return null\n\tif (typeof node === \"object\") return node\n\treturn Vnode(\"#\", undefined, undefined, String(node), undefined, undefined)\n}\nVnode.normalizeChildren = function(input) {\n\tvar children = []\n\tif (input.length) {\n\t\tvar isKeyed = input[0] != null && input[0].key != null\n\t\t// Note: this is a *very* perf-sensitive check.\n\t\t// Fun fact: merging the loop like this is somehow faster than splitting\n\t\t// it, noticeably so.\n\t\tfor (var i = 1; i < input.length; i++) {\n\t\t\tif ((input[i] != null && input[i].key != null) !== isKeyed) {\n\t\t\t\tthrow new TypeError(\"Vnodes must either always have keys or never have keys!\")\n\t\t\t}\n\t\t}\n\t\tfor (var i = 0; i < input.length; i++) {\n\t\t\tchildren[i] = Vnode.normalize(input[i])\n\t\t}\n\t}\n\treturn children\n}\n\nmodule.exports = Vnode\n","\"use strict\"\n\nvar PromisePolyfill = require(\"./promise/promise\")\nvar mountRedraw = require(\"./mount-redraw\")\n\nmodule.exports = require(\"./request/request\")(window, PromisePolyfill, mountRedraw.redraw)\n","\"use strict\"\n\nvar buildPathname = require(\"../pathname/build\")\n\nmodule.exports = function($window, Promise, oncompletion) {\n\tvar callbackCount = 0\n\n\tfunction PromiseProxy(executor) {\n\t\treturn new Promise(executor)\n\t}\n\n\t// In case the global Promise is some userland library's where they rely on\n\t// `foo instanceof this.constructor`, `this.constructor.resolve(value)`, or\n\t// similar. Let's *not* break them.\n\tPromiseProxy.prototype = Promise.prototype\n\tPromiseProxy.__proto__ = Promise // eslint-disable-line no-proto\n\n\tfunction makeRequest(factory) {\n\t\treturn function(url, args) {\n\t\t\tif (typeof url !== \"string\") { args = url; url = url.url }\n\t\t\telse if (args == null) args = {}\n\t\t\tvar promise = new Promise(function(resolve, reject) {\n\t\t\t\tfactory(buildPathname(url, args.params), args, function (data) {\n\t\t\t\t\tif (typeof args.type === \"function\") {\n\t\t\t\t\t\tif (Array.isArray(data)) {\n\t\t\t\t\t\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\t\t\t\t\t\tdata[i] = new args.type(data[i])\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse data = new args.type(data)\n\t\t\t\t\t}\n\t\t\t\t\tresolve(data)\n\t\t\t\t}, reject)\n\t\t\t})\n\t\t\tif (args.background === true) return promise\n\t\t\tvar count = 0\n\t\t\tfunction complete() {\n\t\t\t\tif (--count === 0 && typeof oncompletion === \"function\") oncompletion()\n\t\t\t}\n\n\t\t\treturn wrap(promise)\n\n\t\t\tfunction wrap(promise) {\n\t\t\t\tvar then = promise.then\n\t\t\t\t// Set the constructor, so engines know to not await or resolve\n\t\t\t\t// this as a native promise. At the time of writing, this is\n\t\t\t\t// only necessary for V8, but their behavior is the correct\n\t\t\t\t// behavior per spec. See this spec issue for more details:\n\t\t\t\t// https://github.com/tc39/ecma262/issues/1577. Also, see the\n\t\t\t\t// corresponding comment in `request/tests/test-request.js` for\n\t\t\t\t// a bit more background on the issue at hand.\n\t\t\t\tpromise.constructor = PromiseProxy\n\t\t\t\tpromise.then = function() {\n\t\t\t\t\tcount++\n\t\t\t\t\tvar next = then.apply(promise, arguments)\n\t\t\t\t\tnext.then(complete, function(e) {\n\t\t\t\t\t\tcomplete()\n\t\t\t\t\t\tif (count === 0) throw e\n\t\t\t\t\t})\n\t\t\t\t\treturn wrap(next)\n\t\t\t\t}\n\t\t\t\treturn promise\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction hasHeader(args, name) {\n\t\tfor (var key in args.headers) {\n\t\t\tif ({}.hasOwnProperty.call(args.headers, key) && name.test(key)) return true\n\t\t}\n\t\treturn false\n\t}\n\n\treturn {\n\t\trequest: makeRequest(function(url, args, resolve, reject) {\n\t\t\tvar method = args.method != null ? args.method.toUpperCase() : \"GET\"\n\t\t\tvar body = args.body\n\t\t\tvar assumeJSON = (args.serialize == null || args.serialize === JSON.serialize) && !(body instanceof $window.FormData)\n\t\t\tvar responseType = args.responseType || (typeof args.extract === \"function\" ? \"\" : \"json\")\n\n\t\t\tvar xhr = new $window.XMLHttpRequest(), aborted = false\n\t\t\tvar original = xhr, replacedAbort\n\t\t\tvar abort = xhr.abort\n\n\t\t\txhr.abort = function() {\n\t\t\t\taborted = true\n\t\t\t\tabort.call(this)\n\t\t\t}\n\n\t\t\txhr.open(method, url, args.async !== false, typeof args.user === \"string\" ? args.user : undefined, typeof args.password === \"string\" ? args.password : undefined)\n\n\t\t\tif (assumeJSON && body != null && !hasHeader(args, /^content-type$/i)) {\n\t\t\t\txhr.setRequestHeader(\"Content-Type\", \"application/json; charset=utf-8\")\n\t\t\t}\n\t\t\tif (typeof args.deserialize !== \"function\" && !hasHeader(args, /^accept$/i)) {\n\t\t\t\txhr.setRequestHeader(\"Accept\", \"application/json, text/*\")\n\t\t\t}\n\t\t\tif (args.withCredentials) xhr.withCredentials = args.withCredentials\n\t\t\tif (args.timeout) xhr.timeout = args.timeout\n\t\t\txhr.responseType = responseType\n\n\t\t\tfor (var key in args.headers) {\n\t\t\t\tif ({}.hasOwnProperty.call(args.headers, key)) {\n\t\t\t\t\txhr.setRequestHeader(key, args.headers[key])\n\t\t\t\t}\n\t\t\t}\n\n\t\t\txhr.onreadystatechange = function(ev) {\n\t\t\t\t// Don't throw errors on xhr.abort().\n\t\t\t\tif (aborted) return\n\n\t\t\t\tif (ev.target.readyState === 4) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar success = (ev.target.status >= 200 && ev.target.status < 300) || ev.target.status === 304 || (/^file:\\/\\//i).test(url)\n\t\t\t\t\t\t// When the response type isn't \"\" or \"text\",\n\t\t\t\t\t\t// `xhr.responseText` is the wrong thing to use.\n\t\t\t\t\t\t// Browsers do the right thing and throw here, and we\n\t\t\t\t\t\t// should honor that and do the right thing by\n\t\t\t\t\t\t// preferring `xhr.response` where possible/practical.\n\t\t\t\t\t\tvar response = ev.target.response, message\n\n\t\t\t\t\t\tif (responseType === \"json\") {\n\t\t\t\t\t\t\t// For IE and Edge, which don't implement\n\t\t\t\t\t\t\t// `responseType: \"json\"`.\n\t\t\t\t\t\t\tif (!ev.target.responseType && typeof args.extract !== \"function\") response = JSON.parse(ev.target.responseText)\n\t\t\t\t\t\t} else if (!responseType || responseType === \"text\") {\n\t\t\t\t\t\t\t// Only use this default if it's text. If a parsed\n\t\t\t\t\t\t\t// document is needed on old IE and friends (all\n\t\t\t\t\t\t\t// unsupported), the user should use a custom\n\t\t\t\t\t\t\t// `config` instead. They're already using this at\n\t\t\t\t\t\t\t// their own risk.\n\t\t\t\t\t\t\tif (response == null) response = ev.target.responseText\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (typeof args.extract === \"function\") {\n\t\t\t\t\t\t\tresponse = args.extract(ev.target, args)\n\t\t\t\t\t\t\tsuccess = true\n\t\t\t\t\t\t} else if (typeof args.deserialize === \"function\") {\n\t\t\t\t\t\t\tresponse = args.deserialize(response)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (success) resolve(response)\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttry { message = ev.target.responseText }\n\t\t\t\t\t\t\tcatch (e) { message = response }\n\t\t\t\t\t\t\tvar error = new Error(message)\n\t\t\t\t\t\t\terror.code = ev.target.status\n\t\t\t\t\t\t\terror.response = response\n\t\t\t\t\t\t\treject(error)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\treject(e)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (typeof args.config === \"function\") {\n\t\t\t\txhr = args.config(xhr, args, url) || xhr\n\n\t\t\t\t// Propagate the `abort` to any replacement XHR as well.\n\t\t\t\tif (xhr !== original) {\n\t\t\t\t\treplacedAbort = xhr.abort\n\t\t\t\t\txhr.abort = function() {\n\t\t\t\t\t\taborted = true\n\t\t\t\t\t\treplacedAbort.call(this)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (body == null) xhr.send()\n\t\t\telse if (typeof args.serialize === \"function\") xhr.send(args.serialize(body))\n\t\t\telse if (body instanceof $window.FormData) xhr.send(body)\n\t\t\telse xhr.send(JSON.stringify(body))\n\t\t}),\n\t\tjsonp: makeRequest(function(url, args, resolve, reject) {\n\t\t\tvar callbackName = args.callbackName || \"_mithril_\" + Math.round(Math.random() * 1e16) + \"_\" + callbackCount++\n\t\t\tvar script = $window.document.createElement(\"script\")\n\t\t\t$window[callbackName] = function(data) {\n\t\t\t\tdelete $window[callbackName]\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\tresolve(data)\n\t\t\t}\n\t\t\tscript.onerror = function() {\n\t\t\t\tdelete $window[callbackName]\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\treject(new Error(\"JSONP request failed\"))\n\t\t\t}\n\t\t\tscript.src = url + (url.indexOf(\"?\") < 0 ? \"?\" : \"&\") +\n\t\t\t\tencodeURIComponent(args.callbackKey || \"callback\") + \"=\" +\n\t\t\t\tencodeURIComponent(callbackName)\n\t\t\t$window.document.documentElement.appendChild(script)\n\t\t}),\n\t}\n}\n","\"use strict\"\n\nvar mountRedraw = require(\"./mount-redraw\")\n\nmodule.exports = require(\"./api/router\")(window, mountRedraw)\n","\"use strict\"\n\nmodule.exports = require(\"./stream/stream\")\n","/* eslint-disable */\n;(function() {\n\"use strict\"\n/* eslint-enable */\nStream.SKIP = {}\nStream.lift = lift\nStream.scan = scan\nStream.merge = merge\nStream.combine = combine\nStream.scanMerge = scanMerge\nStream[\"fantasy-land/of\"] = Stream\n\nvar warnedHalt = false\nObject.defineProperty(Stream, \"HALT\", {\n\tget: function() {\n\t\twarnedHalt || console.log(\"HALT is deprecated and has been renamed to SKIP\");\n\t\twarnedHalt = true\n\t\treturn Stream.SKIP\n\t}\n})\n\nfunction Stream(value) {\n\tvar dependentStreams = []\n\tvar dependentFns = []\n\n\tfunction stream(v) {\n\t\tif (arguments.length && v !== Stream.SKIP) {\n\t\t\tvalue = v\n\t\t\tif (open(stream)) {\n\t\t\t\tstream._changing()\n\t\t\t\tstream._state = \"active\"\n\t\t\t\tdependentStreams.forEach(function(s, i) { s(dependentFns[i](value)) })\n\t\t\t}\n\t\t}\n\n\t\treturn value\n\t}\n\n\tstream.constructor = Stream\n\tstream._state = arguments.length && value !== Stream.SKIP ? \"active\" : \"pending\"\n\tstream._parents = []\n\n\tstream._changing = function() {\n\t\tif (open(stream)) stream._state = \"changing\"\n\t\tdependentStreams.forEach(function(s) {\n\t\t\ts._changing()\n\t\t})\n\t}\n\n\tstream._map = function(fn, ignoreInitial) {\n\t\tvar target = ignoreInitial ? Stream() : Stream(fn(value))\n\t\ttarget._parents.push(stream)\n\t\tdependentStreams.push(target)\n\t\tdependentFns.push(fn)\n\t\treturn target\n\t}\n\n\tstream.map = function(fn) {\n\t\treturn stream._map(fn, stream._state !== \"active\")\n\t}\n\n\tvar end\n\tfunction createEnd() {\n\t\tend = Stream()\n\t\tend.map(function(value) {\n\t\t\tif (value === true) {\n\t\t\t\tstream._parents.forEach(function (p) {p._unregisterChild(stream)})\n\t\t\t\tstream._state = \"ended\"\n\t\t\t\tstream._parents.length = dependentStreams.length = dependentFns.length = 0\n\t\t\t}\n\t\t\treturn value\n\t\t})\n\t\treturn end\n\t}\n\n\tstream.toJSON = function() { return value != null && typeof value.toJSON === \"function\" ? value.toJSON() : value }\n\n\tstream[\"fantasy-land/map\"] = stream.map\n\tstream[\"fantasy-land/ap\"] = function(x) { return combine(function(s1, s2) { return s1()(s2()) }, [x, stream]) }\n\n\tstream._unregisterChild = function(child) {\n\t\tvar childIndex = dependentStreams.indexOf(child)\n\t\tif (childIndex !== -1) {\n\t\t\tdependentStreams.splice(childIndex, 1)\n\t\t\tdependentFns.splice(childIndex, 1)\n\t\t}\n\t}\n\n\tObject.defineProperty(stream, \"end\", {\n\t\tget: function() { return end || createEnd() }\n\t})\n\n\treturn stream\n}\n\nfunction combine(fn, streams) {\n\tvar ready = streams.every(function(s) {\n\t\tif (s.constructor !== Stream)\n\t\t\tthrow new Error(\"Ensure that each item passed to stream.combine/stream.merge/lift is a stream\")\n\t\treturn s._state === \"active\"\n\t})\n\tvar stream = ready\n\t\t? Stream(fn.apply(null, streams.concat([streams])))\n\t\t: Stream()\n\n\tvar changed = []\n\n\tvar mappers = streams.map(function(s) {\n\t\treturn s._map(function(value) {\n\t\t\tchanged.push(s)\n\t\t\tif (ready || streams.every(function(s) { return s._state !== \"pending\" })) {\n\t\t\t\tready = true\n\t\t\t\tstream(fn.apply(null, streams.concat([changed])))\n\t\t\t\tchanged = []\n\t\t\t}\n\t\t\treturn value\n\t\t}, true)\n\t})\n\n\tvar endStream = stream.end.map(function(value) {\n\t\tif (value === true) {\n\t\t\tmappers.forEach(function(mapper) { mapper.end(true) })\n\t\t\tendStream.end(true)\n\t\t}\n\t\treturn undefined\n\t})\n\n\treturn stream\n}\n\nfunction merge(streams) {\n\treturn combine(function() { return streams.map(function(s) { return s() }) }, streams)\n}\n\nfunction scan(fn, acc, origin) {\n\tvar stream = origin.map(function(v) {\n\t\tvar next = fn(acc, v)\n\t\tif (next !== Stream.SKIP) acc = next\n\t\treturn next\n\t})\n\tstream(acc)\n\treturn stream\n}\n\nfunction scanMerge(tuples, seed) {\n\tvar streams = tuples.map(function(tuple) { return tuple[0] })\n\n\tvar stream = combine(function() {\n\t\tvar changed = arguments[arguments.length - 1]\n\t\tstreams.forEach(function(stream, i) {\n\t\t\tif (changed.indexOf(stream) > -1)\n\t\t\t\tseed = tuples[i][1](seed, stream())\n\t\t})\n\n\t\treturn seed\n\t}, streams)\n\n\tstream(seed)\n\n\treturn stream\n}\n\nfunction lift() {\n\tvar fn = arguments[0]\n\tvar streams = Array.prototype.slice.call(arguments, 1)\n\treturn merge(streams).map(function(streams) {\n\t\treturn fn.apply(undefined, streams)\n\t})\n}\n\nfunction open(s) {\n\treturn s._state === \"pending\" || s._state === \"active\" || s._state === \"changing\"\n}\n\nif (typeof module !== \"undefined\") module[\"exports\"] = Stream\nelse if (typeof window.m === \"function\" && !(\"stream\" in window.m)) window.m.stream = Stream\nelse window.m = {stream : Stream}\n\n}());\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7E]/; // non-ASCII chars\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, fn) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = fn(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(string, fn) {\n\tconst parts = string.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tstring = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tstring = string.replace(regexSeparators, '\\x2E');\n\tconst labels = string.split('.');\n\tconst encoded = map(labels, fn).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = array => String.fromCodePoint(...array);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint - 0x30 < 0x0A) {\n\t\treturn codePoint - 0x16;\n\t}\n\tif (codePoint - 0x41 < 0x1A) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint - 0x61 < 0x1A) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t//  0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tlet oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tlet inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tlet basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue == n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.1.0',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode };\nexport default punycode;\n","/* jshint browser: true */\n\n(function () {\n\n// We'll copy the properties below into the mirror div.\n// Note that some browsers, such as Firefox, do not concatenate properties\n// into their shorthand (e.g. padding-top, padding-bottom etc. -> padding),\n// so we have to list every single property explicitly.\nvar properties = [\n  'direction',  // RTL support\n  'boxSizing',\n  'width',  // on Chrome and IE, exclude the scrollbar, so the mirror div wraps exactly as the textarea does\n  'height',\n  'overflowX',\n  'overflowY',  // copy the scrollbar for IE\n\n  'borderTopWidth',\n  'borderRightWidth',\n  'borderBottomWidth',\n  'borderLeftWidth',\n  'borderStyle',\n\n  'paddingTop',\n  'paddingRight',\n  'paddingBottom',\n  'paddingLeft',\n\n  // https://developer.mozilla.org/en-US/docs/Web/CSS/font\n  'fontStyle',\n  'fontVariant',\n  'fontWeight',\n  'fontStretch',\n  'fontSize',\n  'fontSizeAdjust',\n  'lineHeight',\n  'fontFamily',\n\n  'textAlign',\n  'textTransform',\n  'textIndent',\n  'textDecoration',  // might not make a difference, but better be safe\n\n  'letterSpacing',\n  'wordSpacing',\n\n  'tabSize',\n  'MozTabSize'\n\n];\n\nvar isBrowser = (typeof window !== 'undefined');\nvar isFirefox = (isBrowser && window.mozInnerScreenX != null);\n\nfunction getCaretCoordinates(element, position, options) {\n  if (!isBrowser) {\n    throw new Error('textarea-caret-position#getCaretCoordinates should only be called in a browser');\n  }\n\n  var debug = options && options.debug || false;\n  if (debug) {\n    var el = document.querySelector('#input-textarea-caret-position-mirror-div');\n    if (el) el.parentNode.removeChild(el);\n  }\n\n  // The mirror div will replicate the textarea's style\n  var div = document.createElement('div');\n  div.id = 'input-textarea-caret-position-mirror-div';\n  document.body.appendChild(div);\n\n  var style = div.style;\n  var computed = window.getComputedStyle ? window.getComputedStyle(element) : element.currentStyle;  // currentStyle for IE < 9\n  var isInput = element.nodeName === 'INPUT';\n\n  // Default textarea styles\n  style.whiteSpace = 'pre-wrap';\n  if (!isInput)\n    style.wordWrap = 'break-word';  // only for textarea-s\n\n  // Position off-screen\n  style.position = 'absolute';  // required to return coordinates properly\n  if (!debug)\n    style.visibility = 'hidden';  // not 'display: none' because we want rendering\n\n  // Transfer the element's properties to the div\n  properties.forEach(function (prop) {\n    if (isInput && prop === 'lineHeight') {\n      // Special case for <input>s because text is rendered centered and line height may be != height\n      style.lineHeight = computed.height;\n    } else {\n      style[prop] = computed[prop];\n    }\n  });\n\n  if (isFirefox) {\n    // Firefox lies about the overflow property for textareas: https://bugzilla.mozilla.org/show_bug.cgi?id=984275\n    if (element.scrollHeight > parseInt(computed.height))\n      style.overflowY = 'scroll';\n  } else {\n    style.overflow = 'hidden';  // for Chrome to not render a scrollbar; IE keeps overflowY = 'scroll'\n  }\n\n  div.textContent = element.value.substring(0, position);\n  // The second special handling for input type=\"text\" vs textarea:\n  // spaces need to be replaced with non-breaking spaces - http://stackoverflow.com/a/13402035/1269037\n  if (isInput)\n    div.textContent = div.textContent.replace(/\\s/g, '\\u00a0');\n\n  var span = document.createElement('span');\n  // Wrapping must be replicated *exactly*, including when a long word gets\n  // onto the next line, with whitespace at the end of the line before (#7).\n  // The  *only* reliable way to do that is to copy the *entire* rest of the\n  // textarea's content into the <span> created at the caret position.\n  // For inputs, just '.' would be enough, but no need to bother.\n  span.textContent = element.value.substring(position) || '.';  // || because a completely empty faux span doesn't render at all\n  div.appendChild(span);\n\n  var coordinates = {\n    top: span.offsetTop + parseInt(computed['borderTopWidth']),\n    left: span.offsetLeft + parseInt(computed['borderLeftWidth']),\n    height: parseInt(computed['lineHeight'])\n  };\n\n  if (debug) {\n    span.style.backgroundColor = '#aaa';\n  } else {\n    document.body.removeChild(div);\n  }\n\n  return coordinates;\n}\n\nif (typeof module != 'undefined' && typeof module.exports != 'undefined') {\n  module.exports = getCaretCoordinates;\n} else if(isBrowser) {\n  window.getCaretCoordinates = getCaretCoordinates;\n}\n\n}());\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../../babel-loader/lib/index.js??ruleSet[1].rules[0]!./jquery.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"$\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"$\"] = ___EXPOSE_LOADER_IMPORT___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"jQuery\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"jQuery\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../../babel-loader/lib/index.js??ruleSet[1].rules[0]!./color-thief.min.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"ColorThief\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"ColorThief\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../babel-loader/lib/index.js??ruleSet[1].rules[0]!./dayjs.min.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"dayjs\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"dayjs\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../babel-loader/lib/index.js??ruleSet[1].rules[0]!./index.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"m\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"m\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../babel-loader/lib/index.js??ruleSet[1].rules[0]!./punycode.es6.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"punycode\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"punycode\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","function _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n  for (var i = 0, arr2 = new Array(len); i < len; i++) {\n    arr2[i] = arr[i];\n  }\n  return arr2;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayWithHoles(arr) {\n  if (Array.isArray(arr)) return arr;\n}\nmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n  return self;\n}\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _defineProperties(target, props) {\n  for (var i = 0; i < props.length; i++) {\n    var descriptor = props[i];\n    descriptor.enumerable = descriptor.enumerable || false;\n    descriptor.configurable = true;\n    if (\"value\" in descriptor) descriptor.writable = true;\n    Object.defineProperty(target, descriptor.key, descriptor);\n  }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  Object.defineProperty(Constructor, \"prototype\", {\n    writable: false\n  });\n  return Constructor;\n}\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n  return obj;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _getPrototypeOf(o) {\n  module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n    return o.__proto__ || Object.getPrototypeOf(o);\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  return _getPrototypeOf(o);\n}\nmodule.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\nfunction _inherits(subClass, superClass) {\n  if (typeof superClass !== \"function\" && superClass !== null) {\n    throw new TypeError(\"Super expression must either be null or a function\");\n  }\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      writable: true,\n      configurable: true\n    }\n  });\n  Object.defineProperty(subClass, \"prototype\", {\n    writable: false\n  });\n  if (superClass) setPrototypeOf(subClass, superClass);\n}\nmodule.exports = _inherits, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArrayLimit(arr, i) {\n  var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n  if (_i == null) return;\n  var _arr = [];\n  var _n = true;\n  var _d = false;\n  var _s, _e;\n  try {\n    for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n      _arr.push(_s.value);\n      if (i && _arr.length === i) break;\n    }\n  } catch (err) {\n    _d = true;\n    _e = err;\n  } finally {\n    try {\n      if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n    } finally {\n      if (_d) throw _e;\n    }\n  }\n  return _arr;\n}\nmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableRest() {\n  throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\nfunction _possibleConstructorReturn(self, call) {\n  if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n    return call;\n  } else if (call !== void 0) {\n    throw new TypeError(\"Derived constructors may only return object or undefined\");\n  }\n  return assertThisInitialized(self);\n}\nmodule.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n  \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n  module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n    return exports;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  var exports = {},\n    Op = Object.prototype,\n    hasOwn = Op.hasOwnProperty,\n    defineProperty = Object.defineProperty || function (obj, key, desc) {\n      obj[key] = desc.value;\n    },\n    $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n    iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n    asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n    toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n  function define(obj, key, value) {\n    return Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: !0,\n      configurable: !0,\n      writable: !0\n    }), obj[key];\n  }\n  try {\n    define({}, \"\");\n  } catch (err) {\n    define = function define(obj, key, value) {\n      return obj[key] = value;\n    };\n  }\n  function wrap(innerFn, outerFn, self, tryLocsList) {\n    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n      generator = Object.create(protoGenerator.prototype),\n      context = new Context(tryLocsList || []);\n    return defineProperty(generator, \"_invoke\", {\n      value: makeInvokeMethod(innerFn, self, context)\n    }), generator;\n  }\n  function tryCatch(fn, obj, arg) {\n    try {\n      return {\n        type: \"normal\",\n        arg: fn.call(obj, arg)\n      };\n    } catch (err) {\n      return {\n        type: \"throw\",\n        arg: err\n      };\n    }\n  }\n  exports.wrap = wrap;\n  var ContinueSentinel = {};\n  function Generator() {}\n  function GeneratorFunction() {}\n  function GeneratorFunctionPrototype() {}\n  var IteratorPrototype = {};\n  define(IteratorPrototype, iteratorSymbol, function () {\n    return this;\n  });\n  var getProto = Object.getPrototypeOf,\n    NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n  NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n  var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n  function defineIteratorMethods(prototype) {\n    [\"next\", \"throw\", \"return\"].forEach(function (method) {\n      define(prototype, method, function (arg) {\n        return this._invoke(method, arg);\n      });\n    });\n  }\n  function AsyncIterator(generator, PromiseImpl) {\n    function invoke(method, arg, resolve, reject) {\n      var record = tryCatch(generator[method], generator, arg);\n      if (\"throw\" !== record.type) {\n        var result = record.arg,\n          value = result.value;\n        return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n          invoke(\"next\", value, resolve, reject);\n        }, function (err) {\n          invoke(\"throw\", err, resolve, reject);\n        }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n          result.value = unwrapped, resolve(result);\n        }, function (error) {\n          return invoke(\"throw\", error, resolve, reject);\n        });\n      }\n      reject(record.arg);\n    }\n    var previousPromise;\n    defineProperty(this, \"_invoke\", {\n      value: function value(method, arg) {\n        function callInvokeWithMethodAndArg() {\n          return new PromiseImpl(function (resolve, reject) {\n            invoke(method, arg, resolve, reject);\n          });\n        }\n        return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n      }\n    });\n  }\n  function makeInvokeMethod(innerFn, self, context) {\n    var state = \"suspendedStart\";\n    return function (method, arg) {\n      if (\"executing\" === state) throw new Error(\"Generator is already running\");\n      if (\"completed\" === state) {\n        if (\"throw\" === method) throw arg;\n        return doneResult();\n      }\n      for (context.method = method, context.arg = arg;;) {\n        var delegate = context.delegate;\n        if (delegate) {\n          var delegateResult = maybeInvokeDelegate(delegate, context);\n          if (delegateResult) {\n            if (delegateResult === ContinueSentinel) continue;\n            return delegateResult;\n          }\n        }\n        if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n          if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n          context.dispatchException(context.arg);\n        } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n        state = \"executing\";\n        var record = tryCatch(innerFn, self, context);\n        if (\"normal\" === record.type) {\n          if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n          return {\n            value: record.arg,\n            done: context.done\n          };\n        }\n        \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n      }\n    };\n  }\n  function maybeInvokeDelegate(delegate, context) {\n    var method = delegate.iterator[context.method];\n    if (undefined === method) {\n      if (context.delegate = null, \"throw\" === context.method) {\n        if (delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method)) return ContinueSentinel;\n        context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a 'throw' method\");\n      }\n      return ContinueSentinel;\n    }\n    var record = tryCatch(method, delegate.iterator, context.arg);\n    if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n    var info = record.arg;\n    return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n  }\n  function pushTryEntry(locs) {\n    var entry = {\n      tryLoc: locs[0]\n    };\n    1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n  }\n  function resetTryEntry(entry) {\n    var record = entry.completion || {};\n    record.type = \"normal\", delete record.arg, entry.completion = record;\n  }\n  function Context(tryLocsList) {\n    this.tryEntries = [{\n      tryLoc: \"root\"\n    }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n  }\n  function values(iterable) {\n    if (iterable) {\n      var iteratorMethod = iterable[iteratorSymbol];\n      if (iteratorMethod) return iteratorMethod.call(iterable);\n      if (\"function\" == typeof iterable.next) return iterable;\n      if (!isNaN(iterable.length)) {\n        var i = -1,\n          next = function next() {\n            for (; ++i < iterable.length;) {\n              if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n            }\n            return next.value = undefined, next.done = !0, next;\n          };\n        return next.next = next;\n      }\n    }\n    return {\n      next: doneResult\n    };\n  }\n  function doneResult() {\n    return {\n      value: undefined,\n      done: !0\n    };\n  }\n  return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n    value: GeneratorFunctionPrototype,\n    configurable: !0\n  }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n    value: GeneratorFunction,\n    configurable: !0\n  }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n    var ctor = \"function\" == typeof genFun && genFun.constructor;\n    return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n  }, exports.mark = function (genFun) {\n    return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n  }, exports.awrap = function (arg) {\n    return {\n      __await: arg\n    };\n  }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n    return this;\n  }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n    void 0 === PromiseImpl && (PromiseImpl = Promise);\n    var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n    return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n      return result.done ? result.value : iter.next();\n    });\n  }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n    return this;\n  }), define(Gp, \"toString\", function () {\n    return \"[object Generator]\";\n  }), exports.keys = function (val) {\n    var object = Object(val),\n      keys = [];\n    for (var key in object) {\n      keys.push(key);\n    }\n    return keys.reverse(), function next() {\n      for (; keys.length;) {\n        var key = keys.pop();\n        if (key in object) return next.value = key, next.done = !1, next;\n      }\n      return next.done = !0, next;\n    };\n  }, exports.values = values, Context.prototype = {\n    constructor: Context,\n    reset: function reset(skipTempReset) {\n      if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {\n        \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n      }\n    },\n    stop: function stop() {\n      this.done = !0;\n      var rootRecord = this.tryEntries[0].completion;\n      if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n      return this.rval;\n    },\n    dispatchException: function dispatchException(exception) {\n      if (this.done) throw exception;\n      var context = this;\n      function handle(loc, caught) {\n        return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n      }\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i],\n          record = entry.completion;\n        if (\"root\" === entry.tryLoc) return handle(\"end\");\n        if (entry.tryLoc <= this.prev) {\n          var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n            hasFinally = hasOwn.call(entry, \"finallyLoc\");\n          if (hasCatch && hasFinally) {\n            if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n            if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n          } else if (hasCatch) {\n            if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n          } else {\n            if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n            if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n          }\n        }\n      }\n    },\n    abrupt: function abrupt(type, arg) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n          var finallyEntry = entry;\n          break;\n        }\n      }\n      finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n      var record = finallyEntry ? finallyEntry.completion : {};\n      return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n    },\n    complete: function complete(record, afterLoc) {\n      if (\"throw\" === record.type) throw record.arg;\n      return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n    },\n    finish: function finish(finallyLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n      }\n    },\n    \"catch\": function _catch(tryLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc === tryLoc) {\n          var record = entry.completion;\n          if (\"throw\" === record.type) {\n            var thrown = record.arg;\n            resetTryEntry(entry);\n          }\n          return thrown;\n        }\n      }\n      throw new Error(\"illegal catch attempt\");\n    },\n    delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n      return this.delegate = {\n        iterator: values(iterable),\n        resultName: resultName,\n        nextLoc: nextLoc\n      }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n    }\n  }, exports;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _setPrototypeOf(o, p) {\n  module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  return _setPrototypeOf(o, p);\n}\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithHoles = require(\"./arrayWithHoles.js\");\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableRest = require(\"./nonIterableRest.js\");\nfunction _slicedToArray(arr, i) {\n  return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n    return typeof obj;\n  } : function (obj) {\n    return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n  regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n  if (typeof globalThis === \"object\") {\n    globalThis.regeneratorRuntime = runtime;\n  } else {\n    Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n  }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","function bidi(node, prop) {\n  var type = node.tag === 'select' ? (node.attrs.multi ? 'multi' : 'select') : node.attrs.type;\n\n  // Setup: bind listeners\n  if (type === 'multi') {\n    node.attrs.onchange = function () {\n      prop(\n        [].slice.call(this.selectedOptions, function (x) {\n          return x.value;\n        })\n      );\n    };\n  } else if (type === 'select') {\n    node.attrs.onchange = function (e) {\n      prop(this.selectedOptions[0].value);\n    };\n  } else if (type === 'checkbox') {\n    node.attrs.onchange = function (e) {\n      prop(this.checked);\n    };\n  } else {\n    node.attrs.onchange = node.attrs.oninput = function (e) {\n      prop(this.value);\n    };\n  }\n\n  if (node.tag === 'select') {\n    node.children.forEach(function (option) {\n      if (option.attrs.value === prop() || option.children[0] === prop()) {\n        option.attrs.selected = true;\n      }\n    });\n  } else if (type === 'checkbox') {\n    node.attrs.checked = prop();\n  } else if (type === 'radio') {\n    node.attrs.checked = prop() === node.attrs.value;\n  } else {\n    node.attrs.value = prop();\n  }\n\n  node.attrs.bidi = null;\n\n  return node;\n}\n\nbidi.view = function (ctrl, node, prop) {\n  return bidi(node, node.attrs.bidi);\n};\n\nexport default bidi;\n","import bidi from './bidi';\n\nexport default function patchMithril(global) {\n  const defaultMithril = global.m;\n\n  const modifiedMithril = function (comp, ...args) {\n    const node = defaultMithril.apply(this, arguments);\n\n    if (!node.attrs) node.attrs = {};\n\n    // Allows the use of the bidi attr.\n    if (node.attrs.bidi) {\n      bidi(node, node.attrs.bidi);\n    }\n\n    return node;\n  };\n\n  Object.keys(defaultMithril).forEach((key) => (modifiedMithril[key] = defaultMithril[key]));\n\n  global.m = modifiedMithril;\n}\n","import type Application from './Application';\n\n// Used to fix typings\nconst w = window as any;\n\n/**\n * Proxy app. Common JS is run first, at which point `window.app` is not\n * set as this is done by the namespaced JS.\n *\n * When the corrent value is set, this code would retain the reference to\n * the original invalid value.\n *\n * By using a proxy, we can ensure that our `window.app` value is always\n * up-to-date with the latest reference.\n */\nconst appProxy = new Proxy(\n  {},\n  {\n    get(_, properties) {\n      return Reflect.get(w.app, properties, w.app);\n    },\n    set(_, properties, value) {\n      return Reflect.set(w.app, properties, value, w.app);\n    },\n  }\n);\n\n/**\n * The instance of Application within the common namespace.\n */\nexport default appProxy as Application;\n","// Expose jQuery, mithril and dayjs to the window browser object\nimport 'expose-loader?exposes=$,jQuery!jquery';\nimport 'expose-loader?exposes=m!mithril';\nimport 'expose-loader?exposes=dayjs!dayjs';\n\nimport 'bootstrap/js/affix';\nimport 'bootstrap/js/dropdown';\nimport 'bootstrap/js/tooltip';\nimport 'bootstrap/js/transition';\nimport 'jquery.hotkeys/jquery.hotkeys';\n\nimport relativeTime from 'dayjs/plugin/relativeTime';\nimport localizedFormat from 'dayjs/plugin/localizedFormat';\n\ndayjs.extend(relativeTime);\ndayjs.extend(localizedFormat);\n\nimport patchMithril from './utils/patchMithril';\n\npatchMithril(window);\n\nimport app from './app';\n\nexport { app };\n\nimport './utils/arrayFlatPolyfill';\n\nconst tooltipGen = $.fn.tooltip;\n\n// Remove in a future version of Flarum.\n// @ts-ignore\n$.fn.tooltip = function (options, caller) {\n  // Show a warning when `$.tooltip` is used outside of the Tooltip component.\n  // This functionality is deprecated and should not be used.\n  if (!['DANGEROUS_tooltip_jquery_fn_deprecation_exempt'].includes(caller)) {\n    console.warn(\n      \"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\"\n    );\n  }\n\n  tooltipGen.bind(this)(options);\n};\n","export default function _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n  return self;\n}","export default function _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n  return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n  setPrototypeOf(subClass, superClass);\n}","export default function _extends() {\n  _extends = Object.assign ? Object.assign.bind() : function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n    return target;\n  };\n  return _extends.apply(this, arguments);\n}","import type Mithril from 'mithril';\n\n/**\n * Mithril 2 does not completely rerender the page if a route change leads to the same route\n * (or the same component handling a different route). This util calls m.route.set, forcing a reonit.\n *\n * @see https://mithril.js.org/route.html#key-parameter\n */\nexport default function setRouteWithForcedRefresh(route: string, params = null, options: Mithril.RouteOptions = {}) {\n  const newOptions = { ...options };\n  newOptions.state = newOptions.state || {};\n  newOptions.state.key = Date.now();\n\n  m.route.set(route, params, newOptions);\n}\n","import setRouteWithForcedRefresh from '../../common/utils/setRouteWithForcedRefresh';\nimport IHistory, { HistoryEntry } from '../../common/IHistory';\n\n/**\n * The `History` class keeps track and manages a stack of routes that the user\n * has navigated to in their session.\n *\n * An item can be pushed to the top of the stack using the `push` method. An\n * item in the stack has a name and a URL. The name need not be unique; if it is\n * the same as the item before it, that will be overwritten with the new URL. In\n * this way, if a user visits a discussion, and then visits another discussion,\n * popping the history stack will still take them back to the discussion list\n * rather than the previous discussion.\n */\nexport default class History implements IHistory {\n  /**\n   * The stack of routes that have been navigated to.\n   */\n  protected stack: HistoryEntry[] = [];\n\n  /**\n   * Get the item on the top of the stack.\n   */\n  getCurrent(): HistoryEntry {\n    return this.stack[this.stack.length - 1];\n  }\n\n  /**\n   * Get the previous item on the stack.\n   */\n  getPrevious(): HistoryEntry {\n    return this.stack[this.stack.length - 2];\n  }\n\n  /**\n   * Push an item to the top of the stack.\n   *\n   * @param {string} name The name of the route.\n   * @param {string} title The title of the route.\n   * @param {string} [url] The URL of the route. The current URL will be used if\n   *     not provided.\n   */\n  push(name: string, title: string, url = m.route.get()) {\n    // If we're pushing an item with the same name as second-to-top item in the\n    // stack, we will assume that the user has clicked the 'back' button in\n    // their browser. In this case, we don't want to push a new item, so we will\n    // pop off the top item, and then the second-to-top item will be overwritten\n    // below.\n    const secondTop = this.stack[this.stack.length - 2];\n    if (secondTop && secondTop.name === name) {\n      this.stack.pop();\n    }\n\n    // If we're pushing an item with the same name as the top item in the stack,\n    // then we'll overwrite it with the new URL.\n    const top = this.getCurrent();\n    if (top && top.name === name) {\n      Object.assign(top, { url, title });\n    } else {\n      this.stack.push({ name, url, title });\n    }\n  }\n\n  /**\n   * Check whether or not the history stack is able to be popped.\n   */\n  canGoBack(): boolean {\n    return this.stack.length > 1;\n  }\n\n  /**\n   * Go back to the previous route in the history stack.\n   */\n  back() {\n    if (!this.canGoBack()) {\n      return this.home();\n    }\n\n    this.stack.pop();\n\n    m.route.set(this.getCurrent().url);\n  }\n\n  /**\n   * Get the URL of the previous page.\n   */\n  backUrl(): string {\n    const secondTop = this.stack[this.stack.length - 2];\n\n    return secondTop.url;\n  }\n\n  /**\n   * Go to the first route in the history stack.\n   */\n  home() {\n    this.stack.splice(0);\n\n    setRouteWithForcedRefresh('/');\n  }\n}\n","/**\n * The `Pane` class manages the page's discussion list sidepane. The pane is a\n * part of the content view (DiscussionPage component), but its visibility is\n * determined by CSS classes applied to the outer page element. This class\n * manages the application of those CSS classes.\n */\nexport default class Pane {\n  constructor(element) {\n    /**\n     * The localStorage key to store the pane's pinned state with.\n     *\n     * @type {String}\n     * @protected\n     */\n    this.pinnedKey = 'panePinned';\n\n    /**\n     * The page element.\n     *\n     * @type {jQuery}\n     * @protected\n     */\n    this.$element = $(element);\n\n    /**\n     * Whether or not the pane is currently pinned.\n     *\n     * @type {Boolean}\n     * @protected\n     */\n    this.pinned = localStorage.getItem(this.pinnedKey) === 'true';\n\n    /**\n     * Whether or not the pane is currently exists.\n     *\n     * @type {Boolean}\n     * @protected\n     */\n    this.active = false;\n\n    /**\n     * Whether or not the pane is currently showing, or is hidden off the edge\n     * of the screen.\n     *\n     * @type {Boolean}\n     * @protected\n     */\n    this.showing = false;\n\n    this.render();\n  }\n\n  /**\n   * Enable the pane.\n   */\n  enable() {\n    this.active = true;\n    this.render();\n  }\n\n  /**\n   * Disable the pane.\n   */\n  disable() {\n    this.active = false;\n    this.showing = false;\n    this.render();\n  }\n\n  /**\n   * Show the pane.\n   */\n  show() {\n    clearTimeout(this.hideTimeout);\n    this.showing = true;\n    this.render();\n  }\n\n  /**\n   * Hide the pane.\n   */\n  hide() {\n    this.showing = false;\n    this.render();\n  }\n\n  /**\n   * Begin a timeout to hide the pane, which can be cancelled by showing the\n   * pane.\n   */\n  onmouseleave() {\n    this.hideTimeout = setTimeout(this.hide.bind(this), 250);\n  }\n\n  /**\n   * Toggle whether or not the pane is pinned.\n   */\n  togglePinned() {\n    this.pinned = !this.pinned;\n\n    localStorage.setItem(this.pinnedKey, this.pinned ? 'true' : 'false');\n\n    this.render();\n  }\n\n  /**\n   * Apply the appropriate CSS classes to the page element.\n   *\n   * @protected\n   */\n  render() {\n    this.$element.toggleClass('panePinned', this.pinned).toggleClass('hasPane', this.active).toggleClass('paneShowing', this.showing);\n  }\n}\n","import type Mithril from 'mithril';\n\nexport interface ComponentAttrs extends Mithril.Attributes {}\n\n/**\n * The `Component` class defines a user interface 'building block'. A component\n * generates a virtual DOM to be rendered on each redraw.\n *\n * Essentially, this is a wrapper for Mithril's components that adds several useful features:\n *\n *  - In the `oninit` and `onbeforeupdate` lifecycle hooks, we store vnode attrs in `this.attrs.\n *    This allows us to use attrs across components without having to pass the vnode to every single\n *    method.\n *  - The static `initAttrs` method allows a convenient way to provide defaults (or to otherwise modify)\n *    the attrs that have been passed into a component.\n *  - When the component is created in the DOM, we store its DOM element under `this.element`; this lets\n *    us use jQuery to modify child DOM state from internal methods via the `this.$()` method.\n *  - A convenience `component` method, which serves as an alternative to hyperscript and JSX.\n *\n * As with other Mithril components, components extending Component can be initialized\n * and nested using JSX, hyperscript, or a combination of both. The `component` method can also\n * be used.\n *\n * @example\n * return m('div', <MyComponent foo=\"bar\"><p>Hello World</p></MyComponent>);\n *\n * @example\n * return m('div', MyComponent.component({foo: 'bar'), m('p', 'Hello World!'));\n *\n * @see https://mithril.js.org/components.html\n */\nexport default abstract class Component<Attrs extends ComponentAttrs = ComponentAttrs, State = undefined> implements Mithril.ClassComponent<Attrs> {\n  /**\n   * The root DOM element for the component.\n   */\n  element!: Element;\n\n  /**\n   * The attributes passed into the component.\n   *\n   * @see https://mithril.js.org/components.html#passing-data-to-components\n   */\n  attrs!: Attrs;\n\n  /**\n   * Class component state that is persisted between redraws.\n   *\n   * Updating this will **not** automatically trigger a redraw, unlike\n   * other frameworks.\n   *\n   * This is different to Vnode state, which is always an instance of your\n   * class component.\n   *\n   * This is `undefined` by default.\n   */\n  state!: State;\n\n  /**\n   * @inheritdoc\n   */\n  abstract view(vnode: Mithril.Vnode<Attrs, this>): Mithril.Children;\n\n  /**\n   * @inheritdoc\n   */\n  oninit(vnode: Mithril.Vnode<Attrs, this>) {\n    this.setAttrs(vnode.attrs);\n  }\n\n  /**\n   * @inheritdoc\n   */\n  oncreate(vnode: Mithril.VnodeDOM<Attrs, this>) {\n    this.element = vnode.dom;\n  }\n\n  /**\n   * @inheritdoc\n   */\n  onbeforeupdate(vnode: Mithril.VnodeDOM<Attrs, this>) {\n    this.setAttrs(vnode.attrs);\n  }\n\n  /**\n   * @inheritdoc\n   */\n  onupdate(vnode: Mithril.VnodeDOM<Attrs, this>) {}\n\n  /**\n   * @inheritdoc\n   */\n  onbeforeremove(vnode: Mithril.VnodeDOM<Attrs, this>) {}\n\n  /**\n   * @inheritdoc\n   */\n  onremove(vnode: Mithril.VnodeDOM<Attrs, this>) {}\n\n  /**\n   * Returns a jQuery object for this component's element. If you pass in a\n   * selector string, this method will return a jQuery object, using the current\n   * element as its buffer.\n   *\n   * For example, calling `component.$('li')` will return a jQuery object\n   * containing all of the `li` elements inside the DOM element of this\n   * component.\n   *\n   * @param [selector] a jQuery-compatible selector string\n   * @returns the jQuery object for the DOM node\n   * @final\n   */\n  $(selector?: string): JQuery {\n    const $element = $(this.element) as JQuery<HTMLElement>;\n\n    return selector ? $element.find(selector) : $element;\n  }\n\n  /**\n   * Convenience method to attach a component without JSX.\n   * Has the same effect as calling `m(THIS_CLASS, attrs, children)`.\n   *\n   * @see https://mithril.js.org/hyperscript.html#mselector,-attributes,-children\n   */\n  static component<SAttrs extends ComponentAttrs = ComponentAttrs>(attrs: SAttrs = {} as SAttrs, children: Mithril.Children = null): Mithril.Vnode {\n    const componentAttrs = { ...attrs };\n\n    return m(this as any, componentAttrs, children);\n  }\n\n  /**\n   * Saves a reference to the vnode attrs after running them through initAttrs,\n   * and checking for common issues.\n   */\n  private setAttrs(attrs: Attrs = {} as Attrs): void {\n    (this.constructor as typeof Component).initAttrs(attrs);\n\n    if (attrs) {\n      if ('children' in attrs) {\n        throw new Error(\n          `[${\n            (this.constructor as typeof Component).name\n          }] The \"children\" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute`\n        );\n      }\n\n      if ('tag' in attrs) {\n        throw new Error(`[${(this.constructor as typeof Component).name}] You cannot use the \"tag\" attribute name with Mithril 2.`);\n      }\n    }\n\n    this.attrs = attrs;\n  }\n\n  /**\n   * Initialize the component's attrs.\n   *\n   * This can be used to assign default values for missing, optional attrs.\n   */\n  static initAttrs(attrs: unknown): void {}\n}\n","/**\n * Check if class A is the same as or a subclass of class B.\n */\nexport default function subclassOf(A, B) {\n  return A && (A === B || A.prototype instanceof B);\n}\n","import subclassOf from '../../common/utils/subclassOf';\n\nexport default class PageState {\n  constructor(type, data = {}) {\n    this.type = type;\n    this.data = data;\n  }\n\n  /**\n   * Determine whether the page matches the given class and data.\n   *\n   * @param {object} type The page class to check against. Subclasses are accepted as well.\n   * @param {Record<string, unknown>} data\n   * @return {boolean}\n   */\n  matches(type, data = {}) {\n    // Fail early when the page is of a different type\n    if (!subclassOf(this.type, type)) return false;\n\n    // Now that the type is known to be correct, we loop through the provided\n    // data to see whether it matches the data in our state.\n    return Object.keys(data).every((key) => this.data[key] === data[key]);\n  }\n\n  get(key) {\n    return this.data[key];\n  }\n\n  set(key, value) {\n    this.data[key] = value;\n  }\n}\n","import type Mithril from 'mithril';\nimport app from '../app';\nimport Component from '../Component';\nimport PageState from '../states/PageState';\n\nexport interface IPageAttrs {\n  key?: number;\n  routeName: string;\n}\n\n/**\n * The `Page` component\n *\n * @abstract\n */\nexport default abstract class Page<CustomAttrs extends IPageAttrs = IPageAttrs, CustomState = undefined> extends Component<CustomAttrs, CustomState> {\n  /**\n   * A class name to apply to the body while the route is active.\n   */\n  protected bodyClass = '';\n\n  /**\n   * Whether we should scroll to the top of the page when its rendered.\n   */\n  protected scrollTopOnCreate = true;\n\n  /**\n   * Whether the browser should restore scroll state on refreshes.\n   */\n  protected useBrowserScrollRestoration = true;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    app.previous = app.current;\n    app.current = new PageState(this.constructor, { routeName: this.attrs.routeName });\n\n    app.drawer.hide();\n    app.modal.close();\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    if (this.bodyClass) {\n      $('#app').addClass(this.bodyClass);\n    }\n\n    if (this.scrollTopOnCreate) {\n      $(window).scrollTop(0);\n    }\n\n    if ('scrollRestoration' in history) {\n      history.scrollRestoration = this.useBrowserScrollRestoration ? 'auto' : 'manual';\n    }\n  }\n\n  onremove(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onremove(vnode);\n\n    if (this.bodyClass) {\n      $('#app').removeClass(this.bodyClass);\n    }\n  }\n}\n","function _defineProperties(target, props) {\n  for (var i = 0; i < props.length; i++) {\n    var descriptor = props[i];\n    descriptor.enumerable = descriptor.enumerable || false;\n    descriptor.configurable = true;\n    if (\"value\" in descriptor) descriptor.writable = true;\n    Object.defineProperty(target, descriptor.key, descriptor);\n  }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  Object.defineProperty(Constructor, \"prototype\", {\n    writable: false\n  });\n  return Constructor;\n}","/**\n * Returns if the passed value is an object.\n *\n * In this context, \"object\" refers to **any non-primitive value**, including\n * arrays, function, maps, dates, and more.\n *\n * @example\n * isObject({}); // true\n * @example\n * isObject([]); // true\n * @example\n * isObject(function () {}); // true\n * @example\n * isObject(Object(1)); // true\n * @example\n * isObject(null); // false\n * @example\n * isObject(1); // false\n * @example\n * isObject(\"hello world\"); // false\n *\n * @see https://github.com/jashkenas/underscore/blob/943977e34e2279503528a71ddcc2dd5f96483945/underscore.js#L87-L91\n */\nexport default function isObject(obj: unknown): obj is object {\n  const type = typeof obj;\n  return type === 'function' || (type === 'object' && !!obj);\n}\n","import isObject from './isObject';\n\nexport interface IItemObject<T> {\n  content: T;\n  itemName: string;\n  priority: number;\n}\n\nclass Item<T> {\n  content: T;\n  priority: number;\n\n  constructor(content: T, priority: number) {\n    this.content = content;\n    this.priority = priority;\n  }\n}\n\n/**\n * The `ItemList` class collects items and then arranges them into an array\n * by priority.\n */\nexport default class ItemList<T> {\n  /**\n   * The items in the list.\n   */\n  protected _items: Record<string, Item<T>> = {};\n\n  // TODO: [Flarum 2.0] Remove `.items` getter.\n  /**\n   * A **read-only copy** of items in the list.\n   *\n   * We don't allow adding new items to the ItemList via setting new properties,\n   * nor do we allow modifying existing items directly.\n   *\n   * @deprecated Use {@link ItemList.toObject} instead.\n   */\n  get items(): DeepReadonly<Record<string, Item<T>>> {\n    return new Proxy(this._items, {\n      set() {\n        console.warn('Modifying `ItemList.items` is not allowed.');\n        return false;\n      },\n    });\n  }\n\n  /**\n   * Check whether the list is empty.\n   */\n  isEmpty(): boolean {\n    return Object.keys(this._items).length === 0;\n  }\n\n  /**\n   * Check whether an item is present in the list.\n   */\n  has(key: string): boolean {\n    return Object.keys(this._items).includes(key);\n  }\n\n  /**\n   * Get the content of an item.\n   */\n  get(key: string): T {\n    return this._items[key].content;\n  }\n\n  /**\n   * Get the priority of an item.\n   */\n  getPriority(key: string): number {\n    return this._items[key].priority;\n  }\n\n  /**\n   * Add an item to the list.\n   *\n   * @param key A unique key for the item.\n   * @param content The item's content.\n   * @param priority The priority of the item. Items with a higher priority\n   * will be positioned before items with a lower priority.\n   */\n  add(key: string, content: T, priority: number = 0): this {\n    this._items[key] = new Item(content, priority);\n\n    return this;\n  }\n\n  // TODO: [Flarum 2.0] Remove deprecated `.replace()` method.\n  /**\n   * Replace an item and/or priority in the list, only if it is already present.\n   *\n   * If `content` or `priority` are `null`, these values will not be replaced.\n   *\n   * If the provided `key` is not present, nothing will happen.\n   *\n   * @deprecated Please use the {@link ItemList.setContent} and {@link ItemList.setPriority}\n   * methods to replace items and their priorities. This method will be removed in Flarum 2.0.\n   *\n   * @param key The key of the item in the list\n   * @param content The item's new content\n   * @param priority The item's new priority\n   *\n   * @example <caption>Replace priority and not content.</caption>\n   * items.replace('myItem', null, 10);\n   *\n   * @example <caption>Replace content and not priority.</caption>\n   * items.replace('myItem', <p>My new value.</p>);\n   *\n   * @example <caption>Replace content and priority.</caption>\n   * items.replace('myItem', <p>My new value.</p>, 10);\n   */\n  replace(key: string, content: T | null = null, priority: number | null = null): this {\n    if (!this.has(key)) return this;\n\n    if (content !== null) {\n      this._items[key].content = content;\n    }\n\n    if (priority !== null) {\n      this._items[key].priority = priority;\n    }\n\n    return this;\n  }\n\n  /**\n   * Replaces an item's content, if the provided item key exists.\n   *\n   * If the provided `key` is not present, an error will be thrown.\n   *\n   * @param key The key of the item in the list\n   * @param content The item's new content\n   *\n   * @example <caption>Replace item content.</caption>\n   * items.setContent('myItem', <p>My new value.</p>);\n   *\n   * @example <caption>Replace item content and priority.</caption>\n   *          items\n   *            .setContent('myItem', <p>My new value.</p>)\n   *            .setPriority('myItem', 10);\n   *\n   * @throws If the provided `key` is not present in the ItemList.\n   */\n  setContent(key: string, content: T): this {\n    if (!this.has(key)) {\n      throw new Error(`[ItemList] Cannot set content of Item. Key \\`${key}\\` is not present.`);\n    }\n\n    // Saves on bundle size to call the deprecated method internally\n    return this.replace(key, content);\n  }\n\n  /**\n   * Replaces an item's priority, if the provided item key exists.\n   *\n   * If the provided `key` is not present, an error will be thrown.\n   *\n   * @param key The key of the item in the list\n   * @param priority The item's new priority\n   *\n   * @example <caption>Replace item priority.</caption>\n   * items.setPriority('myItem', 10);\n   *\n   * @example <caption>Replace item priority and content.</caption>\n   *          items\n   *            .setPriority('myItem', 10)\n   *            .setContent('myItem', <p>My new value.</p>);\n   *\n   * @throws If the provided `key` is not present in the ItemList.\n   */\n  setPriority(key: string, priority: number): this {\n    if (!this.has(key)) {\n      throw new Error(`[ItemList] Cannot set priority of Item. Key \\`${key}\\` is not present.`);\n    }\n\n    this._items[key].priority = priority;\n\n    return this;\n  }\n\n  /**\n   * Remove an item from the list.\n   *\n   * If the provided `key` is not present, nothing will happen.\n   */\n  remove(key: string): this {\n    delete this._items[key];\n\n    return this;\n  }\n\n  /**\n   * Merge another list's items into this one.\n   *\n   * The list passed to this function will overwrite items which already exist\n   * with the same key.\n   */\n  merge(otherList: ItemList<T>): ItemList<T> {\n    Object.keys(otherList._items).forEach((key) => {\n      const val = otherList._items[key];\n\n      if (val instanceof Item) {\n        this._items[key] = val;\n      }\n    });\n\n    return this;\n  }\n\n  /**\n   * Convert the list into an array of item content arranged by priority.\n   *\n   * This **does not** preserve the original types of primitives and proxies\n   * all content values to make `itemName` accessible on them.\n   *\n   * **NOTE:** If your ItemList holds primitive types (such as numbers, booleans\n   * or strings), these will be converted to their object counterparts if you do\n   * not provide `true` to this function.\n   *\n   * **NOTE:** Modifying any objects in the final array may also update the\n   * content of the original ItemList.\n   *\n   * @param keepPrimitives Converts item content to objects and sets the\n   * `itemName` property on them.\n   *\n   * @see https://github.com/flarum/core/issues/3030\n   */\n  toArray(keepPrimitives?: false): (T & { itemName: string })[];\n  /**\n   * Convert the list into an array of item content arranged by priority.\n   *\n   * Content values that are already objects will be proxied and have\n   * `itemName` accessible on them. Primitive values will not have the\n   * `itemName` property accessible.\n   *\n   * **NOTE:** Modifying any objects in the final array may also update the\n   * content of the original ItemList.\n   *\n   * @param keepPrimitives Converts item content to objects and sets the\n   * `itemName` property on them.\n   */\n  toArray(keepPrimitives: true): (T extends object ? T & Readonly<{ itemName: string }> : T)[];\n\n  toArray(keepPrimitives: boolean = false): T[] | (T & Readonly<{ itemName: string }>)[] {\n    const items: Item<T>[] = Object.keys(this._items).map((key, i) => {\n      const item = this._items[key];\n\n      if (!keepPrimitives || isObject(item.content)) {\n        // Convert content to object, then proxy it\n        return {\n          ...item,\n          content: this.createItemContentProxy(isObject(item.content) ? item.content : Object(item.content), key),\n        };\n      } else {\n        // ...otherwise just return a clone of the item.\n        return { ...item };\n      }\n    });\n\n    return items.sort((a, b) => b.priority - a.priority).map((item) => item.content);\n  }\n\n  /**\n   * A read-only map of all keys to their respective items in no particular order.\n   *\n   * We don't allow adding new items to the ItemList via setting new properties,\n   * nor do we allow modifying existing items directly. You should use the\n   * {@link ItemList.add}, {@link ItemList.setContent} and\n   * {@link ItemList.setPriority} methods instead.\n   *\n   * To match the old behaviour of the `ItemList.items` property, call\n   * `Object.values(ItemList.toObject())`.\n   *\n   * @example\n   * const items = new ItemList();\n   * items.add('b', 'My cool value', 20);\n   * items.add('a', 'My value', 10);\n   * items.toObject();\n   * // {\n   * //   a: { content: 'My value', priority: 10, itemName: 'a' },\n   * //   b: { content: 'My cool value', priority: 20, itemName: 'b' },\n   * // }\n   */\n  toObject(): DeepReadonly<Record<string, IItemObject<T>>> {\n    return Object.keys(this._items).reduce((map, key) => {\n      const obj = {\n        content: this.get(key),\n        itemName: key,\n        priority: this.getPriority(key),\n      };\n\n      map[key] = obj;\n\n      return map;\n    }, {} as Record<string, IItemObject<T>>);\n  }\n\n  /**\n   * Proxies an item's content, adding the `itemName` readonly property to it.\n   *\n   * @example\n   * createItemContentProxy({ foo: 'bar' }, 'myItem');\n   * // { foo: 'bar', itemName: 'myItem' }\n   *\n   * @param content The item's content (objects only)\n   * @param key The item's key\n   * @return Proxied content\n   *\n   * @internal\n   */\n  private createItemContentProxy<C extends object>(content: C, key: string): Readonly<C & { itemName: string }> {\n    return new Proxy(content, {\n      get(target, property, receiver) {\n        if (property === 'itemName') return key;\n\n        return Reflect.get(target, property, receiver);\n      },\n      set(target, property, value, receiver) {\n        if (key !== null && property === 'itemName') {\n          throw new Error('`itemName` property is read-only');\n        }\n\n        return Reflect.set(target, property, value, receiver);\n      },\n    }) as C & { itemName: string };\n  }\n}\n","import Component from '../Component';\n\n/**\n * The `Separator` component defines a menu separator item.\n */\nclass Separator extends Component {\n  view() {\n    return <li className=\"Dropdown-separator\" />;\n  }\n}\n\nSeparator.isListItem = true;\n\nexport default Separator;\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f);else for(t in e)e[t]&&(n&&(n+=\" \"),n+=t);return n}export function clsx(){for(var e,t,f=0,n=\"\";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","import clsx from 'clsx';\n\n/**\n * This util exposes `clsx` to core and extensions as a re-usable utility.\n *\n * For full documentation, see `clsx` on GitHub.\n *\n * @see https://github.com/lukeed/clsx\n */\nconst classList = clsx;\n\nexport default classList;\n","import type Mithril from 'mithril';\nimport Component, { ComponentAttrs } from '../Component';\nimport Separator from '../components/Separator';\nimport classList from '../utils/classList';\n\ntype ModdedVnodeAttrs = {\n  itemClassName?: string;\n  key?: string;\n};\n\ntype ModdedTag = Mithril.Vnode['tag'] & {\n  isListItem?: boolean;\n  isActive?: (attrs: ComponentAttrs) => boolean;\n};\n\ntype ModdedVnode = Mithril.Vnode<ModdedVnodeAttrs> & { itemName?: string; itemClassName?: string; tag: ModdedTag };\n\ntype ModdedChild = ModdedVnode | string | number | boolean | null | undefined;\ntype ModdedChildArray = ModdedChildren[];\ntype ModdedChildren = ModdedChild | ModdedChildArray;\n\n/**\n * This type represents an element of a list returned by `ItemList.toArray()`,\n * coupled with some static properties used on various components.\n */\nexport type ModdedChildrenWithItemName = ModdedChildren & { itemName?: string };\n\nfunction isVnode(item: ModdedChildren): item is Mithril.Vnode {\n  return typeof item === 'object' && item !== null && 'tag' in item;\n}\n\nfunction isSeparator(item: ModdedChildren): boolean {\n  return isVnode(item) && item.tag === Separator;\n}\n\nfunction withoutUnnecessarySeparators(items: ModdedChildrenWithItemName[]): ModdedChildrenWithItemName[] {\n  const newItems: ModdedChildrenWithItemName[] = [];\n  let prevItem: ModdedChildren;\n\n  items.filter(Boolean).forEach((item, i: number) => {\n    if (!isSeparator(item) || (prevItem && !isSeparator(prevItem) && i !== items.length - 1)) {\n      prevItem = item;\n      newItems.push(item);\n    }\n  });\n\n  return newItems;\n}\n\n/**\n * The `listItems` helper wraps an array of components in the provided tag,\n * stripping out any unnecessary `Separator` components.\n *\n * By default, this tag is an `<li>` tag, but this is customisable through the\n * second function parameter, `customTag`.\n */\nexport default function listItems<Attrs extends ComponentAttrs>(\n  rawItems: ModdedChildrenWithItemName[],\n  customTag: VnodeElementTag<Attrs> = 'li',\n  attributes: Attrs = {} as Attrs\n): Mithril.Vnode[] {\n  const items = rawItems instanceof Array ? rawItems : [rawItems];\n  const Tag = customTag;\n\n  return withoutUnnecessarySeparators(items).map((item) => {\n    const classes = [item.itemName && `item-${item.itemName}`];\n\n    if (isVnode(item) && item.tag.isListItem) {\n      item.attrs = item.attrs || {};\n      item.attrs.key = item.attrs.key || item.itemName;\n      item.key = item.attrs.key;\n\n      return item;\n    }\n\n    if (isVnode(item)) {\n      classes.push(item.attrs?.itemClassName || item.itemClassName);\n\n      if (item.tag.isActive?.(item.attrs)) {\n        classes.push('active');\n      }\n    }\n\n    const key = (isVnode(item) && item?.attrs?.key) || item.itemName;\n\n    return (\n      <Tag className={classList(classes)} key={key} {...attributes}>\n        {item}\n      </Tag>\n    );\n  });\n}\n","import Component from '../../common/Component';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\n\n/**\n * The `DiscussionHero` component displays the hero on a discussion page.\n *\n * ### attrs\n *\n * - `discussion`\n */\nexport default class DiscussionHero extends Component {\n  view() {\n    return (\n      <header className=\"Hero DiscussionHero\">\n        <div className=\"container\">\n          <ul className=\"DiscussionHero-items\">{listItems(this.items().toArray())}</ul>\n        </div>\n      </header>\n    );\n  }\n\n  /**\n   * Build an item list for the contents of the discussion hero.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  items() {\n    const items = new ItemList();\n    const discussion = this.attrs.discussion;\n    const badges = discussion.badges().toArray();\n\n    if (badges.length) {\n      items.add('badges', <ul className=\"DiscussionHero-badges badges\">{listItems(badges)}</ul>, 10);\n    }\n\n    items.add('title', <h1 className=\"DiscussionHero-title\">{discussion.title()}</h1>);\n\n    return items;\n  }\n}\n","export default function _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = Object.keys(source);\n  var key, i;\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (excluded.indexOf(key) >= 0) continue;\n    target[key] = source[key];\n  }\n  return target;\n}","/**\n * The `extract` utility deletes a property from an object and returns its\n * value.\n *\n * @param object The object that owns the property\n * @param property The name of the property to extract\n * @return The value of the property\n */\nexport default function extract<T, K extends keyof T>(object: T, property: K): T[K] {\n  const value = object[property];\n\n  delete object[property];\n\n  return value;\n}\n","/**\n * Truncate a string to the given length, appending ellipses if necessary.\n */\nexport function truncate(string: string, length: number, start: number = 0): string {\n  return (start > 0 ? '...' : '') + string.substring(start, start + length) + (string.length > start + length ? '...' : '');\n}\n\n/**\n * Create a slug out of the given string depending on the selected mode.\n * Invalid characters are converted to hyphens.\n *\n * NOTE: This method does not use the comparably sophisticated transliteration\n * mechanism that is employed in the backend. Therefore, it should only be used\n * to *suggest* slugs that can be overridden by the user.\n */\nexport function slug(string: string, mode: SluggingMode = SluggingMode.ALPHANUMERIC): string {\n  switch (mode) {\n    case SluggingMode.UTF8:\n      return (\n        string\n          .toLowerCase()\n          // Match non-word characters (take UTF8 into consideration) and replace with a dash.\n          .replace(/[^\\p{L}\\p{N}\\p{M}]/giu, '-')\n          .replace(/-+/g, '-')\n          .replace(/-$|^-/g, '')\n      );\n\n    case SluggingMode.ALPHANUMERIC:\n    default:\n      return string\n        .toLowerCase()\n        .replace(/[^a-z0-9]/gi, '-')\n        .replace(/-+/g, '-')\n        .replace(/-$|^-/g, '');\n  }\n}\n\nenum SluggingMode {\n  ALPHANUMERIC = 'alphanum',\n  UTF8 = 'utf8',\n}\n\n/**\n * Strip HTML tags and quotes out of the given string, replacing them with\n * meaningful punctuation.\n */\nexport function getPlainContent(string: string): string {\n  const html = string.replace(/(<\\/p>|<br>)/g, '$1 &nbsp;').replace(/<img\\b[^>]*>/gi, ' ');\n\n  const element = new DOMParser().parseFromString(html, 'text/html').documentElement;\n\n  getPlainContent.removeSelectors.forEach((selector) => {\n    const el = element.querySelectorAll(selector);\n    el.forEach((e) => {\n      e.remove();\n    });\n  });\n\n  return element.innerText.replace(/\\s+/g, ' ').trim();\n}\n\n/**\n * An array of DOM selectors to remove when getting plain content.\n *\n * @type {Array}\n */\ngetPlainContent.removeSelectors = ['blockquote', 'script'];\n\n/**\n * Make a string's first character uppercase.\n */\nexport function ucfirst(string: string): string {\n  return string.substr(0, 1).toUpperCase() + string.substr(1);\n}\n\n/**\n * Transform a camel case string to snake case.\n */\nexport function camelCaseToSnakeCase(str: string): string {\n  return str.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`);\n}\n\n/**\n * Generate a random string (a-z, 0-9) of a given length.\n *\n * Providing a length of less than 0 will result in an error.\n *\n * @param length Length of the random string to generate\n * @returns A random string of provided length\n */\nexport function generateRandomString(length: number): string {\n  if (length < 0) throw new Error('Cannot generate a random string with length less than 0.');\n  if (length === 0) return '';\n\n  const arr = new Uint8Array(length / 2);\n  window.crypto.getRandomValues(arr);\n\n  return Array.from(arr, (dec) => {\n    return dec.toString(16).padStart(2, '0');\n  }).join('');\n}\n","import Component from '../Component';\nimport extract from '../utils/extract';\n\n/**\n * The link component enables both internal and external links.\n * It will return a regular HTML link for any links to external sites,\n * and it will use Mithril's m.route.Link for any internal links.\n *\n * Links will default to internal; the 'external' attr must be set to\n * `true` for the link to be external.\n */\nexport default class Link extends Component {\n  view(vnode) {\n    let { options = {}, ...attrs } = vnode.attrs;\n\n    attrs.href ||= '';\n\n    // For some reason, m.route.Link does not like vnode.text, so if present, we\n    // need to convert it to text vnodes and store it in children.\n    const children = vnode.children || { tag: '#', children: vnode.text };\n\n    if (attrs.external) {\n      return <a {...attrs}>{children}</a>;\n    }\n\n    // If the href URL of the link is the same as the current page path\n    // we will not add a new entry to the browser history.\n    // This allows us to still refresh the Page component\n    // without adding endless history entries.\n    if (attrs.href === m.route.get()) {\n      if (!('replace' in options)) options.replace = true;\n    }\n\n    // Mithril 2 does not completely rerender the page if a route change leads to the same route\n    // (or the same component handling a different route).\n    // Here, the `force` parameter will use Mithril's key system to force a full rerender\n    // see https://mithril.js.org/route.html#key-parameter\n    if (extract(attrs, 'force')) {\n      if (!('state' in options)) options.state = {};\n      if (!('key' in options.state)) options.state.key = Date.now();\n    }\n\n    attrs.options = options;\n\n    return <m.route.Link {...attrs}>{children}</m.route.Link>;\n  }\n}\n","import type Mithril from 'mithril';\nimport type { ComponentAttrs } from '../Component';\nimport User from '../models/User';\nimport classList from '../utils/classList';\n\nexport interface AvatarAttrs extends ComponentAttrs {}\n\n/**\n * The `avatar` helper displays a user's avatar.\n *\n * @param user\n * @param attrs Attributes to apply to the avatar element\n */\nexport default function avatar(user: User | null, attrs: ComponentAttrs = {}): Mithril.Vnode {\n  attrs.className = classList('Avatar', attrs.className);\n  attrs.loading ??= 'lazy';\n  let content: string = '';\n\n  // If the `title` attribute is set to null or false, we don't want to give the\n  // avatar a title. On the other hand, if it hasn't been given at all, we can\n  // safely default it to the user's username.\n  const hasTitle: boolean | string = attrs.title === 'undefined' || attrs.title;\n  if (!hasTitle) delete attrs.title;\n\n  // If a user has been passed, then we will set up an avatar using their\n  // uploaded image, or the first letter of their username if they haven't\n  // uploaded one.\n  if (user) {\n    const username = user.displayName() || '?';\n    const avatarUrl = user.avatarUrl();\n\n    if (hasTitle) attrs.title = attrs.title || username;\n\n    if (avatarUrl) {\n      return <img {...attrs} src={avatarUrl} alt=\"\" />;\n    }\n\n    content = username.charAt(0).toUpperCase();\n    attrs.style = { '--avatar-bg': user.color() };\n  }\n\n  return <span {...attrs}>{content}</span>;\n}\n","import type Mithril from 'mithril';\nimport { truncate } from '../utils/string';\n\n/**\n * The `highlight` helper searches for a word phrase in a string, and wraps\n * matches with the <mark> tag.\n *\n * @param string The string to highlight.\n * @param phrase The word or words to highlight.\n * @param [length] The number of characters to truncate the string to.\n *     The string will be truncated surrounding the first match.\n */\nexport default function highlight(string: string, phrase?: string | RegExp, length?: number): Mithril.Vnode<any, any> | string {\n  if (!phrase && !length) return string;\n\n  // Convert the word phrase into a global regular expression (if it isn't\n  // already) so we can search the string for matched.\n  const regexp = phrase instanceof RegExp ? phrase : new RegExp(phrase ?? '', 'gi');\n\n  let highlighted = string;\n  let start = 0;\n\n  // If a length was given, the truncate the string surrounding the first match.\n  if (length) {\n    if (phrase) start = Math.max(0, string.search(regexp) - length / 2);\n\n    highlighted = truncate(highlighted, length, start);\n  }\n\n  // Convert the string into HTML entities, then highlight all matches with\n  // <mark> tags. Then we will return the result as a trusted HTML string.\n  highlighted = $('<div/>').text(highlighted).html();\n\n  if (phrase) highlighted = highlighted.replace(regexp, '<mark>$&</mark>');\n\n  return m.trust(highlighted);\n}\n","import type Mithril from 'mithril';\nimport classList from '../utils/classList';\n\n/**\n * The `icon` helper displays an icon.\n *\n * @param fontClass The full icon class, prefix and the icon’s name.\n * @param attrs Any other attributes to apply.\n */\nexport default function icon(fontClass: string, attrs: Mithril.Attributes = {}): Mithril.Vnode {\n  attrs.className = classList('icon', fontClass, attrs.className);\n\n  return <i aria-hidden=\"true\" {...attrs} />;\n}\n","import type Mithril from 'mithril';\n\n/**\n * Extract the text nodes from a virtual element.\n */\nexport default function extractText(vdom: Mithril.Children): string {\n  if (vdom instanceof Array) {\n    return vdom.map((element) => extractText(element)).join('');\n  } else if (typeof vdom === 'object' && vdom !== null) {\n    return vdom.children ? extractText(vdom.children) : String(vdom.text);\n  } else {\n    return String(vdom);\n  }\n}\n","import app from '../../common/app';\nimport dayjs from 'dayjs';\nimport extractText from './extractText';\n\n/**\n * The `humanTime` utility converts a date to a localized, human-readable time-\n * ago string.\n */\nexport default function humanTime(time: dayjs.ConfigType): string {\n  let d = dayjs(time);\n  const now = dayjs();\n\n  // To prevent showing things like \"in a few seconds\" due to small offsets\n  // between client and server time, we always reset future dates to the\n  // current time. This will result in \"just now\" being shown instead.\n  if (d.isAfter(now)) {\n    d = now;\n  }\n\n  const day = 864e5;\n  const diff = d.diff(dayjs());\n  let ago: string;\n\n  // If this date was more than a month ago, we'll show the name of the month\n  // in the string. If it wasn't this year, we'll show the year as well.\n  if (diff < -30 * day) {\n    if (d.year() === dayjs().year()) {\n      ago = d.format(extractText(app.translator.trans('core.lib.datetime_formats.humanTimeShort')));\n    } else {\n      ago = d.format(extractText(app.translator.trans('core.lib.datetime_formats.humanTimeLong')));\n    }\n  } else {\n    ago = d.fromNow();\n  }\n\n  return ago;\n}\n","import app from '../../common/app';\nimport extractText from './extractText';\n\n/**\n * The `abbreviateNumber` utility converts a number to a shorter localized form.\n *\n * @example\n * abbreviateNumber(1234);\n * // \"1.2K\"\n */\nexport default function abbreviateNumber(number: number): string {\n  // TODO: translation\n  if (number >= 1000000) {\n    return Math.floor(number / 1000000) + extractText(app.translator.trans('core.lib.number_suffix.mega_text'));\n  } else if (number >= 1000) {\n    return (number / 1000).toFixed(1) + extractText(app.translator.trans('core.lib.number_suffix.kilo_text'));\n  } else {\n    return number.toString();\n  }\n}\n","import app from '../../common/app';\nimport Component, { ComponentAttrs } from '../Component';\nimport icon from '../helpers/icon';\nimport listItems, { ModdedChildrenWithItemName } from '../helpers/listItems';\nimport extractText from '../utils/extractText';\nimport type Mithril from 'mithril';\n\nexport interface IDropdownAttrs extends ComponentAttrs {\n  /** A class name to apply to the dropdown toggle button. */\n  buttonClassName?: string;\n  /** A class name to apply to the dropdown menu. */\n  menuClassName?: string;\n  /** The name of an icon to show in the dropdown toggle button. */\n  icon?: string;\n  /** The name of an icon to show on the right of the button. */\n  caretIcon?: string;\n  /** The label of the dropdown toggle button. Defaults to 'Controls'. */\n  label: Mithril.Children;\n  /** The label used to describe the dropdown toggle button to assistive readers. Defaults to 'Toggle dropdown menu'. */\n  accessibleToggleLabel?: string;\n  /** An action to take when the dropdown is collapsed. */\n  onhide?: () => void;\n  /** An action to take when the dropdown is opened. */\n  onshow?: () => void;\n\n  lazyDraw?: boolean;\n}\n\n/**\n * The `Dropdown` component displays a button which, when clicked, shows a\n * dropdown menu beneath it.\n *\n * The children will be displayed as a list inside the dropdown menu.\n */\nexport default class Dropdown<CustomAttrs extends IDropdownAttrs = IDropdownAttrs> extends Component<CustomAttrs> {\n  protected showing = false;\n\n  static initAttrs(attrs: IDropdownAttrs) {\n    attrs.className ||= '';\n    attrs.buttonClassName ||= '';\n    attrs.menuClassName ||= '';\n    attrs.label ||= '';\n    attrs.caretIcon ??= 'fas fa-caret-down';\n    attrs.accessibleToggleLabel ||= extractText(app.translator.trans('core.lib.dropdown.toggle_dropdown_accessible_label'));\n  }\n\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    const items = vnode.children ? listItems(vnode.children as ModdedChildrenWithItemName[]) : [];\n    const renderItems = this.attrs.lazyDraw ? this.showing : true;\n\n    return (\n      <div className={'ButtonGroup Dropdown dropdown ' + this.attrs.className + ' itemCount' + items.length + (this.showing ? ' open' : '')}>\n        {this.getButton(vnode.children as Mithril.ChildArray)}\n        {renderItems && this.getMenu(items)}\n      </div>\n    );\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    // When opening the dropdown menu, work out if the menu goes beyond the\n    // bottom of the viewport. If it does, we will apply class to make it show\n    // above the toggle button instead of below it.\n    this.$().on('shown.bs.dropdown', () => {\n      const { lazyDraw, onshow } = this.attrs;\n\n      this.showing = true;\n\n      // If using lazy drawing, redraw before calling `onshow` function\n      // to make sure the menu DOM exists in case the callback tries to use it.\n      if (lazyDraw) {\n        m.redraw.sync();\n      }\n\n      if (typeof onshow === 'function') {\n        onshow();\n      }\n\n      // If not using lazy drawing, keep previous functionality\n      // of redrawing after calling onshow()\n      if (!lazyDraw) {\n        m.redraw();\n      }\n\n      const $menu = this.$('.Dropdown-menu');\n      const isRight = $menu.hasClass('Dropdown-menu--right');\n\n      const top = $menu.offset()?.top ?? 0;\n      const height = $menu.height() ?? 0;\n      const windowSrollTop = $(window).scrollTop() ?? 0;\n      const windowHeight = $(window).height() ?? 0;\n\n      $menu.removeClass('Dropdown-menu--top Dropdown-menu--right');\n\n      $menu.toggleClass('Dropdown-menu--top', top + height > windowSrollTop + windowHeight);\n\n      if (($menu.offset()?.top || 0) < 0) {\n        $menu.removeClass('Dropdown-menu--top');\n      }\n\n      const left = $menu.offset()?.left ?? 0;\n      const width = $menu.width() ?? 0;\n      const windowScrollLeft = $(window).scrollLeft() ?? 0;\n      const windowWidth = $(window).width() ?? 0;\n\n      $menu.toggleClass('Dropdown-menu--right', isRight || left + width > windowScrollLeft + windowWidth);\n    });\n\n    this.$().on('hidden.bs.dropdown', () => {\n      this.showing = false;\n\n      if (this.attrs.onhide) {\n        this.attrs.onhide();\n      }\n\n      m.redraw();\n    });\n  }\n\n  /**\n   * Get the template for the button.\n   */\n  getButton(children: Mithril.ChildArray): Mithril.Vnode<any, any> {\n    return (\n      <button\n        className={'Dropdown-toggle ' + this.attrs.buttonClassName}\n        aria-haspopup=\"menu\"\n        aria-label={this.attrs.accessibleToggleLabel}\n        data-toggle=\"dropdown\"\n        onclick={this.attrs.onclick}\n      >\n        {this.getButtonContent(children)}\n      </button>\n    );\n  }\n\n  /**\n   * Get the template for the button's content.\n   */\n  getButtonContent(children: Mithril.ChildArray): Mithril.ChildArray {\n    return [\n      this.attrs.icon ? icon(this.attrs.icon, { className: 'Button-icon' }) : '',\n      <span className=\"Button-label\">{this.attrs.label}</span>,\n      this.attrs.caretIcon ? icon(this.attrs.caretIcon, { className: 'Button-caret' }) : '',\n    ];\n  }\n\n  getMenu(items: Mithril.Vnode<any, any>[]): Mithril.Vnode<any, any> {\n    return <ul className={'Dropdown-menu dropdown-menu ' + this.attrs.menuClassName}>{items}</ul>;\n  }\n}\n","import dayjs from 'dayjs';\nimport type Mithril from 'mithril';\nimport humanTimeUtil from '../utils/humanTime';\n\n/**\n * The `humanTime` helper displays a time in a human-friendly time-ago format\n * (e.g. '12 days ago'), wrapped in a <time> tag with other information about\n * the time.\n */\nexport default function humanTime(time: Date): Mithril.Vnode {\n  const d = dayjs(time);\n\n  const datetime = d.format();\n  const full = d.format('LLLL');\n  const ago = humanTimeUtil(time);\n\n  return (\n    <time pubdate datetime={datetime} title={full} data-humantime>\n      {ago}\n    </time>\n  );\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport humanTime from '../../common/helpers/humanTime';\nimport icon from '../../common/helpers/icon';\n\n/**\n * Displays information about a the first or last post in a discussion.\n *\n * ### Attrs\n *\n * - `discussion`\n * - `lastPost`\n */\nexport default class TerminalPost extends Component {\n  view() {\n    const discussion = this.attrs.discussion;\n    const lastPost = this.attrs.lastPost && discussion.replyCount();\n\n    const user = discussion[lastPost ? 'lastPostedUser' : 'user']();\n    const time = discussion[lastPost ? 'lastPostedAt' : 'createdAt']();\n\n    return (\n      <span>\n        {!!lastPost && icon('fas fa-reply')}{' '}\n        {app.translator.trans('core.forum.discussion_list.' + (lastPost ? 'replied' : 'started') + '_text', {\n          user,\n          ago: humanTime(time),\n        })}\n      </span>\n    );\n  }\n}\n","/**\n * The `SubtreeRetainer` class keeps track of a number of pieces of data,\n * comparing the values of these pieces at every iteration.\n *\n * This is useful for preventing redraws to relatively static (or huge)\n * components whose VDOM only depends on very few values, when none of them\n * have changed.\n *\n * @example\n * // Check two callbacks for changes on each update\n * this.subtree = new SubtreeRetainer(\n *   () => this.attrs.post.freshness,\n *   () => this.showing\n * );\n *\n * // Add more callbacks to be checked for updates\n * this.subtree.check(() => this.attrs.user.freshness);\n *\n * // In a component's onbeforeupdate() method:\n * return this.subtree.needsRebuild()\n *\n * @see https://mithril.js.org/lifecycle-methods.html#onbeforeupdate\n */\nexport default class SubtreeRetainer {\n  protected callbacks: (() => any)[];\n  protected data: Record<string, any>;\n\n  /**\n   * @param callbacks Functions returning data to keep track of.\n   */\n  constructor(...callbacks: (() => any)[]) {\n    this.callbacks = callbacks;\n    this.data = {};\n\n    // Build the initial data, so it is available when calling\n    // needsRebuild from the onbeforeupdate hook.\n    this.needsRebuild();\n  }\n\n  /**\n   * Return whether any data has changed since the last check.\n   * If so, Mithril needs to re-diff the vnode and its children.\n   */\n  needsRebuild(): boolean {\n    let needsRebuild = false;\n\n    this.callbacks.forEach((callback, i) => {\n      const result = callback();\n\n      if (result !== this.data[i]) {\n        this.data[i] = result;\n        needsRebuild = true;\n      }\n    });\n\n    return needsRebuild;\n  }\n\n  /**\n   * Add another callback to be checked.\n   */\n  check(...callbacks: (() => any)[]): void {\n    this.callbacks = this.callbacks.concat(callbacks);\n    // Update the data cache when new checks are added.\n    this.needsRebuild();\n  }\n\n  /**\n   * Invalidate the subtree, forcing it to be redrawn.\n   */\n  invalidate(): void {\n    this.data = {};\n  }\n}\n","import app from '../../common/app';\nimport Component, { ComponentAttrs } from '../Component';\nimport classList from '../utils/classList';\n\nexport interface LoadingIndicatorAttrs extends ComponentAttrs {\n  /**\n   * Custom classes for the loading indicator's container.\n   */\n  className?: string;\n  /**\n   * Custom classes for the loading indicator's container.\n   */\n  containerClassName?: string;\n  /**\n   * Optional size for the loading indicator.\n   */\n  size?: 'large' | 'medium' | 'small';\n  /**\n   * Optional attributes to apply to the loading indicator's container.\n   */\n  containerAttrs?: Partial<ComponentAttrs>;\n  /**\n   * Display type of the spinner.\n   *\n   * @default 'block'\n   */\n  display?: 'block' | 'inline' | 'unset';\n}\n\n/**\n * The `LoadingIndicator` component displays a simple CSS-based loading spinner.\n *\n * To set a custom color, use the CSS `color` property.\n *\n * To increase spacing around the spinner, use the CSS `height` property on the\n * spinner's **container**. Setting the `display` attribute to `block` will set\n * a height of `100px` by default.\n *\n * To apply a custom size to the loading indicator, set the `--size` and\n * `--thickness` CSS custom properties on the loading indicator container.\n *\n * If you *really* want to change how this looks as part of your custom theme,\n * you can override the `border-radius` and `border` then set either a\n * background image, or use `content: \"\\<glyph>\"` (e.g. `content: \"\\f1ce\"`)\n * and `font-family: 'Font Awesome 5 Free'` to set an FA icon if you'd rather.\n *\n * ### Attrs\n *\n * - `containerClassName` Class name(s) to apply to the indicator's parent\n * - `className` Class name(s) to apply to the indicator itself\n * - `display` Determines how the spinner should be displayed (`inline`, `block` (default) or `unset`)\n * - `size` Size of the loading indicator (`small`, `medium` or `large`)\n * - `containerAttrs` Optional attrs to be applied to the container DOM element\n *\n * All other attrs will be assigned as attributes on the DOM element.\n */\nexport default class LoadingIndicator extends Component<LoadingIndicatorAttrs> {\n  view() {\n    const { display = 'block', size = 'medium', containerClassName, className, ...attrs } = this.attrs;\n\n    const completeClassName = classList('LoadingIndicator', className);\n    const completeContainerClassName = classList(\n      'LoadingIndicator-container',\n      display !== 'unset' && `LoadingIndicator-container--${display}`,\n      size && `LoadingIndicator-container--${size}`,\n      containerClassName\n    );\n\n    return (\n      <div\n        aria-label={app.translator.trans('core.lib.loading_indicator.accessible_label')}\n        role=\"status\"\n        {...attrs.containerAttrs}\n        data-size={size}\n        className={completeContainerClassName}\n      >\n        <div aria-hidden=\"true\" className={completeClassName} {...attrs} />\n      </div>\n    );\n  }\n}\n","import Component from '../Component';\n\n/**\n * The `ConfirmDocumentUnload` component can be used to register a global\n * event handler that prevents closing the browser window/tab based on the\n * return value of a given callback prop.\n *\n * ### Attrs\n *\n * - `when` - a callback returning true when the browser should prompt for\n *            confirmation before closing the window/tab\n */\nexport default class ConfirmDocumentUnload extends Component {\n  handler() {\n    return this.attrs.when() || undefined;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.boundHandler = this.handler.bind(this);\n    $(window).on('beforeunload', this.boundHandler);\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    $(window).off('beforeunload', this.boundHandler);\n  }\n\n  view(vnode) {\n    return <>{vnode.children}</>;\n  }\n}\n","import app from '../app';\n\n/**\n * Calls `console.warn` with the provided arguments, but only if the forum is in debug mode.\n *\n * This function is intended to provide warnings to extension developers about issues with\n * their extensions that may not be easily noticed when testing, such as accessibility\n * issues.\n *\n * These warnings should be hidden on production forums to ensure webmasters are not\n * inundated with do-gooders telling them they have an issue when it isn't something they\n * can fix.\n */\nexport default function fireDebugWarning(...args: Parameters<typeof console.warn>): void {\n  if (!app.forum.attribute('debug')) return;\n\n  console.warn(...args);\n}\n\n/**\n * Fire a Flarum deprecation warning which is shown in the JS console.\n *\n * These warnings are only shown when the forum is in debug mode, and the function exists to\n * reduce bundle size caused by multiple warnings across our JavaScript.\n *\n * @param message The message to display. (Short, but sweet, please!)\n * @param githubId The PR or Issue ID with more info in relation to this change.\n * @param [removedFrom] The version in which this feature will be completely removed. (default: 2.0)\n * @param [repo] The repo which the issue or PR is located in. (default: flarum/core)\n *\n * @see {@link fireDebugWarning}\n */\nexport function fireDeprecationWarning(message: string, githubId: string, removedFrom: string = '2.0', repo: string = 'flarum/core'): void {\n  // GitHub auto-redirects between `/pull` and `/issues` for us, so using `/pull` saves 2 bytes!\n  fireDebugWarning(`[Flarum ${removedFrom} Deprecation] ${message}\\n\\nSee: https://github.com/${repo}/pull/${githubId}`);\n}\n","import type Mithril from 'mithril';\nimport Component, { ComponentAttrs } from '../Component';\nimport fireDebugWarning from '../helpers/fireDebugWarning';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport extractText from '../utils/extractText';\nimport LoadingIndicator from './LoadingIndicator';\n\nexport interface IButtonAttrs extends ComponentAttrs {\n  /**\n   * Class(es) of an optional icon to be rendered within the button.\n   *\n   * If provided, the button will gain a `has-icon` class.\n   */\n  icon?: string;\n  /**\n   * Disables button from user input.\n   *\n   * Default: `false`\n   */\n  disabled?: boolean;\n  /**\n   * Show a loading spinner within the button.\n   *\n   * If `true`, also disables the button.\n   *\n   * Default: `false`\n   */\n  loading?: boolean;\n  /**\n   * **DEPRECATED:** Please use the `aria-label` attribute instead. For tooltips, use\n   * the `<Tooltip>` component.\n   *\n   * Accessible text for the button. This should always be present if the button only\n   * contains an icon.\n   *\n   * The textual content of this attribute is passed to the DOM element as `aria-label`.\n   *\n   * @deprecated\n   */\n  title?: string | Mithril.ChildArray;\n  /**\n   * Accessible text for the button. This should always be present if the button only\n   * contains an icon.\n   *\n   * The textual content of this attribute is passed to the DOM element as `aria-label`.\n   */\n  'aria-label'?: string | Mithril.ChildArray;\n  /**\n   * Button type.\n   *\n   * Default: `\"button\"`\n   *\n   * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type\n   */\n  type?: string;\n}\n\n/**\n * The `Button` component defines an element which, when clicked, performs an\n * action.\n *\n * Other attrs will be assigned as attributes on the `<button>` element.\n *\n * Note that a Button has no default class names. This is because a Button can\n * be used to represent any generic clickable control, like a menu item. Common\n * styles can be applied by providing `className=\"Button\"` to the Button component.\n */\nexport default class Button<CustomAttrs extends IButtonAttrs = IButtonAttrs> extends Component<CustomAttrs> {\n  view(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    let { type, title, 'aria-label': ariaLabel, icon: iconName, disabled, loading, className, class: _class, ...attrs } = this.attrs;\n\n    // If no `type` attr provided, set to \"button\"\n    type ||= 'button';\n\n    // Use `title` attribute as `aria-label` if none provided\n    ariaLabel ||= title;\n\n    // If given a translation object, extract the text.\n    if (typeof ariaLabel === 'object') {\n      ariaLabel = extractText(ariaLabel);\n    }\n\n    if (disabled || loading) {\n      delete attrs.onclick;\n    }\n\n    className = classList(_class, className, {\n      hasIcon: iconName,\n      disabled: disabled || loading,\n      loading: loading,\n    });\n\n    const buttonAttrs = {\n      disabled,\n      className,\n      type,\n      'aria-label': ariaLabel,\n      ...attrs,\n    };\n\n    return <button {...buttonAttrs}>{this.getButtonContent(vnode.children)}</button>;\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    const { 'aria-label': ariaLabel } = this.attrs;\n\n    if (this.view === Button.prototype.view && !ariaLabel && !extractText(vnode.children) && !this.element?.getAttribute?.('aria-label')) {\n      fireDebugWarning(\n        '[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',\n        this.element\n      );\n    }\n  }\n\n  /**\n   * Get the template for the button's content.\n   */\n  protected getButtonContent(children: Mithril.Children): Mithril.ChildArray {\n    const iconName = this.attrs.icon;\n\n    return [\n      iconName && icon(iconName, { className: 'Button-icon' }),\n      children && <span className=\"Button-label\">{children}</span>,\n      this.attrs.loading && <LoadingIndicator size=\"small\" display=\"inline\" />,\n    ];\n  }\n}\n","/*\n * Original Copyright GitHub, Inc. Licensed under the MIT License.\n * See license text at https://github.com/github/markdown-toolbar-element/blob/master/LICENSE.\n */\n\nexport interface SelectionRange {\n  text: string;\n  selectionStart: number | undefined;\n  selectionEnd: number | undefined;\n}\n\nlet canInsertText: boolean | null = null;\n\nexport default function insertText(textarea: HTMLTextAreaElement, { text, selectionStart, selectionEnd }: SelectionRange) {\n  const originalSelectionStart = textarea.selectionStart;\n  const before = textarea.value.slice(0, originalSelectionStart);\n  const after = textarea.value.slice(textarea.selectionEnd);\n\n  if (canInsertText === null || canInsertText === true) {\n    textarea.contentEditable = 'true';\n    try {\n      canInsertText = document.execCommand('insertText', false, text);\n    } catch (error) {\n      canInsertText = false;\n    }\n    textarea.contentEditable = 'false';\n  }\n\n  if (canInsertText && !textarea.value.slice(0, textarea.selectionStart).endsWith(text)) {\n    canInsertText = false;\n  }\n\n  if (!canInsertText) {\n    textarea.value = before + text + after;\n    textarea.dispatchEvent(new CustomEvent('input', { bubbles: true, cancelable: true }));\n  }\n\n  if (selectionStart != null && selectionEnd != null) {\n    textarea.setSelectionRange(selectionStart, selectionEnd);\n  } else {\n    textarea.setSelectionRange(originalSelectionStart, textarea.selectionEnd);\n  }\n}\n","import getCaretCoordinates from 'textarea-caret';\nimport insertText from './insertText';\nimport ItemList from './ItemList';\nimport type EditorDriverInterface from './EditorDriverInterface';\nimport { type EditorDriverParams } from './EditorDriverInterface';\n\nexport default class BasicEditorDriver implements EditorDriverInterface {\n  el: HTMLTextAreaElement;\n\n  constructor(dom: HTMLElement, params: EditorDriverParams) {\n    this.el = document.createElement('textarea');\n\n    this.build(dom, params);\n  }\n\n  protected build(dom: HTMLElement, params: EditorDriverParams) {\n    this.el.className = params.classNames.join(' ');\n    this.el.disabled = params.disabled;\n    this.el.placeholder = params.placeholder;\n    this.el.value = params.value;\n\n    const callInputListeners = (e: Event) => {\n      params.inputListeners.forEach((listener) => {\n        listener();\n      });\n\n      e.redraw = false;\n    };\n\n    this.el.oninput = (e) => {\n      params.oninput(this.el.value);\n      callInputListeners(e);\n    };\n\n    this.el.onclick = callInputListeners;\n    this.el.onkeyup = callInputListeners;\n\n    this.el.addEventListener('keydown', (e) => {\n      this.keyHandlers(params)\n        .toArray()\n        .forEach((handler) => handler(e));\n    });\n\n    dom.append(this.el);\n  }\n\n  protected keyHandlers(params: EditorDriverParams) {\n    const items = new ItemList<(e: KeyboardEvent) => void>();\n\n    items.add('submit', function (e: KeyboardEvent) {\n      if ((e.metaKey || e.ctrlKey) && e.key === 'Enter') {\n        params.onsubmit();\n      }\n    });\n\n    return items;\n  }\n\n  moveCursorTo(position: number) {\n    this.setSelectionRange(position, position);\n  }\n\n  getSelectionRange(): Array<number> {\n    return [this.el.selectionStart, this.el.selectionEnd];\n  }\n\n  getLastNChars(n: number): string {\n    const value = this.el.value;\n\n    return value.slice(Math.max(0, this.el.selectionStart - n), this.el.selectionStart);\n  }\n\n  insertAtCursor(text: string) {\n    this.insertAt(this.el.selectionStart, text);\n  }\n\n  insertAt(pos: number, text: string) {\n    this.insertBetween(pos, pos, text);\n  }\n\n  insertBetween(selectionStart: number, selectionEnd: number, text: string) {\n    this.setSelectionRange(selectionStart, selectionEnd);\n\n    const cursorPos = selectionStart + text.length;\n    insertText(this.el, { text, selectionStart: cursorPos, selectionEnd: cursorPos });\n  }\n\n  replaceBeforeCursor(start: number, text: string) {\n    this.insertBetween(start, this.el.selectionStart, text);\n  }\n\n  protected setSelectionRange(start: number, end: number) {\n    this.el.setSelectionRange(start, end);\n    this.focus();\n  }\n\n  getCaretCoordinates(position: number) {\n    const relCoords = getCaretCoordinates(this.el, position);\n\n    return {\n      top: relCoords.top - this.el.scrollTop,\n      left: relCoords.left,\n    };\n  }\n\n  // DOM Interactions\n\n  /**\n   * Set the disabled status of the editor.\n   */\n  disabled(disabled: boolean) {\n    this.el.disabled = disabled;\n  }\n\n  /**\n   * Focus on the editor.\n   */\n  focus() {\n    this.el.focus();\n  }\n\n  /**\n   * Destroy the editor\n   */\n  destroy() {\n    this.el.remove();\n  }\n}\n","import Component from '../Component';\nimport type Mithril from 'mithril';\nimport classList from '../utils/classList';\nimport extractText from '../utils/extractText';\n\nexport interface TooltipAttrs extends Mithril.CommonAttributes<TooltipAttrs, Tooltip> {\n  /**\n   * Tooltip textual content.\n   *\n   * String arrays, like those provided by the translator, will be flattened\n   * into strings.\n   */\n  text: string | string[];\n  /**\n   * Use to manually show or hide the tooltip. `undefined` will show based on cursor events.\n   *\n   * Default: `undefined`.\n   */\n  tooltipVisible?: boolean;\n  /**\n   * Whether to show on focus.\n   *\n   * Default: `true`.\n   */\n  showOnFocus?: boolean;\n  /**\n   * Tooltip position around element.\n   *\n   * Default: `'top'`.\n   */\n  position?: 'top' | 'bottom' | 'left' | 'right';\n  /**\n   * Whether HTML content is allowed in the tooltip.\n   *\n   * **Warning:** this is a possible XSS attack vector. This option shouldn't\n   * be used wherever possible, and may not work when we migrate to another\n   * tooltip library. Be prepared for this to break in Flarum stable.\n   *\n   * Default: `false`.\n   *\n   * @deprecated\n   */\n  html?: boolean;\n  /**\n   * Sets the delay between a trigger state occurring and the tooltip appearing\n   * on-screen.\n   *\n   * **Warning:** this option may be removed when switching to another tooltip\n   * library. Be prepared for this to break in Flarum stable.\n   *\n   * Default: `0`.\n   *\n   * @deprecated\n   */\n  delay?: number;\n  /**\n   * Used to disable the warning for passing text to the `title` attribute.\n   *\n   * Tooltip text should be passed to the `text` attribute.\n   */\n  ignoreTitleWarning?: boolean;\n}\n\n/**\n * The `Tooltip` component is used to create a tooltip for an element. It\n * requires a single child element to be passed to it. Passing multiple\n * children or fragments will throw an error.\n *\n * You should use this for any tooltips you create to allow for backwards\n * compatibility when we switch to another tooltip library instead of\n * Bootstrap tooltips.\n *\n * If you need to pass multiple children, surround them with another element,\n * such as a `<span>` or `<div>`.\n *\n * **Note:** this component will overwrite the `title` attribute of the first\n * child you pass to it, as this is how the current tooltip system works in\n * Flarum. This shouldn't be an issue if you're using this component correctly.\n *\n * @example <caption>Basic usage</caption>\n *          <Tooltip text=\"You wish!\">\n *            <Button>\n *              Click for free money!\n *            </Button>\n *          </Tooltip>\n *\n * @example <caption>Use of `position` and `showOnFocus` attrs</caption>\n *          <Tooltip text=\"Woah! That's cool!\" position=\"bottom\" showOnFocus>\n *            <span>3 replies</span>\n *          </Tooltip>\n *\n * @example <caption>Incorrect usage</caption>\n *          // This is wrong! Surround the children with a <span> or similar.\n *          <Tooltip text=\"This won't work\">\n *            Click\n *            <a href=\"/\">here</a>\n *          </Tooltip>\n */\nexport default class Tooltip extends Component<TooltipAttrs> {\n  private firstChild: Mithril.Vnode<any, any> | null = null;\n  private childDomNode: HTMLElement | null = null;\n\n  private oldText: string = '';\n  private oldVisibility: boolean | undefined;\n\n  private shouldRecreateTooltip: boolean = false;\n  private shouldChangeTooltipVisibility: boolean = false;\n\n  view(vnode: Mithril.Vnode<TooltipAttrs, this>) {\n    /**\n     * We know this will be a ChildArray and not a primitive as this\n     * vnode is a component, not a text or trusted HTML vnode.\n     */\n    const children = vnode.children as Mithril.ChildArray | undefined;\n\n    // We remove these to get the remaining attrs to pass to the DOM element\n    const { text, tooltipVisible, showOnFocus = true, position = 'top', ignoreTitleWarning = false, html = false, delay = 0, ...attrs } = this.attrs;\n\n    if ((this.attrs as any).title && !ignoreTitleWarning) {\n      console.warn(\n        '`title` attribute was passed to Tooltip component. Was this intentional? Tooltip content should be passed to the `text` attr instead.'\n      );\n    }\n\n    const realText = this.getRealText();\n\n    // We need to recreate the tooltip if the text has changed\n    if (realText !== this.oldText) {\n      this.oldText = realText;\n      this.shouldRecreateTooltip = true;\n    }\n\n    if (tooltipVisible !== this.oldVisibility) {\n      this.oldVisibility = this.attrs.tooltipVisible;\n      this.shouldChangeTooltipVisibility = true;\n    }\n\n    // We'll try our best to detect any issues created by devs before they cause any weird effects.\n    // Throwing an error will prevent the forum rendering, but will be better at alerting devs to\n    // an issue.\n\n    if (typeof children === 'undefined') {\n      throw new Error(\n        `Tooltip component was provided with no direct child DOM element. Tooltips must contain a single direct DOM node to attach to.`\n      );\n    }\n\n    if (children.length !== 1) {\n      throw new Error(\n        `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>.`\n      );\n    }\n\n    const firstChild = children[0];\n\n    if (typeof firstChild !== 'object' || Array.isArray(firstChild) || firstChild === null) {\n      throw new Error(\n        `Tooltip component was provided with no direct child DOM element. Tooltips must contain a single direct DOM node to attach to.`\n      );\n    }\n\n    if (typeof firstChild.tag === 'string' && ['#', '[', '<'].includes(firstChild.tag)) {\n      throw new Error(\n        `Tooltip component with provided with a vnode with tag \"${firstChild.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>.`\n      );\n    }\n\n    this.firstChild = firstChild;\n\n    return children;\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<TooltipAttrs, this>) {\n    super.oncreate(vnode);\n\n    this.checkDomNodeChanged();\n    this.recreateTooltip();\n  }\n\n  onupdate(vnode: Mithril.VnodeDOM<TooltipAttrs, this>) {\n    super.onupdate(vnode);\n\n    this.checkDomNodeChanged();\n    this.recreateTooltip();\n  }\n\n  private recreateTooltip() {\n    if (this.shouldRecreateTooltip && this.childDomNode !== null) {\n      $(this.childDomNode).tooltip(\n        'destroy',\n        // @ts-expect-error We don't want this arg to be part of the public API. It only exists to prevent deprecation warnings when using `$.tooltip` in this component.\n        'DANGEROUS_tooltip_jquery_fn_deprecation_exempt'\n      );\n      this.createTooltip();\n      this.shouldRecreateTooltip = false;\n    }\n\n    if (this.shouldChangeTooltipVisibility) {\n      this.shouldChangeTooltipVisibility = false;\n      this.updateVisibility();\n    }\n  }\n\n  private updateVisibility() {\n    if (this.childDomNode === null) return;\n\n    if (this.attrs.tooltipVisible === true) {\n      $(this.childDomNode).tooltip(\n        'show',\n        // @ts-expect-error We don't want this arg to be part of the public API. It only exists to prevent deprecation warnings when using `$.tooltip` in this component.\n        'DANGEROUS_tooltip_jquery_fn_deprecation_exempt'\n      );\n    } else if (this.attrs.tooltipVisible === false) {\n      $(this.childDomNode).tooltip(\n        'hide',\n        // @ts-expect-error We don't want this arg to be part of the public API. It only exists to prevent deprecation warnings when using `$.tooltip` in this component.\n        'DANGEROUS_tooltip_jquery_fn_deprecation_exempt'\n      );\n    }\n  }\n\n  private createTooltip() {\n    if (this.childDomNode === null) return;\n\n    const {\n      showOnFocus = true,\n      position = 'top',\n      delay,\n      // This will have no effect when switching to CSS tooltips\n      html = false,\n      tooltipVisible,\n      text,\n    } = this.attrs;\n\n    // Fancy \"hack\" to assemble the trigger string\n    const trigger = typeof tooltipVisible === 'boolean' ? 'manual' : classList('hover', [showOnFocus && 'focus']);\n\n    const realText = this.getRealText();\n    this.childDomNode.setAttribute('title', realText);\n    this.childDomNode.setAttribute('aria-label', realText);\n\n    // https://getbootstrap.com/docs/3.3/javascript/#tooltips-options\n    $(this.childDomNode).tooltip(\n      {\n        html,\n        delay,\n        placement: position,\n        trigger,\n      },\n      // @ts-expect-error We don't want this arg to be part of the public API. It only exists to prevent deprecation warnings when using `$.tooltip` in this component.\n      'DANGEROUS_tooltip_jquery_fn_deprecation_exempt'\n    );\n  }\n\n  private getRealText(): string {\n    const { text } = this.attrs;\n\n    return Array.isArray(text) ? extractText(text) : text;\n  }\n\n  /**\n   * Checks if the tooltip DOM node has changed.\n   *\n   * If it has, it updates `this.childDomNode` to the new node, and sets\n   * `shouldRecreateTooltip` to `true`.\n   */\n  private checkDomNodeChanged() {\n    const domNode = (this.firstChild as Mithril.VnodeDOM<any, any>).dom as HTMLElement;\n\n    if (domNode && !domNode.isSameNode(this.childDomNode)) {\n      this.childDomNode = domNode;\n      this.shouldRecreateTooltip = true;\n    }\n  }\n}\n","import app from '../../common/app';\n\nimport Component from '../Component';\nimport ItemList from '../utils/ItemList';\nimport listItems from '../helpers/listItems';\nimport Button from './Button';\n\nimport BasicEditorDriver from '../utils/BasicEditorDriver';\nimport Tooltip from './Tooltip';\n\n/**\n * The `TextEditor` component displays a textarea with controls, including a\n * submit button.\n *\n * ### Attrs\n *\n * - `composer`\n * - `submitLabel`\n * - `value`\n * - `placeholder`\n * - `disabled`\n * - `preview`\n */\nexport default class TextEditor extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * The value of the editor.\n     *\n     * @type {String}\n     */\n    this.value = this.attrs.value || '';\n\n    /**\n     * Whether the editor is disabled.\n     */\n    this.disabled = !!this.attrs.disabled;\n  }\n\n  view() {\n    return (\n      <div className=\"TextEditor\">\n        <div className=\"TextEditor-editorContainer\"></div>\n\n        <ul className=\"TextEditor-controls Composer-footer\">\n          {listItems(this.controlItems().toArray())}\n          <li className=\"TextEditor-toolbar\">{this.toolbarItems().toArray()}</li>\n        </ul>\n      </div>\n    );\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.attrs.composer.editor = this.buildEditor(this.$('.TextEditor-editorContainer')[0]);\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    const newDisabled = !!this.attrs.disabled;\n\n    if (this.disabled !== newDisabled) {\n      this.disabled = newDisabled;\n      this.attrs.composer.editor.disabled(newDisabled);\n    }\n  }\n\n  buildEditorParams() {\n    return {\n      classNames: ['FormControl', 'Composer-flexible', 'TextEditor-editor'],\n      disabled: this.disabled,\n      placeholder: this.attrs.placeholder || '',\n      value: this.value,\n      oninput: this.oninput.bind(this),\n      inputListeners: [],\n      onsubmit: () => {\n        this.onsubmit();\n        m.redraw();\n      },\n    };\n  }\n\n  buildEditor(dom) {\n    return new BasicEditorDriver(dom, this.buildEditorParams());\n  }\n\n  /**\n   * Build an item list for the text editor controls.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controlItems() {\n    const items = new ItemList();\n\n    items.add(\n      'submit',\n      <Button icon=\"fas fa-paper-plane\" className=\"Button Button--primary\" itemClassName=\"App-primaryControl\" onclick={this.onsubmit.bind(this)}>\n        {this.attrs.submitLabel}\n      </Button>\n    );\n\n    if (this.attrs.preview) {\n      items.add(\n        'preview',\n        <Tooltip text={app.translator.trans('core.forum.composer.preview_tooltip')}>\n          <Button icon=\"far fa-eye\" className=\"Button Button--icon\" onclick={this.attrs.preview} />\n        </Tooltip>\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the toolbar controls.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  toolbarItems() {\n    return new ItemList();\n  }\n\n  /**\n   * Handle input into the textarea.\n   *\n   * @param {string} value\n   */\n  oninput(value) {\n    this.value = value;\n\n    this.attrs.onchange(this.value);\n  }\n\n  /**\n   * Handle the submit button being clicked.\n   */\n  onsubmit() {\n    this.attrs.onsubmit(this.value);\n  }\n}\n","import Component from '../../common/Component';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport ConfirmDocumentUnload from '../../common/components/ConfirmDocumentUnload';\nimport TextEditor from '../../common/components/TextEditor';\nimport avatar from '../../common/helpers/avatar';\nimport listItems from '../../common/helpers/listItems';\nimport ItemList from '../../common/utils/ItemList';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `ComposerBody` component handles the body, or the content, of the\n * composer. Subclasses should implement the `onsubmit` method and override\n * `headerTimes`.\n *\n * ### Attrs\n *\n * - `composer`\n * - `originalContent`\n * - `submitLabel`\n * - `placeholder`\n * - `user`\n * - `confirmExit`\n * - `disabled`\n *\n * @abstract\n */\nexport default class ComposerBody extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.composer = this.attrs.composer;\n\n    /**\n     * Whether or not the component is loading.\n     *\n     * @type {Boolean}\n     */\n    this.loading = false;\n\n    // Let the composer state know to ask for confirmation under certain\n    // circumstances, if the body supports / requires it and has a corresponding\n    // confirmation question to ask.\n    if (this.attrs.confirmExit) {\n      this.composer.preventClosingWhen(() => this.hasChanges(), this.attrs.confirmExit);\n    }\n\n    this.composer.fields.content(this.attrs.originalContent || '');\n  }\n\n  view() {\n    return (\n      <ConfirmDocumentUnload when={this.hasChanges.bind(this)}>\n        <div className={classList('ComposerBody', this.attrs.className)}>\n          {avatar(this.attrs.user, { className: 'ComposerBody-avatar' })}\n          <div className=\"ComposerBody-content\">\n            <ul className=\"ComposerBody-header\">{listItems(this.headerItems().toArray())}</ul>\n            <div className=\"ComposerBody-editor\">\n              <TextEditor\n                submitLabel={this.attrs.submitLabel}\n                placeholder={this.attrs.placeholder}\n                disabled={this.loading || this.attrs.disabled}\n                composer={this.composer}\n                preview={this.jumpToPreview?.bind(this)}\n                onchange={this.composer.fields.content}\n                onsubmit={this.onsubmit.bind(this)}\n                value={this.composer.fields.content()}\n              />\n            </div>\n          </div>\n          <LoadingIndicator display=\"unset\" containerClassName={classList('ComposerBody-loading', this.loading && 'active')} size=\"large\" />\n        </div>\n      </ConfirmDocumentUnload>\n    );\n  }\n\n  /**\n   * Check if there is any unsaved data.\n   *\n   * @return {boolean}\n   */\n  hasChanges() {\n    const content = this.composer.fields.content();\n\n    return content && content !== this.attrs.originalContent;\n  }\n\n  /**\n   * Build an item list for the composer's header.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  headerItems() {\n    return new ItemList();\n  }\n\n  /**\n   * Handle the submit event of the text editor.\n   *\n   * @abstract\n   */\n  onsubmit() {}\n\n  /**\n   * Stop loading.\n   */\n  loaded() {\n    this.loading = false;\n    m.redraw();\n  }\n}\n","import app from '../../forum/app';\nimport ComposerBody from './ComposerBody';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport icon from '../../common/helpers/icon';\nimport extractText from '../../common/utils/extractText';\n\nfunction minimizeComposerIfFullScreen(e) {\n  if (app.composer.isFullScreen()) {\n    app.composer.minimize();\n    e.stopPropagation();\n  }\n}\n\n/**\n * The `ReplyComposer` component displays the composer content for replying to a\n * discussion.\n *\n * ### Attrs\n *\n * - All of the attrs of ComposerBody\n * - `discussion`\n */\nexport default class ReplyComposer extends ComposerBody {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.placeholder = attrs.placeholder || extractText(app.translator.trans('core.forum.composer_reply.body_placeholder'));\n    attrs.submitLabel = attrs.submitLabel || app.translator.trans('core.forum.composer_reply.submit_button');\n    attrs.confirmExit = attrs.confirmExit || extractText(app.translator.trans('core.forum.composer_reply.discard_confirmation'));\n  }\n\n  headerItems() {\n    const items = super.headerItems();\n    const discussion = this.attrs.discussion;\n\n    items.add(\n      'title',\n      <h3>\n        {icon('fas fa-reply')}{' '}\n        <Link href={app.route.discussion(discussion)} onclick={minimizeComposerIfFullScreen}>\n          {discussion.title()}\n        </Link>\n      </h3>\n    );\n\n    return items;\n  }\n\n  /**\n   * Jump to the preview when triggered by the text editor.\n   */\n  jumpToPreview(e) {\n    minimizeComposerIfFullScreen(e);\n\n    m.route.set(app.route.discussion(this.attrs.discussion, 'reply'));\n  }\n\n  /**\n   * Get the data to submit to the server when the reply is saved.\n   *\n   * @return {Record<string, unknown>}\n   */\n  data() {\n    return {\n      content: this.composer.fields.content(),\n      relationships: { discussion: this.attrs.discussion },\n    };\n  }\n\n  onsubmit() {\n    const discussion = this.attrs.discussion;\n\n    this.loading = true;\n    m.redraw();\n\n    const data = this.data();\n\n    app.store\n      .createRecord('posts')\n      .save(data)\n      .then((post) => {\n        // If we're currently viewing the discussion which this reply was made\n        // in, then we can update the post stream and scroll to the post.\n        if (app.viewingDiscussion(discussion)) {\n          const stream = app.current.get('stream');\n          stream.update().then(() => stream.goToNumber(post.number()));\n        } else {\n          // Otherwise, we'll create an alert message to inform the user that\n          // their reply has been posted, containing a button which will\n          // transition to their new post when clicked.\n          let alert;\n          const viewButton = (\n            <Button\n              className=\"Button Button--link\"\n              onclick={() => {\n                m.route.set(app.route.post(post));\n                app.alerts.dismiss(alert);\n              }}\n            >\n              {app.translator.trans('core.forum.composer_reply.view_button')}\n            </Button>\n          );\n          alert = app.alerts.show(\n            {\n              type: 'success',\n              controls: [viewButton],\n            },\n            app.translator.trans('core.forum.composer_reply.posted_message')\n          );\n        }\n\n        this.composer.hide();\n      }, this.loaded.bind(this));\n  }\n}\n","import Component, { ComponentAttrs } from '../Component';\nimport Button from './Button';\nimport listItems from '../helpers/listItems';\nimport extract from '../utils/extract';\nimport type Mithril from 'mithril';\nimport classList from '../utils/classList';\nimport app from '../app';\nimport iconHelper from '../helpers/icon';\n\nexport interface AlertAttrs extends ComponentAttrs {\n  /** The type of alert this is. Will be used to give the alert a class name of `Alert--{type}`. */\n  type?: string;\n  /** Title of the alert. Optional. */\n  title?: Mithril.Children;\n  /** Icon used next to the title. Optional. */\n  icon?: string;\n  /** An array of controls to show in the alert. */\n  controls?: Mithril.Children;\n  /** Whether or not the alert can be dismissed. */\n  dismissible?: boolean;\n  /** A callback to run when the alert is dismissed */\n  ondismiss?: Function;\n}\n\n/**\n * The `Alert` component represents an alert box, which contains a message,\n * some controls, and may be dismissible.\n */\nexport default class Alert<T extends AlertAttrs = AlertAttrs> extends Component<T> {\n  view(vnode: Mithril.VnodeDOM<T, this>) {\n    const attrs = Object.assign({}, this.attrs);\n\n    const type = extract(attrs, 'type');\n    attrs.className = classList('Alert', `Alert--${type}`, attrs.className);\n\n    const title = extract(attrs, 'title');\n    const icon = extract(attrs, 'icon');\n    const content = extract(attrs, 'content') || vnode.children;\n    const controls = (extract(attrs, 'controls') || []) as Mithril.Vnode[];\n\n    // If the alert is meant to be dismissible (which is the case by default),\n    // then we will create a dismiss button to append as the final control in\n    // the alert.\n    const dismissible = extract(attrs, 'dismissible');\n    const ondismiss = extract(attrs, 'ondismiss');\n    const dismissControl: Mithril.Vnode[] = [];\n\n    if (dismissible || dismissible === undefined) {\n      dismissControl.push(\n        <Button\n          aria-label={app.translator.trans('core.lib.alert.dismiss_a11y_label')}\n          icon=\"fas fa-times\"\n          className=\"Button Button--link Button--icon Alert-dismiss\"\n          onclick={ondismiss}\n        />\n      );\n    }\n\n    return (\n      <div {...attrs}>\n        {!!title && (\n          <div className=\"Alert-title\">\n            {!!icon && <span className=\"Alert-title-icon\">{iconHelper(icon)}</span>}\n            <span className=\"Alert-title-text\">{title}</span>\n          </div>\n        )}\n        <span className=\"Alert-body\">{content}</span>\n        <ul className=\"Alert-controls\">{listItems(controls.concat(dismissControl))}</ul>\n      </div>\n    );\n  }\n}\n","import app from '../../common/app';\nimport Component from '../Component';\nimport Alert, { AlertAttrs } from './Alert';\nimport Button from './Button';\n\nimport type Mithril from 'mithril';\nimport type ModalManagerState from '../states/ModalManagerState';\nimport type RequestError from '../utils/RequestError';\nimport type ModalManager from './ModalManager';\nimport fireDebugWarning from '../helpers/fireDebugWarning';\nimport classList from '../utils/classList';\n\nexport interface IInternalModalAttrs {\n  state: ModalManagerState;\n  animateShow: ModalManager['animateShow'];\n  animateHide: ModalManager['animateHide'];\n}\n\nexport interface IDismissibleOptions {\n  /**\n   * @deprecated Check specific individual attributes instead. Will be removed in Flarum 2.0.\n   */\n  isDismissible: boolean;\n  viaCloseButton: boolean;\n  viaEscKey: boolean;\n  viaBackdropClick: boolean;\n}\n\n/**\n * The `Modal` component displays a modal dialog, wrapped in a form. Subclasses\n * should implement the `className`, `title`, and `content` methods.\n */\nexport default abstract class Modal<ModalAttrs extends IInternalModalAttrs = IInternalModalAttrs, CustomState = undefined> extends Component<\n  ModalAttrs,\n  CustomState\n> {\n  // TODO: [Flarum 2.0] remove `isDismissible` static attribute\n  /**\n   * Determine whether or not the modal should be dismissible via an 'x' button.\n   *\n   * @deprecated Use the individual `isDismissibleVia...` attributes instead and remove references to this.\n   */\n  static readonly isDismissible: boolean = true;\n\n  /**\n   * Can the model be dismissed with a close button (X)?\n   *\n   * If `false`, no close button is shown.\n   */\n  protected static readonly isDismissibleViaCloseButton: boolean = true;\n  /**\n   * Can the modal be dismissed by pressing the Esc key on a keyboard?\n   */\n  protected static readonly isDismissibleViaEscKey: boolean = true;\n  /**\n   * Can the modal be dismissed via a click on the backdrop.\n   */\n  protected static readonly isDismissibleViaBackdropClick: boolean = true;\n\n  static get dismissibleOptions(): IDismissibleOptions {\n    // If someone sets this to `false`, provide the same behaviour as previous versions of Flarum.\n    if (!this.isDismissible) {\n      return {\n        isDismissible: false,\n        viaCloseButton: false,\n        viaEscKey: false,\n        viaBackdropClick: false,\n      };\n    }\n\n    return {\n      isDismissible: true,\n      viaCloseButton: this.isDismissibleViaCloseButton,\n      viaEscKey: this.isDismissibleViaEscKey,\n      viaBackdropClick: this.isDismissibleViaBackdropClick,\n    };\n  }\n\n  protected loading: boolean = false;\n\n  /**\n   * Attributes for an alert component to show below the header.\n   */\n  alertAttrs: AlertAttrs | null = null;\n\n  oninit(vnode: Mithril.Vnode<ModalAttrs, this>) {\n    super.oninit(vnode);\n\n    // TODO: [Flarum 2.0] Remove the code below.\n    // This code prevents extensions which do not implement all abstract methods of this class from breaking\n    // the forum frontend. Without it, function calls would would error rather than returning `undefined.`\n\n    const missingMethods: string[] = [];\n\n    ['className', 'title', 'content', 'onsubmit'].forEach((method) => {\n      if (!(this as any)[method]) {\n        (this as any)[method] = function (): void {};\n        missingMethods.push(method);\n      }\n    });\n\n    if (missingMethods.length > 0) {\n      fireDebugWarning(\n        `Modal \\`${this.constructor.name}\\` does not implement all abstract methods of the Modal super class. Missing methods: ${missingMethods.join(\n          ', '\n        )}.`\n      );\n    }\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<ModalAttrs, this>) {\n    super.oncreate(vnode);\n\n    this.attrs.animateShow(() => this.onready());\n  }\n\n  onbeforeremove(vnode: Mithril.VnodeDOM<ModalAttrs, this>): Promise<void> | void {\n    super.onbeforeremove(vnode);\n\n    // If the global modal state currently contains a modal,\n    // we've just opened up a new one, and accordingly,\n    // we don't need to show a hide animation.\n    if (!this.attrs.state.modal) {\n      // Here, we ensure that the animation has time to complete.\n      // See https://mithril.js.org/lifecycle-methods.html#onbeforeremove\n      // Bootstrap's Modal.TRANSITION_DURATION is 300 ms.\n      return new Promise((resolve) => setTimeout(resolve, 300));\n    }\n  }\n\n  /**\n   * @todo split into FormModal and Modal in 2.0\n   */\n  view() {\n    if (this.alertAttrs) {\n      this.alertAttrs.dismissible = false;\n    }\n\n    return (\n      <div className={classList('Modal modal-dialog fade', this.className())}>\n        <div className=\"Modal-content\">\n          {this.dismissibleOptions.viaCloseButton && (\n            <div className=\"Modal-close App-backControl\">\n              <Button\n                icon=\"fas fa-times\"\n                onclick={() => this.hide()}\n                className=\"Button Button--icon Button--link\"\n                aria-label={app.translator.trans('core.lib.modal.close')}\n              />\n            </div>\n          )}\n\n          <form onsubmit={this.onsubmit.bind(this)}>\n            <div className=\"Modal-header\">\n              <h3 className=\"App-titleControl App-titleControl--text\">{this.title()}</h3>\n            </div>\n\n            {!!this.alertAttrs && (\n              <div className=\"Modal-alert\">\n                <Alert {...this.alertAttrs} />\n              </div>\n            )}\n\n            {this.content()}\n          </form>\n        </div>\n      </div>\n    );\n  }\n\n  /**\n   * Get the class name to apply to the modal.\n   */\n  abstract className(): string;\n\n  /**\n   * Get the title of the modal dialog.\n   */\n  abstract title(): Mithril.Children;\n\n  /**\n   * Get the content of the modal.\n   */\n  abstract content(): Mithril.Children;\n\n  /**\n   * Handle the modal form's submit event.\n   */\n  onsubmit(e: SubmitEvent): void {\n    // ...\n  }\n\n  /**\n   * Callback executed when the modal is shown and ready to be interacted with.\n   *\n   * @remark Focuses the first input in the modal.\n   */\n  onready(): void {\n    this.$().find('input, select, textarea').first().trigger('focus').trigger('select');\n  }\n\n  /**\n   * Hides the modal.\n   */\n  hide(): void {\n    this.attrs.animateHide();\n  }\n\n  /**\n   * Sets `loading` to false and triggers a redraw.\n   */\n  loaded(): void {\n    this.loading = false;\n    m.redraw();\n  }\n\n  /**\n   * Shows an alert describing an error returned from the API, and gives focus to\n   * the first relevant field involved in the error.\n   */\n  onerror(error: RequestError): void {\n    this.alertAttrs = error.alert;\n\n    m.redraw();\n\n    if (error.status === 422 && error.response?.errors) {\n      this.$('form [name=' + (error.response.errors as any[])[0].source.pointer.replace('/data/attributes/', '') + ']').trigger('select');\n    } else {\n      this.onready();\n    }\n  }\n\n  private get dismissibleOptions(): IDismissibleOptions {\n    return (this.constructor as typeof Modal).dismissibleOptions;\n  }\n}\n","import Stream from 'mithril/stream';\n\nexport default Stream;\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport extractText from '../../common/utils/extractText';\nimport Stream from '../../common/utils/Stream';\nimport Mithril from 'mithril';\nimport RequestError from '../../common/utils/RequestError';\nimport ItemList from '../../common/utils/ItemList';\n\nexport interface IForgotPasswordModalAttrs extends IInternalModalAttrs {\n  email?: string;\n}\n\n/**\n * The `ForgotPasswordModal` component displays a modal which allows the user to\n * enter their email address and request a link to reset their password.\n */\nexport default class ForgotPasswordModal<CustomAttrs extends IForgotPasswordModalAttrs = IForgotPasswordModalAttrs> extends Modal<CustomAttrs> {\n  /**\n   * The value of the email input.\n   */\n  email!: Stream<string>;\n\n  success: boolean = false;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.email = Stream(this.attrs.email || '');\n  }\n\n  className() {\n    return 'ForgotPasswordModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.forgot_password.title');\n  }\n\n  content() {\n    if (this.success) {\n      return (\n        <div className=\"Modal-body\">\n          <div className=\"Form Form--centered\">\n            <p className=\"helpText\">{app.translator.trans('core.forum.forgot_password.email_sent_message')}</p>\n            <div className=\"Form-group\">\n              <Button className=\"Button Button--primary Button--block\" onclick={this.hide.bind(this)}>\n                {app.translator.trans('core.forum.forgot_password.dismiss_button')}\n              </Button>\n            </div>\n          </div>\n        </div>\n      );\n    }\n\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">\n          <p className=\"helpText\">{app.translator.trans('core.forum.forgot_password.text')}</p>\n          {this.fields().toArray()}\n        </div>\n      </div>\n    );\n  }\n\n  fields() {\n    const items = new ItemList();\n\n    const emailLabel = extractText(app.translator.trans('core.forum.forgot_password.email_placeholder'));\n\n    items.add(\n      'email',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"email\"\n          type=\"email\"\n          placeholder={emailLabel}\n          aria-label={emailLabel}\n          bidi={this.email}\n          disabled={this.loading}\n        />\n      </div>,\n      50\n    );\n\n    items.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.forum.forgot_password.submit_button')}\n        </Button>\n      </div>,\n      -10\n    );\n\n    return items;\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    app\n      .request({\n        method: 'POST',\n        url: app.forum.attribute('apiUrl') + '/forgot',\n        body: this.requestParams(),\n        errorHandler: this.onerror.bind(this),\n      })\n      .then(() => {\n        this.success = true;\n        this.alertAttrs = null;\n      })\n      .catch(() => {})\n      .then(this.loaded.bind(this));\n  }\n\n  requestParams(): Record<string, unknown> {\n    const data = {\n      email: this.email(),\n    };\n\n    return data;\n  }\n\n  onerror(error: RequestError) {\n    if (error.status === 404 && error.alert) {\n      error.alert.content = app.translator.trans('core.forum.forgot_password.not_found_message');\n    }\n\n    super.onerror(error);\n  }\n}\n","import Component from '../../common/Component';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `LogInButtons` component displays a collection of social login buttons.\n */\nexport default class LogInButtons extends Component {\n  view() {\n    return <div className=\"LogInButtons\">{this.items().toArray()}</div>;\n  }\n\n  /**\n   * Build a list of LogInButton components.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  items() {\n    return new ItemList();\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport LogInModal from './LogInModal';\nimport Button from '../../common/components/Button';\nimport LogInButtons from './LogInButtons';\nimport extractText from '../../common/utils/extractText';\nimport ItemList from '../../common/utils/ItemList';\nimport Stream from '../../common/utils/Stream';\nimport type Mithril from 'mithril';\n\nexport interface ISignupModalAttrs extends IInternalModalAttrs {\n  username?: string;\n  email?: string;\n  password?: string;\n  token?: string;\n  provided?: string[];\n}\n\nexport type SignupBody = {\n  username: string;\n  email: string;\n} & ({ token: string } | { password: string });\n\nexport default class SignUpModal<CustomAttrs extends ISignupModalAttrs = ISignupModalAttrs> extends Modal<CustomAttrs> {\n  /**\n   * The value of the username input.\n   */\n  username!: Stream<string>;\n\n  /**\n   * The value of the email input.\n   */\n  email!: Stream<string>;\n\n  /**\n   * The value of the password input.\n   */\n  password!: Stream<string>;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.username = Stream(this.attrs.username || '');\n    this.email = Stream(this.attrs.email || '');\n    this.password = Stream(this.attrs.password || '');\n  }\n\n  className() {\n    return 'Modal--small SignUpModal';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.sign_up.title');\n  }\n\n  content() {\n    return [<div className=\"Modal-body\">{this.body()}</div>, <div className=\"Modal-footer\">{this.footer()}</div>];\n  }\n\n  isProvided(field: string): boolean {\n    return this.attrs.provided?.includes(field) ?? false;\n  }\n\n  body() {\n    return [!this.attrs.token && <LogInButtons />, <div className=\"Form Form--centered\">{this.fields().toArray()}</div>];\n  }\n\n  fields() {\n    const items = new ItemList();\n\n    const usernameLabel = extractText(app.translator.trans('core.forum.sign_up.username_placeholder'));\n    const emailLabel = extractText(app.translator.trans('core.forum.sign_up.email_placeholder'));\n    const passwordLabel = extractText(app.translator.trans('core.forum.sign_up.password_placeholder'));\n\n    items.add(\n      'username',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"username\"\n          type=\"text\"\n          placeholder={usernameLabel}\n          aria-label={usernameLabel}\n          bidi={this.username}\n          disabled={this.loading || this.isProvided('username')}\n        />\n      </div>,\n      30\n    );\n\n    items.add(\n      'email',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"email\"\n          type=\"email\"\n          placeholder={emailLabel}\n          aria-label={emailLabel}\n          bidi={this.email}\n          disabled={this.loading || this.isProvided('email')}\n        />\n      </div>,\n      20\n    );\n\n    if (!this.attrs.token) {\n      items.add(\n        'password',\n        <div className=\"Form-group\">\n          <input\n            className=\"FormControl\"\n            name=\"password\"\n            type=\"password\"\n            autocomplete=\"new-password\"\n            placeholder={passwordLabel}\n            aria-label={passwordLabel}\n            bidi={this.password}\n            disabled={this.loading}\n          />\n        </div>,\n        10\n      );\n    }\n\n    items.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.forum.sign_up.submit_button')}\n        </Button>\n      </div>,\n      -10\n    );\n\n    return items;\n  }\n\n  footer() {\n    return [\n      <p className=\"SignUpModal-logIn\">{app.translator.trans('core.forum.sign_up.log_in_text', { a: <a onclick={this.logIn.bind(this)} /> })}</p>,\n    ];\n  }\n\n  /**\n   * Open the log in modal, prefilling it with an email/username/password if\n   * the user has entered one.\n   */\n  logIn() {\n    const attrs = {\n      identification: this.email() || this.username(),\n    };\n\n    app.modal.show(LogInModal, attrs);\n  }\n\n  onready() {\n    if (this.attrs.username && !this.attrs.email) {\n      this.$('[name=email]').select();\n    } else {\n      this.$('[name=username]').select();\n    }\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    const body = this.submitData();\n\n    app\n      .request({\n        url: app.forum.attribute('baseUrl') + '/register',\n        method: 'POST',\n        body,\n        errorHandler: this.onerror.bind(this),\n      })\n      .then(() => window.location.reload(), this.loaded.bind(this));\n  }\n\n  /**\n   * Get the data that should be submitted in the sign-up request.\n   */\n  submitData(): SignupBody {\n    const authData = this.attrs.token ? { token: this.attrs.token } : { password: this.password() };\n\n    const data = {\n      username: this.username(),\n      email: this.email(),\n      ...authData,\n    };\n\n    return data;\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport ForgotPasswordModal from './ForgotPasswordModal';\nimport SignUpModal from './SignUpModal';\nimport Button from '../../common/components/Button';\nimport LogInButtons from './LogInButtons';\nimport extractText from '../../common/utils/extractText';\nimport ItemList from '../../common/utils/ItemList';\nimport Stream from '../../common/utils/Stream';\nimport type Mithril from 'mithril';\nimport RequestError from '../../common/utils/RequestError';\nimport type { LoginParams } from '../../common/Session';\n\nexport interface ILoginModalAttrs extends IInternalModalAttrs {\n  identification?: string;\n  password?: string;\n  remember?: boolean;\n}\n\nexport default class LogInModal<CustomAttrs extends ILoginModalAttrs = ILoginModalAttrs> extends Modal<CustomAttrs> {\n  /**\n   * The value of the identification input.\n   */\n  identification!: Stream<string>;\n  /**\n   * The value of the password input.\n   */\n  password!: Stream<string>;\n  /**\n   * The value of the remember me input.\n   */\n  remember!: Stream<boolean>;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.identification = Stream(this.attrs.identification || '');\n    this.password = Stream(this.attrs.password || '');\n    this.remember = Stream(!!this.attrs.remember);\n  }\n\n  className() {\n    return 'LogInModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.log_in.title');\n  }\n\n  content() {\n    return [<div className=\"Modal-body\">{this.body()}</div>, <div className=\"Modal-footer\">{this.footer()}</div>];\n  }\n\n  body() {\n    return [<LogInButtons />, <div className=\"Form Form--centered\">{this.fields().toArray()}</div>];\n  }\n\n  fields() {\n    const items = new ItemList();\n\n    const identificationLabel = extractText(app.translator.trans('core.forum.log_in.username_or_email_placeholder'));\n    const passwordLabel = extractText(app.translator.trans('core.forum.log_in.password_placeholder'));\n\n    items.add(\n      'identification',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"identification\"\n          type=\"text\"\n          placeholder={identificationLabel}\n          aria-label={identificationLabel}\n          bidi={this.identification}\n          disabled={this.loading}\n        />\n      </div>,\n      30\n    );\n\n    items.add(\n      'password',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"password\"\n          type=\"password\"\n          autocomplete=\"current-password\"\n          placeholder={passwordLabel}\n          aria-label={passwordLabel}\n          bidi={this.password}\n          disabled={this.loading}\n        />\n      </div>,\n      20\n    );\n\n    items.add(\n      'remember',\n      <div className=\"Form-group\">\n        <div>\n          <label className=\"checkbox\">\n            <input type=\"checkbox\" bidi={this.remember} disabled={this.loading} />\n            {app.translator.trans('core.forum.log_in.remember_me_label')}\n          </label>\n        </div>\n      </div>,\n      10\n    );\n\n    items.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.forum.log_in.submit_button')}\n        </Button>\n      </div>,\n      -10\n    );\n\n    return items;\n  }\n\n  footer() {\n    return (\n      <>\n        <p className=\"LogInModal-forgotPassword\">\n          <a onclick={this.forgotPassword.bind(this)}>{app.translator.trans('core.forum.log_in.forgot_password_link')}</a>\n        </p>\n        {app.forum.attribute<boolean>('allowSignUp') && (\n          <p className=\"LogInModal-signUp\">{app.translator.trans('core.forum.log_in.sign_up_text', { a: <a onclick={this.signUp.bind(this)} /> })}</p>\n        )}\n      </>\n    );\n  }\n\n  /**\n   * Open the forgot password modal, prefilling it with an email if the user has\n   * entered one.\n   */\n  forgotPassword() {\n    const email = this.identification();\n    const attrs = email.includes('@') ? { email } : undefined;\n\n    app.modal.show(ForgotPasswordModal, attrs);\n  }\n\n  /**\n   * Open the sign up modal, prefilling it with an email/username/password if\n   * the user has entered one.\n   */\n  signUp() {\n    const identification = this.identification();\n\n    const attrs = {\n      [identification.includes('@') ? 'email' : 'username']: identification,\n    };\n\n    app.modal.show(SignUpModal, attrs);\n  }\n\n  onready() {\n    this.$('[name=' + (this.identification() ? 'password' : 'identification') + ']').trigger('select');\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    app.session.login(this.loginParams(), { errorHandler: this.onerror.bind(this) }).then(() => window.location.reload(), this.loaded.bind(this));\n  }\n\n  loginParams(): LoginParams {\n    const data = {\n      identification: this.identification(),\n      password: this.password(),\n      remember: this.remember(),\n    };\n\n    return data;\n  }\n\n  onerror(error: RequestError) {\n    if (error.status === 401 && error.alert) {\n      error.alert.content = app.translator.trans('core.forum.log_in.invalid_login_message');\n      this.password('');\n    }\n\n    super.onerror(error);\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport Stream from '../../common/utils/Stream';\nimport Mithril from 'mithril';\nimport Discussion from '../../common/models/Discussion';\n\nexport interface IRenameDiscussionModalAttrs extends IInternalModalAttrs {\n  discussion: Discussion;\n  currentTitle: string;\n}\n\n/**\n * The 'RenameDiscussionModal' displays a modal dialog with an input to rename a discussion\n */\nexport default class RenameDiscussionModal<CustomAttrs extends IRenameDiscussionModalAttrs = IRenameDiscussionModalAttrs> extends Modal<CustomAttrs> {\n  discussion!: Discussion;\n  currentTitle!: string;\n  newTitle!: Stream<string>;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.discussion = this.attrs.discussion;\n    this.currentTitle = this.attrs.currentTitle;\n    this.newTitle = Stream(this.currentTitle);\n  }\n\n  className() {\n    return 'RenameDiscussionModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.rename_discussion.title');\n  }\n\n  content() {\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">\n          <div className=\"Form-group\">\n            <input className=\"FormControl\" bidi={this.newTitle} type=\"text\" />\n          </div>\n          <div className=\"Form-group\">\n            <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n              {app.translator.trans('core.forum.rename_discussion.submit_button')}\n            </Button>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  onsubmit(e: SubmitEvent): Promise<void> | void {\n    e.preventDefault();\n\n    this.loading = true;\n\n    const title = this.newTitle();\n    const currentTitle = this.currentTitle;\n\n    // If the title is different to what it was before, then save it. After the\n    // save has completed, update the post stream as there will be a new post\n    // indicating that the discussion was renamed.\n    if (title && title !== currentTitle) {\n      return this.discussion\n        .save({ title })\n        .then(() => {\n          if (app.viewingDiscussion(this.discussion)) {\n            app.current.get('stream').update();\n          }\n          m.redraw();\n          this.hide();\n        })\n        .catch(() => {\n          this.loading = false;\n          m.redraw();\n        });\n    } else {\n      this.hide();\n    }\n  }\n}\n","import app from '../../forum/app';\nimport DiscussionPage from '../components/DiscussionPage';\nimport ReplyComposer from '../components/ReplyComposer';\nimport LogInModal from '../components/LogInModal';\nimport Button from '../../common/components/Button';\nimport Separator from '../../common/components/Separator';\nimport RenameDiscussionModal from '../components/RenameDiscussionModal';\nimport ItemList from '../../common/utils/ItemList';\nimport extractText from '../../common/utils/extractText';\n\n/**\n * The `DiscussionControls` utility constructs a list of buttons for a\n * discussion which perform actions on it.\n */\nexport default {\n  /**\n   * Get a list of controls for a discussion.\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controls(discussion, context) {\n    const items = new ItemList();\n\n    ['user', 'moderation', 'destructive'].forEach((section) => {\n      const controls = this[section + 'Controls'](discussion, context).toArray();\n      if (controls.length) {\n        controls.forEach((item) => items.add(item.itemName, item));\n        items.add(section + 'Separator', <Separator />);\n      }\n    });\n\n    return items;\n  },\n\n  /**\n   * Get controls for a discussion pertaining to the current user (e.g. reply,\n   * follow).\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  userControls(discussion, context) {\n    const items = new ItemList();\n\n    // Only add a reply control if this is the discussion's controls dropdown\n    // for the discussion page itself. We don't want it to show up for\n    // discussions in the discussion list, etc.\n    if (context instanceof DiscussionPage) {\n      items.add(\n        'reply',\n        !app.session.user || discussion.canReply() ? (\n          <Button\n            icon=\"fas fa-reply\"\n            onclick={() => {\n              // If the user is not logged in, the promise rejects, and a login modal shows up.\n              // Since that's already handled, we dont need to show an error message in the console.\n              return this.replyAction\n                .bind(discussion)(true, false)\n                .catch(() => {});\n            }}\n          >\n            {app.translator.trans(\n              app.session.user ? 'core.forum.discussion_controls.reply_button' : 'core.forum.discussion_controls.log_in_to_reply_button'\n            )}\n          </Button>\n        ) : (\n          <Button\n            icon=\"fas fa-reply\"\n            className=\"disabled\"\n            title={extractText(app.translator.trans('core.forum.discussion_controls.cannot_reply_text'))}\n          >\n            {app.translator.trans('core.forum.discussion_controls.cannot_reply_button')}\n          </Button>\n        )\n      );\n    }\n\n    return items;\n  },\n\n  /**\n   * Get controls for a discussion pertaining to moderation (e.g. rename, lock).\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  moderationControls(discussion) {\n    const items = new ItemList();\n\n    if (discussion.canRename()) {\n      items.add(\n        'rename',\n        <Button icon=\"fas fa-pencil-alt\" onclick={this.renameAction.bind(discussion)}>\n          {app.translator.trans('core.forum.discussion_controls.rename_button')}\n        </Button>\n      );\n    }\n\n    return items;\n  },\n\n  /**\n   * Get controls for a discussion which are destructive (e.g. delete).\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  destructiveControls(discussion) {\n    const items = new ItemList();\n\n    if (!discussion.isHidden()) {\n      if (discussion.canHide()) {\n        items.add(\n          'hide',\n          <Button icon=\"far fa-trash-alt\" onclick={this.hideAction.bind(discussion)}>\n            {app.translator.trans('core.forum.discussion_controls.delete_button')}\n          </Button>\n        );\n      }\n    } else {\n      if (discussion.canHide()) {\n        items.add(\n          'restore',\n          <Button icon=\"fas fa-reply\" onclick={this.restoreAction.bind(discussion)}>\n            {app.translator.trans('core.forum.discussion_controls.restore_button')}\n          </Button>\n        );\n      }\n\n      if (discussion.canDelete()) {\n        items.add(\n          'delete',\n          <Button icon=\"fas fa-times\" onclick={this.deleteAction.bind(discussion)}>\n            {app.translator.trans('core.forum.discussion_controls.delete_forever_button')}\n          </Button>\n        );\n      }\n    }\n\n    return items;\n  },\n\n  /**\n   * Open the reply composer for the discussion. A promise will be returned,\n   * which resolves when the composer opens successfully. If the user is not\n   * logged in, they will be prompted. If they don't have permission to\n   * reply, the promise will be rejected.\n   *\n   * @param {boolean} goToLast Whether or not to scroll down to the last post if the discussion is being viewed.\n   * @param {boolean} forceRefresh Whether or not to force a reload of the composer component, even if it is already open for this discussion.\n   *\n   * @return {Promise<void>}\n   */\n  replyAction(goToLast, forceRefresh) {\n    return new Promise((resolve, reject) => {\n      if (app.session.user) {\n        if (this.canReply()) {\n          if (!app.composer.composingReplyTo(this) || forceRefresh) {\n            app.composer.load(ReplyComposer, {\n              user: app.session.user,\n              discussion: this,\n            });\n          }\n          app.composer.show();\n\n          if (goToLast && app.viewingDiscussion(this) && !app.composer.isFullScreen()) {\n            app.current.get('stream').goToNumber('reply');\n          }\n\n          return resolve(app.composer);\n        } else {\n          return reject();\n        }\n      }\n\n      app.modal.show(LogInModal);\n\n      return reject();\n    });\n  },\n\n  /**\n   * Hide a discussion.\n   *\n   * @return {Promise<void>}\n   */\n  hideAction() {\n    this.pushData({ attributes: { hiddenAt: new Date() }, relationships: { hiddenUser: app.session.user } });\n\n    return this.save({ isHidden: true });\n  },\n\n  /**\n   * Restore a discussion.\n   *\n   * @return {Promise<void>}\n   */\n  restoreAction() {\n    this.pushData({ attributes: { hiddenAt: null }, relationships: { hiddenUser: null } });\n\n    return this.save({ isHidden: false });\n  },\n\n  /**\n   * Delete the discussion after confirming with the user.\n   *\n   * @return {Promise<void>}\n   */\n  deleteAction() {\n    if (confirm(extractText(app.translator.trans('core.forum.discussion_controls.delete_confirmation')))) {\n      // If we're currently viewing the discussion that was deleted, go back\n      // to the previous page.\n      if (app.viewingDiscussion(this)) {\n        app.history.back();\n      }\n\n      return this.delete().then(() => app.discussions.removeDiscussion(this));\n    }\n  },\n\n  /**\n   * Rename the discussion.\n   */\n  renameAction() {\n    return app.modal.show(RenameDiscussionModal, {\n      currentTitle: this.title(),\n      discussion: this,\n    });\n  },\n};\n","/**\n * The `slidable` utility adds touch gestures to an element so that it can be\n * slid away to reveal controls underneath, and then released to activate those\n * controls.\n *\n * It relies on the element having children with particular CSS classes.\n *\n * The function returns a record with a `reset` proeprty. This is a function\n * which reverts the slider to its original position. This should be called,\n * for example, when a controls dropdown is closed.\n *\n * @param {HTMLElement | SVGElement | Element} element\n * @return {{ reset : () => void }}\n */\nexport default function slidable(element) {\n  const $element = $(element);\n  const threshold = 50;\n\n  let $underneathLeft;\n  let $underneathRight;\n\n  let startX;\n  let startY;\n  let couldBeSliding = false;\n  let isSliding = false;\n  let pos = 0;\n\n  /**\n   * Animate the slider to a new position.\n   *\n   * @param {number} newPos\n   * @param {Partial<JQueryAnimationOptions>} [options]\n   */\n  const animatePos = (newPos, options = {}) => {\n    // Since we can't animate the transform property with jQuery, we'll use a\n    // bit of a workaround. We set up the animation with a step function that\n    // will set the transform property, but then we animate an unused property\n    // (background-position-x) with jQuery.\n    options.duration ||= 'fast';\n    options.step = function (x) {\n      $(this).css('transform', 'translate(' + x + 'px, 0)');\n    };\n\n    $element.find('.Slidable-content').animate({ 'background-position-x': newPos }, options);\n  };\n\n  /**\n   * Revert the slider to its original position.\n   */\n  const reset = () => {\n    animatePos(0, {\n      complete: function () {\n        $element.removeClass('sliding');\n        $underneathLeft.hide();\n        $underneathRight.hide();\n        isSliding = false;\n      },\n    });\n  };\n\n  $element\n    .find('.Slidable-content')\n    .on('touchstart', function (e) {\n      // Update the references to the elements underneath the slider, provided\n      // they're not disabled.\n      $underneathLeft = $element.find('.Slidable-underneath--left:not(.disabled)');\n      $underneathRight = $element.find('.Slidable-underneath--right:not(.disabled)');\n\n      startX = e.originalEvent.targetTouches[0].clientX;\n      startY = e.originalEvent.targetTouches[0].clientY;\n\n      couldBeSliding = true;\n      pos = 0;\n    })\n\n    .on('touchmove', function (e) {\n      const newX = e.originalEvent.targetTouches[0].clientX;\n      const newY = e.originalEvent.targetTouches[0].clientY;\n\n      // Once the user moves their touch in a direction that's more up/down than\n      // left/right, we'll assume they're scrolling the page. But if they do\n      // move in a horizontal direction at first, then we'll lock their touch\n      // into the slider.\n      if (couldBeSliding && Math.abs(newX - startX) > Math.abs(newY - startY)) {\n        isSliding = true;\n      }\n      couldBeSliding = false;\n\n      if (isSliding) {\n        pos = newX - startX;\n\n        // If there are controls underneath the either side, then we'll show/hide\n        // them depending on the slider's position. We also make the controls\n        // icon get a bit bigger the further they slide.\n        const toggle = ($underneath, side) => {\n          if ($underneath.length) {\n            const active = side === 'left' ? pos > 0 : pos < 0;\n\n            if (active && $underneath.hasClass('Slidable-underneath--elastic')) {\n              pos -= pos * 0.5;\n            }\n            $underneath.toggle(active);\n\n            const scale = Math.max(0, Math.min(1, (Math.abs(pos) - 25) / threshold));\n            $underneath.find('.icon').css('transform', 'scale(' + scale + ')');\n          } else {\n            pos = Math[side === 'left' ? 'min' : 'max'](0, pos);\n          }\n        };\n\n        toggle($underneathLeft, 'left');\n        toggle($underneathRight, 'right');\n\n        $(this).css('transform', 'translate(' + pos + 'px, 0)');\n        $(this).css('background-position-x', pos + 'px');\n\n        $element.toggleClass('sliding', !!pos);\n\n        e.preventDefault();\n      }\n    })\n\n    .on('touchend', function () {\n      // If the user releases the touch and the slider is past the threshold\n      // position on either side, then we will activate the control for that\n      // side. We will also animate the slider's position all the way to the\n      // other side, or back to its original position, depending on whether or\n      // not the side is 'elastic'.\n      const activate = ($underneath) => {\n        $underneath.click();\n\n        if ($underneath.hasClass('Slidable-underneath--elastic')) {\n          reset();\n        } else {\n          animatePos((pos > 0 ? 1 : -1) * $element.width());\n        }\n      };\n\n      if ($underneathRight.length && pos < -threshold) {\n        activate($underneathRight);\n      } else if ($underneathLeft.length && pos > threshold) {\n        activate($underneathLeft);\n      } else {\n        reset();\n      }\n\n      couldBeSliding = false;\n      isSliding = false;\n    });\n\n  return { reset };\n}\n","const specialChars = /[.*+?^${}()|[\\]\\\\]/g;\n\n/**\n * Escapes the `RegExp` special characters in `input`.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n */\nexport default function escapeRegExp(input: string): string {\n  return input.replace(specialChars, '\\\\$&');\n}\n","import app from '../../forum/app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport Link from '../../common/components/Link';\nimport avatar from '../../common/helpers/avatar';\nimport listItems from '../../common/helpers/listItems';\nimport highlight from '../../common/helpers/highlight';\nimport icon from '../../common/helpers/icon';\nimport humanTime from '../../common/utils/humanTime';\nimport ItemList from '../../common/utils/ItemList';\nimport abbreviateNumber from '../../common/utils/abbreviateNumber';\nimport Dropdown from '../../common/components/Dropdown';\nimport TerminalPost from './TerminalPost';\nimport SubtreeRetainer from '../../common/utils/SubtreeRetainer';\nimport DiscussionControls from '../utils/DiscussionControls';\nimport slidable from '../utils/slidable';\nimport classList from '../../common/utils/classList';\nimport DiscussionPage from './DiscussionPage';\nimport escapeRegExp from '../../common/utils/escapeRegExp';\nimport Tooltip from '../../common/components/Tooltip';\nimport type Discussion from '../../common/models/Discussion';\nimport type Mithril from 'mithril';\nimport type { DiscussionListParams } from '../states/DiscussionListState';\n\nexport interface IDiscussionListItemAttrs extends ComponentAttrs {\n  discussion: Discussion;\n  params: DiscussionListParams;\n}\n\n/**\n * The `DiscussionListItem` component shows a single discussion in the\n * discussion list.\n */\nexport default class DiscussionListItem<CustomAttrs extends IDiscussionListItemAttrs = IDiscussionListItemAttrs> extends Component<CustomAttrs> {\n  /**\n   * Ensures that the discussion will not be redrawn\n   * unless new data comes in.\n   */\n  subtree!: SubtreeRetainer;\n\n  highlightRegExp?: RegExp;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.subtree = new SubtreeRetainer(\n      () => this.attrs.discussion.freshness,\n      () => {\n        const time = app.session.user && app.session.user.markedAllAsReadAt();\n        return time && time.getTime();\n      },\n      () => this.active()\n    );\n  }\n\n  elementAttrs() {\n    return {\n      className: classList('DiscussionListItem', {\n        active: this.active(),\n        'DiscussionListItem--hidden': this.attrs.discussion.isHidden(),\n        Slidable: 'ontouchstart' in window,\n      }),\n    };\n  }\n\n  view() {\n    const attrs = this.elementAttrs();\n\n    return <div {...attrs}>{this.viewItems().toArray()}</div>;\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    const discussion = this.attrs.discussion;\n    const controls = DiscussionControls.controls(discussion, this).toArray();\n\n    items.add('controls', this.controlsView(controls), 100);\n    items.add('slidableUnderneath', this.slidableUnderneathView(), 90);\n    items.add('content', this.contentView(), 80);\n\n    return items;\n  }\n\n  controlsView(controls: Mithril.ChildArray): Mithril.Children {\n    return (\n      <>\n        {!!controls.length && (\n          <Dropdown\n            icon=\"fas fa-ellipsis-v\"\n            className=\"DiscussionListItem-controls\"\n            buttonClassName=\"Button Button--icon Button--flat Slidable-underneath Slidable-underneath--right\"\n            accessibleToggleLabel={app.translator.trans('core.forum.discussion_controls.toggle_dropdown_accessible_label')}\n          >\n            {controls}\n          </Dropdown>\n        )}\n      </>\n    );\n  }\n\n  slidableUnderneathView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n    const isUnread = discussion.isUnread();\n\n    return (\n      <span\n        className={classList('Slidable-underneath Slidable-underneath--left Slidable-underneath--elastic', { disabled: !isUnread })}\n        onclick={this.markAsRead.bind(this)}\n      >\n        {icon('fas fa-check')}\n      </span>\n    );\n  }\n\n  contentView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n    const isUnread = discussion.isUnread();\n    const isRead = discussion.isRead();\n\n    return (\n      <div className={classList('DiscussionListItem-content', 'Slidable-content', { unread: isUnread, read: isRead })}>\n        {this.contentItems().toArray()}\n      </div>\n    );\n  }\n\n  contentItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('authorAvatar', this.authorAvatarView(), 100);\n    items.add('badges', this.badgesView(), 90);\n    items.add('main', this.mainView(), 80);\n    items.add('replyCount', this.replyCountItem(), 70);\n\n    return items;\n  }\n\n  authorAvatarView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n    const user = discussion.user();\n\n    return (\n      <Tooltip\n        text={app.translator.trans('core.forum.discussion_list.started_text', { user, ago: humanTime(discussion.createdAt()) })}\n        position=\"right\"\n      >\n        <Link className=\"DiscussionListItem-author\" href={user ? app.route.user(user) : '#'}>\n          {avatar(user || null, { title: '' })}\n        </Link>\n      </Tooltip>\n    );\n  }\n\n  badgesView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n\n    return <ul className=\"DiscussionListItem-badges badges\">{listItems(discussion.badges().toArray())}</ul>;\n  }\n\n  mainView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n    const jumpTo = this.getJumpTo();\n\n    return (\n      <Link href={app.route.discussion(discussion, jumpTo)} className=\"DiscussionListItem-main\">\n        {this.mainItems().toArray()}\n      </Link>\n    );\n  }\n\n  mainItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    const discussion = this.attrs.discussion;\n\n    items.add('title', <h2 className=\"DiscussionListItem-title\">{highlight(discussion.title(), this.highlightRegExp)}</h2>, 100);\n    items.add('info', <ul className=\"DiscussionListItem-info\">{listItems(this.infoItems().toArray())}</ul>, 90);\n\n    return items;\n  }\n\n  getJumpTo() {\n    const discussion = this.attrs.discussion;\n    let jumpTo = 0;\n\n    if (this.attrs.params.q) {\n      const post = discussion.mostRelevantPost();\n      if (post) {\n        jumpTo = post.number();\n      }\n\n      const phrase = escapeRegExp(this.attrs.params.q);\n      this.highlightRegExp = new RegExp(phrase + '|' + phrase.trim().replace(/\\s+/g, '|'), 'gi');\n    } else {\n      jumpTo = Math.min(discussion.lastPostNumber() ?? 0, (discussion.lastReadPostNumber() || 0) + 1);\n    }\n\n    return jumpTo;\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    // If we're on a touch device, set up the discussion row to be slidable.\n    // This allows the user to drag the row to either side of the screen to\n    // reveal controls.\n    if ('ontouchstart' in window) {\n      const slidableInstance = slidable(this.element);\n\n      this.$('.DiscussionListItem-controls').on('hidden.bs.dropdown', () => slidableInstance.reset());\n    }\n  }\n\n  onbeforeupdate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onbeforeupdate(vnode);\n\n    return this.subtree.needsRebuild();\n  }\n\n  /**\n   * Determine whether or not the discussion is currently being viewed.\n   */\n  active() {\n    return app.current.matches(DiscussionPage, { discussion: this.attrs.discussion });\n  }\n\n  /**\n   * Determine whether or not information about who started the discussion\n   * should be displayed instead of information about the most recent reply to\n   * the discussion.\n   */\n  showFirstPost() {\n    return ['newest', 'oldest'].includes(this.attrs.params.sort ?? '');\n  }\n\n  /**\n   * Determine whether or not the number of replies should be shown instead of\n   * the number of unread posts.\n   *\n   * @return {boolean}\n   */\n  showRepliesCount() {\n    return this.attrs.params.sort === 'replies';\n  }\n\n  /**\n   * Mark the discussion as read.\n   */\n  markAsRead() {\n    const discussion = this.attrs.discussion;\n\n    if (discussion.isUnread()) {\n      discussion.save({ lastReadPostNumber: discussion.lastPostNumber() });\n      m.redraw();\n    }\n  }\n\n  /**\n   * Build an item list of info for a discussion listing. By default this is\n   * just the first/last post indicator.\n   */\n  infoItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.attrs.params.q) {\n      const post = this.attrs.discussion.mostRelevantPost() || this.attrs.discussion.firstPost();\n\n      if (post && post.contentType() === 'comment') {\n        const excerpt = highlight(post.contentPlain() ?? '', this.highlightRegExp, 175);\n        items.add('excerpt', excerpt, -100);\n      }\n    } else {\n      items.add('terminalPost', <TerminalPost discussion={this.attrs.discussion} lastPost={!this.showFirstPost()} />);\n    }\n\n    return items;\n  }\n\n  replyCountItem() {\n    const discussion = this.attrs.discussion;\n    const showUnread = !this.showRepliesCount() && discussion.isUnread();\n\n    if (showUnread) {\n      return (\n        <button className=\"Button--ua-reset DiscussionListItem-count\" onclick={this.markAsRead.bind(this)}>\n          <span aria-hidden=\"true\">{abbreviateNumber(discussion.unreadCount())}</span>\n\n          <span className=\"visually-hidden\">\n            {app.translator.trans('core.forum.discussion_list.unread_replies_a11y_label', { count: discussion.replyCount() })}\n          </span>\n        </button>\n      );\n    }\n\n    return (\n      <span className=\"DiscussionListItem-count\">\n        <span aria-hidden=\"true\">{abbreviateNumber(discussion.replyCount())}</span>\n\n        <span className=\"visually-hidden\">\n          {app.translator.trans('core.forum.discussion_list.total_replies_a11y_label', { count: discussion.replyCount() })}\n        </span>\n      </span>\n    );\n  }\n}\n","import Component from '../Component';\n\n/**\n * The `Placeholder` component displays a muted text with some call to action,\n * usually used as an empty state.\n *\n * ### Attrs\n *\n * - `text`\n */\nexport default class Placeholder extends Component {\n  view() {\n    return (\n      <div className=\"Placeholder\">\n        <p>{this.attrs.text}</p>\n      </div>\n    );\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport DiscussionListItem from './DiscussionListItem';\nimport Button from '../../common/components/Button';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport Placeholder from '../../common/components/Placeholder';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `DiscussionList` component displays a list of discussions.\n *\n * ### Attrs\n *\n * - `state` A DiscussionListState object that represents the discussion lists's state.\n */\nexport default class DiscussionList extends Component {\n  view() {\n    /**\n     * @type {import('../states/DiscussionListState').default}\n     */\n    const state = this.attrs.state;\n\n    const params = state.getParams();\n    const isLoading = state.isInitialLoading() || state.isLoadingNext();\n\n    let loading;\n\n    if (isLoading) {\n      loading = <LoadingIndicator />;\n    } else if (state.hasNext()) {\n      loading = (\n        <Button className=\"Button\" onclick={state.loadNext.bind(state)}>\n          {app.translator.trans('core.forum.discussion_list.load_more_button')}\n        </Button>\n      );\n    }\n\n    if (state.isEmpty()) {\n      const text = app.translator.trans('core.forum.discussion_list.empty_text');\n      return (\n        <div className=\"DiscussionList\">\n          <Placeholder text={text} />\n        </div>\n      );\n    }\n\n    const pageSize = state.pageSize;\n\n    return (\n      <div className={classList('DiscussionList', { 'DiscussionList--searchResults': state.isSearchResults() })}>\n        <ul role=\"feed\" aria-busy={isLoading} className=\"DiscussionList-discussions\">\n          {state.getPages().map((pg, pageNum) => {\n            return pg.items.map((discussion, itemNum) => (\n              <li key={discussion.id()} data-id={discussion.id()} role=\"article\" aria-setsize=\"-1\" aria-posinset={pageNum * pageSize + itemNum}>\n                <DiscussionListItem discussion={discussion} params={params} />\n              </li>\n            ));\n          })}\n        </ul>\n        <div className=\"DiscussionList-loadMore\">{loading}</div>\n      </div>\n    );\n  }\n}\n","import app from '../../forum/app';\nimport DiscussionList from './DiscussionList';\nimport Component from '../../common/Component';\nimport DiscussionPage from './DiscussionPage';\n\nconst hotEdge = (e) => {\n  if (e.pageX < 10) app.pane.show();\n};\n\n/**\n * The `DiscussionListPane` component displays the list of previously viewed\n * discussions in a panel that can be displayed by moving the mouse to the left\n * edge of the screen, where it can also be pinned in place.\n *\n * ### Attrs\n *\n * - `state` A DiscussionListState object that represents the discussion lists's state.\n */\nexport default class DiscussionListPane extends Component {\n  view() {\n    if (!this.attrs.state.hasItems()) {\n      return;\n    }\n\n    return <aside className=\"DiscussionPage-list\">{this.enoughSpace() && <DiscussionList state={this.attrs.state} />}</aside>;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    const $list = $(vnode.dom);\n\n    // When the mouse enters and leaves the discussions pane, we want to show\n    // and hide the pane respectively. We also create a 10px 'hot edge' on the\n    // left of the screen to activate the pane.\n    const pane = app.pane;\n    $list.hover(pane.show.bind(pane), pane.onmouseleave.bind(pane));\n\n    $(document).on('mousemove', hotEdge);\n\n    // When coming from another discussion, scroll to the previous postition\n    // to prevent the discussion list jumping around.\n    if (app.previous.matches(DiscussionPage)) {\n      const top = app.cache.discussionListPaneScrollTop || 0;\n      $list.scrollTop(top);\n    } else {\n      // If the discussion we are viewing is listed in the discussion list, then\n      // we will make sure it is visible in the viewport – if it is not we will\n      // scroll the list down to it.\n      const $discussion = $list.find('.DiscussionListItem.active');\n      if ($discussion.length) {\n        const listTop = $list.offset().top;\n        const listBottom = listTop + $list.outerHeight();\n        const discussionTop = $discussion.offset().top;\n        const discussionBottom = discussionTop + $discussion.outerHeight();\n\n        if (discussionTop < listTop || discussionBottom > listBottom) {\n          $list.scrollTop($list.scrollTop() - listTop + discussionTop);\n        }\n      }\n    }\n  }\n\n  onremove(vnode) {\n    app.cache.discussionListPaneScrollTop = $(vnode.dom).scrollTop();\n    $(document).off('mousemove', hotEdge);\n  }\n\n  /**\n   * Are we on a device that's larger than we consider \"mobile\"?\n   *\n   * @returns {boolean}\n   */\n  enoughSpace() {\n    return !$('.App-navigation').is(':visible');\n  }\n}\n","/**\n * The `ScrollListener` class sets up a listener that handles window scroll\n * events.\n */\nexport default class ScrollListener {\n  /**\n   * @param {(top: number) => void} callback The callback to run when the scroll position\n   *     changes.\n   */\n  constructor(callback) {\n    this.callback = callback;\n    this.ticking = false;\n  }\n\n  /**\n   * On each animation frame, as long as the listener is active, run the\n   * `update` method.\n   *\n   * @protected\n   */\n  loop() {\n    // THROTTLE: If the callback is still running (or hasn't yet run), we ignore\n    // further scroll events.\n    if (this.ticking) return;\n\n    // Schedule the callback to be executed soon (TM), and stop throttling once\n    // the callback is done.\n    requestAnimationFrame(() => {\n      this.update();\n      this.ticking = false;\n    });\n\n    this.ticking = true;\n  }\n\n  /**\n   * Run the callback, whether there was a scroll event or not.\n   */\n  update() {\n    this.callback(window.pageYOffset);\n  }\n\n  /**\n   * Start listening to and handling the window's scroll position.\n   */\n  start() {\n    if (!this.active) {\n      window.addEventListener('scroll', (this.active = this.loop.bind(this)), { passive: true });\n    }\n  }\n\n  /**\n   * Stop listening to and handling the window's scroll position.\n   */\n  stop() {\n    window.removeEventListener('scroll', this.active);\n\n    this.active = null;\n  }\n}\n","import Component from '../../common/Component';\nimport avatar from '../../common/helpers/avatar';\n\n/**\n * The `LoadingPost` component shows a placeholder that looks like a post,\n * indicating that the post is loading.\n */\nexport default class LoadingPost extends Component {\n  view() {\n    return (\n      <div className=\"Post CommentPost LoadingPost\">\n        <header className=\"Post-header\">\n          {avatar(null, { className: 'PostUser-avatar' })}\n          <div className=\"fakeText\" />\n        </header>\n\n        <div className=\"Post-body\">\n          <div className=\"fakeText\" />\n          <div className=\"fakeText\" />\n          <div className=\"fakeText\" />\n        </div>\n      </div>\n    );\n  }\n}\n","import app from '../../common/app';\nimport type Mithril from 'mithril';\nimport User from '../models/User';\n\n/**\n * The `username` helper displays a user's username in a <span className=\"username\">\n * tag. If the user doesn't exist, the username will be displayed as [deleted].\n */\nexport default function username(user: User | null | undefined | false): Mithril.Vnode {\n  const name = (user && user.displayName()) || app.translator.trans('core.lib.username.deleted_text');\n\n  return <span className=\"username\">{name}</span>;\n}\n","/*global s9e*/\n\nimport Component from '../../common/Component';\n\n/**\n * The `ComposerPostPreview` component renders Markdown as HTML using the\n * TextFormatter library, polling a data source for changes every 50ms. This is\n * done to prevent expensive redraws on e.g. every single keystroke, while\n * still retaining the perception of live updates for the user.\n *\n * ### Attrs\n *\n * - `composer` The state of the composer controlling this preview.\n * - `className` A CSS class for the element surrounding the preview.\n * - `surround` A callback that can execute code before and after re-render, e.g. for scroll anchoring.\n */\nexport default class ComposerPostPreview extends Component {\n  static initAttrs(attrs) {\n    attrs.className = attrs.className || '';\n    attrs.surround = attrs.surround || ((preview) => preview());\n  }\n\n  view() {\n    return <div className={this.attrs.className} />;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    // Every 50ms, if the composer content has changed, then update the post's\n    // body with a preview.\n    let preview;\n    const updatePreview = () => {\n      // Since we're polling, the composer may have been closed in the meantime,\n      // so we bail in that case.\n      if (!this.attrs.composer.isVisible()) return;\n\n      const content = this.attrs.composer.fields.content();\n\n      if (preview === content) return;\n\n      preview = content;\n\n      this.attrs.surround(() => s9e.TextFormatter.preview(preview || '', vnode.dom));\n    };\n    updatePreview();\n\n    this.updateInterval = setInterval(updatePreview, 50);\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    clearInterval(this.updateInterval);\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport DiscussionControls from '../utils/DiscussionControls';\nimport ComposerPostPreview from './ComposerPostPreview';\nimport listItems from '../../common/helpers/listItems';\n\n/**\n * The `ReplyPlaceholder` component displays a placeholder for a reply, which,\n * when clicked, opens the reply composer.\n *\n * ### Attrs\n *\n * - `discussion`\n */\nexport default class ReplyPlaceholder extends Component {\n  view() {\n    if (app.composer.composingReplyTo(this.attrs.discussion)) {\n      return (\n        <article className=\"Post CommentPost editing\" aria-busy=\"true\">\n          <header className=\"Post-header\">\n            <div className=\"PostUser\">\n              <h3 className=\"PostUser-name\">\n                {avatar(app.session.user, { className: 'PostUser-avatar' })}\n                {username(app.session.user)}\n              </h3>\n              <ul className=\"PostUser-badges badges\">{listItems(app.session.user.badges().toArray())}</ul>\n            </div>\n          </header>\n          <ComposerPostPreview className=\"Post-body\" composer={app.composer} surround={this.anchorPreview.bind(this)} />\n        </article>\n      );\n    }\n\n    const reply = () => {\n      DiscussionControls.replyAction.call(this.attrs.discussion, true).catch(() => {});\n    };\n\n    return (\n      <button className=\"Post ReplyPlaceholder\" onclick={reply}>\n        <span className=\"Post-header\">\n          {avatar(app.session.user, { className: 'PostUser-avatar' })} {app.translator.trans('core.forum.post_stream.reply_placeholder')}\n        </span>\n      </button>\n    );\n  }\n\n  anchorPreview(preview) {\n    const anchorToBottom = $(window).scrollTop() + $(window).height() >= $(document).height();\n\n    preview();\n\n    if (anchorToBottom) {\n      $(window).scrollTop($(document).height());\n    }\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport ScrollListener from '../../common/utils/ScrollListener';\nimport PostLoading from './LoadingPost';\nimport ReplyPlaceholder from './ReplyPlaceholder';\nimport Button from '../../common/components/Button';\nimport ItemList from '../../common/utils/ItemList';\nimport extractText from '../../common/utils/extractText';\n\n/**\n * The `PostStream` component displays an infinitely-scrollable wall of posts in\n * a discussion. Posts that have not loaded will be displayed as placeholders.\n *\n * ### Attrs\n *\n * - `discussion`\n * - `stream`\n * - `targetPost`\n * - `onPositionChange`\n */\nexport default class PostStream extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.discussion = this.attrs.discussion;\n    this.stream = this.attrs.stream;\n\n    this.scrollListener = new ScrollListener(this.onscroll.bind(this));\n  }\n\n  view() {\n    let lastTime;\n\n    const viewingEnd = this.stream.viewingEnd();\n    const posts = this.stream.posts();\n    const postIds = this.discussion.postIds();\n\n    const postFadeIn = (vnode) => {\n      $(vnode.dom).addClass('fadeIn');\n      // 500 is the duration of the fadeIn CSS animation + 100ms,\n      // so the animation has time to complete\n      setTimeout(() => $(vnode.dom).removeClass('fadeIn'), 500);\n    };\n\n    const items = posts.map((post, i) => {\n      let content;\n      const attrs = { 'data-index': this.stream.visibleStart + i };\n\n      if (post) {\n        const time = post.createdAt();\n        const PostComponent = app.postComponents[post.contentType()];\n        content = !!PostComponent && <PostComponent post={post} />;\n\n        attrs.key = 'post' + post.id();\n        attrs.oncreate = postFadeIn;\n        attrs['data-time'] = time.toISOString();\n        attrs['data-number'] = post.number();\n        attrs['data-id'] = post.id();\n        attrs['data-type'] = post.contentType();\n\n        // If the post before this one was more than 4 days ago, we will\n        // display a 'time gap' indicating how long it has been in between\n        // the posts.\n        const dt = time - lastTime;\n\n        if (dt > 1000 * 60 * 60 * 24 * 4) {\n          content = [\n            <div className=\"PostStream-timeGap\">\n              <span>{app.translator.trans('core.forum.post_stream.time_lapsed_text', { period: dayjs().add(dt, 'ms').fromNow(true) })}</span>\n            </div>,\n            content,\n          ];\n        }\n\n        lastTime = time;\n      } else {\n        attrs.key = 'post' + postIds[this.stream.visibleStart + i];\n\n        content = <PostLoading />;\n      }\n\n      const postStreamElement = (\n        <div className=\"PostStream-item\" {...attrs}>\n          {content}\n        </div>\n      );\n\n      // If we're on the first post, call the afterFirstPostItems method and add any additional elements.\n      if (i === 0 && this.afterFirstPostItems().toArray().length > 0) {\n        // Using m.fragment to return multiple elements without an enclosing container\n        return m.fragment({ ...attrs }, [\n          postStreamElement,\n          <div className=\"PostStream-item PostStream-afterFirstPost\" key=\"afterFirstPost\">\n            {this.afterFirstPostItems().toArray()}\n          </div>,\n        ]);\n      }\n\n      return postStreamElement;\n    });\n\n    if (!viewingEnd && posts[this.stream.visibleEnd - this.stream.visibleStart - 1]) {\n      items.push(\n        <div className=\"PostStream-loadMore\" key=\"loadMore\">\n          <Button className=\"Button\" onclick={this.stream.loadNext.bind(this.stream)}>\n            {app.translator.trans('core.forum.post_stream.load_more_button')}\n          </Button>\n        </div>\n      );\n    }\n\n    // Allow extensions to add items to the end of the post stream.\n    if (viewingEnd) {\n      items.push(...this.endItems().toArray());\n    }\n\n    // If we're viewing the end of the discussion, the user can reply, and\n    // is not already doing so, then show a 'write a reply' placeholder.\n    if (viewingEnd && (!app.session.user || this.discussion.canReply())) {\n      items.push(\n        <div className=\"PostStream-item\" key=\"reply\" data-index={this.stream.count()} oncreate={postFadeIn}>\n          <ReplyPlaceholder discussion={this.discussion} />\n        </div>\n      );\n    }\n\n    return (\n      <div className=\"PostStream\" role=\"feed\" aria-live=\"off\" aria-busy={this.stream.pagesLoading ? 'true' : 'false'}>\n        {items}\n      </div>\n    );\n  }\n\n  /**\n   * @returns {ItemList<import('mithril').Children>}\n   */\n  afterFirstPostItems() {\n    const items = new ItemList();\n\n    return items;\n  }\n\n  /**\n   * @returns {ItemList<import('mithril').Children>}\n   */\n  endItems() {\n    const items = new ItemList();\n\n    return items;\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    this.triggerScroll();\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.triggerScroll();\n\n    // This is wrapped in setTimeout due to the following Mithril issue:\n    // https://github.com/lhorie/mithril.js/issues/637\n    setTimeout(() => this.scrollListener.start());\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    this.scrollListener.stop();\n    clearTimeout(this.calculatePositionTimeout);\n  }\n\n  /**\n   * Start scrolling, if appropriate, to a newly-targeted post.\n   */\n  triggerScroll() {\n    if (!this.stream.needsScroll) return;\n\n    const target = this.stream.targetPost;\n    this.stream.needsScroll = false;\n\n    if ('number' in target) {\n      this.scrollToNumber(target.number, this.stream.animateScroll);\n    } else if ('index' in target) {\n      this.scrollToIndex(target.index, this.stream.animateScroll, target.reply);\n    }\n  }\n\n  /**\n   *\n   * @param {number} top\n   */\n  onscroll(top = window.pageYOffset) {\n    if (this.stream.paused || this.stream.pagesLoading) return;\n\n    this.updateScrubber(top);\n\n    this.loadPostsIfNeeded(top);\n\n    // Throttle calculation of our position (start/end numbers of posts in the\n    // viewport) to 100ms.\n    clearTimeout(this.calculatePositionTimeout);\n    this.calculatePositionTimeout = setTimeout(this.calculatePosition.bind(this, top), 100);\n  }\n\n  /**\n   * Check if either extreme of the post stream is in the viewport,\n   * and if so, trigger loading the next/previous page.\n   *\n   * @param {number} top\n   */\n  loadPostsIfNeeded(top = window.pageYOffset) {\n    const marginTop = this.getMarginTop();\n    const viewportHeight = $(window).height() - marginTop;\n    const viewportTop = top + marginTop;\n    const loadAheadDistance = 300;\n\n    if (this.stream.visibleStart > 0) {\n      const $item = this.$('.PostStream-item[data-index=' + this.stream.visibleStart + ']');\n\n      if ($item.length && $item.offset().top > viewportTop - loadAheadDistance) {\n        this.stream.loadPrevious();\n      }\n    }\n\n    if (this.stream.visibleEnd < this.stream.count()) {\n      const $item = this.$('.PostStream-item[data-index=' + (this.stream.visibleEnd - 1) + ']');\n\n      if ($item.length && $item.offset().top + $item.outerHeight(true) < viewportTop + viewportHeight + loadAheadDistance) {\n        this.stream.loadNext();\n      }\n    }\n  }\n\n  updateScrubber(top = window.pageYOffset) {\n    const marginTop = this.getMarginTop();\n    const viewportHeight = $(window).height() - marginTop;\n    const viewportTop = top + marginTop;\n\n    // Before looping through all of the posts, we reset the scrollbar\n    // properties to a 'default' state. These values reflect what would be\n    // seen if the browser were scrolled right up to the top of the page,\n    // and the viewport had a height of 0.\n    const $items = this.$('.PostStream-item[data-index]');\n    let visible = 0;\n    let period = '';\n    let indexFromViewPort = null;\n\n    // Now loop through each of the items in the discussion. An 'item' is\n    // either a single post or a 'gap' of one or more posts that haven't\n    // been loaded yet.\n    $items.each(function () {\n      const $this = $(this);\n      const top = $this.offset().top;\n      const height = $this.outerHeight(true);\n\n      // If this item is above the top of the viewport, skip to the next\n      // one. If it's below the bottom of the viewport, break out of the\n      // loop.\n      if (top + height < viewportTop) {\n        return true;\n      }\n      if (top > viewportTop + viewportHeight) {\n        return false;\n      }\n\n      // Work out how many pixels of this item are visible inside the viewport.\n      // Then add the proportion of this item's total height to the index.\n      const visibleTop = Math.max(0, viewportTop - top);\n      const visibleBottom = Math.min(height, viewportTop + viewportHeight - top);\n      const visiblePost = visibleBottom - visibleTop;\n\n      // We take the index of the first item that passed the previous checks.\n      // It is the item that is first visible in the viewport.\n      if (indexFromViewPort === null) {\n        indexFromViewPort = parseFloat($this.data('index')) + visibleTop / height;\n      }\n\n      if (visiblePost > 0) {\n        visible += visiblePost / height;\n      }\n\n      // If this item has a time associated with it, then set the\n      // scrollbar's current period to a formatted version of this time.\n      const time = $this.data('time');\n      if (time) period = time;\n    });\n\n    // If indexFromViewPort is null, it means no posts are visible in the\n    // viewport. This can happen, when drafting a long reply post. In that case\n    // set the index to the last post.\n    this.stream.index = indexFromViewPort !== null ? indexFromViewPort + 1 : this.stream.count();\n    this.stream.visible = visible;\n    if (period) this.stream.description = dayjs(period).format(extractText(app.translator.trans('core.lib.datetime_formats.scrubber')));\n  }\n\n  /**\n   * Work out which posts (by number) are currently visible in the viewport, and\n   * fire an event with the information.\n   */\n  calculatePosition(top = window.pageYOffset) {\n    const marginTop = this.getMarginTop();\n    const $window = $(window);\n    const viewportHeight = $window.height() - marginTop;\n    const scrollTop = $window.scrollTop() + marginTop;\n    const viewportTop = top + marginTop;\n\n    let startNumber;\n    let endNumber;\n\n    this.$('.PostStream-item').each(function () {\n      const $item = $(this);\n      const top = $item.offset().top;\n      const height = $item.outerHeight(true);\n      const visibleTop = Math.max(0, viewportTop - top);\n\n      const threeQuartersVisible = visibleTop / height < 0.75;\n      const coversQuarterOfViewport = (height - visibleTop) / viewportHeight > 0.25;\n      if (startNumber === undefined && (threeQuartersVisible || coversQuarterOfViewport)) {\n        startNumber = $item.data('number');\n      }\n\n      if (top + height > scrollTop) {\n        if (top + height < scrollTop + viewportHeight) {\n          if ($item.data('number')) {\n            endNumber = $item.data('number');\n          }\n        } else return false;\n      }\n    });\n\n    if (startNumber) {\n      this.attrs.onPositionChange(startNumber || 1, endNumber, startNumber);\n    }\n  }\n\n  /**\n   * Get the distance from the top of the viewport to the point at which we\n   * would consider a post to be the first one visible.\n   *\n   * @return {number}\n   */\n  getMarginTop() {\n    const headerId = app.screen() === 'phone' ? '#app-navigation' : '#header';\n\n    return this.$() && $(headerId).outerHeight() + parseInt(this.$().css('margin-top'), 10);\n  }\n\n  /**\n   * Scroll down to a certain post by number and 'flash' it.\n   *\n   * @param {number} number\n   * @param {boolean} animate\n   * @return {JQueryDeferred}\n   */\n  scrollToNumber(number, animate) {\n    const $item = this.$(`.PostStream-item[data-number=${number}]`);\n\n    return this.scrollToItem($item, animate).then(this.flashItem.bind(this, $item));\n  }\n\n  /**\n   * Scroll down to a certain post by index.\n   *\n   * @param {number} index\n   * @param {boolean} animate\n   * @param {boolean} reply Whether or not to scroll to the reply placeholder.\n   * @return {JQueryDeferred}\n   */\n  scrollToIndex(index, animate, reply) {\n    const $item = reply ? $('.PostStream-item:last-child') : this.$(`.PostStream-item[data-index=${index}]`);\n\n    this.scrollToItem($item, animate, true, reply);\n\n    if (reply) {\n      this.flashItem($item);\n    }\n  }\n\n  /**\n   * Scroll down to the given post.\n   *\n   * @param {JQuery} $item\n   * @param {boolean} animate\n   * @param {boolean} force Whether or not to force scrolling to the item, even\n   *     if it is already in the viewport.\n   * @param {boolean} reply Whether or not to scroll to the reply placeholder.\n   * @return {JQueryDeferred}\n   */\n  scrollToItem($item, animate, force, reply) {\n    const $container = $('html, body').stop(true);\n    const index = $item.data('index');\n\n    if ($item.length) {\n      const itemTop = $item.offset().top - this.getMarginTop();\n      const itemBottom = $item.offset().top + $item.height();\n      const scrollTop = $(document).scrollTop();\n      const scrollBottom = scrollTop + $(window).height();\n\n      // If the item is already in the viewport, we may not need to scroll.\n      // If we're scrolling to the reply placeholder, we'll make sure its\n      // bottom will line up with the top of the composer.\n      if (force || itemTop < scrollTop || itemBottom > scrollBottom) {\n        const top = reply ? itemBottom - $(window).height() + app.composer.computedHeight() : $item.is(':first-child') ? 0 : itemTop;\n\n        if (!animate) {\n          $container.scrollTop(top);\n        } else if (top !== scrollTop) {\n          $container.animate({ scrollTop: top }, 'fast');\n        }\n      }\n    }\n\n    const updateScrubberHeight = () => {\n      // We manually set the index because we want to display the index of the\n      // exact post we've scrolled to, not just that of the first post within viewport.\n      this.updateScrubber();\n      if (index !== undefined) this.stream.index = index + 1;\n    };\n\n    // If we don't update this before the scroll, the scrubber will start\n    // at the top, and animate down, which can be confusing\n    updateScrubberHeight();\n    this.stream.forceUpdateScrubber = true;\n\n    return Promise.all([$container.promise(), this.stream.loadPromise]).then(() => {\n      m.redraw.sync();\n\n      // Rendering post contents will probably throw off our position.\n      // To counter this, we'll scroll either:\n      //   - To the reply placeholder (aligned with composer top)\n      //   - To the top of the page if we're on the first post\n      //   - To the top of a post (if that post exists)\n      // If the post does not currently exist, it's probably\n      // outside of the range we loaded in, so we won't adjust anything,\n      // as it will soon be rendered by the \"load more\" system.\n      let itemOffset;\n      if (reply) {\n        const $placeholder = $('.PostStream-item:last-child');\n        $(window).scrollTop($placeholder.offset().top + $placeholder.height() - $(window).height() + app.composer.computedHeight());\n      } else if (index === 0) {\n        $(window).scrollTop(0);\n      } else if ((itemOffset = $(`.PostStream-item[data-index=${index}]`).offset())) {\n        $(window).scrollTop(itemOffset.top - this.getMarginTop());\n      }\n\n      // We want to adjust this again after posts have been loaded in\n      // and position adjusted so that the scrubber's height is accurate.\n      updateScrubberHeight();\n\n      this.calculatePosition();\n      this.stream.paused = false;\n      // Check if we need to load more posts after scrolling.\n      this.loadPostsIfNeeded();\n    });\n  }\n\n  /**\n   * 'Flash' the given post, drawing the user's attention to it.\n   *\n   * @param {JQuery} $item\n   */\n  flashItem($item) {\n    // This might execute before the fadeIn class has been removed in PostStreamItem's\n    // oncreate, so we remove it just to be safe and avoid a double animation.\n    $item.removeClass('fadeIn');\n    $item.addClass('flash').on('animationend webkitAnimationEnd', (e) => {\n      $item.removeClass('flash');\n    });\n  }\n}\n","import app from '../../common/app';\n\n/**\n * The `formatNumber` utility localizes a number into a string with the\n * appropriate punctuation based on the provided locale otherwise will default to the users locale.\n *\n * @example\n * formatNumber(1234);\n * // 1,234\n */\nexport default function formatNumber(number: number, locale: string = app.data.locale): string {\n  return new Intl.NumberFormat(locale).format(number);\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport icon from '../../common/helpers/icon';\nimport formatNumber from '../../common/utils/formatNumber';\nimport ScrollListener from '../../common/utils/ScrollListener';\n\n/**\n * The `PostStreamScrubber` component displays a scrubber which can be used to\n * navigate/scrub through a post stream.\n *\n * ### Attrs\n *\n * - `stream`\n * - `className`\n */\nexport default class PostStreamScrubber extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.stream = this.attrs.stream;\n    this.handlers = {};\n\n    this.scrollListener = new ScrollListener(this.updateScrubberValues.bind(this, { fromScroll: true, forceHeightChange: true }));\n  }\n\n  view() {\n    const count = this.stream.count();\n\n    // Index is left blank for performance reasons, it is filled in in updateScubberValues\n    const viewing = app.translator.trans('core.forum.post_scrubber.viewing_text', {\n      count,\n      index: <span className=\"Scrubber-index\"></span>,\n      formattedCount: <span className=\"Scrubber-count\">{formatNumber(count)}</span>,\n    });\n\n    const unreadCount = this.stream.discussion.unreadCount();\n    const unreadPercent = count ? Math.min(count - this.stream.index, unreadCount) / count : 0;\n\n    function styleUnread(vnode) {\n      const $element = $(vnode.dom);\n      const newStyle = {\n        top: 100 - unreadPercent * 100 + '%',\n        height: unreadPercent * 100 + '%',\n        opacity: unreadPercent ? 1 : 0,\n      };\n\n      if (vnode.state.oldStyle) {\n        $element.stop(true).css(vnode.state.oldStyle).animate(newStyle);\n      } else {\n        $element.css(newStyle);\n      }\n\n      vnode.state.oldStyle = newStyle;\n    }\n    const classNames = ['PostStreamScrubber', 'Dropdown'];\n    if (this.attrs.className) classNames.push(this.attrs.className);\n\n    return (\n      <div className={classNames.join(' ')}>\n        <button className=\"Button Dropdown-toggle\" data-toggle=\"dropdown\">\n          {viewing} {icon('fas fa-sort')}\n        </button>\n\n        <div className=\"Dropdown-menu dropdown-menu\">\n          <div className=\"Scrubber\">\n            <a className=\"Scrubber-first\" onclick={this.goToFirst.bind(this)}>\n              {icon('fas fa-angle-double-up')} {this.firstPostLabel()}\n            </a>\n\n            <div className=\"Scrubber-scrollbar\">\n              <div className=\"Scrubber-before\" />\n              <div className=\"Scrubber-handle\">\n                <div className=\"Scrubber-bar\" />\n                <div className=\"Scrubber-info\">\n                  <strong>{viewing}</strong>\n                  <span className=\"Scrubber-description\"></span>\n                </div>\n              </div>\n              <div className=\"Scrubber-after\" />\n\n              <div className=\"Scrubber-unread\" oncreate={styleUnread} onupdate={styleUnread}>\n                {this.unreadLabel(unreadCount)}\n              </div>\n            </div>\n\n            <a className=\"Scrubber-last\" onclick={this.goToLast.bind(this)}>\n              {icon('fas fa-angle-double-down')} {this.lastPostLabel()}\n            </a>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  firstPostLabel() {\n    return app.translator.trans('core.forum.post_scrubber.original_post_link');\n  }\n\n  unreadLabel(unreadCount) {\n    return app.translator.trans('core.forum.post_scrubber.unread_text', { count: unreadCount });\n  }\n\n  lastPostLabel() {\n    return app.translator.trans('core.forum.post_scrubber.now_link');\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    if (this.stream.forceUpdateScrubber) {\n      this.stream.forceUpdateScrubber = false;\n      this.stream.loadPromise.then(() => this.updateScrubberValues({ animate: true, forceHeightChange: true }));\n    }\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    // Whenever the window is resized, adjust the height of the scrollbar\n    // so that it fills the height of the sidebar.\n    $(window)\n      .on('resize', (this.handlers.onresize = this.onresize.bind(this)))\n      .resize();\n\n    // When any part of the whole scrollbar is clicked, we want to jump to\n    // that position.\n    this.$('.Scrubber-scrollbar')\n      .bind('click', this.onclick.bind(this))\n\n      // Now we want to make the scrollbar handle draggable. Let's start by\n      // preventing default browser events from messing things up.\n      .bind('dragstart mousedown touchstart', (e) => e.preventDefault());\n\n    // When the mouse is pressed on the scrollbar handle, we capture some\n    // information about its current position. We will store this\n    // information in an object and pass it on to the document's\n    // mousemove/mouseup events later.\n    this.dragging = false;\n    this.mouseStart = 0;\n    this.indexStart = 0;\n\n    this.$('.Scrubber-handle')\n      .bind('mousedown touchstart', this.onmousedown.bind(this))\n\n      // Exempt the scrollbar handle from the 'jump to' click event.\n      .click((e) => e.stopPropagation());\n\n    // When the mouse moves and when it is released, we pass the\n    // information that we captured when the mouse was first pressed onto\n    // some event handlers. These handlers will move the scrollbar/stream-\n    // content as appropriate.\n    $(document)\n      .on('mousemove touchmove', (this.handlers.onmousemove = this.onmousemove.bind(this)))\n      .on('mouseup touchend', (this.handlers.onmouseup = this.onmouseup.bind(this)));\n\n    setTimeout(() => this.scrollListener.start());\n\n    this.stream.loadPromise.then(() => this.updateScrubberValues({ animate: false, forceHeightChange: true }));\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    this.scrollListener.stop();\n    $(window).off('resize', this.handlers.onresize);\n\n    $(document).off('mousemove touchmove', this.handlers.onmousemove).off('mouseup touchend', this.handlers.onmouseup);\n  }\n\n  /**\n   * Update the scrollbar's position to reflect the current values of the\n   * index/visible properties.\n   *\n   * @param {Partial<{fromScroll: boolean, forceHeightChange: boolean, animate: boolean}>} options\n   */\n  updateScrubberValues(options = {}) {\n    const index = this.stream.index;\n    const count = this.stream.count();\n    const visible = this.stream.visible || 1;\n    const percentPerPost = this.percentPerPost();\n\n    const $scrubber = this.$();\n    $scrubber.find('.Scrubber-index').text(formatNumber(this.stream.sanitizeIndex(Math.max(1, index))));\n    $scrubber.find('.Scrubber-description').text(this.stream.description);\n    $scrubber.toggleClass('disabled', this.stream.disabled());\n\n    const heights = {};\n    heights.before = Math.max(0, percentPerPost.index * Math.min(index - 1, count - visible));\n    heights.handle = Math.min(100 - heights.before, percentPerPost.visible * visible);\n    heights.after = 100 - heights.before - heights.handle;\n\n    // If the stream is paused, don't change height on scroll, as the viewport is being scrolled by the JS\n    // If a height change animation is already in progress, don't adjust height unless overriden\n    if ((options.fromScroll && this.stream.paused) || (this.adjustingHeight && !options.forceHeightChange)) return;\n\n    const func = options.animate ? 'animate' : 'css';\n    this.adjustingHeight = true;\n    const animationPromises = [];\n    for (const part in heights) {\n      const $part = $scrubber.find(`.Scrubber-${part}`);\n      animationPromises.push(\n        $part\n          .stop(true, true)\n          [func]({ height: heights[part] + '%' }, 'fast')\n          .promise()\n      );\n\n      // jQuery likes to put overflow:hidden, but because the scrollbar handle\n      // has a negative margin-left, we need to override.\n      if (func === 'animate') $part.css('overflow', 'visible');\n    }\n    Promise.all(animationPromises).then(() => (this.adjustingHeight = false));\n  }\n\n  /**\n   * Go to the first post in the discussion.\n   */\n  goToFirst() {\n    this.stream.goToFirst();\n    this.updateScrubberValues({ animate: true, forceHeightChange: true });\n  }\n\n  /**\n   * Go to the last post in the discussion.\n   */\n  goToLast() {\n    this.stream.goToLast();\n    this.updateScrubberValues({ animate: true, forceHeightChange: true });\n  }\n\n  onresize() {\n    // Adjust the height of the scrollbar so that it fills the height of\n    // the sidebar and doesn't overlap the footer.\n    const scrubber = this.$();\n    const scrollbar = this.$('.Scrubber-scrollbar');\n\n    scrollbar.css(\n      'max-height',\n      $(window).height() -\n        scrubber.offset().top +\n        $(window).scrollTop() -\n        parseInt($('#app').css('padding-bottom'), 10) -\n        (scrubber.outerHeight() - scrollbar.outerHeight())\n    );\n  }\n\n  onmousedown(e) {\n    e.redraw = false;\n    this.mouseStart = e.clientY || e.originalEvent.touches[0].clientY;\n    this.indexStart = this.stream.index;\n    this.dragging = true;\n    $('body').css('cursor', 'move');\n    this.$().toggleClass('dragging', this.dragging);\n  }\n\n  onmousemove(e) {\n    if (!this.dragging) return;\n\n    // Work out how much the mouse has moved by - first in pixels, then\n    // convert it to a percentage of the scrollbar's height, and then\n    // finally convert it into an index. Add this delta index onto\n    // the index at which the drag was started, and then scroll there.\n    const deltaPixels = (e.clientY || e.originalEvent.touches[0].clientY) - this.mouseStart;\n    const deltaPercent = (deltaPixels / this.$('.Scrubber-scrollbar').outerHeight()) * 100;\n    const deltaIndex = deltaPercent / this.percentPerPost().index || 0;\n    const newIndex = Math.min(this.indexStart + deltaIndex, this.stream.count() - 1);\n\n    this.stream.index = Math.max(0, newIndex);\n    this.updateScrubberValues();\n  }\n\n  onmouseup() {\n    this.$().toggleClass('dragging', this.dragging);\n    if (!this.dragging) return;\n\n    this.mouseStart = 0;\n    this.indexStart = 0;\n    this.dragging = false;\n    $('body').css('cursor', '');\n\n    this.$().removeClass('open');\n\n    // If the index we've landed on is in a gap, then tell the stream-\n    // content that we want to load those posts.\n    const intIndex = Math.floor(this.stream.index);\n    this.stream.goToIndex(intIndex);\n  }\n\n  onclick(e) {\n    // Calculate the index which we want to jump to based on the click position.\n\n    // 1. Get the offset of the click from the top of the scrollbar, as a\n    //    percentage of the scrollbar's height.\n    const $scrollbar = this.$('.Scrubber-scrollbar');\n    const offsetPixels = (e.pageY || e.originalEvent.touches[0].pageY) - $scrollbar.offset().top + $('body').scrollTop();\n    let offsetPercent = (offsetPixels / $scrollbar.outerHeight()) * 100;\n\n    // 2. We want the handle of the scrollbar to end up centered on the click\n    //    position. Thus, we calculate the height of the handle in percent and\n    //    use that to find a new offset percentage.\n    offsetPercent = offsetPercent - parseFloat($scrollbar.find('.Scrubber-handle')[0].style.height) / 2;\n\n    // 3. Now we can convert the percentage into an index, and tell the stream-\n    //    content component to jump to that index.\n    let offsetIndex = offsetPercent / this.percentPerPost().index;\n    offsetIndex = Math.max(0, Math.min(this.stream.count() - 1, offsetIndex));\n    this.stream.goToIndex(Math.floor(offsetIndex));\n    this.updateScrubberValues({ animate: true, forceHeightChange: true });\n\n    this.$().removeClass('open');\n  }\n\n  /**\n   * Get the percentage of the height of the scrubber that should be allocated\n   * to each post.\n   *\n   * @return {{ index: number, visible: number }}\n   * @property {Number} index The percent per post for posts on either side of\n   *     the visible part of the scrubber.\n   * @property {Number} visible The percent per post for the visible part of the\n   *     scrubber.\n   */\n  percentPerPost() {\n    const count = this.stream.count() || 1;\n    const visible = this.stream.visible || 1;\n\n    // To stop the handle of the scrollbar from getting too small when there\n    // are many posts, we define a minimum percentage height for the handle\n    // calculated from a 50 pixel limit. From this, we can calculate the\n    // minimum percentage per visible post. If this is greater than the actual\n    // percentage per post, then we need to adjust the 'before' percentage to\n    // account for it.\n    const minPercentVisible = (50 / this.$('.Scrubber-scrollbar').outerHeight()) * 100;\n    const percentPerVisiblePost = Math.max(100 / count, minPercentVisible / visible);\n    const percentPerPost = count === visible ? 0 : (100 - percentPerVisiblePost * visible) / (count - visible);\n\n    return {\n      index: percentPerPost,\n      visible: percentPerVisiblePost,\n    };\n  }\n}\n","import Dropdown, { IDropdownAttrs } from './Dropdown';\nimport Button from './Button';\nimport icon from '../helpers/icon';\nimport Mithril from 'mithril';\nimport classList from '../utils/classList';\n\nexport interface ISplitDropdownAttrs extends IDropdownAttrs {}\n\n/**\n * The `SplitDropdown` component is similar to `Dropdown`, but the first child\n * is displayed as its own button prior to the toggle button.\n */\nexport default class SplitDropdown extends Dropdown {\n  static initAttrs(attrs: ISplitDropdownAttrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = classList(attrs.className, 'Dropdown--split');\n    attrs.menuClassName = classList(attrs.menuClassName, 'Dropdown-menu--right');\n  }\n\n  getButton(children: Mithril.ChildArray): Mithril.Vnode<any, any> {\n    // Make a copy of the attrs of the first child component. We will assign\n    // these attrs to a new button, so that it has exactly the same behaviour as\n    // the first child.\n    const firstChild = this.getFirstChild(children);\n    const buttonAttrs = Object.assign({}, firstChild?.attrs);\n    buttonAttrs.className = classList(buttonAttrs.className, 'SplitDropdown-button Button', this.attrs.buttonClassName);\n\n    return (\n      <>\n        <Button {...buttonAttrs}>{firstChild.children}</Button>\n        <button\n          className={'Dropdown-toggle Button Button--icon ' + this.attrs.buttonClassName}\n          aria-haspopup=\"menu\"\n          aria-label={this.attrs.accessibleToggleLabel}\n          data-toggle=\"dropdown\"\n        >\n          {this.attrs.icon ? icon(this.attrs.icon, { className: 'Button-icon' }) : null}\n          {icon('fas fa-caret-down', { className: 'Button-caret' })}\n        </button>\n      </>\n    );\n  }\n\n  /**\n   * Get the first child. If the first child is an array, the first item in that\n   * array will be returned.\n   */\n  protected getFirstChild(children: Mithril.Children): Mithril.Vnode<any, any> {\n    let firstChild = children;\n\n    while (firstChild instanceof Array) firstChild = firstChild[0];\n\n    return firstChild as Mithril.Vnode<any, any>;\n  }\n}\n","/* eslint-disable no-undefined,no-param-reassign,no-shadow */\n\n/**\n * Throttle execution of a function. Especially useful for rate limiting\n * execution of handlers on events like resize and scroll.\n *\n * @param  {number}    delay -          A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param  {boolean}   [noTrailing] -   Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the\n *                                    throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time\n *                                    after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,\n *                                    the internal counter is reset).\n * @param  {Function}  callback -       A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n *                                    to `callback` when the throttled-function is executed.\n * @param  {boolean}   [debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),\n *                                    schedule `callback` to execute after `delay` ms.\n *\n * @returns {Function}  A new, throttled, function.\n */\nexport default function (delay, noTrailing, callback, debounceMode) {\n\t/*\n\t * After wrapper has stopped being called, this timeout ensures that\n\t * `callback` is executed at the proper times in `throttle` and `end`\n\t * debounce modes.\n\t */\n\tlet timeoutID;\n\tlet cancelled = false;\n\n\t// Keep track of the last time `callback` was executed.\n\tlet lastExec = 0;\n\n\t// Function to clear existing timeout\n\tfunction clearExistingTimeout() {\n\t\tif (timeoutID) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\t}\n\n\t// Function to cancel next exec\n\tfunction cancel() {\n\t\tclearExistingTimeout();\n\t\tcancelled = true;\n\t}\n\n\t// `noTrailing` defaults to falsy.\n\tif (typeof noTrailing !== 'boolean') {\n\t\tdebounceMode = callback;\n\t\tcallback = noTrailing;\n\t\tnoTrailing = undefined;\n\t}\n\n\t/*\n\t * The `wrapper` function encapsulates all of the throttling / debouncing\n\t * functionality and when executed will limit the rate at which `callback`\n\t * is executed.\n\t */\n\tfunction wrapper(...arguments_) {\n\t\tlet self = this;\n\t\tlet elapsed = Date.now() - lastExec;\n\n\t\tif (cancelled) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec() {\n\t\t\tlastExec = Date.now();\n\t\t\tcallback.apply(self, arguments_);\n\t\t}\n\n\t\t/*\n\t\t * If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t * to allow future `callback` executions.\n\t\t */\n\t\tfunction clear() {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif (debounceMode && !timeoutID) {\n\t\t\t/*\n\t\t\t * Since `wrapper` is being called for the first time and\n\t\t\t * `debounceMode` is true (at begin), execute `callback`.\n\t\t\t */\n\t\t\texec();\n\t\t}\n\n\t\tclearExistingTimeout();\n\n\t\tif (debounceMode === undefined && elapsed > delay) {\n\t\t\t/*\n\t\t\t * In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t * `callback`.\n\t\t\t */\n\t\t\texec();\n\t\t} else if (noTrailing !== true) {\n\t\t\t/*\n\t\t\t * In trailing throttle mode, since `delay` time has not been\n\t\t\t * exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t * recent execution.\n\t\t\t *\n\t\t\t * If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t * after `delay` ms.\n\t\t\t *\n\t\t\t * If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t * execute after `delay` ms.\n\t\t\t */\n\t\t\ttimeoutID = setTimeout(\n\t\t\t\tdebounceMode ? clear : exec,\n\t\t\t\tdebounceMode === undefined ? delay - elapsed : delay\n\t\t\t);\n\t\t}\n\t}\n\n\twrapper.cancel = cancel;\n\n\t// Return the wrapper function.\n\treturn wrapper;\n}\n","/* eslint-disable no-undefined */\n\nimport throttle from './throttle';\n\n/**\n * Debounce execution of a function. Debouncing, unlike throttling,\n * guarantees that a function is only executed a single time, either at the\n * very beginning of a series of calls, or at the very end.\n *\n * @param  {number}   delay -         A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param  {boolean}  [atBegin] -     Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds\n *                                  after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.\n *                                  (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).\n * @param  {Function} callback -      A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n *                                  to `callback` when the debounced-function is executed.\n *\n * @returns {Function} A new, debounced function.\n */\nexport default function (delay, atBegin, callback) {\n\treturn callback === undefined\n\t\t? throttle(delay, atBegin, false)\n\t\t: throttle(delay, callback, atBegin !== false);\n}\n","/**\n * The `anchorScroll` utility saves the scroll position relative to an element,\n * and then restores it after a callback has been run.\n *\n * This is useful if a redraw will change the page's content above the viewport.\n * Normally doing this will result in the content in the viewport being pushed\n * down or pulled up. By wrapping the redraw with this utility, the scroll\n * position can be anchor to an element that is in or below the viewport, so\n * the content in the viewport will stay the same.\n *\n * @param {string | HTMLElement | SVGElement | Element} element The element to anchor the scroll position to.\n * @param {() => void} callback The callback to run that will change page content.\n */\nexport default function anchorScroll(element, callback) {\n  const $window = $(window);\n  const relativeScroll = $(element).offset().top - $window.scrollTop();\n\n  callback();\n\n  $window.scrollTop($(element).offset().top - relativeScroll);\n}\n","import app from '../../forum/app';\nimport { throttle } from 'throttle-debounce';\nimport anchorScroll from '../../common/utils/anchorScroll';\nimport type Discussion from '../../common/models/Discussion';\nimport type Post from '../../common/models/Post';\n\nexport default class PostStreamState {\n  /**\n   * The number of posts to load per page.\n   */\n  static loadCount = 20;\n\n  /**\n   * The discussion to display the post stream for.\n   */\n  discussion: Discussion;\n\n  /**\n   * Whether or not the infinite-scrolling auto-load functionality is\n   * disabled.\n   */\n  paused = false;\n\n  loadPageTimeouts: Record<number, NodeJS.Timeout> = {};\n  pagesLoading = 0;\n\n  index = 0;\n  number = 1;\n\n  /**\n   * The number of posts that are currently visible in the viewport.\n   */\n  visible = 1;\n  visibleStart = 0;\n  visibleEnd = 0;\n\n  animateScroll = false;\n  needsScroll = false;\n  targetPost: { number: number } | { index: number; reply?: boolean } | null = null;\n\n  /**\n   * The description to render on the scrubber.\n   */\n  description = '';\n\n  /**\n   * When the page is scrolled, goToIndex is called, or the page is loaded,\n   * various listeners result in the scrubber being updated with a new\n   * position and values. However, if goToNumber is called, the scrubber\n   * will not be updated. Accordingly, we add logic to the scrubber's\n   * onupdate to update itself, but only when needed, as indicated by this\n   * property.\n   *\n   */\n  forceUpdateScrubber = false;\n\n  loadPromise: Promise<void> | null = null;\n\n  loadNext: () => void;\n  loadPrevious: () => void;\n\n  constructor(discussion: Discussion, includedPosts: Post[] = []) {\n    this.discussion = discussion;\n\n    this.loadNext = throttle(300, this._loadNext);\n    this.loadPrevious = throttle(300, this._loadPrevious);\n\n    this.show(includedPosts);\n  }\n\n  /**\n   * Update the stream so that it loads and includes the latest posts in the\n   * discussion, if the end is being viewed.\n   */\n  update() {\n    if (!this.viewingEnd()) return Promise.resolve();\n\n    this.visibleEnd = this.count();\n\n    return this.loadRange(this.visibleStart, this.visibleEnd);\n  }\n\n  /**\n   * Load and scroll up to the first post in the discussion.\n   */\n  goToFirst(): Promise<void> {\n    return this.goToIndex(0);\n  }\n\n  /**\n   * Load and scroll down to the last post in the discussion.\n   */\n  goToLast(): Promise<void> {\n    return this.goToIndex(this.count() - 1, true);\n  }\n\n  /**\n   * Load and scroll to a post with a certain number.\n   *\n   * @param number The post number to go to. If 'reply', go to the last post and scroll the reply preview into view.\n   */\n  goToNumber(number: number | 'reply', noAnimation = false): Promise<void> {\n    // If we want to go to the reply preview, then we will go to the end of the\n    // discussion and then scroll to the very bottom of the page.\n    if (number === 'reply') {\n      const resultPromise = this.goToLast();\n      this.targetPost = { ...(this.targetPost as { index: number }), reply: true };\n      return resultPromise;\n    }\n\n    this.paused = true;\n\n    this.loadPromise = this.loadNearNumber(number);\n\n    this.needsScroll = true;\n    this.targetPost = { number };\n    this.animateScroll = !noAnimation;\n    this.number = number;\n\n    // In this case, the redraw is only called after the response has been loaded\n    // because we need to know the indices of the post range before we can\n    // start scrolling to items. Calling redraw early causes issues.\n    // Since this is only used for external navigation to the post stream, the delay\n    // before the stream is moved is not an issue.\n    return this.loadPromise.then(() => m.redraw());\n  }\n\n  /**\n   * Load and scroll to a certain index within the discussion.\n   */\n  goToIndex(index: number, noAnimation = false): Promise<void> {\n    this.paused = true;\n\n    this.loadPromise = this.loadNearIndex(index);\n\n    this.needsScroll = true;\n    this.targetPost = { index };\n    this.animateScroll = !noAnimation;\n    this.index = index;\n\n    m.redraw();\n\n    return this.loadPromise;\n  }\n\n  /**\n   * Clear the stream and load posts near a certain number. Returns a promise.\n   * If the post with the given number is already loaded, the promise will be\n   * resolved immediately.\n   */\n  loadNearNumber(number: number): Promise<void> {\n    if (this.posts().some((post) => post && Number(post.number()) === Number(number))) {\n      return Promise.resolve();\n    }\n\n    this.reset();\n\n    return app.store\n      .find<Post[]>('posts', {\n        filter: { discussion: this.discussion.id() as string },\n        page: { near: number },\n      })\n      .then(this.show.bind(this));\n  }\n\n  /**\n   * Clear the stream and load posts near a certain index. A page of posts\n   * surrounding the given index will be loaded. Returns a promise. If the given\n   * index is already loaded, the promise will be resolved immediately.\n   */\n  loadNearIndex(index: number): Promise<void> {\n    if (index >= this.visibleStart && index < this.visibleEnd) {\n      return Promise.resolve();\n    }\n\n    const start = this.sanitizeIndex(index - PostStreamState.loadCount / 2);\n    const end = start + PostStreamState.loadCount;\n\n    this.reset(start, end);\n\n    return this.loadRange(start, end).then(this.show.bind(this));\n  }\n\n  /**\n   * Load the next page of posts.\n   */\n  _loadNext() {\n    const start = this.visibleEnd;\n    const end = (this.visibleEnd = this.sanitizeIndex(this.visibleEnd + PostStreamState.loadCount));\n\n    // Unload the posts which are two pages back from the page we're currently\n    // loading.\n    const twoPagesAway = start - PostStreamState.loadCount * 2;\n    if (twoPagesAway > this.visibleStart && twoPagesAway >= 0) {\n      this.visibleStart = twoPagesAway + PostStreamState.loadCount + 1;\n\n      if (this.loadPageTimeouts[twoPagesAway]) {\n        clearTimeout(this.loadPageTimeouts[twoPagesAway]);\n        delete this.loadPageTimeouts[twoPagesAway];\n        this.pagesLoading--;\n      }\n    }\n\n    this.loadPage(start, end);\n  }\n\n  /**\n   * Load the previous page of posts.\n   */\n  _loadPrevious() {\n    const end = this.visibleStart;\n    const start = (this.visibleStart = this.sanitizeIndex(this.visibleStart - PostStreamState.loadCount));\n\n    // Unload the posts which are two pages back from the page we're currently\n    // loading.\n    const twoPagesAway = start + PostStreamState.loadCount * 2;\n    if (twoPagesAway < this.visibleEnd && twoPagesAway <= this.count()) {\n      this.visibleEnd = twoPagesAway;\n\n      if (this.loadPageTimeouts[twoPagesAway]) {\n        clearTimeout(this.loadPageTimeouts[twoPagesAway]);\n        delete this.loadPageTimeouts[twoPagesAway];\n        this.pagesLoading--;\n      }\n    }\n\n    this.loadPage(start, end, true);\n  }\n\n  /**\n   * Load a page of posts into the stream and redraw.\n   */\n  loadPage(start: number, end: number, backwards = false) {\n    this.pagesLoading++;\n\n    const redraw = () => {\n      if (start < this.visibleStart || end > this.visibleEnd) return;\n\n      const anchorIndex = backwards ? this.visibleEnd - 1 : this.visibleStart;\n      anchorScroll(`.PostStream-item[data-index=\"${anchorIndex}\"]`, m.redraw.sync);\n    };\n    redraw();\n\n    this.loadPageTimeouts[start] = setTimeout(\n      () => {\n        this.loadRange(start, end).then(() => {\n          redraw();\n          this.pagesLoading--;\n        });\n        delete this.loadPageTimeouts[start];\n      },\n      this.pagesLoading - 1 ? 1000 : 0\n    );\n  }\n\n  /**\n   * Load and inject the specified range of posts into the stream, without\n   * clearing it.\n   */\n  loadRange(start: number, end: number): Promise<Post[]> {\n    const loadIds: string[] = [];\n    const loaded: Post[] = [];\n\n    this.discussion\n      .postIds()\n      .slice(start, end)\n      .forEach((id) => {\n        const post = app.store.getById<Post>('posts', id);\n\n        if (post && post.discussion() && typeof post.canEdit() !== 'undefined') {\n          loaded.push(post);\n        } else {\n          loadIds.push(id);\n        }\n      });\n\n    if (loadIds.length) {\n      return app.store.find<Post[]>('posts', loadIds).then((newPosts) => {\n        return loaded.concat(newPosts).sort((a, b) => a.number() - b.number());\n      });\n    }\n\n    return Promise.resolve(loaded);\n  }\n\n  /**\n   * Set up the stream with the given array of posts.\n   */\n  show(posts: Post[]) {\n    this.visibleStart = posts.length ? this.discussion.postIds().indexOf(posts[0].id() ?? '0') : 0;\n    this.visibleEnd = this.sanitizeIndex(this.visibleStart + posts.length);\n  }\n\n  /**\n   * Reset the stream so that a specific range of posts is displayed. If a range\n   * is not specified, the first page of posts will be displayed.\n   */\n  reset(start?: number, end?: number) {\n    this.visibleStart = start || 0;\n    this.visibleEnd = this.sanitizeIndex(end || PostStreamState.loadCount);\n  }\n\n  /**\n   * Get the visible page of posts.\n   */\n  posts(): (Post | null)[] {\n    return this.discussion\n      .postIds()\n      .slice(this.visibleStart, this.visibleEnd)\n      .map((id) => {\n        const post = app.store.getById<Post>('posts', id);\n\n        return post && post.discussion() && typeof post.canEdit() !== 'undefined' ? post : null;\n      });\n  }\n\n  /**\n   * Get the total number of posts in the discussion.\n   */\n  count(): number {\n    return this.discussion.postIds().length;\n  }\n\n  /**\n   * Check whether or not the scrubber should be disabled, i.e. if all of the\n   * posts are visible in the viewport.\n   */\n  disabled(): boolean {\n    return this.visible >= this.count();\n  }\n\n  /**\n   * Are we currently viewing the end of the discussion?\n   */\n  viewingEnd(): boolean {\n    // In some cases, such as if we've stickied a post, an event post\n    // may have been added / removed. This means that `this.visibleEnd`\n    // and`this.count()` will be out of sync by 1 post, but we are still\n    // \"viewing the end\" of the post stream, so we should still reload\n    // all posts up until the last one.\n    return Math.abs(this.count() - this.visibleEnd) <= 1;\n  }\n\n  /**\n   * Make sure that the given index is not outside of the possible range of\n   * indexes in the discussion.\n   */\n  sanitizeIndex(index: number) {\n    return Math.max(0, Math.min(this.count(), Math.floor(index)));\n  }\n}\n","import type Mithril from 'mithril';\n\nimport app from '../../forum/app';\nimport Page, { IPageAttrs } from '../../common/components/Page';\nimport ItemList from '../../common/utils/ItemList';\nimport DiscussionHero from './DiscussionHero';\nimport DiscussionListPane from './DiscussionListPane';\nimport PostStream from './PostStream';\nimport PostStreamScrubber from './PostStreamScrubber';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport SplitDropdown from '../../common/components/SplitDropdown';\nimport listItems from '../../common/helpers/listItems';\nimport DiscussionControls from '../utils/DiscussionControls';\nimport PostStreamState from '../states/PostStreamState';\nimport Discussion from '../../common/models/Discussion';\nimport Post from '../../common/models/Post';\nimport { ApiResponseSingle } from '../../common/Store';\n\nexport interface IDiscussionPageAttrs extends IPageAttrs {\n  id: string;\n  near?: number;\n}\n\n/**\n * The `DiscussionPage` component displays a whole discussion page, including\n * the discussion list pane, the hero, the posts, and the sidebar.\n */\nexport default class DiscussionPage<CustomAttrs extends IDiscussionPageAttrs = IDiscussionPageAttrs> extends Page<CustomAttrs> {\n  /**\n   * The discussion that is being viewed.\n   */\n  protected discussion: Discussion | null = null;\n\n  /**\n   * A public API for interacting with the post stream.\n   */\n  protected stream: PostStreamState | null = null;\n\n  /**\n   * The number of the first post that is currently visible in the viewport.\n   */\n  protected near: number = 0;\n\n  protected useBrowserScrollRestoration = true;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.load();\n\n    // If the discussion list has been loaded, then we'll enable the pane (and\n    // hide it by default). Also, if we've just come from another discussion\n    // page, then we don't want Mithril to redraw the whole page – if it did,\n    // then the pane would redraw which would be slow and would cause problems with\n    // event handlers.\n    // We will also enable the pane if the discussion list is empty but loading,\n    // because the DiscussionComposer refreshes the list and redirects to the new discussion at the same time.\n    if (app.discussions.hasItems() || app.discussions.isLoading()) {\n      app.pane?.enable();\n      app.pane?.hide();\n    }\n\n    this.bodyClass = 'App--discussion';\n  }\n\n  onremove(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onremove(vnode);\n\n    // If we are indeed navigating away from this discussion, then disable the\n    // discussion list pane. Also, if we're composing a reply to this\n    // discussion, minimize the composer – unless it's empty, in which case\n    // we'll just close it.\n    app.pane?.disable();\n\n    if (this.discussion && app.composer.composingReplyTo(this.discussion) && !app.composer?.fields?.content()) {\n      app.composer.hide();\n    } else {\n      app.composer.minimize();\n    }\n  }\n\n  view(): Mithril.Children {\n    return <div className=\"DiscussionPage\">{this.viewItems().toArray()}</div>;\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('pane', <DiscussionListPane state={app.discussions} />, 100);\n    items.add(\n      'discussions',\n      <div className=\"DiscussionPage-discussion\">{this.discussion ? this.pageContent().toArray() : this.loadingItems().toArray()}</div>,\n      90\n    );\n\n    return items;\n  }\n\n  /**\n   * List of components shown while the discussion is loading.\n   */\n  loadingItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('spinner', <LoadingIndicator />, 100);\n\n    return items;\n  }\n\n  /**\n   * Function that renders the `sidebarItems` ItemList.\n   */\n  sidebar(): Mithril.Children {\n    return (\n      <nav className=\"DiscussionPage-nav\">\n        <ul>{listItems(this.sidebarItems().toArray())}</ul>\n      </nav>\n    );\n  }\n\n  /**\n   * Renders the discussion's hero.\n   */\n  hero(): Mithril.Children {\n    return <DiscussionHero discussion={this.discussion} />;\n  }\n\n  /**\n   * List of items rendered as the main page content.\n   */\n  pageContent(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('hero', this.hero(), 100);\n    items.add('main', <div className=\"container\">{this.mainContent().toArray()}</div>, 10);\n\n    return items;\n  }\n\n  /**\n   * List of items rendered inside the main page content container.\n   */\n  mainContent(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('sidebar', this.sidebar(), 100);\n\n    items.add(\n      'poststream',\n      <div className=\"DiscussionPage-stream\">\n        <PostStream discussion={this.discussion} stream={this.stream} onPositionChange={this.positionChanged.bind(this)} />\n      </div>,\n      10\n    );\n\n    return items;\n  }\n\n  /**\n   * Load the discussion from the API or use the preloaded one.\n   */\n  load(): void {\n    const preloadedDiscussion = app.preloadedApiDocument<Discussion>();\n    if (preloadedDiscussion) {\n      // We must wrap this in a setTimeout because if we are mounting this\n      // component for the first time on page load, then any calls to m.redraw\n      // will be ineffective and thus any configs (scroll code) will be run\n      // before stuff is drawn to the page.\n      setTimeout(this.show.bind(this, preloadedDiscussion), 0);\n    } else {\n      const params = this.requestParams();\n\n      app.store.find<Discussion>('discussions', m.route.param('id'), params).then(this.show.bind(this));\n    }\n\n    m.redraw();\n  }\n\n  /**\n   * Get the parameters that should be passed in the API request to get the\n   * discussion.\n   */\n  requestParams(): Record<string, unknown> {\n    return {\n      bySlug: true,\n      page: { near: this.near },\n    };\n  }\n\n  /**\n   * Initialize the component to display the given discussion.\n   */\n  show(discussion: ApiResponseSingle<Discussion>): void {\n    app.history.push('discussion', discussion.title());\n    app.setTitle(discussion.title());\n    app.setTitleCount(0);\n\n    // When the API responds with a discussion, it will also include a number of\n    // posts. Some of these posts are included because they are on the first\n    // page of posts we want to display (determined by the `near` parameter) –\n    // others may be included because due to other relationships introduced by\n    // extensions. We need to distinguish the two so we don't end up displaying\n    // the wrong posts. We do so by filtering out the posts that don't have\n    // the 'discussion' relationship linked, then sorting and splicing.\n    let includedPosts: Post[] = [];\n    if (discussion.payload && discussion.payload.included) {\n      const discussionId = discussion.id();\n\n      includedPosts = discussion.payload.included\n        .filter(\n          (record) =>\n            record.type === 'posts' &&\n            record.relationships &&\n            record.relationships.discussion &&\n            !Array.isArray(record.relationships.discussion.data) &&\n            record.relationships.discussion.data.id === discussionId\n        )\n        // We can make this assertion because posts should be in the store,\n        // since they were in the discussion's payload.\n        .map((record) => app.store.getById<Post>('posts', record.id) as Post)\n        .sort((a: Post, b: Post) => a.number() - b.number())\n        .slice(0, 20);\n    }\n\n    // Set up the post stream for this discussion, along with the first page of\n    // posts we want to display. Tell the stream to scroll down and highlight\n    // the specific post that was routed to.\n    this.stream = new PostStreamState(discussion, includedPosts);\n    const rawNearParam = m.route.param('near');\n    const nearParam = rawNearParam === 'reply' ? 'reply' : parseInt(rawNearParam);\n    this.stream.goToNumber(nearParam || (includedPosts[0]?.number() ?? 0), true).then(() => {\n      this.discussion = discussion;\n\n      app.current.set('discussion', discussion);\n      app.current.set('stream', this.stream);\n    });\n  }\n\n  /**\n   * Build an item list for the contents of the sidebar.\n   */\n  sidebarItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.discussion) {\n      items.add(\n        'controls',\n        <SplitDropdown\n          icon=\"fas fa-ellipsis-v\"\n          className=\"App-primaryControl\"\n          buttonClassName=\"Button--primary\"\n          accessibleToggleLabel={app.translator.trans('core.forum.discussion_controls.toggle_dropdown_accessible_label')}\n        >\n          {DiscussionControls.controls(this.discussion, this).toArray()}\n        </SplitDropdown>,\n        100\n      );\n    }\n\n    items.add('scrubber', <PostStreamScrubber stream={this.stream} className=\"App-titleControl\" />, -100);\n\n    return items;\n  }\n\n  /**\n   * When the posts that are visible in the post stream change (i.e. the user\n   * scrolls up or down), then we update the URL and mark the posts as read.\n   */\n  positionChanged(startNumber: number, endNumber: number): void {\n    const discussion = this.discussion;\n\n    if (!discussion) return;\n\n    // Construct a URL to this discussion with the updated position, then\n    // replace it into the window's history and our own history stack.\n    const url = app.route.discussion(discussion, (this.near = startNumber));\n\n    window.history.replaceState(null, document.title, url);\n    app.history.push('discussion', discussion.title());\n\n    // If the user hasn't read past here before, then we'll update their read\n    // state and redraw.\n    if (app.session.user && endNumber > (discussion.lastReadPostNumber() || 0)) {\n      discussion.save({ lastReadPostNumber: endNumber });\n      m.redraw();\n    }\n  }\n}\n","import Component from '../../common/Component';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\n\n/**\n * The `HeaderPrimary` component displays primary header controls. On the\n * default skin, these are shown just to the right of the forum title.\n */\nexport default class HeaderPrimary extends Component {\n  view() {\n    return <ul className=\"Header-controls\">{listItems(this.items().toArray())}</ul>;\n  }\n\n  /**\n   * Build an item list for the controls.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  items() {\n    return new ItemList();\n  }\n}\n","import Button from './Button';\nimport Link from './Link';\n\n/**\n * The `LinkButton` component defines a `Button` which links to a route.\n *\n * ### Attrs\n *\n * All of the attrs accepted by `Button`, plus:\n *\n * - `active` Whether or not the page that this button links to is currently\n *   active.\n * - `href` The URL to link to. If the current URL `m.route()` matches this,\n *   the `active` prop will automatically be set to true.\n * - `force` Whether the page should be fully rerendered. Defaults to `true`.\n */\nexport default class LinkButton extends Button {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.active = this.isActive(attrs);\n    if (attrs.force === undefined) attrs.force = true;\n  }\n\n  view(vnode) {\n    const vdom = super.view(vnode);\n\n    vdom.tag = Link;\n    vdom.attrs.active = String(vdom.attrs.active);\n    delete vdom.attrs.type;\n\n    return vdom;\n  }\n\n  /**\n   * Determine whether a component with the given attrs is 'active'.\n   *\n   * @param {object} attrs\n   * @return {boolean}\n   */\n  static isActive(attrs) {\n    return typeof attrs.active !== 'undefined' ? attrs.active : m.route.get()?.split('?')[0] === attrs.href?.split('?')[0];\n  }\n}\n","import app from '../../forum/app';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport Dropdown, { IDropdownAttrs } from '../../common/components/Dropdown';\nimport LinkButton from '../../common/components/LinkButton';\nimport Button from '../../common/components/Button';\nimport ItemList from '../../common/utils/ItemList';\nimport Separator from '../../common/components/Separator';\nimport extractText from '../../common/utils/extractText';\nimport type Mithril from 'mithril';\n\nexport interface ISessionDropdownAttrs extends IDropdownAttrs {}\n\n/**\n * The `SessionDropdown` component shows a button with the current user's\n * avatar/name, with a dropdown of session controls.\n */\nexport default class SessionDropdown<CustomAttrs extends ISessionDropdownAttrs = ISessionDropdownAttrs> extends Dropdown<CustomAttrs> {\n  static initAttrs(attrs: ISessionDropdownAttrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = 'SessionDropdown';\n    attrs.buttonClassName = 'Button Button--user Button--flat';\n    attrs.menuClassName = 'Dropdown-menu--right';\n\n    attrs.accessibleToggleLabel = extractText(app.translator.trans('core.forum.header.session_dropdown_accessible_label'));\n  }\n\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    return super.view({ ...vnode, children: this.items().toArray() });\n  }\n\n  getButtonContent() {\n    const user = app.session.user;\n\n    return [avatar(user), ' ', <span className=\"Button-label\">{username(user)}</span>];\n  }\n\n  /**\n   * Build an item list for the contents of the dropdown menu.\n   */\n  items(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n    const user = app.session.user!;\n\n    items.add(\n      'profile',\n      <LinkButton icon=\"fas fa-user\" href={app.route.user(user)}>\n        {app.translator.trans('core.forum.header.profile_button')}\n      </LinkButton>,\n      100\n    );\n\n    items.add(\n      'settings',\n      <LinkButton icon=\"fas fa-cog\" href={app.route('settings')}>\n        {app.translator.trans('core.forum.header.settings_button')}\n      </LinkButton>,\n      50\n    );\n\n    if (app.forum.attribute('adminUrl')) {\n      items.add(\n        'administration',\n        <LinkButton icon=\"fas fa-wrench\" href={app.forum.attribute('adminUrl')} target=\"_blank\">\n          {app.translator.trans('core.forum.header.admin_button')}\n        </LinkButton>,\n        0\n      );\n    }\n\n    items.add('separator', <Separator />, -90);\n\n    items.add(\n      'logOut',\n      <Button icon=\"fas fa-sign-out-alt\" onclick={app.session.logout.bind(app.session)}>\n        {app.translator.trans('core.forum.header.log_out_button')}\n      </Button>,\n      -100\n    );\n\n    return items;\n  }\n}\n","import Dropdown, { IDropdownAttrs } from './Dropdown';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport type Component from '../Component';\nimport type Mithril from 'mithril';\n\n/**\n * Determines via a vnode is currently \"active\".\n * Due to changes in Mithril 2, attrs will not be instantiated until AFTER view()\n * is initially called on the parent component, so we can not always depend on the\n * active attr to determine which element should be displayed as the \"active child\".\n *\n * This is a temporary patch, and as so, is not exported / placed in utils.\n */\nfunction isActive(vnode: Mithril.Children): boolean {\n  if (!vnode || typeof vnode !== 'object' || vnode instanceof Array) return false;\n\n  const tag = vnode.tag;\n\n  // Allow non-selectable dividers/headers to be added.\n  if (typeof tag === 'string' && tag !== 'a' && tag !== 'button') return false;\n\n  if ((typeof tag === 'object' || typeof tag === 'function') && 'initAttrs' in tag) {\n    (tag as unknown as typeof Component).initAttrs(vnode.attrs);\n  }\n\n  return (typeof tag === 'object' || typeof tag === 'function') && 'isActive' in tag ? (tag as any).isActive(vnode.attrs) : vnode.attrs.active;\n}\n\nexport interface ISelectDropdownAttrs extends IDropdownAttrs {\n  defaultLabel: string;\n}\n\n/**\n * The `SelectDropdown` component is the same as a `Dropdown`, except the toggle\n * button's label is set as the label of the first child which has a truthy\n * `active` prop.\n */\nexport default class SelectDropdown<CustomAttrs extends ISelectDropdownAttrs = ISelectDropdownAttrs> extends Dropdown<CustomAttrs> {\n  static initAttrs(attrs: ISelectDropdownAttrs) {\n    attrs.caretIcon ??= 'fas fa-sort';\n\n    super.initAttrs(attrs);\n\n    attrs.className = classList(attrs.className, 'Dropdown--select');\n  }\n\n  getButtonContent(children: Mithril.ChildArray): Mithril.ChildArray {\n    const activeChild = children.find(isActive);\n    let label = (activeChild && typeof activeChild === 'object' && 'children' in activeChild && activeChild.children) || this.attrs.defaultLabel;\n\n    // @ts-ignore\n    if (Array.isArray(label)) label = label[0];\n\n    return [<span className=\"Button-label\">{label}</span>, this.attrs.caretIcon ? icon(this.attrs.caretIcon, { className: 'Button-caret' }) : null];\n  }\n}\n","import app from '../common/app';\nimport { FlarumRequestOptions } from './Application';\nimport { fireDeprecationWarning } from './helpers/fireDebugWarning';\nimport Store, { ApiPayloadSingle, ApiResponseSingle, MetaInformation } from './Store';\n\nexport interface ModelIdentifier {\n  type: string;\n  id: string;\n}\n\nexport interface ModelAttributes {\n  [key: string]: unknown;\n}\n\nexport interface ModelRelationships {\n  [relationship: string]: {\n    data: ModelIdentifier | ModelIdentifier[];\n  };\n}\n\nexport interface UnsavedModelData {\n  type?: string;\n  attributes?: ModelAttributes;\n  relationships?: ModelRelationships;\n}\n\nexport interface SavedModelData {\n  type: string;\n  id: string;\n  attributes?: ModelAttributes;\n  relationships?: ModelRelationships;\n}\n\nexport type ModelData = UnsavedModelData | SavedModelData;\n\nexport interface SaveRelationships {\n  [relationship: string]: null | Model | Model[];\n}\n\nexport interface SaveAttributes {\n  [key: string]: unknown;\n  relationships?: SaveRelationships;\n}\n\n/**\n * The `Model` class represents a local data resource. It provides methods to\n * persist changes via the API.\n */\nexport default abstract class Model {\n  /**\n   * The resource object from the API.\n   */\n  data: ModelData = {};\n\n  /**\n   * The time at which the model's data was last updated. Watching the value\n   * of this property is a fast way to retain/cache a subtree if data hasn't\n   * changed.\n   */\n  freshness: Date = new Date();\n\n  /**\n   * Whether or not the resource exists on the server.\n   */\n  exists: boolean = false;\n\n  /**\n   * The data store that this resource should be persisted to.\n   */\n  protected store: Store;\n\n  /**\n   * @param data A resource object from the API.\n   * @param store The data store that this model should be persisted to.\n   */\n  constructor(data: ModelData = {}, store = app.store) {\n    this.data = data;\n    this.store = store;\n  }\n\n  /**\n   * Get the model's ID.\n   *\n   * @final\n   */\n  id(): string | undefined {\n    return 'id' in this.data ? this.data.id : undefined;\n  }\n\n  /**\n   * Get one of the model's attributes.\n   *\n   * @final\n   */\n  attribute<T = unknown>(attribute: string): T {\n    return this.data?.attributes?.[attribute] as T;\n  }\n\n  /**\n   * Merge new data into this model locally.\n   *\n   * @param data A resource object to merge into this model\n   */\n  pushData(data: ModelData | { relationships?: SaveRelationships }): this {\n    if ('id' in data) {\n      (this.data as SavedModelData).id = data.id;\n    }\n\n    if ('type' in data) {\n      this.data.type = data.type;\n    }\n\n    if ('attributes' in data) {\n      this.data.attributes ||= {};\n\n      // @deprecated\n      // Filter out relationships that got in by accident.\n      for (const key in data.attributes) {\n        const val = data.attributes[key];\n        if (val && val instanceof Model) {\n          fireDeprecationWarning('Providing models as attributes to `Model.pushData()` or `Model.pushAttributes()` is deprecated.', '3249');\n          delete data.attributes[key];\n          data.relationships ||= {};\n          data.relationships[key] = { data: Model.getIdentifier(val) };\n        }\n      }\n\n      Object.assign(this.data.attributes, data.attributes);\n    }\n\n    if ('relationships' in data) {\n      const relationships = this.data.relationships ?? {};\n\n      // For every relationship field, we need to check if we've\n      // been handed a Model instance. If so, we will convert it to a\n      // relationship data object.\n      for (const r in data.relationships) {\n        const relationship = data.relationships[r];\n\n        if (relationship === null) {\n          delete relationships[r];\n          delete data.relationships[r];\n          continue;\n        }\n\n        let identifier: ModelRelationships[string];\n        if (relationship instanceof Model) {\n          identifier = { data: Model.getIdentifier(relationship) };\n        } else if (relationship instanceof Array) {\n          identifier = { data: relationship.map(Model.getIdentifier) };\n        } else {\n          identifier = relationship;\n        }\n\n        data.relationships[r] = identifier;\n        relationships[r] = identifier;\n      }\n\n      this.data.relationships = relationships;\n    }\n\n    // Now that we've updated the data, we can say that the model is fresh.\n    // This is an easy way to invalidate retained subtrees etc.\n    this.freshness = new Date();\n\n    return this;\n  }\n\n  /**\n   * Merge new attributes into this model locally.\n   *\n   * @param attributes The attributes to merge.\n   */\n  pushAttributes(attributes: ModelAttributes) {\n    this.pushData({ attributes });\n  }\n\n  /**\n   * Merge new attributes into this model, both locally and with persistence.\n   *\n   * @param attributes The attributes to save. If a 'relationships' key\n   *     exists, it will be extracted and relationships will also be saved.\n   */\n  save(\n    attributes: SaveAttributes,\n    options: Omit<FlarumRequestOptions<ApiPayloadSingle>, 'url'> & { meta?: MetaInformation } = {}\n  ): Promise<ApiResponseSingle<this>> {\n    const data: ModelData & { id?: string } = {\n      type: this.data.type,\n      attributes,\n    };\n\n    if ('id' in this.data) {\n      data.id = this.data.id;\n    }\n\n    // If a 'relationships' key exists, extract it from the attributes hash and\n    // set it on the top-level data object instead. We will be sending this data\n    // object to the API for persistence.\n    if (attributes.relationships) {\n      data.relationships = {};\n\n      for (const key in attributes.relationships) {\n        const model = attributes.relationships[key];\n\n        if (model === null) continue;\n\n        data.relationships[key] = {\n          data: model instanceof Array ? model.map(Model.getIdentifier) : Model.getIdentifier(model),\n        };\n      }\n\n      delete attributes.relationships;\n    }\n\n    // Before we update the model's data, we should make a copy of the model's\n    // old data so that we can revert back to it if something goes awry during\n    // persistence.\n    const oldData = this.copyData();\n\n    this.pushData(data);\n\n    const request = {\n      data,\n      meta: options.meta || undefined,\n    };\n\n    return app\n      .request<ApiPayloadSingle>({\n        method: this.exists ? 'PATCH' : 'POST',\n        url: app.forum.attribute('apiUrl') + this.apiEndpoint(),\n        body: request,\n        ...options,\n      })\n      .then(\n        // If everything went well, we'll make sure the store knows that this\n        // model exists now (if it didn't already), and we'll push the data that\n        // the API returned into the store.\n        (payload) => {\n          return this.store.pushPayload<this>(payload);\n        },\n\n        // If something went wrong, though... good thing we backed up our model's\n        // old data! We'll revert to that and let others handle the error.\n        (err: Error) => {\n          this.pushData(oldData);\n          m.redraw();\n          throw err;\n        }\n      );\n  }\n\n  /**\n   * Send a request to delete the resource.\n   *\n   * @param body Data to send along with the DELETE request.\n   */\n  delete(body: FlarumRequestOptions<void>['body'] = {}, options: Omit<FlarumRequestOptions<void>, 'url'> = {}): Promise<void> {\n    if (!this.exists) return Promise.resolve();\n\n    return app\n      .request({\n        method: 'DELETE',\n        url: app.forum.attribute('apiUrl') + this.apiEndpoint(),\n        body,\n        ...options,\n      })\n      .then(() => {\n        this.exists = false;\n\n        this.store.remove(this);\n      });\n  }\n\n  /**\n   * Construct a path to the API endpoint for this resource.\n   */\n  protected apiEndpoint(): string {\n    return '/' + this.data.type + ('id' in this.data ? '/' + this.data.id : '');\n  }\n\n  protected copyData(): ModelData {\n    return JSON.parse(JSON.stringify(this.data));\n  }\n\n  protected rawRelationship<M extends Model>(relationship: string): undefined | ModelIdentifier;\n  protected rawRelationship<M extends Model[]>(relationship: string): undefined | ModelIdentifier[];\n  protected rawRelationship<_M extends Model | Model[]>(relationship: string): undefined | ModelIdentifier | ModelIdentifier[] {\n    return this.data.relationships?.[relationship]?.data;\n  }\n\n  /**\n   * Generate a function which returns the value of the given attribute.\n   *\n   * @param transform A function to transform the attribute value\n   */\n  static attribute<T>(name: string): () => T;\n  static attribute<T, O = unknown>(name: string, transform: (attr: O) => T): () => T;\n  static attribute<T, O = unknown>(name: string, transform?: (attr: O) => T): () => T {\n    return function (this: Model) {\n      if (transform) {\n        return transform(this.attribute(name));\n      }\n\n      return this.attribute(name);\n    };\n  }\n\n  /**\n   * Generate a function which returns the value of the given has-one\n   * relationship.\n   *\n   * @return false if no information about the\n   *     relationship exists; undefined if the relationship exists but the model\n   *     has not been loaded; or the model if it has been loaded.\n   */\n  static hasOne<M extends Model>(name: string): () => M | false;\n  static hasOne<M extends Model | null>(name: string): () => M | null | false;\n  static hasOne<M extends Model>(name: string): () => M | false {\n    return function (this: Model) {\n      const relationshipData = this.data.relationships?.[name]?.data;\n\n      if (relationshipData && relationshipData instanceof Array) {\n        throw new Error(`Relationship ${name} on model ${this.data.type} is plural, so the hasOne method cannot be used to access it.`);\n      }\n\n      if (relationshipData) {\n        return this.store.getById<M>(relationshipData.type, relationshipData.id) as M;\n      }\n\n      return false;\n    };\n  }\n\n  /**\n   * Generate a function which returns the value of the given has-many\n   * relationship.\n   *\n   * @return false if no information about the relationship\n   *     exists; an array if it does, containing models if they have been\n   *     loaded, and undefined for those that have not.\n   */\n  static hasMany<M extends Model>(name: string): () => (M | undefined)[] | false {\n    return function (this: Model) {\n      const relationshipData = this.data.relationships?.[name]?.data;\n\n      if (relationshipData && !(relationshipData instanceof Array)) {\n        throw new Error(`Relationship ${name} on model ${this.data.type} is singular, so the hasMany method cannot be used to access it.`);\n      }\n\n      if (relationshipData) {\n        return relationshipData.map((data) => this.store.getById<M>(data.type, data.id));\n      }\n\n      return false;\n    };\n  }\n\n  /**\n   * Transform the given value into a Date object.\n   */\n  static transformDate(value: string): Date;\n  static transformDate(value: string | null): Date | null;\n  static transformDate(value: string | undefined): Date | undefined;\n  static transformDate(value: string | null | undefined): Date | null | undefined;\n  static transformDate(value: string | null | undefined): Date | null | undefined {\n    return value != null ? new Date(value) : value;\n  }\n\n  /**\n   * Get a resource identifier object for the given model.\n   */\n  protected static getIdentifier(model: Model): ModelIdentifier;\n  protected static getIdentifier(model?: Model): ModelIdentifier | null {\n    if (!model || !('id' in model.data)) return null;\n\n    return {\n      type: model.data.type,\n      id: model.data.id,\n    };\n  }\n}\n","import Model from '../Model';\n\n/**\n * The `computed` utility creates a function that will cache its output until\n * any of the dependent values are dirty.\n *\n * @param dependentKeys The keys of the dependent values.\n * @param compute The function which computes the value using the\n *     dependent values.\n */\nexport default function computed<T, M = Model>(...args: [...string[], (this: M, ...args: unknown[]) => T]): () => T {\n  const keys = args.slice(0, -1) as string[];\n  const compute = args.slice(-1)[0] as (this: M, ...args: unknown[]) => T;\n\n  const dependentValues: Record<string, unknown> = {};\n  let computedValue: T;\n\n  return function (this: M) {\n    let recompute = false;\n\n    // Read all of the dependent values. If any of them have changed since last\n    // time, then we'll want to recompute our output.\n    keys.forEach((key) => {\n      const attr = (this as Record<string, unknown | (() => unknown)>)[key];\n      const value = typeof attr === 'function' ? attr.call(this) : attr;\n\n      if (dependentValues[key] !== value) {\n        recompute = true;\n        dependentValues[key] = value;\n      }\n    });\n\n    if (recompute) {\n      computedValue = compute.apply(\n        this,\n        keys.map((key) => dependentValues[key])\n      );\n    }\n\n    return computedValue;\n  };\n}\n","/**\n * The `isDark` utility converts a hex color to rgb, and then calculates a YIQ\n * value in order to get the appropriate brightness value. See\n * https://www.w3.org/TR/AERT/#color-contrast for references.\n *\n * A YIQ value >= 128 corresponds to a light color according to the W3C\n * standards, but we use a custom threshold for each light and dark modes\n * to preserve design consistency.\n */\nexport default function isDark(hexcolor: string | null): boolean {\n  // return if hexcolor is undefined or shorter than 4 characters, shortest hex form is #333;\n  // decided against regex hex color validation for performance considerations\n  if (!hexcolor || hexcolor.length < 4) {\n    return false;\n  }\n\n  let hexnumbers = hexcolor.replace('#', '');\n\n  if (hexnumbers.length === 3) {\n    hexnumbers += hexnumbers;\n  }\n\n  const r = parseInt(hexnumbers.slice(0, 2), 16);\n  const g = parseInt(hexnumbers.slice(2, 4), 16);\n  const b = parseInt(hexnumbers.slice(4, 6), 16);\n  const yiq = (r * 299 + g * 587 + b * 114) / 1000;\n\n  const threshold = parseInt(getComputedStyle(document.body).getPropertyValue('--yiq-threshold').trim()) || 128;\n\n  return yiq < threshold;\n}\n","import isDark from '../utils/isDark';\n\nexport default function textContrastClass(hexcolor: string | null | undefined): string {\n  if (!hexcolor) return 'text-contrast--unchanged';\n\n  return isDark(hexcolor) ? 'text-contrast--light' : 'text-contrast--dark';\n}\n","type KeyboardEventHandler = (event: KeyboardEvent) => void;\ntype ShouldHandle = (event: KeyboardEvent) => boolean;\n\nenum Keys {\n  Enter = 13,\n  Escape = 27,\n  Space = 32,\n  ArrowUp = 38,\n  ArrowDown = 40,\n  ArrowLeft = 37,\n  ArrowRight = 39,\n  Tab = 9,\n  Backspace = 8,\n}\n\n/**\n * The `KeyboardNavigatable` class manages lists that can be navigated with the\n * keyboard, calling callbacks for each actions.\n *\n * This helper encapsulates the key binding logic, providing a simple fluent\n * API for use.\n */\nexport default class KeyboardNavigatable {\n  /**\n   * Callback to be executed for a specified input.\n   */\n  protected callbacks = new Map<number, KeyboardEventHandler>();\n\n  /**\n   * Callback that determines whether keyboard input should be handled.\n   * By default, always handle keyboard navigation.\n   */\n  protected whenCallback: ShouldHandle = (event: KeyboardEvent) => true;\n\n  /**\n   * Provide a callback to be executed when navigating upwards.\n   *\n   * This will be triggered by the Up key.\n   */\n  onUp(callback: KeyboardEventHandler): KeyboardNavigatable {\n    this.callbacks.set(Keys.ArrowUp, (e) => {\n      e.preventDefault();\n      callback(e);\n    });\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when navigating downwards.\n   *\n   * This will be triggered by the Down key.\n   */\n  onDown(callback: KeyboardEventHandler): KeyboardNavigatable {\n    this.callbacks.set(Keys.ArrowDown, (e) => {\n      e.preventDefault();\n      callback(e);\n    });\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when the current item is selected..\n   *\n   * This will be triggered by the Return key (and Tab key, if not disabled).\n   */\n  onSelect(callback: KeyboardEventHandler, ignoreTabPress: boolean = false): KeyboardNavigatable {\n    const handler: KeyboardEventHandler = (e) => {\n      e.preventDefault();\n      callback(e);\n    };\n\n    if (!ignoreTabPress) this.callbacks.set(Keys.Tab, handler);\n    this.callbacks.set(Keys.Enter, handler);\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when the current item is tabbed into.\n   *\n   * This will be triggered by the Tab key.\n   */\n  onTab(callback: KeyboardEventHandler): KeyboardNavigatable {\n    const handler: KeyboardEventHandler = (e) => {\n      e.preventDefault();\n      callback(e);\n    };\n\n    this.callbacks.set(9, handler);\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when the navigation is canceled.\n   *\n   * This will be triggered by the Escape key.\n   */\n  onCancel(callback: KeyboardEventHandler): KeyboardNavigatable {\n    this.callbacks.set(Keys.Escape, (e) => {\n      e.stopPropagation();\n      e.preventDefault();\n      callback(e);\n    });\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when previous input is removed.\n   *\n   * This will be triggered by the Backspace key.\n   */\n  onRemove(callback: KeyboardEventHandler): KeyboardNavigatable {\n    this.callbacks.set(Keys.Backspace, (e) => {\n      if (e instanceof KeyboardEvent && e.target instanceof HTMLInputElement && e.target.selectionStart === 0 && e.target.selectionEnd === 0) {\n        callback(e);\n        e.preventDefault();\n      }\n    });\n\n    return this;\n  }\n\n  /**\n   * Provide a callback that determines whether keyboard input should be handled.\n   */\n  when(callback: ShouldHandle): KeyboardNavigatable {\n    this.whenCallback = callback;\n\n    return this;\n  }\n\n  /**\n   * Set up the navigation key bindings on the given jQuery element.\n   */\n  bindTo($element: JQuery<HTMLElement>) {\n    // Handle navigation key events on the navigatable element.\n    $element[0].addEventListener('keydown', this.navigate.bind(this));\n  }\n\n  /**\n   * Interpret the given keyboard event as navigation commands.\n   */\n  navigate(event: KeyboardEvent) {\n    // This callback determines whether keyboard should be handled or ignored.\n    if (!this.whenCallback(event)) return;\n\n    const keyCallback = this.callbacks.get(event.which);\n    if (keyCallback) {\n      keyCallback(event);\n    }\n  }\n}\n","import Tooltip from './Tooltip';\nimport Component, { ComponentAttrs } from '../Component';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport textContrastClass from '../helpers/textContrastClass';\n\nexport interface IBadgeAttrs extends ComponentAttrs {\n  icon: string;\n  type?: string;\n  label?: string;\n  color?: string;\n}\n\n/**\n * The `Badge` component represents a user/discussion badge, indicating some\n * status (e.g. a discussion is stickied, a user is an admin).\n *\n * A badge may have the following special attrs:\n *\n * - `type` The type of badge this is. This will be used to give the badge a\n *   class name of `Badge--{type}`.\n * - `icon` The name of an icon to show inside the badge.\n * - `label`\n *\n * All other attrs will be assigned as attributes on the badge element.\n */\nexport default class Badge<CustomAttrs extends IBadgeAttrs = IBadgeAttrs> extends Component<CustomAttrs> {\n  view() {\n    const { type, icon: iconName, label, color, style = {}, ...attrs } = this.attrs;\n\n    const className = classList('Badge', [type && `Badge--${type}`], attrs.className, textContrastClass(color));\n\n    const iconChild = iconName ? icon(iconName, { className: 'Badge-icon' }) : m.trust('&nbsp;');\n\n    const newStyle = { ...style, '--badge-bg': color };\n\n    const badgeAttrs = {\n      ...attrs,\n      className,\n      style: newStyle,\n    };\n\n    const badgeNode = <div {...badgeAttrs}>{iconChild}</div>;\n\n    // If we don't have a tooltip label, don't render the tooltip component.\n    if (!label) return badgeNode;\n\n    return <Tooltip text={label}>{badgeNode}</Tooltip>;\n  }\n}\n","import app from '../../common/app';\nimport Model from '../Model';\nimport computed from '../utils/computed';\nimport ItemList from '../utils/ItemList';\nimport Badge from '../components/Badge';\nimport Mithril from 'mithril';\nimport Post from './Post';\nimport User from './User';\n\nexport default class Discussion extends Model {\n  title() {\n    return Model.attribute<string>('title').call(this);\n  }\n  slug() {\n    return Model.attribute<string>('slug').call(this);\n  }\n\n  createdAt() {\n    return Model.attribute<Date | undefined, string | undefined>('createdAt', Model.transformDate).call(this);\n  }\n  user() {\n    return Model.hasOne<User | null>('user').call(this);\n  }\n  firstPost() {\n    return Model.hasOne<Post | null>('firstPost').call(this);\n  }\n\n  lastPostedAt() {\n    return Model.attribute('lastPostedAt', Model.transformDate).call(this);\n  }\n  lastPostedUser() {\n    return Model.hasOne<User | null>('lastPostedUser').call(this);\n  }\n  lastPost() {\n    return Model.hasOne<Post | null>('lastPost').call(this);\n  }\n  lastPostNumber() {\n    return Model.attribute<number | null | undefined>('lastPostNumber').call(this);\n  }\n\n  commentCount() {\n    return Model.attribute<number | undefined>('commentCount').call(this);\n  }\n  replyCount() {\n    return computed<number, this>('commentCount', (commentCount) => Math.max(0, ((commentCount as number) ?? 0) - 1)).call(this);\n  }\n  posts() {\n    return Model.hasMany<Post>('posts').call(this);\n  }\n  mostRelevantPost() {\n    return Model.hasOne<Post | null>('mostRelevantPost').call(this);\n  }\n\n  lastReadAt() {\n    return Model.attribute('lastReadAt', Model.transformDate).call(this);\n  }\n  lastReadPostNumber() {\n    return Model.attribute<number | null | undefined>('lastReadPostNumber').call(this);\n  }\n  isUnread() {\n    return computed<boolean, this>('unreadCount', (unreadCount) => !!unreadCount).call(this);\n  }\n  isRead() {\n    return computed<boolean, this>('unreadCount', (unreadCount) => !!(app.session.user && !unreadCount)).call(this);\n  }\n\n  hiddenAt() {\n    return Model.attribute('hiddenAt', Model.transformDate).call(this);\n  }\n  hiddenUser() {\n    return Model.hasOne<User | null>('hiddenUser').call(this);\n  }\n  isHidden() {\n    return computed<boolean, this>('hiddenAt', (hiddenAt) => !!hiddenAt).call(this);\n  }\n\n  canReply() {\n    return Model.attribute<boolean | undefined>('canReply').call(this);\n  }\n  canRename() {\n    return Model.attribute<boolean | undefined>('canRename').call(this);\n  }\n  canHide() {\n    return Model.attribute<boolean | undefined>('canHide').call(this);\n  }\n  canDelete() {\n    return Model.attribute<boolean | undefined>('canDelete').call(this);\n  }\n\n  /**\n   * Remove a post from the discussion's posts relationship.\n   */\n  removePost(id: string): void {\n    const posts = this.rawRelationship<Post[]>('posts');\n\n    if (!posts) {\n      return;\n    }\n\n    posts.some((data, i) => {\n      if (id === data.id) {\n        posts.splice(i, 1);\n        return true;\n      }\n\n      return false;\n    });\n  }\n\n  /**\n   * Get the estimated number of unread posts in this discussion for the current\n   * user.\n   */\n  unreadCount(): number {\n    const user = app.session.user;\n\n    if (user && (user.markedAllAsReadAt()?.getTime() ?? 0) < this.lastPostedAt()?.getTime()!) {\n      const unreadCount = Math.max(0, (this.lastPostNumber() ?? 0) - (this.lastReadPostNumber() || 0));\n      // If posts have been deleted, it's possible that the unread count could exceed the\n      // actual post count. As such, we take the min of the two to ensure this isn't an issue.\n      return Math.min(unreadCount, this.commentCount() ?? 0);\n    }\n\n    return 0;\n  }\n\n  /**\n   * Get the Badge components that apply to this discussion.\n   */\n  badges(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.isHidden()) {\n      items.add('hidden', <Badge type=\"hidden\" icon=\"fas fa-trash\" label={app.translator.trans('core.lib.badge.hidden_tooltip')} />);\n    }\n\n    return items;\n  }\n\n  /**\n   * Get a list of all of the post IDs in this discussion.\n   */\n  postIds(): string[] {\n    return this.rawRelationship<Post[]>('posts')?.map((link) => link.id) ?? [];\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport listItems from '../../common/helpers/listItems';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport Discussion from '../../common/models/Discussion';\nimport ItemList from '../../common/utils/ItemList';\nimport Tooltip from '../../common/components/Tooltip';\n\n/**\n * The `NotificationList` component displays a list of the logged-in user's\n * notifications, grouped by discussion.\n */\nexport default class NotificationList extends Component {\n  view() {\n    const state = this.attrs.state;\n\n    return (\n      <div className=\"NotificationList\">\n        <div className=\"NotificationList-header\">\n          <h4 className=\"App-titleControl App-titleControl--text\">{app.translator.trans('core.forum.notifications.title')}</h4>\n\n          <div className=\"App-primaryControl\">{this.controlItems().toArray()}</div>\n        </div>\n\n        <div className=\"NotificationList-content\">{this.content(state)}</div>\n      </div>\n    );\n  }\n\n  controlItems() {\n    const items = new ItemList();\n    const state = this.attrs.state;\n\n    items.add(\n      'mark_all_as_read',\n      <Tooltip text={app.translator.trans('core.forum.notifications.mark_all_as_read_tooltip')}>\n        <Button\n          className=\"Button Button--link\"\n          data-container=\".NotificationList\"\n          icon=\"fas fa-check\"\n          title={app.translator.trans('core.forum.notifications.mark_all_as_read_tooltip')}\n          onclick={state.markAllAsRead.bind(state)}\n        />\n      </Tooltip>,\n      70\n    );\n\n    items.add(\n      'delete_all',\n      <Tooltip text={app.translator.trans('core.forum.notifications.delete_all_tooltip')}>\n        <Button\n          className=\"Button Button--link\"\n          data-container=\".NotificationList\"\n          icon=\"fas fa-trash-alt\"\n          title={app.translator.trans('core.forum.notifications.delete_all_tooltip')}\n          onclick={() => {\n            if (confirm(app.translator.trans('core.forum.notifications.delete_all_confirm'))) {\n              state.deleteAll.call(state);\n            }\n          }}\n        />\n      </Tooltip>,\n      50\n    );\n\n    return items;\n  }\n\n  content(state) {\n    if (state.isLoading()) {\n      return <LoadingIndicator className=\"LoadingIndicator--block\" />;\n    }\n\n    if (state.hasItems()) {\n      return state.getPages().map((page) => {\n        const groups = [];\n        const discussions = {};\n\n        page.items.forEach((notification) => {\n          const subject = notification.subject();\n\n          if (typeof subject === 'undefined') return;\n\n          // Get the discussion that this notification is related to. If it's not\n          // directly related to a discussion, it may be related to a post or\n          // other entity which is related to a discussion.\n          let discussion = null;\n          if (subject instanceof Discussion) discussion = subject;\n          else if (subject && subject.discussion) discussion = subject.discussion();\n\n          // If the notification is not related to a discussion directly or\n          // indirectly, then we will assign it to a neutral group.\n          const key = discussion ? discussion.id() : 0;\n          discussions[key] = discussions[key] || { discussion: discussion, notifications: [] };\n          discussions[key].notifications.push(notification);\n\n          if (groups.indexOf(discussions[key]) === -1) {\n            groups.push(discussions[key]);\n          }\n        });\n\n        return groups.map((group) => {\n          const badges = group.discussion && group.discussion.badges().toArray();\n\n          return (\n            <div className=\"NotificationGroup\">\n              {group.discussion ? (\n                <Link className=\"NotificationGroup-header\" href={app.route.discussion(group.discussion)}>\n                  {badges && !!badges.length && <ul className=\"NotificationGroup-badges badges\">{listItems(badges)}</ul>}\n                  <span>{group.discussion.title()}</span>\n                </Link>\n              ) : (\n                <div className=\"NotificationGroup-header\">{app.forum.attribute('title')}</div>\n              )}\n\n              <ul className=\"NotificationGroup-content\">\n                {group.notifications.map((notification) => {\n                  const NotificationComponent = app.notificationComponents[notification.contentType()];\n                  return (\n                    !!NotificationComponent && (\n                      <li>\n                        <NotificationComponent notification={notification} />\n                      </li>\n                    )\n                  );\n                })}\n              </ul>\n            </div>\n          );\n        });\n      });\n    }\n\n    return <div className=\"NotificationList-empty\">{app.translator.trans('core.forum.notifications.empty_text')}</div>;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.$notifications = this.$('.NotificationList-content');\n\n    // If we are on the notifications page, the window will be scrolling and not the $notifications element.\n    this.$scrollParent = this.inPanel() ? this.$notifications : $(window);\n\n    this.boundScrollHandler = this.scrollHandler.bind(this);\n    this.$scrollParent.on('scroll', this.boundScrollHandler);\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    this.$scrollParent.off('scroll', this.boundScrollHandler);\n  }\n\n  scrollHandler() {\n    const state = this.attrs.state;\n\n    // Whole-page scroll events are listened to on `window`, but we need to get the actual\n    // scrollHeight, scrollTop, and clientHeight from the document element.\n    const scrollParent = this.inPanel() ? this.$scrollParent[0] : document.documentElement;\n\n    // On very short screens, the scrollHeight + scrollTop might not reach the clientHeight\n    // by a fraction of a pixel, so we compensate for that.\n    const atBottom = Math.abs(scrollParent.scrollHeight - scrollParent.scrollTop - scrollParent.clientHeight) <= 1;\n\n    if (state.hasNext() && !state.isLoadingNext() && atBottom) {\n      state.loadNext();\n    }\n  }\n\n  /**\n   * If the NotificationList component isn't in a panel (e.g. on NotificationPage when mobile),\n   * we need to listen to scroll events on the window, and get scroll state from the body.\n   */\n  inPanel() {\n    return this.$notifications.css('overflow') === 'auto';\n  }\n}\n","import app from '../../forum/app';\nimport Dropdown, { IDropdownAttrs } from '../../common/components/Dropdown';\nimport icon from '../../common/helpers/icon';\nimport classList from '../../common/utils/classList';\nimport NotificationList from './NotificationList';\nimport extractText from '../../common/utils/extractText';\nimport type Mithril from 'mithril';\n\nexport interface INotificationsDropdown extends IDropdownAttrs {}\n\nexport default class NotificationsDropdown<CustomAttrs extends IDropdownAttrs = IDropdownAttrs> extends Dropdown<CustomAttrs> {\n  static initAttrs(attrs: INotificationsDropdown) {\n    attrs.className ||= 'NotificationsDropdown';\n    attrs.buttonClassName ||= 'Button Button--flat';\n    attrs.menuClassName ||= 'Dropdown-menu--right';\n    attrs.label ||= extractText(app.translator.trans('core.forum.notifications.tooltip'));\n    attrs.icon ||= 'fas fa-bell';\n\n    // For best a11y support, both `title` and `aria-label` should be used\n    attrs.accessibleToggleLabel ||= extractText(app.translator.trans('core.forum.notifications.toggle_dropdown_accessible_label'));\n\n    super.initAttrs(attrs);\n  }\n\n  getButton(children: Mithril.ChildArray): Mithril.Vnode<any, any> {\n    const newNotifications = this.getNewCount();\n\n    const vdom = super.getButton(children);\n\n    vdom.attrs.title = this.attrs.label;\n\n    vdom.attrs.className = classList(vdom.attrs.className, [newNotifications && 'new']);\n    vdom.attrs.onclick = this.onclick.bind(this);\n\n    return vdom;\n  }\n\n  getButtonContent(): Mithril.ChildArray {\n    const unread = this.getUnreadCount();\n\n    return [\n      this.attrs.icon ? icon(this.attrs.icon, { className: 'Button-icon' }) : null,\n      unread !== 0 && <span className=\"NotificationsDropdown-unread\">{unread}</span>,\n      <span className=\"Button-label\">{this.attrs.label}</span>,\n    ];\n  }\n\n  getMenu() {\n    return (\n      <div className={classList('Dropdown-menu', this.attrs.menuClassName)} onclick={this.menuClick.bind(this)}>\n        {this.showing && <NotificationList state={this.attrs.state} />}\n      </div>\n    );\n  }\n\n  onclick() {\n    if (app.drawer.isOpen()) {\n      this.goToRoute();\n    } else {\n      this.attrs.state.load();\n    }\n  }\n\n  goToRoute() {\n    m.route.set(app.route('notifications'));\n  }\n\n  getUnreadCount() {\n    return app.session.user!.unreadNotificationCount();\n  }\n\n  getNewCount() {\n    return app.session.user!.newNotificationCount();\n  }\n\n  menuClick(e: MouseEvent) {\n    // Don't close the notifications dropdown if the user is opening a link in a\n    // new tab or window.\n    if (e.shiftKey || e.metaKey || e.ctrlKey || e.button === 1) e.stopPropagation();\n  }\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n  try {\n    var info = gen[key](arg);\n    var value = info.value;\n  } catch (error) {\n    reject(error);\n    return;\n  }\n  if (info.done) {\n    resolve(value);\n  } else {\n    Promise.resolve(value).then(_next, _throw);\n  }\n}\nexport default function _asyncToGenerator(fn) {\n  return function () {\n    var self = this,\n      args = arguments;\n    return new Promise(function (resolve, reject) {\n      var gen = fn.apply(self, args);\n      function _next(value) {\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n      }\n      function _throw(err) {\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n      }\n      _next(undefined);\n    });\n  };\n}","import app from '../../forum/app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport Link from '../../common/components/Link';\nimport highlight from '../../common/helpers/highlight';\nimport Discussion from '../../common/models/Discussion';\nimport Post from '../../common/models/Post';\nimport type Mithril from 'mithril';\nimport ItemList from '../../common/utils/ItemList';\n\nexport interface DiscussionsSearchItemAttrs extends ComponentAttrs {\n  query: string;\n  discussion: Discussion;\n  mostRelevantPost: Post;\n}\n\nexport default class DiscussionsSearchItem extends Component<DiscussionsSearchItemAttrs> {\n  query!: string;\n  discussion!: Discussion;\n  mostRelevantPost!: Post | null | undefined;\n\n  oninit(vnode: Mithril.Vnode<DiscussionsSearchItemAttrs, this>) {\n    super.oninit(vnode);\n\n    this.query = this.attrs.query;\n    this.discussion = this.attrs.discussion;\n    this.mostRelevantPost = this.attrs.mostRelevantPost;\n  }\n\n  view() {\n    return (\n      <li className=\"DiscussionSearchResult\" data-index={'discussions' + this.discussion.id()}>\n        <Link href={app.route.discussion(this.discussion, (this.mostRelevantPost && this.mostRelevantPost.number()) || 0)}>\n          {this.viewItems().toArray()}\n        </Link>\n      </li>\n    );\n  }\n\n  discussionTitle() {\n    return this.discussion.title();\n  }\n\n  mostRelevantPostContent() {\n    return this.mostRelevantPost?.contentPlain();\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('discussion-title', <div className=\"DiscussionSearchResult-title\">{highlight(this.discussionTitle(), this.query)}</div>, 90);\n\n    !!this.mostRelevantPost &&\n      items.add(\n        'most-relevant',\n        <div className=\"DiscussionSearchResult-excerpt\">{highlight(this.mostRelevantPostContent() ?? '', this.query, 100)}</div>,\n        80\n      );\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport LinkButton from '../../common/components/LinkButton';\nimport { SearchSource } from './Search';\nimport type Mithril from 'mithril';\nimport Discussion from '../../common/models/Discussion';\nimport DiscussionsSearchItem from './DiscussionsSearchItem';\n\n/**\n * The `DiscussionsSearchSource` finds and displays discussion search results in\n * the search dropdown.\n */\nexport default class DiscussionsSearchSource implements SearchSource {\n  protected results = new Map<string, Discussion[]>();\n  queryString: string | null = null;\n\n  async search(query: string): Promise<void> {\n    query = query.toLowerCase();\n\n    this.results.set(query, []);\n\n    this.setQueryString(query);\n\n    const params = {\n      filter: { q: this.queryString || query },\n      page: { limit: this.limit() },\n      include: this.includes().join(','),\n    };\n\n    return app.store.find<Discussion[]>('discussions', params).then((results) => {\n      this.results.set(query, results);\n      m.redraw();\n    });\n  }\n\n  view(query: string): Array<Mithril.Vnode> {\n    query = query.toLowerCase();\n\n    this.setQueryString(query);\n\n    const results = (this.results.get(query) || []).map((discussion) => {\n      const mostRelevantPost = discussion.mostRelevantPost();\n\n      return <DiscussionsSearchItem query={query} discussion={discussion} mostRelevantPost={mostRelevantPost} />;\n    }) as Array<Mithril.Vnode>;\n\n    return [\n      <li className=\"Dropdown-header\">{app.translator.trans('core.forum.search.discussions_heading')}</li>,\n      <li>\n        <LinkButton icon=\"fas fa-search\" href={app.route('index', { q: this.queryString })}>\n          {app.translator.trans('core.forum.search.all_discussions_button', { query })}\n        </LinkButton>\n      </li>,\n      ...results,\n    ];\n  }\n\n  includes(): string[] {\n    return ['mostRelevantPost'];\n  }\n\n  limit(): number {\n    return 3;\n  }\n\n  queryMutators(): string[] {\n    return [];\n  }\n\n  setQueryString(query: string): void {\n    this.queryString = query + ' ' + this.queryMutators().join(' ');\n  }\n}\n","import type Mithril from 'mithril';\n\nimport app from '../../forum/app';\nimport highlight from '../../common/helpers/highlight';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport Link from '../../common/components/Link';\nimport { SearchSource } from './Search';\nimport User from '../../common/models/User';\n\n/**\n * The `UsersSearchSource` finds and displays user search results in the search\n * dropdown.\n */\nexport default class UsersSearchResults implements SearchSource {\n  protected results = new Map<string, User[]>();\n\n  async search(query: string): Promise<void> {\n    return app.store\n      .find<User[]>('users', {\n        filter: { q: query },\n        page: { limit: 5 },\n      })\n      .then((results) => {\n        this.results.set(query, results);\n        m.redraw();\n      });\n  }\n\n  view(query: string): Array<Mithril.Vnode> {\n    query = query.toLowerCase();\n\n    const results = (this.results.get(query) || [])\n      .concat(\n        app.store\n          .all<User>('users')\n          .filter((user) => [user.username(), user.displayName()].some((value) => value.toLowerCase().substr(0, query.length) === query))\n      )\n      .filter((e, i, arr) => arr.lastIndexOf(e) === i)\n      .sort((a, b) => a.displayName().localeCompare(b.displayName()));\n\n    if (!results.length) return [];\n\n    return [\n      <li className=\"Dropdown-header\">{app.translator.trans('core.forum.search.users_heading')}</li>,\n      ...results.map((user) => {\n        const name = username(user);\n\n        const children = [highlight(name.text as string, query)];\n\n        return (\n          <li className=\"UserSearchResult\" data-index={'users' + user.id()}>\n            <Link href={app.route.user(user)}>\n              {avatar(user)}\n              {{ ...name, text: undefined, children }}\n            </Link>\n          </li>\n        );\n      }),\n    ];\n  }\n}\n","import app from '../../forum/app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport ItemList from '../../common/utils/ItemList';\nimport classList from '../../common/utils/classList';\nimport extractText from '../../common/utils/extractText';\nimport KeyboardNavigatable from '../../common/utils/KeyboardNavigatable';\nimport icon from '../../common/helpers/icon';\nimport SearchState from '../states/SearchState';\nimport DiscussionsSearchSource from './DiscussionsSearchSource';\nimport UsersSearchSource from './UsersSearchSource';\nimport { fireDeprecationWarning } from '../../common/helpers/fireDebugWarning';\nimport type Mithril from 'mithril';\n\n/**\n * The `SearchSource` interface defines a section of search results in the\n * search dropdown.\n *\n * Search sources should be registered with the `Search` component class\n * by extending the `sourceItems` method. When the user types a\n * query, each search source will be prompted to load search results via the\n * `search` method. When the dropdown is redrawn, it will be constructed by\n * putting together the output from the `view` method of each source.\n */\nexport interface SearchSource {\n  /**\n   * Make a request to get results for the given query.\n   * The results will be updated internally in the search source, not exposed.\n   */\n  search(query: string): Promise<void>;\n\n  /**\n   * Get an array of virtual <li>s that list the search results for the given\n   * query.\n   */\n  view(query: string): Array<Mithril.Vnode>;\n}\n\nexport interface SearchAttrs extends ComponentAttrs {\n  /** The type of alert this is. Will be used to give the alert a class name of `Alert--{type}`. */\n  state: SearchState;\n}\n\n/**\n * The `Search` component displays a menu of as-you-type results from a variety\n * of sources.\n *\n * The search box will be 'activated' if the app's search state's\n * getInitialSearch() value is a truthy value. If this is the case, an 'x'\n * button will be shown next to the search field, and clicking it will clear the search.\n *\n * ATTRS:\n *\n * - state: SearchState instance.\n */\nexport default class Search<T extends SearchAttrs = SearchAttrs> extends Component<T, SearchState> {\n  /**\n   * The minimum query length before sources are searched.\n   */\n  protected static MIN_SEARCH_LEN = 3;\n\n  /**\n   * The instance of `SearchState` for this component.\n   */\n  protected searchState!: SearchState;\n\n  /**\n   * The instance of `SearchState` for this component.\n   *\n   * @deprecated Replace with`this.searchState` instead.\n   */\n  // TODO: [Flarum 2.0] Remove this.\n  // @ts-expect-error This is a get accessor, while superclass defines this as a property. This is needed to prevent breaking changes, however.\n  get state() {\n    fireDeprecationWarning('`state` property of the Search component is deprecated', '3212');\n    return this.searchState;\n  }\n  set state(state: SearchState) {\n    // Workaround to prevent triggering deprecation warnings due to Mithril\n    // setting state to undefined when creating components\n    state !== undefined && fireDeprecationWarning('`state` property of the Search component is deprecated', '3212');\n    this.searchState = state;\n  }\n\n  /**\n   * Whether or not the search input has focus.\n   */\n  protected hasFocus = false;\n\n  /**\n   * An array of SearchSources.\n   */\n  protected sources?: SearchSource[];\n\n  /**\n   * The number of sources that are still loading results.\n   */\n  protected loadingSources = 0;\n\n  /**\n   * The index of the currently-selected <li> in the results list. This can be\n   * a unique string (to account for the fact that an item's position may jump\n   * around as new results load), but otherwise it will be numeric (the\n   * sequential position within the list).\n   */\n  protected index: number = 0;\n\n  protected navigator!: KeyboardNavigatable;\n\n  protected searchTimeout?: number;\n\n  private updateMaxHeightHandler?: () => void;\n\n  oninit(vnode: Mithril.Vnode<T, this>) {\n    super.oninit(vnode);\n\n    this.searchState = this.attrs.state;\n  }\n\n  view() {\n    const currentSearch = this.searchState.getInitialSearch();\n\n    // Initialize search sources in the view rather than the constructor so\n    // that we have access to app.forum.\n    if (!this.sources) this.sources = this.sourceItems().toArray();\n\n    // Hide the search view if no sources were loaded\n    if (!this.sources.length) return <div></div>;\n\n    const searchLabel = extractText(app.translator.trans('core.forum.header.search_placeholder'));\n\n    const isActive = !!currentSearch;\n    const shouldShowResults = !!(this.searchState.getValue() && this.hasFocus);\n    const shouldShowClearButton = !!(!this.loadingSources && this.searchState.getValue());\n\n    return (\n      <div\n        role=\"search\"\n        aria-label={app.translator.trans('core.forum.header.search_role_label')}\n        className={classList('Search', {\n          open: this.searchState.getValue() && this.hasFocus,\n          focused: this.hasFocus,\n          active: isActive,\n          loading: !!this.loadingSources,\n        })}\n      >\n        <div className=\"Search-input\">\n          <input\n            aria-label={searchLabel}\n            className=\"FormControl\"\n            type=\"search\"\n            placeholder={searchLabel}\n            value={this.searchState.getValue()}\n            oninput={(e: InputEvent) => this.searchState.setValue((e?.target as HTMLInputElement)?.value)}\n            onfocus={() => (this.hasFocus = true)}\n            onblur={() => (this.hasFocus = false)}\n          />\n          {!!this.loadingSources && <LoadingIndicator size=\"small\" display=\"inline\" containerClassName=\"Button Button--icon Button--link\" />}\n          {shouldShowClearButton && (\n            <button\n              className=\"Search-clear Button Button--icon Button--link\"\n              onclick={this.clear.bind(this)}\n              aria-label={app.translator.trans('core.forum.header.search_clear_button_accessible_label')}\n              type=\"button\"\n            >\n              {icon('fas fa-times-circle')}\n            </button>\n          )}\n        </div>\n        <ul\n          className=\"Dropdown-menu Search-results\"\n          aria-hidden={!shouldShowResults || undefined}\n          aria-live={shouldShowResults ? 'polite' : undefined}\n        >\n          {shouldShowResults && this.sources.map((source) => source.view(this.searchState.getValue()))}\n        </ul>\n      </div>\n    );\n  }\n\n  updateMaxHeight() {\n    // Since extensions might add elements above the search box on mobile,\n    // we need to calculate and set the max height dynamically.\n    const resultsElementMargin = 14;\n    const maxHeight =\n      window.innerHeight - this.element.querySelector('.Search-input>.FormControl')!.getBoundingClientRect().bottom - resultsElementMargin;\n\n    this.element.querySelector<HTMLElement>('.Search-results')?.style?.setProperty('max-height', `${maxHeight}px`);\n  }\n\n  onupdate(vnode: Mithril.VnodeDOM<T, this>) {\n    super.onupdate(vnode);\n\n    // Highlight the item that is currently selected.\n    this.setIndex(this.getCurrentNumericIndex());\n\n    // If there are no sources, the search view is not shown.\n    if (!this.sources?.length) return;\n\n    this.updateMaxHeight();\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<T, this>) {\n    super.oncreate(vnode);\n\n    // If there are no sources, we shouldn't initialize logic for\n    // search elements, as they will not be shown.\n    if (!this.sources?.length) return;\n\n    const search = this;\n    const state = this.searchState;\n\n    // Highlight the item that is currently selected.\n    this.setIndex(this.getCurrentNumericIndex());\n\n    this.$('.Search-results')\n      .on('mousedown', (e) => e.preventDefault())\n      .on('click', () => this.$('input').trigger('blur'))\n\n      // Whenever the mouse is hovered over a search result, highlight it.\n      .on('mouseenter', '> li:not(.Dropdown-header)', function () {\n        search.setIndex(search.selectableItems().index(this));\n      });\n\n    const $input = this.$('input') as JQuery<HTMLInputElement>;\n\n    this.navigator = new KeyboardNavigatable();\n    this.navigator\n      .onUp(() => this.setIndex(this.getCurrentNumericIndex() - 1, true))\n      .onDown(() => this.setIndex(this.getCurrentNumericIndex() + 1, true))\n      .onSelect(this.selectResult.bind(this), true)\n      .onCancel(this.clear.bind(this))\n      .bindTo($input);\n\n    // Handle input key events on the search input, triggering results to load.\n    $input\n      .on('input focus', function () {\n        const query = this.value.toLowerCase();\n\n        if (!query) return;\n\n        if (search.searchTimeout) clearTimeout(search.searchTimeout);\n        search.searchTimeout = window.setTimeout(() => {\n          if (state.isCached(query)) return;\n\n          if (query.length >= (search.constructor as typeof Search).MIN_SEARCH_LEN) {\n            search.sources?.map((source) => {\n              if (!source.search) return;\n\n              search.loadingSources++;\n\n              source.search(query).then(() => {\n                search.loadingSources = Math.max(0, search.loadingSources - 1);\n                m.redraw();\n              });\n            });\n          }\n\n          state.cache(query);\n          m.redraw();\n        }, 250);\n      })\n\n      .on('focus', function () {\n        $(this)\n          .one('mouseup', (e) => e.preventDefault())\n          .trigger('select');\n      });\n\n    this.updateMaxHeightHandler = this.updateMaxHeight.bind(this);\n    window.addEventListener('resize', this.updateMaxHeightHandler);\n  }\n\n  onremove(vnode: Mithril.VnodeDOM<T, this>) {\n    super.onremove(vnode);\n\n    if (this.updateMaxHeightHandler) {\n      window.removeEventListener('resize', this.updateMaxHeightHandler);\n    }\n  }\n\n  /**\n   * Navigate to the currently selected search result and close the list.\n   */\n  selectResult() {\n    if (this.searchTimeout) clearTimeout(this.searchTimeout);\n\n    this.loadingSources = 0;\n\n    const selectedUrl = this.getItem(this.index).find('a').attr('href');\n    if (this.searchState.getValue() && selectedUrl) {\n      m.route.set(selectedUrl);\n    } else {\n      this.clear();\n    }\n\n    this.$('input').blur();\n  }\n\n  /**\n   * Clear the search\n   */\n  clear() {\n    this.searchState.clear();\n  }\n\n  /**\n   * Build an item list of SearchSources.\n   */\n  sourceItems(): ItemList<SearchSource> {\n    const items = new ItemList<SearchSource>();\n\n    if (app.forum.attribute('canViewForum')) items.add('discussions', new DiscussionsSearchSource());\n    if (app.forum.attribute('canSearchUsers')) items.add('users', new UsersSearchSource());\n\n    return items;\n  }\n\n  /**\n   * Get all of the search result items that are selectable.\n   */\n  selectableItems(): JQuery {\n    return this.$('.Search-results > li:not(.Dropdown-header)');\n  }\n\n  /**\n   * Get the position of the currently selected search result item.\n   * Returns zero if not found.\n   */\n  getCurrentNumericIndex(): number {\n    return Math.max(0, this.selectableItems().index(this.getItem(this.index)));\n  }\n\n  /**\n   * Get the <li> in the search results with the given index (numeric or named).\n   */\n  getItem(index: number): JQuery {\n    const $items = this.selectableItems();\n    let $item = $items.filter(`[data-index=\"${index}\"]`);\n\n    if (!$item.length) {\n      $item = $items.eq(index);\n    }\n\n    return $item;\n  }\n\n  /**\n   * Set the currently-selected search result item to the one with the given\n   * index.\n   */\n  setIndex(index: number, scrollToItem: boolean = false) {\n    const $items = this.selectableItems();\n    const $dropdown = $items.parent();\n\n    let fixedIndex = index;\n    if (index < 0) {\n      fixedIndex = $items.length - 1;\n    } else if (index >= $items.length) {\n      fixedIndex = 0;\n    }\n\n    const $item = $items.removeClass('active').eq(fixedIndex).addClass('active');\n\n    this.index = parseInt($item.attr('data-index') as string) || fixedIndex;\n\n    if (scrollToItem) {\n      const dropdownScroll = $dropdown.scrollTop()!;\n      const dropdownTop = $dropdown.offset()!.top;\n      const dropdownBottom = dropdownTop + $dropdown.outerHeight()!;\n      const itemTop = $item.offset()!.top;\n      const itemBottom = itemTop + $item.outerHeight()!;\n\n      let scrollTop;\n      if (itemTop < dropdownTop) {\n        scrollTop = dropdownScroll - dropdownTop + itemTop - parseInt($dropdown.css('padding-top'), 10);\n      } else if (itemBottom > dropdownBottom) {\n        scrollTop = dropdownScroll - dropdownBottom + itemBottom + parseInt($dropdown.css('padding-bottom'), 10);\n      }\n\n      if (typeof scrollTop !== 'undefined') {\n        $dropdown.stop(true).animate({ scrollTop }, 100);\n      }\n    }\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport Button from '../../common/components/Button';\nimport LogInModal from './LogInModal';\nimport SignUpModal from './SignUpModal';\nimport SessionDropdown from './SessionDropdown';\nimport SelectDropdown from '../../common/components/SelectDropdown';\nimport NotificationsDropdown from './NotificationsDropdown';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\nimport Search from '../components/Search';\n\n/**\n * The `HeaderSecondary` component displays secondary header controls, such as\n * the search box and the user menu. On the default skin, these are shown on the\n * right side of the header.\n */\nexport default class HeaderSecondary extends Component {\n  view() {\n    return <ul className=\"Header-controls\">{listItems(this.items().toArray())}</ul>;\n  }\n\n  /**\n   * Build an item list for the controls.\n   *\n   * @return {ItemList}\n   */\n  items() {\n    const items = new ItemList();\n\n    items.add('search', <Search state={app.search} />, 30);\n\n    if (app.forum.attribute('showLanguageSelector') && Object.keys(app.data.locales).length > 1) {\n      const locales = [];\n\n      for (const locale in app.data.locales) {\n        locales.push(\n          <Button\n            active={app.data.locale === locale}\n            icon={app.data.locale === locale ? 'fas fa-check' : true}\n            onclick={() => {\n              if (app.session.user) {\n                app.session.user.savePreferences({ locale }).then(() => window.location.reload());\n              } else {\n                document.cookie = `locale=${locale}; path=/; expires=Tue, 19 Jan 2038 03:14:07 GMT`;\n                window.location.reload();\n              }\n            }}\n          >\n            {app.data.locales[locale]}\n          </Button>\n        );\n      }\n\n      items.add(\n        'locale',\n        <SelectDropdown\n          buttonClassName=\"Button Button--link\"\n          accessibleToggleLabel={app.translator.trans('core.forum.header.locale_dropdown_accessible_label')}\n        >\n          {locales}\n        </SelectDropdown>,\n        20\n      );\n    }\n\n    if (app.session.user) {\n      items.add('notifications', <NotificationsDropdown state={app.notifications} />, 10);\n      items.add('session', <SessionDropdown />, 0);\n    } else {\n      if (app.forum.attribute('allowSignUp')) {\n        items.add(\n          'signUp',\n          <Button className=\"Button Button--link\" onclick={() => app.modal.show(SignUpModal)}>\n            {app.translator.trans('core.forum.header.sign_up_link')}\n          </Button>,\n          10\n        );\n      }\n\n      items.add(\n        'logIn',\n        <Button className=\"Button Button--link\" onclick={() => app.modal.show(LogInModal)}>\n          {app.translator.trans('core.forum.header.log_in_link')}\n        </Button>,\n        0\n      );\n    }\n\n    return items;\n  }\n}\n","import Button from '../../common/components/Button';\n\n/**\n * The `ComposerButton` component displays a button suitable for the composer\n * controls.\n */\nexport default class ComposerButton extends Button {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = attrs.className || 'Button Button--icon Button--link';\n  }\n}\n","import app from '../../forum/app';\nimport subclassOf from '../../common/utils/subclassOf';\nimport Stream from '../../common/utils/Stream';\nimport ReplyComposer from '../components/ReplyComposer';\n\nclass ComposerState {\n  constructor() {\n    /**\n     * The composer's current position.\n     *\n     * @type {ComposerState.Position}\n     */\n    this.position = ComposerState.Position.HIDDEN;\n\n    /**\n     * The composer's intended height, which can be modified by the user\n     * (by dragging the composer handle).\n     *\n     * @type {number}\n     */\n    this.height = null;\n\n    /**\n     * The dynamic component being shown inside the composer.\n     *\n     * @type {Object}\n     */\n    this.body = { attrs: {} };\n\n    /**\n     * A reference to the text editor that allows text manipulation.\n     *\n     * @type {import('../../common/utils/EditorDriverInterface')|null}\n     */\n    this.editor = null;\n\n    this.clear();\n  }\n\n  /**\n   * Load a content component into the composer.\n   *\n   * @param {typeof import('../components/ComposerBody').default} componentClass\n   */\n  load(componentClass, attrs) {\n    const body = { componentClass, attrs };\n\n    if (this.preventExit()) return;\n\n    // If we load a similar component into the composer, then Mithril will be\n    // able to diff the old/new contents and some DOM-related state from the\n    // old composer will remain. To prevent this from happening, we clear the\n    // component and force a redraw, so that the new component will be working\n    // on a blank slate.\n    if (this.isVisible()) {\n      this.clear();\n      m.redraw.sync();\n    }\n\n    this.body = body;\n  }\n\n  /**\n   * Clear the composer's content component.\n   */\n  clear() {\n    this.position = ComposerState.Position.HIDDEN;\n    this.body = { attrs: {} };\n    this.onExit = null;\n\n    this.fields = {\n      content: Stream(''),\n    };\n\n    if (this.editor) {\n      this.editor.destroy();\n    }\n    this.editor = null;\n  }\n\n  /**\n   * Show the composer.\n   */\n  show() {\n    if (this.position === ComposerState.Position.NORMAL || this.position === ComposerState.Position.FULLSCREEN) return;\n\n    this.position = ComposerState.Position.NORMAL;\n    m.redraw.sync();\n  }\n\n  /**\n   * Close the composer.\n   */\n  hide() {\n    this.clear();\n    m.redraw();\n  }\n\n  /**\n   * Confirm with the user so they don't lose their content, then close the\n   * composer.\n   */\n  close() {\n    if (this.preventExit()) return;\n\n    this.hide();\n  }\n\n  /**\n   * Minimize the composer. Has no effect if the composer is hidden.\n   */\n  minimize() {\n    if (!this.isVisible()) return;\n\n    this.position = ComposerState.Position.MINIMIZED;\n    m.redraw();\n  }\n\n  /**\n   * Take the composer into fullscreen mode. Has no effect if the composer is\n   * hidden.\n   */\n  fullScreen() {\n    if (!this.isVisible()) return;\n\n    this.position = ComposerState.Position.FULLSCREEN;\n    m.redraw();\n  }\n\n  /**\n   * Exit fullscreen mode.\n   */\n  exitFullScreen() {\n    if (this.position !== ComposerState.Position.FULLSCREEN) return;\n\n    this.position = ComposerState.Position.NORMAL;\n    m.redraw();\n  }\n\n  /**\n   * Determine whether the body matches the given component class and data.\n   *\n   * @param {object} type The component class to check against. Subclasses are accepted as well.\n   * @param {object} data\n   * @return {boolean}\n   */\n  bodyMatches(type, data = {}) {\n    // Fail early when the body is of a different type\n    if (!subclassOf(this.body.componentClass, type)) return false;\n\n    // Now that the type is known to be correct, we loop through the provided\n    // data to see whether it matches the data in the attributes for the body.\n    return Object.keys(data).every((key) => this.body.attrs[key] === data[key]);\n  }\n\n  /**\n   * Determine whether or not the Composer is visible.\n   *\n   * True when the composer is displayed on the screen and has a body component.\n   * It could be open in \"normal\" or full-screen mode, or even minimized.\n   *\n   * @returns {boolean}\n   */\n  isVisible() {\n    return this.position !== ComposerState.Position.HIDDEN;\n  }\n\n  /**\n   * Determine whether or not the Composer is covering the screen.\n   *\n   * This will be true if the Composer is in full-screen mode on desktop,\n   * or if we are on a mobile device, where we always consider the composer as full-screen..\n   *\n   * @return {boolean}\n   */\n  isFullScreen() {\n    return this.position === ComposerState.Position.FULLSCREEN || app.screen() === 'phone';\n  }\n\n  /**\n   * Check whether or not the user is currently composing a reply to a\n   * discussion.\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @return {boolean}\n   */\n  composingReplyTo(discussion) {\n    return this.isVisible() && this.bodyMatches(ReplyComposer, { discussion });\n  }\n\n  /**\n   * Confirm with the user that they want to close the composer and lose their\n   * content.\n   *\n   * @return {boolean} Whether or not the exit was cancelled.\n   */\n  preventExit() {\n    if (!this.isVisible()) return;\n    if (!this.onExit) return;\n\n    if (this.onExit.callback()) {\n      return !confirm(this.onExit.message);\n    }\n  }\n\n  /**\n   * Configure when / what to ask the user before closing the composer.\n   *\n   * The provided callback will be used to determine whether asking for\n   * confirmation is necessary. If the callback returns true at the time of\n   * closing, the provided text will be shown in a standard confirmation dialog.\n   *\n   * @param {() => boolean} callback\n   * @param {string} message\n   */\n  preventClosingWhen(callback, message) {\n    this.onExit = { callback, message };\n  }\n\n  /**\n   * Minimum height of the Composer.\n   * @returns {number}\n   */\n  minimumHeight() {\n    return 200;\n  }\n\n  /**\n   * Maxmimum height of the Composer.\n   * @returns {number}\n   */\n  maximumHeight() {\n    return $(window).height() - $('#header').outerHeight();\n  }\n\n  /**\n   * Computed the composer's current height, based on the intended height, and\n   * the composer's current state. This will be applied to the composer\n   * content's DOM element.\n   * @returns {number | string}\n   */\n  computedHeight() {\n    // If the composer is minimized, then we don't want to set a height; we'll\n    // let the CSS decide how high it is. If it's fullscreen, then we need to\n    // make it as high as the window.\n    if (this.position === ComposerState.Position.MINIMIZED) {\n      return '';\n    } else if (this.position === ComposerState.Position.FULLSCREEN) {\n      return $(window).height();\n    }\n\n    // Otherwise, if it's normal or hidden, then we use the intended height.\n    // We don't let the composer get too small or too big, though.\n    return Math.max(this.minimumHeight(), Math.min(this.height, this.maximumHeight()));\n  }\n}\n\nComposerState.Position = {\n  HIDDEN: 'hidden',\n  NORMAL: 'normal',\n  MINIMIZED: 'minimized',\n  FULLSCREEN: 'fullScreen',\n};\n\nexport default ComposerState;\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport ItemList from '../../common/utils/ItemList';\nimport ComposerButton from './ComposerButton';\nimport listItems from '../../common/helpers/listItems';\nimport classList from '../../common/utils/classList';\nimport ComposerState from '../states/ComposerState';\n\n/**\n * The `Composer` component displays the composer. It can be loaded with a\n * content component with `load` and then its position/state can be altered with\n * `show`, `hide`, `close`, `minimize`, `fullScreen`, and `exitFullScreen`.\n */\nexport default class Composer extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * The composer's \"state\".\n     *\n     * @type {ComposerState}\n     */\n    this.state = this.attrs.state;\n\n    /**\n     * Whether or not the composer currently has focus.\n     *\n     * @type {Boolean}\n     */\n    this.active = false;\n\n    // Store the initial position so that we can trigger animations correctly.\n    this.prevPosition = this.state.position;\n  }\n\n  view() {\n    const body = this.state.body;\n    const classes = {\n      normal: this.state.position === ComposerState.Position.NORMAL,\n      minimized: this.state.position === ComposerState.Position.MINIMIZED,\n      fullScreen: this.state.position === ComposerState.Position.FULLSCREEN,\n      active: this.active,\n      visible: this.state.isVisible(),\n    };\n\n    // Set up a handler so that clicks on the content will show the composer.\n    const showIfMinimized = this.state.position === ComposerState.Position.MINIMIZED ? this.state.show.bind(this.state) : undefined;\n\n    const ComposerBody = body.componentClass;\n\n    return (\n      <div className={'Composer ' + classList(classes)}>\n        <div className=\"Composer-handle\" oncreate={this.configHandle.bind(this)} />\n        <ul className=\"Composer-controls\">{listItems(this.controlItems().toArray())}</ul>\n        <div className=\"Composer-content\" onclick={showIfMinimized}>\n          {ComposerBody && <ComposerBody {...body.attrs} composer={this.state} disabled={classes.minimized} />}\n        </div>\n      </div>\n    );\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    if (this.state.position === this.prevPosition) {\n      // Set the height of the Composer element and its contents on each redraw,\n      // so that they do not lose it if their DOM elements are recreated.\n      this.updateHeight();\n    } else {\n      this.animatePositionChange();\n\n      this.prevPosition = this.state.position;\n    }\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.initializeHeight();\n    this.$().hide().css('bottom', -this.state.computedHeight());\n\n    // Whenever any of the inputs inside the composer are have focus, we want to\n    // add a class to the composer to draw attention to it.\n    this.$().on('focus blur', ':input,.TextEditor-editorContainer', (e) => {\n      this.active = e.type === 'focusin';\n      m.redraw();\n    });\n\n    // When the escape key is pressed on any inputs, close the composer.\n    this.$().on('keydown', ':input,.TextEditor-editorContainer', 'esc', () => this.state.close());\n\n    this.handlers = {};\n\n    $(window)\n      .on('resize', (this.handlers.onresize = this.updateHeight.bind(this)))\n      .resize();\n\n    $(document)\n      .on('mousemove', (this.handlers.onmousemove = this.onmousemove.bind(this)))\n      .on('mouseup', (this.handlers.onmouseup = this.onmouseup.bind(this)));\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    $(window).off('resize', this.handlers.onresize);\n\n    $(document).off('mousemove', this.handlers.onmousemove).off('mouseup', this.handlers.onmouseup);\n  }\n\n  /**\n   * Add the necessary event handlers to the composer's handle so that it can\n   * be used to resize the composer.\n   */\n  configHandle(vnode) {\n    const composer = this;\n\n    $(vnode.dom)\n      .css('cursor', 'row-resize')\n      .bind('dragstart mousedown', (e) => e.preventDefault())\n      .mousedown(function (e) {\n        composer.mouseStart = e.clientY;\n        composer.heightStart = composer.$().height();\n        composer.handle = $(this);\n        $('body').css('cursor', 'row-resize');\n      });\n  }\n\n  /**\n   * Resize the composer according to mouse movement.\n   *\n   * @param {MouseEvent} e\n   */\n  onmousemove(e) {\n    if (!this.handle) return;\n\n    // Work out how much the mouse has been moved, and set the height\n    // relative to the old one based on that. Then update the content's\n    // height so that it fills the height of the composer, and update the\n    // body's padding.\n    const deltaPixels = this.mouseStart - e.clientY;\n    this.changeHeight(this.heightStart + deltaPixels);\n\n    // Update the body's padding-bottom so that no content on the page will ever\n    // get permanently hidden behind the composer. If the user is already\n    // scrolled to the bottom of the page, then we will keep them scrolled to\n    // the bottom after the padding has been updated.\n    const scrollTop = $(window).scrollTop();\n    const anchorToBottom = scrollTop > 0 && scrollTop + $(window).height() >= $(document).height();\n    this.updateBodyPadding(anchorToBottom);\n  }\n\n  /**\n   * Finish resizing the composer when the mouse is released.\n   */\n  onmouseup() {\n    if (!this.handle) return;\n\n    this.handle = null;\n    $('body').css('cursor', '');\n  }\n\n  /**\n   * Draw focus to the first focusable content element (the text editor).\n   */\n  focus() {\n    this.$('.Composer-content :input:enabled:visible, .TextEditor-editor').first().focus();\n  }\n\n  /**\n   * Update the DOM to reflect the composer's current height. This involves\n   * setting the height of the composer's root element, and adjusting the height\n   * of any flexible elements inside the composer's body.\n   */\n  updateHeight() {\n    const height = this.state.computedHeight();\n    const $flexible = this.$('.Composer-flexible');\n\n    this.$().height(height);\n\n    if ($flexible.length) {\n      const headerHeight = $flexible.offset().top - this.$().offset().top;\n      const paddingBottom = parseInt($flexible.css('padding-bottom'), 10);\n      const footerHeight = this.$('.Composer-footer').outerHeight(true);\n\n      $flexible.height(this.$().outerHeight() - headerHeight - paddingBottom - footerHeight);\n    }\n  }\n\n  /**\n   * Update the amount of padding-bottom on the body so that the page's\n   * content will still be visible above the composer when the page is\n   * scrolled right to the bottom.\n   */\n  updateBodyPadding() {\n    const visible =\n      this.state.position !== ComposerState.Position.HIDDEN && this.state.position !== ComposerState.Position.MINIMIZED && app.screen() !== 'phone';\n\n    const paddingBottom = visible ? this.state.computedHeight() - parseInt($('#app').css('padding-bottom'), 10) : 0;\n\n    $('#content').css({ paddingBottom });\n  }\n\n  /**\n   * Trigger the right animation depending on the desired new position.\n   */\n  animatePositionChange() {\n    // When exiting full-screen mode: focus content\n    if (this.prevPosition === ComposerState.Position.FULLSCREEN && this.state.position === ComposerState.Position.NORMAL) {\n      this.focus();\n      return;\n    }\n\n    switch (this.state.position) {\n      case ComposerState.Position.HIDDEN:\n        return this.hide();\n      case ComposerState.Position.MINIMIZED:\n        return this.minimize();\n      case ComposerState.Position.FULLSCREEN:\n        return this.focus();\n      case ComposerState.Position.NORMAL:\n        return this.show();\n    }\n  }\n\n  /**\n   * Animate the Composer into the new position by changing the height.\n   */\n  animateHeightChange() {\n    const $composer = this.$().stop(true);\n    const oldHeight = $composer.outerHeight();\n    const scrollTop = $(window).scrollTop();\n\n    $composer.show();\n    this.updateHeight();\n\n    const newHeight = $composer.outerHeight();\n\n    if (this.prevPosition === ComposerState.Position.HIDDEN) {\n      $composer.css({ bottom: -newHeight, height: newHeight });\n    } else {\n      $composer.css({ height: oldHeight });\n    }\n\n    const animation = $composer.animate({ bottom: 0, height: newHeight }, 'fast').promise();\n\n    this.updateBodyPadding();\n    $(window).scrollTop(scrollTop);\n    return animation;\n  }\n\n  /**\n   * Show the Composer backdrop.\n   */\n  showBackdrop() {\n    this.$backdrop = $('<div/>').addClass('composer-backdrop').appendTo('body');\n  }\n\n  /**\n   * Hide the Composer backdrop.\n   */\n  hideBackdrop() {\n    if (this.$backdrop) this.$backdrop.remove();\n  }\n\n  /**\n   * Animate the composer sliding up from the bottom to take its normal height.\n   *\n   * @private\n   */\n  show() {\n    this.animateHeightChange().then(() => this.focus());\n\n    if (app.screen() === 'phone') {\n      // On safari fixed position doesn't properly work on mobile,\n      // So we use absolute and set the top value.\n      // https://github.com/flarum/core/issues/2652\n\n      // Due to another safari bug, `scrollTop` is unreliable when\n      // at the very bottom of the page AND opening the composer.\n      // So we fallback to a calculated version of scrollTop.\n      // https://github.com/flarum/core/issues/2683\n      const scrollElement = document.documentElement;\n      const topOfViewport = Math.min(scrollElement.scrollTop, scrollElement.scrollHeight - scrollElement.clientHeight);\n      this.$().css('top', $('.App').is('.mobile-safari') ? topOfViewport : 0);\n      this.showBackdrop();\n    }\n  }\n\n  /**\n   * Animate closing the composer.\n   *\n   * @private\n   */\n  hide() {\n    const $composer = this.$();\n\n    // Animate the composer sliding down off the bottom edge of the viewport.\n    // Only when the animation is completed, update other elements on the page.\n    $composer.stop(true).animate({ bottom: -$composer.height() }, 'fast', () => {\n      $composer.hide();\n      this.hideBackdrop();\n      this.updateBodyPadding();\n    });\n  }\n\n  /**\n   * Shrink the composer until only its title is visible.\n   *\n   * @private\n   */\n  minimize() {\n    this.animateHeightChange();\n\n    this.$().css('top', 'auto');\n    this.hideBackdrop();\n  }\n\n  /**\n   * Build an item list for the composer's controls.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controlItems() {\n    const items = new ItemList();\n\n    if (this.state.position === ComposerState.Position.FULLSCREEN) {\n      items.add(\n        'exitFullScreen',\n        <ComposerButton\n          icon=\"fas fa-compress\"\n          title={app.translator.trans('core.forum.composer.exit_full_screen_tooltip')}\n          onclick={this.state.exitFullScreen.bind(this.state)}\n        />\n      );\n    } else {\n      if (this.state.position !== ComposerState.Position.MINIMIZED) {\n        items.add(\n          'minimize',\n          <ComposerButton\n            icon=\"fas fa-minus minimize\"\n            title={app.translator.trans('core.forum.composer.minimize_tooltip')}\n            onclick={this.state.minimize.bind(this.state)}\n            itemClassName=\"App-backControl\"\n          />\n        );\n\n        items.add(\n          'fullScreen',\n          <ComposerButton\n            icon=\"fas fa-expand\"\n            title={app.translator.trans('core.forum.composer.full_screen_tooltip')}\n            onclick={this.state.fullScreen.bind(this.state)}\n          />\n        );\n      }\n\n      items.add(\n        'close',\n        <ComposerButton\n          icon=\"fas fa-times\"\n          title={app.translator.trans('core.forum.composer.close_tooltip')}\n          onclick={this.state.close.bind(this.state)}\n        />\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Initialize default Composer height.\n   */\n  initializeHeight() {\n    this.state.height = localStorage.getItem('composerHeight');\n\n    if (!this.state.height) {\n      this.state.height = this.defaultHeight();\n    }\n  }\n\n  /**\n   * Default height of the Composer in case none is saved.\n   * @returns {number}\n   */\n  defaultHeight() {\n    return this.$().height();\n  }\n\n  /**\n   * Save a new Composer height and update the DOM.\n   * @param {number} height\n   */\n  changeHeight(height) {\n    this.state.height = height;\n    this.updateHeight();\n\n    localStorage.setItem('composerHeight', this.state.height);\n  }\n}\n","import app from '../../forum/app';\nimport type NotificationModel from '../../common/models/Notification';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport avatar from '../../common/helpers/avatar';\nimport icon from '../../common/helpers/icon';\nimport humanTime from '../../common/helpers/humanTime';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport classList from '../../common/utils/classList';\nimport type Mithril from 'mithril';\n\nexport interface INotificationAttrs extends ComponentAttrs {\n  notification: NotificationModel;\n}\n\n// TODO [Flarum 2.0]: Remove `?.` from abstract function calls.\n\n/**\n * The `Notification` component abstract displays a single notification.\n * Subclasses should implement the `icon`, `href`, and `content` methods.\n */\nexport default abstract class Notification<CustomAttrs extends INotificationAttrs = INotificationAttrs> extends Component<CustomAttrs> {\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    const notification = this.attrs.notification;\n    const href = this.href?.() ?? '';\n\n    const fromUser = notification.fromUser();\n\n    return (\n      <Link\n        className={classList('Notification', `Notification--${notification.contentType()}`, [!notification.isRead() && 'unread'])}\n        href={href}\n        external={href.includes('://')}\n        onclick={this.markAsRead.bind(this)}\n      >\n        {avatar(fromUser || null)}\n        {icon(this.icon?.(), { className: 'Notification-icon' })}\n        <span className=\"Notification-title\">\n          <span className=\"Notification-content\">{this.content?.()}</span>\n          <span className=\"Notification-title-spring\" />\n          {humanTime(notification.createdAt())}\n        </span>\n        {!notification.isRead() && (\n          <Button\n            className=\"Notification-action Button Button--link\"\n            icon=\"fas fa-check\"\n            title={app.translator.trans('core.forum.notifications.mark_as_read_tooltip')}\n            onclick={(e: Event) => {\n              e.preventDefault();\n              e.stopPropagation();\n\n              this.markAsRead();\n            }}\n          />\n        )}\n        <div className=\"Notification-excerpt\">{this.excerpt?.()}</div>\n      </Link>\n    );\n  }\n\n  /**\n   * Get the name of the icon that should be displayed in the notification.\n   */\n  abstract icon(): string;\n\n  /**\n   * Get the URL that the notification should link to.\n   */\n  abstract href(): string;\n\n  /**\n   * Get the content of the notification.\n   */\n  abstract content(): Mithril.Children;\n\n  /**\n   * Get the excerpt of the notification.\n   */\n  abstract excerpt(): Mithril.Children;\n\n  /**\n   * Mark the notification as read.\n   */\n  markAsRead() {\n    if (this.attrs.notification.isRead()) return;\n\n    app.session.user?.pushAttributes({ unreadNotificationCount: (app.session.user.unreadNotificationCount() ?? 1) - 1 });\n\n    this.attrs.notification.save({ isRead: true });\n  }\n}\n","import type Discussion from '../../common/models/Discussion';\nimport app from '../../forum/app';\nimport Notification from './Notification';\n\ninterface DiscussionRenamedContent {\n  postNumber: number;\n}\n\n/**\n * The `DiscussionRenamedNotification` component displays a notification which\n * indicates that a discussion has had its title changed.\n */\nexport default class DiscussionRenamedNotification extends Notification {\n  icon() {\n    return 'fas fa-pencil-alt';\n  }\n\n  href() {\n    const notification = this.attrs.notification;\n    const discussion = notification.subject();\n\n    if (!discussion) {\n      return '#';\n    }\n\n    return app.route.discussion(discussion as Discussion, notification.content<DiscussionRenamedContent>().postNumber);\n  }\n\n  content() {\n    return app.translator.trans('core.forum.notifications.discussion_renamed_text', { user: this.attrs.notification.fromUser() });\n  }\n\n  excerpt() {\n    return null;\n  }\n}\n","import app from '../../forum/app';\nimport ComposerBody from './ComposerBody';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport icon from '../../common/helpers/icon';\n\nfunction minimizeComposerIfFullScreen(e) {\n  if (app.composer.isFullScreen()) {\n    app.composer.minimize();\n    e.stopPropagation();\n  }\n}\n\n/**\n * The `EditPostComposer` component displays the composer content for editing a\n * post. It sets the initial content to the content of the post that is being\n * edited, and adds a header control to indicate which post is being edited.\n *\n * ### Attrs\n *\n * - All of the attrs for ComposerBody\n * - `post`\n */\nexport default class EditPostComposer extends ComposerBody {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.submitLabel = attrs.submitLabel || app.translator.trans('core.forum.composer_edit.submit_button');\n    attrs.confirmExit = attrs.confirmExit || app.translator.trans('core.forum.composer_edit.discard_confirmation');\n    attrs.originalContent = attrs.originalContent || attrs.post.content();\n    attrs.user = attrs.user || attrs.post.user();\n\n    attrs.post.editedContent = attrs.originalContent;\n  }\n\n  headerItems() {\n    const items = super.headerItems();\n    const post = this.attrs.post;\n\n    items.add(\n      'title',\n      <h3>\n        {icon('fas fa-pencil-alt')}{' '}\n        <Link href={app.route.discussion(post.discussion(), post.number())} onclick={minimizeComposerIfFullScreen}>\n          {app.translator.trans('core.forum.composer_edit.post_link', { number: post.number(), discussion: post.discussion().title() })}\n        </Link>\n      </h3>\n    );\n\n    return items;\n  }\n\n  /**\n   * Jump to the preview when triggered by the text editor.\n   */\n  jumpToPreview(e) {\n    minimizeComposerIfFullScreen(e);\n\n    m.route.set(app.route.post(this.attrs.post));\n  }\n\n  /**\n   * Get the data to submit to the server when the post is saved.\n   *\n   * @return {Record<string, unknown>}\n   */\n  data() {\n    return {\n      content: this.composer.fields.content(),\n    };\n  }\n\n  onsubmit() {\n    const discussion = this.attrs.post.discussion();\n\n    this.loading = true;\n\n    const data = this.data();\n\n    this.attrs.post.save(data).then((post) => {\n      // If we're currently viewing the discussion which this edit was made\n      // in, then we can scroll to the post.\n      if (app.viewingDiscussion(discussion)) {\n        app.current.get('stream').goToNumber(post.number());\n      } else {\n        // Otherwise, we'll create an alert message to inform the user that\n        // their edit has been made, containing a button which will\n        // transition to their edited post when clicked.\n        const alert = app.alerts.show(\n          {\n            type: 'success',\n            controls: [\n              <Button\n                className=\"Button Button--link\"\n                onclick={() => {\n                  m.route.set(app.route.post(post));\n                  app.alerts.dismiss(alert);\n                }}\n              >\n                {app.translator.trans('core.forum.composer_edit.view_button')}\n              </Button>,\n            ],\n          },\n          app.translator.trans('core.forum.composer_edit.edited_message')\n        );\n      }\n\n      this.composer.hide();\n    }, this.loaded.bind(this));\n  }\n}\n","import app from '../../forum/app';\nimport EditPostComposer from '../components/EditPostComposer';\nimport Button from '../../common/components/Button';\nimport Separator from '../../common/components/Separator';\nimport ItemList from '../../common/utils/ItemList';\nimport extractText from '../../common/utils/extractText';\n\n/**\n * The `PostControls` utility constructs a list of buttons for a post which\n * perform actions on it.\n */\nexport default {\n  /**\n   * Get a list of controls for a post.\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}')}\n   */\n  controls(post, context) {\n    const items = new ItemList();\n\n    ['user', 'moderation', 'destructive'].forEach((section) => {\n      const controls = this[section + 'Controls'](post, context).toArray();\n      if (controls.length) {\n        controls.forEach((item) => items.add(item.itemName, item));\n        items.add(section + 'Separator', <Separator />);\n      }\n    });\n\n    return items;\n  },\n\n  /**\n   * Get controls for a post pertaining to the current user (e.g. report).\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}')}\n   * @protected\n   */\n  userControls(post, context) {\n    return new ItemList();\n  },\n\n  /**\n   * Get controls for a post pertaining to moderation (e.g. edit).\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}')}\n   * @protected\n   */\n  moderationControls(post, context) {\n    const items = new ItemList();\n\n    if (post.contentType() === 'comment' && post.canEdit()) {\n      if (!post.isHidden()) {\n        items.add(\n          'edit',\n          <Button icon=\"fas fa-pencil-alt\" onclick={this.editAction.bind(post)}>\n            {app.translator.trans('core.forum.post_controls.edit_button')}\n          </Button>\n        );\n      }\n    }\n\n    return items;\n  },\n\n  /**\n   * Get controls for a post that are destructive (e.g. delete).\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}')}\n   * @protected\n   */\n  destructiveControls(post, context) {\n    const items = new ItemList();\n\n    if (post.contentType() === 'comment' && !post.isHidden()) {\n      if (post.canHide()) {\n        items.add(\n          'hide',\n          <Button icon=\"far fa-trash-alt\" onclick={this.hideAction.bind(post)}>\n            {app.translator.trans('core.forum.post_controls.delete_button')}\n          </Button>\n        );\n      }\n    } else {\n      if (post.contentType() === 'comment' && post.canHide()) {\n        items.add(\n          'restore',\n          <Button icon=\"fas fa-reply\" onclick={this.restoreAction.bind(post)}>\n            {app.translator.trans('core.forum.post_controls.restore_button')}\n          </Button>\n        );\n      }\n      if (post.canDelete()) {\n        items.add(\n          'delete',\n          <Button icon=\"fas fa-times\" onclick={this.deleteAction.bind(post, context)}>\n            {app.translator.trans('core.forum.post_controls.delete_forever_button')}\n          </Button>\n        );\n      }\n    }\n\n    return items;\n  },\n\n  /**\n   * Open the composer to edit a post.\n   *\n   * @return {Promise<void>}\n   */\n  editAction() {\n    return new Promise((resolve) => {\n      app.composer.load(EditPostComposer, { post: this });\n      app.composer.show();\n\n      return resolve();\n    });\n  },\n\n  /**\n   * Hide a post.\n   *\n   * @return {Promise<void>}\n   */\n  hideAction() {\n    if (!confirm(extractText(app.translator.trans('core.forum.post_controls.hide_confirmation')))) return;\n    this.pushData({ attributes: { hiddenAt: new Date() }, relationships: { hiddenUser: app.session.user } });\n\n    return this.save({ isHidden: true }).then(() => m.redraw());\n  },\n\n  /**\n   * Restore a post.\n   *\n   * @return {Promise<void>}\n   */\n  restoreAction() {\n    this.pushData({ attributes: { hiddenAt: null }, relationships: { hiddenUser: null } });\n\n    return this.save({ isHidden: false }).then(() => m.redraw());\n  },\n\n  /**\n   * Delete a post.\n   *\n   * @return {Promise<void>}\n   */\n  deleteAction(context) {\n    if (!confirm(extractText(app.translator.trans('core.forum.post_controls.delete_confirmation')))) return;\n    if (context) context.loading = true;\n\n    return this.delete()\n      .then(() => {\n        const discussion = this.discussion();\n\n        discussion.removePost(this.id());\n\n        // If this was the last post in the discussion, then we will assume that\n        // the whole discussion was deleted too.\n        if (!discussion.postIds().length) {\n          app.discussions.removeDiscussion(discussion);\n\n          if (app.viewingDiscussion(discussion)) {\n            app.history.back();\n          }\n        }\n      })\n      .catch(() => {})\n      .then(() => {\n        if (context) context.loading = false;\n        m.redraw();\n      });\n  },\n};\n","import app from '../../forum/app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport SubtreeRetainer from '../../common/utils/SubtreeRetainer';\nimport Dropdown from '../../common/components/Dropdown';\nimport PostControls from '../utils/PostControls';\nimport listItems, { ModdedChildrenWithItemName } from '../../common/helpers/listItems';\nimport ItemList from '../../common/utils/ItemList';\nimport type PostModel from '../../common/models/Post';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport type Mithril from 'mithril';\n\nexport interface IPostAttrs extends ComponentAttrs {\n  post: PostModel;\n}\n\n/**\n * The `Post` component displays a single post. The basic post template just\n * includes a controls dropdown; subclasses must implement `content` and `attrs`\n * methods.\n */\nexport default abstract class Post<CustomAttrs extends IPostAttrs = IPostAttrs> extends Component<CustomAttrs> {\n  /**\n   * May be set by subclasses.\n   */\n  loading = false;\n\n  /**\n   * Ensures that the post will not be redrawn\n   * unless new data comes in.\n   */\n  subtree!: SubtreeRetainer;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.loading = false;\n\n    this.subtree = new SubtreeRetainer(\n      () => this.loading,\n      () => this.attrs.post.freshness,\n      () => {\n        const user = this.attrs.post.user();\n        return user && user.freshness;\n      }\n    );\n  }\n\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    const attrs = this.elementAttrs();\n\n    attrs.className = this.classes(attrs.className as string | undefined).join(' ');\n\n    const controls = PostControls.controls(this.attrs.post, this).toArray();\n    const footerItems = this.footerItems().toArray();\n\n    return (\n      <article {...attrs}>\n        <div>{this.viewItems(controls, footerItems).toArray()}</div>\n      </article>\n    );\n  }\n\n  viewItems(controls: Mithril.Children[], footerItems: ModdedChildrenWithItemName[]): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('content', this.loading ? <LoadingIndicator /> : this.content(), 100);\n\n    items.add(\n      'actions',\n      <aside className=\"Post-actions\">\n        <ul>\n          {listItems(this.actionItems().toArray())}\n          {!!controls.length && (\n            <li>\n              <Dropdown\n                className=\"Post-controls\"\n                buttonClassName=\"Button Button--icon Button--flat\"\n                menuClassName=\"Dropdown-menu--right\"\n                icon=\"fas fa-ellipsis-h\"\n                onshow={() => this.$('.Post-controls').addClass('open')}\n                onhide={() => this.$('.Post-controls').removeClass('open')}\n                accessibleToggleLabel={app.translator.trans('core.forum.post_controls.toggle_dropdown_accessible_label')}\n              >\n                {controls}\n              </Dropdown>\n            </li>\n          )}\n        </ul>\n      </aside>,\n      90\n    );\n\n    items.add('footer', <footer className=\"Post-footer\">{footerItems.length > 0 ? <ul>{listItems(footerItems)}</ul> : <ul></ul>}</footer>, 80);\n\n    return items;\n  }\n\n  onbeforeupdate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onbeforeupdate(vnode);\n\n    return this.subtree.needsRebuild();\n  }\n\n  onupdate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onupdate(vnode);\n\n    const $actions = this.$('.Post-actions');\n    const $controls = this.$('.Post-controls');\n\n    $actions.toggleClass('openWithin', $controls.hasClass('open'));\n  }\n\n  /**\n   * Get attributes for the post element.\n   */\n  elementAttrs(): Record<string, unknown> {\n    return {};\n  }\n\n  /**\n   * Get the post's content.\n   */\n  content(): Mithril.Children {\n    // TODO: [Flarum 2.0] return `null`\n    return [];\n  }\n\n  /**\n   * Get the post's classes.\n   */\n  classes(existing?: string): string[] {\n    let classes = (existing || '').split(' ').concat(['Post']);\n\n    const user = this.attrs.post.user();\n    const discussion = this.attrs.post.discussion();\n\n    if (this.loading) {\n      classes.push('Post--loading');\n    }\n\n    if (user && user === app.session.user) {\n      classes.push('Post--by-actor');\n    }\n\n    if (user && user === discussion.user()) {\n      classes.push('Post--by-start-user');\n    }\n\n    return classes;\n  }\n\n  /**\n   * Build an item list for the post's actions.\n   */\n  actionItems(): ItemList<Mithril.Children> {\n    return new ItemList();\n  }\n\n  /**\n   * Build an item list for the post's footer.\n   */\n  footerItems(): ItemList<ModdedChildrenWithItemName> {\n    return new ItemList<ModdedChildrenWithItemName>();\n  }\n}\n","import Badge, { IBadgeAttrs } from './Badge';\nimport Group from '../models/Group';\n\nexport interface IGroupAttrs extends IBadgeAttrs {\n  group?: Group;\n}\n\nexport default class GroupBadge<CustomAttrs extends IGroupAttrs = IGroupAttrs> extends Badge<CustomAttrs> {\n  static initAttrs(attrs: IGroupAttrs): void {\n    super.initAttrs(attrs);\n\n    if (attrs.group) {\n      attrs.icon = attrs.group.icon() || '';\n      attrs.color = attrs.group.color() || '';\n      attrs.label = typeof attrs.label === 'undefined' ? attrs.group.nameSingular() : attrs.label;\n      attrs.type = 'group--' + attrs.group.id();\n\n      delete attrs.group;\n    }\n  }\n}\n","import Model from '../Model';\n\nexport default class Group extends Model {\n  static ADMINISTRATOR_ID = '1';\n  static GUEST_ID = '2';\n  static MEMBER_ID = '3';\n\n  nameSingular() {\n    return Model.attribute<string>('nameSingular').call(this);\n  }\n  namePlural() {\n    return Model.attribute<string>('namePlural').call(this);\n  }\n\n  color() {\n    return Model.attribute<string | null>('color').call(this);\n  }\n  icon() {\n    return Model.attribute<string | null>('icon').call(this);\n  }\n\n  isHidden() {\n    return Model.attribute<boolean>('isHidden').call(this);\n  }\n}\n","import app from '../../common/app';\nimport Modal, { IInternalModalAttrs } from './Modal';\nimport Button from './Button';\nimport GroupBadge from './GroupBadge';\nimport Group from '../models/Group';\nimport extractText from '../utils/extractText';\nimport ItemList from '../utils/ItemList';\nimport Stream from '../utils/Stream';\nimport type Mithril from 'mithril';\nimport type User from '../models/User';\nimport type { SaveAttributes, SaveRelationships } from '../Model';\n\nexport interface IEditUserModalAttrs extends IInternalModalAttrs {\n  user: User;\n}\n\nexport default class EditUserModal<CustomAttrs extends IEditUserModalAttrs = IEditUserModalAttrs> extends Modal<CustomAttrs> {\n  protected username!: Stream<string>;\n  protected email!: Stream<string>;\n  protected isEmailConfirmed!: Stream<boolean>;\n  protected setPassword!: Stream<boolean>;\n  protected password!: Stream<string>;\n  protected groups: Record<string, Stream<boolean>> = {};\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    const user = this.attrs.user;\n\n    this.username = Stream(user.username() || '');\n    this.email = Stream(user.email() || '');\n    this.isEmailConfirmed = Stream(user.isEmailConfirmed() || false);\n    this.setPassword = Stream(false as boolean);\n    this.password = Stream(user.password() || '');\n\n    const userGroups = user.groups() || [];\n\n    app.store\n      .all<Group>('groups')\n      .filter((group) => ![Group.GUEST_ID, Group.MEMBER_ID].includes(group.id()!))\n      .forEach((group) => (this.groups[group.id()!] = Stream(userGroups.includes(group))));\n  }\n\n  className() {\n    return 'EditUserModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.lib.edit_user.title');\n  }\n\n  content() {\n    const fields = this.fields().toArray();\n    return (\n      <div className=\"Modal-body\">\n        {fields.length > 1 ? <div className=\"Form\">{this.fields().toArray()}</div> : app.translator.trans('core.lib.edit_user.nothing_available')}\n      </div>\n    );\n  }\n\n  fields() {\n    const items = new ItemList();\n\n    if (this.attrs.user.canEditCredentials()) {\n      items.add(\n        'username',\n        <div className=\"Form-group\">\n          <label>{app.translator.trans('core.lib.edit_user.username_heading')}</label>\n          <input\n            className=\"FormControl\"\n            placeholder={extractText(app.translator.trans('core.lib.edit_user.username_label'))}\n            bidi={this.username}\n            disabled={this.nonAdminEditingAdmin()}\n          />\n        </div>,\n        40\n      );\n\n      if (app.session.user !== this.attrs.user) {\n        items.add(\n          'email',\n          <div className=\"Form-group\">\n            <label>{app.translator.trans('core.lib.edit_user.email_heading')}</label>\n            <div>\n              <input\n                className=\"FormControl\"\n                placeholder={extractText(app.translator.trans('core.lib.edit_user.email_label'))}\n                bidi={this.email}\n                disabled={this.nonAdminEditingAdmin()}\n              />\n            </div>\n            {!this.isEmailConfirmed() && this.userIsAdmin(app.session.user) && (\n              <div>\n                <Button className=\"Button Button--block\" loading={this.loading} onclick={this.activate.bind(this)}>\n                  {app.translator.trans('core.lib.edit_user.activate_button')}\n                </Button>\n              </div>\n            )}\n          </div>,\n          30\n        );\n\n        items.add(\n          'password',\n          <div className=\"Form-group\">\n            <label>{app.translator.trans('core.lib.edit_user.password_heading')}</label>\n            <div>\n              <label className=\"checkbox\">\n                <input\n                  type=\"checkbox\"\n                  onchange={(e: KeyboardEvent) => {\n                    const target = e.target as HTMLInputElement;\n                    this.setPassword(target.checked);\n                    m.redraw.sync();\n                    if (target.checked) this.$('[name=password]').select();\n                    e.redraw = false;\n                  }}\n                  disabled={this.nonAdminEditingAdmin()}\n                />\n                {app.translator.trans('core.lib.edit_user.set_password_label')}\n              </label>\n              {this.setPassword() && (\n                <input\n                  className=\"FormControl\"\n                  type=\"password\"\n                  name=\"password\"\n                  placeholder={extractText(app.translator.trans('core.lib.edit_user.password_label'))}\n                  bidi={this.password}\n                  disabled={this.nonAdminEditingAdmin()}\n                />\n              )}\n            </div>\n          </div>,\n          20\n        );\n      }\n    }\n\n    if (this.attrs.user.canEditGroups()) {\n      items.add(\n        'groups',\n        <div className=\"Form-group EditUserModal-groups\">\n          <label>{app.translator.trans('core.lib.edit_user.groups_heading')}</label>\n          <div>\n            {Object.keys(this.groups)\n              .map((id) => app.store.getById<Group>('groups', id))\n              .filter(Boolean)\n              .map(\n                (group) =>\n                  // Necessary because filter(Boolean) doesn't narrow out falsy values.\n                  group && (\n                    <label className=\"checkbox\">\n                      <input\n                        type=\"checkbox\"\n                        bidi={this.groups[group.id()!]}\n                        disabled={\n                          group.id() === Group.ADMINISTRATOR_ID && (this.attrs.user === app.session.user || !this.userIsAdmin(app.session.user))\n                        }\n                      />\n                      <GroupBadge group={group} label={null} /> {group.nameSingular()}\n                    </label>\n                  )\n              )}\n          </div>\n        </div>,\n        10\n      );\n    }\n\n    items.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.lib.edit_user.submit_button')}\n        </Button>\n      </div>,\n      -10\n    );\n\n    return items;\n  }\n\n  activate() {\n    this.loading = true;\n    const data = {\n      username: this.username(),\n      isEmailConfirmed: true,\n    };\n    this.attrs.user\n      .save(data, { errorHandler: this.onerror.bind(this) })\n      .then(() => {\n        this.isEmailConfirmed(true);\n        this.loading = false;\n        m.redraw();\n      })\n      .catch(() => {\n        this.loading = false;\n        m.redraw();\n      });\n  }\n\n  data() {\n    const data: SaveAttributes = {};\n    const relationships: SaveRelationships = {};\n\n    if (this.attrs.user.canEditCredentials() && !this.nonAdminEditingAdmin()) {\n      data.username = this.username();\n\n      if (app.session.user !== this.attrs.user) {\n        data.email = this.email();\n      }\n\n      if (this.setPassword()) {\n        data.password = this.password();\n      }\n    }\n\n    if (this.attrs.user.canEditGroups()) {\n      relationships.groups = Object.keys(this.groups)\n        .filter((id) => this.groups[id]())\n        .map((id) => app.store.getById<Group>('groups', id))\n        .filter((g): g is Group => g instanceof Group);\n    }\n\n    data.relationships = relationships;\n\n    return data;\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    this.attrs.user\n      .save(this.data(), { errorHandler: this.onerror.bind(this) })\n      .then(this.hide.bind(this))\n      .catch(() => {\n        this.loading = false;\n        m.redraw();\n      });\n  }\n\n  nonAdminEditingAdmin(): boolean {\n    return this.userIsAdmin(this.attrs.user) && !this.userIsAdmin(app.session.user);\n  }\n\n  /**\n   * @internal\n   */\n  protected userIsAdmin(user: User | null): boolean {\n    return !!(user?.groups() || []).some((g) => g?.id() === Group.ADMINISTRATOR_ID);\n  }\n}\n","import Component from '../../common/Component';\n\n/**\n * The `AffixedSidebar` component uses Bootstrap's \"affix\" plugin to keep a\n * sidebar navigation at the top of the viewport when scrolling.\n *\n * ### Children\n *\n * The component must wrap an element that itself wraps an <ul> element, which\n * will be \"affixed\".\n *\n * @see https://getbootstrap.com/docs/3.4/javascript/#affix\n */\nexport default class AffixedSidebar extends Component {\n  view(vnode) {\n    return vnode.children[0];\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    // Register the affix plugin to execute on every window resize (and trigger)\n    this.boundOnresize = this.onresize.bind(this);\n    $(window).on('resize', this.boundOnresize).resize();\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    $(window).off('resize', this.boundOnresize);\n  }\n\n  onresize() {\n    const $sidebar = this.$();\n    const $header = $('#header');\n    const $footer = $('#footer');\n    const $affixElement = $sidebar.find('> ul');\n\n    $(window).off('.affix');\n    $affixElement.removeClass('affix affix-top affix-bottom').removeData('bs.affix');\n\n    // Don't affix the sidebar if it is taller than the viewport (otherwise\n    // there would be no way to scroll through its content).\n    if ($sidebar.outerHeight(true) > $(window).height() - $header.outerHeight(true)) return;\n\n    $affixElement.affix({\n      offset: {\n        top: () => $sidebar.offset().top - $header.outerHeight(true) - parseInt($sidebar.css('margin-top'), 10),\n        bottom: () => (this.bottom = $footer.outerHeight(true)),\n      },\n    });\n  }\n}\n","import app from '../../forum/app';\nimport Page, { IPageAttrs } from '../../common/components/Page';\nimport ItemList from '../../common/utils/ItemList';\nimport UserCard from './UserCard';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport SelectDropdown from '../../common/components/SelectDropdown';\nimport LinkButton from '../../common/components/LinkButton';\nimport Separator from '../../common/components/Separator';\nimport listItems from '../../common/helpers/listItems';\nimport AffixedSidebar from './AffixedSidebar';\nimport type User from '../../common/models/User';\nimport type Mithril from 'mithril';\n\nexport interface IUserPageAttrs extends IPageAttrs {}\n\n/**\n * The `UserPage` component shows a user's profile. It can be extended to show\n * content inside of the content area. See `ActivityPage` and `SettingsPage` for\n * examples.\n *\n * @abstract\n */\nexport default class UserPage<CustomAttrs extends IUserPageAttrs = IUserPageAttrs, CustomState = undefined> extends Page<CustomAttrs, CustomState> {\n  /**\n   * The user this page is for.\n   */\n  user: User | null = null;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.bodyClass = 'App--user';\n  }\n\n  /**\n   * Base view template for the user page.\n   */\n  view() {\n    return (\n      <div className=\"UserPage\">\n        {this.user\n          ? [\n              <UserCard\n                user={this.user}\n                className=\"Hero UserHero\"\n                editable={this.user.canEdit() || this.user === app.session.user}\n                controlsButtonClassName=\"Button\"\n              />,\n              <div className=\"container\">\n                <div className=\"sideNavContainer\">\n                  <AffixedSidebar>\n                    <nav className=\"sideNav UserPage-nav\">\n                      <ul>{listItems(this.sidebarItems().toArray())}</ul>\n                    </nav>\n                  </AffixedSidebar>\n                  <div className=\"sideNavOffset UserPage-content\">{this.content()}</div>\n                </div>\n              </div>,\n            ]\n          : [<LoadingIndicator display=\"block\" />]}\n      </div>\n    );\n  }\n\n  /**\n   * Get the content to display in the user page.\n   */\n  content(): Mithril.Children | void {}\n\n  /**\n   * Initialize the component with a user, and trigger the loading of their\n   * activity feed.\n   *\n   * @protected\n   */\n  show(user: User): void {\n    this.user = user;\n\n    app.current.set('user', user);\n\n    app.setTitle(user.displayName());\n\n    m.redraw();\n  }\n\n  /**\n   * Given a username, load the user's profile from the store, or make a request\n   * if we don't have it yet. Then initialize the profile page with that user.\n   */\n  loadUser(username: string) {\n    const lowercaseUsername = username.toLowerCase();\n\n    // Load the preloaded user object, if any, into the global app store\n    // We don't use the output of the method because it returns raw JSON\n    // instead of the parsed models\n    app.preloadedApiDocument();\n\n    app.store.all<User>('users').some((user) => {\n      if ((user.username().toLowerCase() === lowercaseUsername || user.id() === username) && user.joinTime()) {\n        this.show(user);\n        return true;\n      }\n\n      return false;\n    });\n\n    if (!this.user) {\n      app.store.find<User>('users', username, { bySlug: true }).then(this.show.bind(this));\n    }\n  }\n\n  /**\n   * Build an item list for the content of the sidebar.\n   */\n  sidebarItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'nav',\n      <SelectDropdown className=\"App-titleControl\" buttonClassName=\"Button\">\n        {this.navItems().toArray()}\n      </SelectDropdown>\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the navigation in the sidebar.\n   */\n  navItems() {\n    const items = new ItemList<Mithril.Children>();\n    const user = this.user!;\n    const isActor = app.session.user === user;\n\n    items.add(\n      'posts',\n      <LinkButton href={app.route('user.posts', { username: user.slug() })} icon=\"far fa-comment\">\n        {app.translator.trans('core.forum.user.posts_link')} <span className=\"Button-badge\">{user.commentCount()}</span>\n      </LinkButton>,\n      100\n    );\n\n    items.add(\n      'discussions',\n      <LinkButton href={app.route('user.discussions', { username: user.slug() })} icon=\"fas fa-bars\">\n        {app.translator.trans('core.forum.user.discussions_link')} <span className=\"Button-badge\">{user.discussionCount()}</span>\n      </LinkButton>,\n      90\n    );\n\n    if (isActor) {\n      items.add('separator', <Separator />, -90);\n      items.add(\n        'settings',\n        <LinkButton href={app.route('settings')} icon=\"fas fa-cog\">\n          {app.translator.trans('core.forum.user.settings_link')}\n        </LinkButton>,\n        -100\n      );\n    }\n\n    if (isActor || app.forum.attribute<boolean>('canModerateAccessTokens')) {\n      if (!isActor) {\n        items.add('security-separator', <Separator />, -90);\n      }\n\n      items.add(\n        'security',\n        <LinkButton href={app.route('user.security', { username: user.slug() })} icon=\"fas fa-shield-alt\">\n          {app.translator.trans('core.forum.user.security_link')}\n        </LinkButton>,\n        -100\n      );\n    }\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Button from '../../common/components/Button';\nimport Separator from '../../common/components/Separator';\nimport EditUserModal from '../../common/components/EditUserModal';\nimport UserPage from '../components/UserPage';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `UserControls` utility constructs a list of buttons for a user which\n * perform actions on it.\n */\nexport default {\n  /**\n   * Get a list of controls for a user.\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controls(user, context) {\n    const items = new ItemList();\n\n    ['user', 'moderation', 'destructive'].forEach((section) => {\n      const controls = this[section + 'Controls'](user, context).toArray();\n      if (controls.length) {\n        controls.forEach((item) => items.add(item.itemName, item));\n        items.add(section + 'Separator', <Separator />);\n      }\n    });\n\n    return items;\n  },\n\n  /**\n   * Get controls for a user pertaining to the current user (e.g. poke, follow).\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  userControls() {\n    return new ItemList();\n  },\n\n  /**\n   * Get controls for a user pertaining to moderation (e.g. suspend, edit).\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  moderationControls(user) {\n    const items = new ItemList();\n\n    if (user.canEdit() || user.canEditCredentials() || user.canEditGroups()) {\n      items.add(\n        'edit',\n        <Button icon=\"fas fa-pencil-alt\" onclick={this.editAction.bind(this, user)}>\n          {app.translator.trans('core.forum.user_controls.edit_button')}\n        </Button>\n      );\n    }\n\n    return items;\n  },\n\n  /**\n   * Get controls for a user which are destructive (e.g. delete).\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  destructiveControls(user) {\n    const items = new ItemList();\n\n    if (user.id() !== '1' && user.canDelete()) {\n      items.add(\n        'delete',\n        <Button icon=\"fas fa-times\" onclick={this.deleteAction.bind(this, user)}>\n          {app.translator.trans('core.forum.user_controls.delete_button')}\n        </Button>\n      );\n    }\n\n    return items;\n  },\n\n  /**\n   * Delete the user.\n   *\n   * @param {import('../../common/models/User').default} user\n   */\n  deleteAction(user) {\n    if (!confirm(app.translator.trans('core.forum.user_controls.delete_confirmation'))) {\n      return;\n    }\n\n    user\n      .delete()\n      .then(() => {\n        this.showDeletionAlert(user, 'success');\n        if (app.current.matches(UserPage, { user })) {\n          app.history.back();\n        } else {\n          window.location.reload();\n        }\n      })\n      .catch(() => this.showDeletionAlert(user, 'error'));\n  },\n\n  /**\n   * Show deletion alert of user.\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {string} type\n   */\n  showDeletionAlert(user, type) {\n    const message = {\n      success: 'core.forum.user_controls.delete_success_message',\n      error: 'core.forum.user_controls.delete_error_message',\n    }[type];\n\n    app.alerts.show(\n      { type },\n      app.translator.trans(message, {\n        user,\n        email: user.email(),\n      })\n    );\n  },\n\n  /**\n   * Edit the user.\n   *\n   * @param {import('../../common/models/User').default} user\n   */\n  editAction(user) {\n    app.modal.show(EditUserModal, { user });\n  },\n};\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport avatar from '../../common/helpers/avatar';\nimport icon from '../../common/helpers/icon';\nimport listItems from '../../common/helpers/listItems';\nimport ItemList from '../../common/utils/ItemList';\nimport classList from '../../common/utils/classList';\nimport Button from '../../common/components/Button';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\n\n/**\n * The `AvatarEditor` component displays a user's avatar along with a dropdown\n * menu which allows the user to upload/remove the avatar.\n *\n * ### Attrs\n *\n * - `className`\n * - `user`\n */\nexport default class AvatarEditor extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * Whether or not an avatar upload is in progress.\n     *\n     * @type {Boolean}\n     */\n    this.loading = false;\n\n    /**\n     * Whether or not an image has been dragged over the dropzone.\n     *\n     * @type {Boolean}\n     */\n    this.isDraggedOver = false;\n  }\n\n  view() {\n    const user = this.attrs.user;\n\n    return (\n      <div className={classList(['AvatarEditor', 'Dropdown', this.attrs.className, this.loading && 'loading', this.isDraggedOver && 'dragover'])}>\n        {avatar(user, { loading: 'eager' })}\n        <a\n          className={user.avatarUrl() ? 'Dropdown-toggle' : 'Dropdown-toggle AvatarEditor--noAvatar'}\n          title={app.translator.trans('core.forum.user.avatar_upload_tooltip')}\n          data-toggle=\"dropdown\"\n          onclick={this.quickUpload.bind(this)}\n          ondragover={this.enableDragover.bind(this)}\n          ondragenter={this.enableDragover.bind(this)}\n          ondragleave={this.disableDragover.bind(this)}\n          ondragend={this.disableDragover.bind(this)}\n          ondrop={this.dropUpload.bind(this)}\n        >\n          {this.loading ? (\n            <LoadingIndicator display=\"unset\" size=\"large\" />\n          ) : user.avatarUrl() ? (\n            icon('fas fa-pencil-alt')\n          ) : (\n            icon('fas fa-plus-circle')\n          )}\n        </a>\n        <ul className=\"Dropdown-menu Menu\">{listItems(this.controlItems().toArray())}</ul>\n      </div>\n    );\n  }\n\n  /**\n   * Get the items in the edit avatar dropdown menu.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controlItems() {\n    const items = new ItemList();\n\n    items.add(\n      'upload',\n      <Button icon=\"fas fa-upload\" onclick={this.openPicker.bind(this)}>\n        {app.translator.trans('core.forum.user.avatar_upload_button')}\n      </Button>\n    );\n\n    items.add(\n      'remove',\n      <Button icon=\"fas fa-times\" onclick={this.remove.bind(this)}>\n        {app.translator.trans('core.forum.user.avatar_remove_button')}\n      </Button>\n    );\n\n    return items;\n  }\n\n  /**\n   * Enable dragover style\n   *\n   * @param {DragEvent} e\n   */\n  enableDragover(e) {\n    e.preventDefault();\n    e.stopPropagation();\n    this.isDraggedOver = true;\n  }\n\n  /**\n   * Disable dragover style\n   *\n   * @param {DragEvent} e\n   */\n  disableDragover(e) {\n    e.preventDefault();\n    e.stopPropagation();\n    this.isDraggedOver = false;\n  }\n\n  /**\n   * Upload avatar when file is dropped into dropzone.\n   *\n   * @param {DragEvent} e\n   */\n  dropUpload(e) {\n    e.preventDefault();\n    e.stopPropagation();\n    this.isDraggedOver = false;\n    this.upload(e.dataTransfer.files[0]);\n  }\n\n  /**\n   * If the user doesn't have an avatar, there's no point in showing the\n   * controls dropdown, because only one option would be viable: uploading.\n   * Thus, when the avatar editor's dropdown toggle button is clicked, we prompt\n   * the user to upload an avatar immediately.\n   *\n   * @param {MouseEvent} e\n   */\n  quickUpload(e) {\n    if (!this.attrs.user.avatarUrl()) {\n      e.preventDefault();\n      e.stopPropagation();\n      this.openPicker();\n    }\n  }\n\n  /**\n   * Upload avatar using file picker\n   */\n  openPicker() {\n    if (this.loading) return;\n\n    // Create a hidden HTML input element and click on it so the user can select\n    // an avatar file. Once they have, we will upload it via the API.\n    const $input = $('<input type=\"file\" accept=\".jpg, .jpeg, .png, .bmp, .gif\">');\n\n    $input\n      .appendTo('body')\n      .hide()\n      .click()\n      .on('input', (e) => {\n        this.upload($(e.target)[0].files[0]);\n      });\n  }\n\n  /**\n   * Upload avatar\n   *\n   * @param {File} file\n   */\n  upload(file) {\n    if (this.loading) return;\n\n    const user = this.attrs.user;\n    const data = new FormData();\n    data.append('avatar', file);\n\n    this.loading = true;\n    m.redraw();\n\n    app\n      .request({\n        method: 'POST',\n        url: `${app.forum.attribute('apiUrl')}/users/${user.id()}/avatar`,\n        serialize: (raw) => raw,\n        body: data,\n      })\n      .then(this.success.bind(this), this.failure.bind(this));\n  }\n\n  /**\n   * Remove the user's avatar.\n   */\n  remove() {\n    const user = this.attrs.user;\n\n    this.loading = true;\n    m.redraw();\n\n    app\n      .request({\n        method: 'DELETE',\n        url: `${app.forum.attribute('apiUrl')}/users/${user.id()}/avatar`,\n      })\n      .then(this.success.bind(this), this.failure.bind(this));\n  }\n\n  /**\n   * After a successful upload/removal, push the updated user data into the\n   * store, and force a re-computation of the user's avatar color.\n   *\n   * @param {object} response\n   * @protected\n   */\n  success(response) {\n    app.store.pushPayload(response);\n    delete this.attrs.user.avatarColor;\n\n    this.loading = false;\n    m.redraw();\n  }\n\n  /**\n   * If avatar upload/removal fails, stop loading.\n   *\n   * @param {object} response\n   * @protected\n   */\n  failure(response) {\n    this.loading = false;\n    m.redraw();\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport humanTime from '../../common/utils/humanTime';\nimport ItemList from '../../common/utils/ItemList';\nimport UserControls from '../utils/UserControls';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport icon from '../../common/helpers/icon';\nimport Dropdown from '../../common/components/Dropdown';\nimport Link from '../../common/components/Link';\nimport AvatarEditor from './AvatarEditor';\nimport listItems from '../../common/helpers/listItems';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `UserCard` component displays a user's profile card. This is used both on\n * the `UserPage` (in the hero) and in discussions, shown when hovering over a\n * post author.\n *\n * ### Attrs\n *\n * - `user`\n * - `className`\n * - `editable`\n * - `controlsButtonClassName`\n */\nexport default class UserCard extends Component {\n  view() {\n    const user = this.attrs.user;\n    const controls = UserControls.controls(user, this).toArray();\n    const color = user.color();\n    const badges = user.badges().toArray();\n\n    return (\n      <div className={classList('UserCard', this.attrs.className)} style={color && { '--usercard-bg': color }}>\n        <div className=\"darkenBackground\">\n          <div className=\"container\">\n            {!!controls.length && (\n              <Dropdown\n                className=\"UserCard-controls App-primaryControl\"\n                menuClassName=\"Dropdown-menu--right\"\n                buttonClassName={this.attrs.controlsButtonClassName}\n                label={app.translator.trans('core.forum.user_controls.button')}\n                accessibleToggleLabel={app.translator.trans('core.forum.user_controls.toggle_dropdown_accessible_label')}\n                icon=\"fas fa-ellipsis-v\"\n              >\n                {controls}\n              </Dropdown>\n            )}\n\n            <div className=\"UserCard-profile\">\n              <h1 className=\"UserCard-identity\">\n                {this.attrs.editable ? (\n                  <>\n                    <AvatarEditor user={user} className=\"UserCard-avatar\" /> {username(user)}\n                  </>\n                ) : (\n                  <Link href={app.route.user(user)}>\n                    <div className=\"UserCard-avatar\">{avatar(user, { loading: 'eager' })}</div>\n                    {username(user)}\n                  </Link>\n                )}\n              </h1>\n\n              {!!badges.length && <ul className=\"UserCard-badges badges\">{listItems(badges)}</ul>}\n\n              <ul className=\"UserCard-info\">{listItems(this.infoItems().toArray())}</ul>\n            </div>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  /**\n   * Build an item list of tidbits of info to show on this user's profile.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  infoItems() {\n    const items = new ItemList();\n    const user = this.attrs.user;\n    const lastSeenAt = user.lastSeenAt();\n\n    if (lastSeenAt) {\n      const online = user.isOnline();\n\n      items.add(\n        'lastSeen',\n        <span className={classList('UserCard-lastSeen', { online })}>\n          {online\n            ? [icon('fas fa-circle'), ' ', app.translator.trans('core.forum.user.online_text')]\n            : [icon('far fa-clock'), ' ', humanTime(lastSeenAt)]}\n        </span>,\n        100\n      );\n    }\n\n    items.add('joined', app.translator.trans('core.forum.user.joined_date_text', { ago: humanTime(user.joinTime()) }), 90);\n\n    return items;\n  }\n}\n","import type Mithril from 'mithril';\nimport User from '../models/User';\nimport icon from './icon';\n\n/**\n * The `useronline` helper displays a green circle if the user is online.\n */\nexport default function userOnline(user: User): Mithril.Vnode<{}, {}> | null {\n  if (user.lastSeenAt() && user.isOnline()) {\n    return <span className=\"UserOnline\">{icon('fas fa-circle')}</span>;\n  }\n\n  return null;\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport Link from '../../common/components/Link';\nimport UserCard from './UserCard';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport userOnline from '../../common/helpers/userOnline';\nimport listItems from '../../common/helpers/listItems';\n\n/**\n * The `PostUser` component shows the avatar and username of a post's author.\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class PostUser extends Component {\n  view() {\n    const post = this.attrs.post;\n    const user = post.user();\n\n    if (!user) {\n      return (\n        <div className=\"PostUser\">\n          <h3 className=\"PostUser-name\">\n            {avatar(user, { className: 'PostUser-avatar' })} {username(user)}\n          </h3>\n        </div>\n      );\n    }\n\n    return (\n      <div className=\"PostUser\">\n        <h3 className=\"PostUser-name\">\n          <Link href={app.route.user(user)}>\n            {avatar(user, { className: 'PostUser-avatar' })}\n            {userOnline(user)}\n            {username(user)}\n          </Link>\n        </h3>\n        <ul className=\"PostUser-badges badges\">{listItems(user.badges().toArray())}</ul>\n\n        {!post.isHidden() && this.attrs.cardVisible && (\n          <UserCard user={user} className=\"UserCard--popover\" controlsButtonClassName=\"Button Button--icon Button--flat\" />\n        )}\n      </div>\n    );\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    let timeout;\n\n    this.$()\n      .on('mouseover', '.PostUser-name a, .UserCard', () => {\n        clearTimeout(timeout);\n        timeout = setTimeout(this.showCard.bind(this), 500);\n      })\n      .on('mouseout', '.PostUser-name a, .UserCard', () => {\n        clearTimeout(timeout);\n        timeout = setTimeout(this.hideCard.bind(this), 250);\n      });\n  }\n\n  /**\n   * Show the user card.\n   */\n  showCard() {\n    this.attrs.oncardshow();\n\n    setTimeout(() => this.$('.UserCard').addClass('in'));\n  }\n\n  /**\n   * Hide the user card.\n   */\n  hideCard() {\n    this.$('.UserCard')\n      .removeClass('in')\n      .one('transitionend webkitTransitionEnd oTransitionEnd', () => {\n        this.attrs.oncardhide();\n      });\n  }\n}\n","import dayjs from 'dayjs';\nimport type Mithril from 'mithril';\n\n/**\n * The `fullTime` helper displays a formatted time string wrapped in a <time>\n * tag.\n */\nexport default function fullTime(time: Date): Mithril.Vnode {\n  const d = dayjs(time);\n\n  const datetime = d.format();\n  const full = d.format('LLLL');\n\n  return (\n    <time pubdate datetime={datetime}>\n      {full}\n    </time>\n  );\n}\n","import Component, { ComponentAttrs } from '../Component';\nimport type Mithril from 'mithril';\nimport ItemList from '../utils/ItemList';\n\nexport interface IIPAddressAttrs extends ComponentAttrs {\n  ip: string | undefined | null;\n}\n\n/**\n * A component to wrap an IP address for display.\n * Designed to be customizable for different use cases.\n *\n * @example\n * <IPAddress ip=\"127.0.0.1\" />\n * @example\n * <IPAddress ip={post.data.attributes.ipAddress} />\n */\nexport default class IPAddress<CustomAttrs extends IIPAddressAttrs = IIPAddressAttrs> extends Component<CustomAttrs> {\n  ip!: string;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.ip = this.attrs.ip || '';\n  }\n\n  view() {\n    return <span className=\"IPAddress\">{this.viewItems().toArray()}</span>;\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('ip', <span>{this.ip}</span>, 100);\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport humanTime from '../../common/helpers/humanTime';\nimport fullTime from '../../common/helpers/fullTime';\nimport ItemList from '../../common/utils/ItemList';\nimport IPAddress from '../../common/components/IPAddress';\n\n/**\n * The `PostMeta` component displays the time of a post, and when clicked, shows\n * a dropdown containing more information about the post (number, full time,\n * permalink).\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class PostMeta extends Component {\n  view() {\n    return <div className=\"Dropdown PostMeta\">{this.viewItems().toArray()}</div>;\n  }\n\n  /**\n   * Get the permalink for the given post.\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @returns {string}\n   */\n  getPermalink(post) {\n    return app.forum.attribute('baseOrigin') + app.route.post(post);\n  }\n\n  /**\n   * When the dropdown menu is shown, select the contents of the permalink\n   * input so that the user can quickly copy the URL.\n   * @param {Event} e\n   */\n  selectPermalink(e) {\n    setTimeout(() => $(this.element).parent().find('.PostMeta-permalink').select());\n\n    e.redraw = false;\n  }\n\n  /**\n   * @returns {ItemList}\n   */\n  viewItems() {\n    const items = new ItemList();\n    const post = this.attrs.post;\n    const time = post.createdAt();\n\n    items.add(\n      'time',\n      <a className=\"Dropdown-toggle\" onclick={(e) => this.selectPermalink(e)} data-toggle=\"dropdown\">\n        {humanTime(time)}\n      </a>,\n      100\n    );\n\n    items.add('meta-dropdown', <div className=\"Dropdown-menu dropdown-menu\">{this.metaItems().toArray()}</div>, 90);\n\n    return items;\n  }\n\n  /**\n   * @returns {ItemList}\n   */\n  metaItems() {\n    const items = new ItemList();\n    const post = this.attrs.post;\n    const touch = 'ontouchstart' in document.documentElement;\n    const permalink = this.getPermalink(post);\n    const time = post.createdAt();\n\n    items.add(\n      'post-number',\n      <span className=\"PostMeta-number\">{app.translator.trans('core.forum.post.number_tooltip', { number: post.number() })} </span>,\n      100\n    );\n\n    items.add('post-time', <span className=\"PostMeta-time\">{fullTime(time)}</span>, 90);\n\n    items.add(\n      'post-ip',\n      <span className=\"PostMeta-ip\">\n        <IPAddress ip={post.data.attributes.ipAddress} />\n      </span>,\n      80\n    );\n\n    items.add(\n      'permalink',\n      touch ? (\n        <a className=\"Button PostMeta-permalink\" href={permalink}>\n          {permalink}\n        </a>\n      ) : (\n        <input className=\"FormControl PostMeta-permalink\" value={permalink} onclick={(e) => e.stopPropagation()} />\n      ),\n      0\n    );\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport humanTime from '../../common/utils/humanTime';\nimport Tooltip from '../../common/components/Tooltip';\n\n/**\n * The `PostEdited` component displays information about when and by whom a post\n * was edited.\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class PostEdited extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n  }\n\n  view() {\n    const post = this.attrs.post;\n    const editedUser = post.editedUser();\n    const editedInfo = app.translator.trans('core.forum.post.edited_tooltip', { user: editedUser, ago: humanTime(post.editedAt()) });\n\n    return (\n      <Tooltip text={editedInfo}>\n        <span className=\"PostEdited\">{app.translator.trans('core.forum.post.edited_text')}</span>\n      </Tooltip>\n    );\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n  }\n}\n","import app from '../../forum/app';\nimport Post from './Post';\nimport classList from '../../common/utils/classList';\nimport PostUser from './PostUser';\nimport PostMeta from './PostMeta';\nimport PostEdited from './PostEdited';\nimport EditPostComposer from './EditPostComposer';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\nimport Button from '../../common/components/Button';\nimport ComposerPostPreview from './ComposerPostPreview';\n\n/**\n * The `CommentPost` component displays a standard `comment`-typed post. This\n * includes a number of item lists (controls, header, and footer) surrounding\n * the post's HTML content.\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class CommentPost extends Post {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * If the post has been hidden, then this flag determines whether or not its\n     * content has been expanded.\n     *\n     * @type {Boolean}\n     */\n    this.revealContent = false;\n\n    /**\n     * Whether or not the user hover card inside of PostUser is visible.\n     * The property must be managed in CommentPost to be able to use it in the subtree check\n     *\n     * @type {Boolean}\n     */\n    this.cardVisible = false;\n\n    this.subtree.check(\n      () => this.cardVisible,\n      () => this.isEditing(),\n      () => this.revealContent\n    );\n  }\n\n  content() {\n    return super.content().concat(this.contentItems().toArray());\n  }\n\n  contentItems() {\n    const items = new ItemList();\n\n    items.add(\n      'header',\n      <header className=\"Post-header\">\n        <ul>{listItems(this.headerItems().toArray())}</ul>\n      </header>,\n      100\n    );\n\n    items.add('body', <div className=\"Post-body\">{this.bodyItems().toArray()}</div>, 90);\n\n    return items;\n  }\n\n  bodyItems() {\n    const items = new ItemList();\n\n    items.add(\n      'content',\n      this.isEditing() ? <ComposerPostPreview className=\"Post-preview\" composer={app.composer} /> : m.trust(this.attrs.post.contentHtml()),\n      100\n    );\n\n    return items;\n  }\n\n  refreshContent() {\n    const contentHtml = this.isEditing() ? '' : this.attrs.post.contentHtml();\n\n    // If the post content has changed since the last render, we'll run through\n    // all of the <script> tags in the content and evaluate them. This is\n    // necessary because TextFormatter outputs them for e.g. syntax highlighting.\n    if (this.contentHtml !== contentHtml) {\n      this.$('.Post-body script').each(function () {\n        const script = document.createElement('script');\n        script.textContent = this.textContent;\n        Array.from(this.attributes).forEach((attr) => script.setAttribute(attr.name, attr.value));\n        this.parentNode.replaceChild(script, this);\n      });\n    }\n\n    this.contentHtml = contentHtml;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.refreshContent();\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    this.refreshContent();\n  }\n\n  isEditing() {\n    return app.composer.bodyMatches(EditPostComposer, { post: this.attrs.post });\n  }\n\n  elementAttrs() {\n    const post = this.attrs.post;\n    const attrs = super.elementAttrs();\n\n    attrs.className = classList(attrs.className, 'CommentPost', {\n      'Post--renderFailed': post.renderFailed(),\n      'Post--hidden': post.isHidden(),\n      'Post--edited': post.isEdited(),\n      revealContent: this.revealContent,\n      editing: this.isEditing(),\n    });\n\n    if (this.isEditing()) attrs['aria-busy'] = 'true';\n\n    return attrs;\n  }\n\n  /**\n   * Toggle the visibility of a hidden post's content.\n   */\n  toggleContent() {\n    this.revealContent = !this.revealContent;\n  }\n\n  /**\n   * Build an item list for the post's header.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  headerItems() {\n    const items = new ItemList();\n    const post = this.attrs.post;\n\n    items.add(\n      'user',\n      <PostUser\n        post={post}\n        cardVisible={this.cardVisible}\n        oncardshow={() => {\n          this.cardVisible = true;\n          m.redraw();\n        }}\n        oncardhide={() => {\n          this.cardVisible = false;\n          m.redraw();\n        }}\n      />,\n      100\n    );\n    items.add('meta', <PostMeta post={post} />);\n\n    if (post.isEdited() && !post.isHidden()) {\n      items.add('edited', <PostEdited post={post} />);\n    }\n\n    // If the post is hidden, add a button that allows toggling the visibility\n    // of the post's content.\n    if (post.isHidden()) {\n      items.add(\n        'toggle',\n        <Button className=\"Button Button--default Button--more\" icon=\"fas fa-ellipsis-h\" onclick={this.toggleContent.bind(this)} />\n      );\n    }\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Post from './Post';\nimport { ucfirst } from '../../common/utils/string';\nimport usernameHelper from '../../common/helpers/username';\nimport icon from '../../common/helpers/icon';\nimport Link from '../../common/components/Link';\nimport humanTime from '../../common/helpers/humanTime';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `EventPost` component displays a post which indicating a discussion\n * event, like a discussion being renamed or stickied. Subclasses must implement\n * the `icon` and `description` methods.\n *\n * ### Attrs\n *\n * - All of the attrs for `Post`\n *\n * @abstract\n */\nexport default class EventPost extends Post {\n  elementAttrs() {\n    const attrs = super.elementAttrs();\n\n    attrs.className = classList(attrs.className, 'EventPost', ucfirst(this.attrs.post.contentType()) + 'Post');\n\n    return attrs;\n  }\n\n  content() {\n    const user = this.attrs.post.user();\n    const username = usernameHelper(user);\n    const data = Object.assign(this.descriptionData(), {\n      user,\n      username: user ? (\n        <Link className=\"EventPost-user\" href={app.route.user(user)}>\n          {username}\n        </Link>\n      ) : (\n        username\n      ),\n      time: humanTime(this.attrs.post.createdAt()),\n    });\n\n    return super\n      .content()\n      .concat([icon(this.icon(), { className: 'EventPost-icon' }), <div className=\"EventPost-info\">{this.description(data)}</div>]);\n  }\n\n  /**\n   * Get the name of the event icon.\n   *\n   * @return {string}\n   */\n  icon() {\n    return '';\n  }\n\n  /**\n   * Get the description text for the event.\n   *\n   * @param {Record<string, unknown>} data\n   * @return {import('mithril').Children} The description to render in the DOM\n   */\n  description(data) {\n    return app.translator.trans(this.descriptionKey(), data);\n  }\n\n  /**\n   * Get the translation key for the description of the event.\n   *\n   * @return {string}\n   */\n  descriptionKey() {\n    return '';\n  }\n\n  /**\n   * Get the translation data for the description of the event.\n   *\n   * @return {Record<string, unknown>}\n   */\n  descriptionData() {\n    return {};\n  }\n}\n","import app from '../../forum/app';\nimport EventPost from './EventPost';\nimport extractText from '../../common/utils/extractText';\nimport Tooltip from '../../common/components/Tooltip';\n\n/**\n * The `DiscussionRenamedPost` component displays a discussion event post\n * indicating that the discussion has been renamed.\n *\n * ### Attrs\n *\n * - All of the attrs for EventPost\n */\nexport default class DiscussionRenamedPost extends EventPost {\n  icon() {\n    return 'fas fa-pencil-alt';\n  }\n\n  description(data) {\n    const renamed = app.translator.trans('core.forum.post_stream.discussion_renamed_text', data);\n\n    return <span>{renamed}</span>;\n  }\n\n  descriptionData() {\n    const post = this.attrs.post;\n    const oldTitle = post.content()[0];\n    const newTitle = post.content()[1];\n\n    return {\n      new: (\n        <Tooltip text={extractText(app.translator.trans('core.forum.post_stream.discussion_renamed_old_tooltip', { old: oldTitle }))}>\n          <strong className=\"DiscussionRenamedPost-new\">{newTitle}</strong>\n        </Tooltip>\n      ),\n    };\n  }\n}\n","import app from '../app';\nimport Component from '../../common/Component';\nimport Button from '../../common/components/Button';\nimport type Mithril from 'mithril';\nimport ItemList from '../../common/utils/ItemList';\n\nexport interface IWelcomeHeroAttrs {}\n\nconst LOCAL_STORAGE_KEY = 'welcomeHidden';\n\n/**\n * The `WelcomeHero` component displays a hero that welcomes the user to the\n * forum.\n */\nexport default class WelcomeHero extends Component<IWelcomeHeroAttrs> {\n  /**\n   * @deprecated Extend the `isHidden` method instead.\n   */\n  hidden: boolean = false;\n\n  oninit(vnode: Mithril.Vnode<IWelcomeHeroAttrs, this>) {\n    super.oninit(vnode);\n  }\n\n  view(vnode: Mithril.Vnode<IWelcomeHeroAttrs, this>) {\n    if (this.isHidden()) return null;\n\n    return (\n      <header className=\"Hero WelcomeHero\">\n        <div className=\"container\">{this.viewItems().toArray()}</div>\n      </header>\n    );\n  }\n\n  /**\n   * Hide the welcome hero.\n   */\n  hide() {\n    localStorage.setItem(LOCAL_STORAGE_KEY, 'true');\n  }\n\n  /**\n   * Determines whether the welcome hero should be hidden.\n   *\n   * @returns if the welcome hero is hidden.\n   */\n  isHidden(): boolean {\n    if (!app.forum.attribute<string>('welcomeTitle')?.trim()) return true;\n    if (localStorage.getItem(LOCAL_STORAGE_KEY)) return true;\n    if (this.hidden) return true;\n\n    return false;\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    const slideUp = () => {\n      this.$().slideUp(this.hide.bind(this));\n    };\n\n    items.add(\n      'dismiss-button',\n      <Button\n        icon=\"fas fa-times\"\n        onclick={slideUp}\n        className=\"Hero-close Button Button--icon Button--link\"\n        aria-label={app.translator.trans('core.forum.welcome_hero.hide')}\n      />,\n      100\n    );\n\n    items.add('content', <div className=\"containerNarrow\">{this.contentItems().toArray()}</div>, 80);\n\n    return items;\n  }\n\n  contentItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('title', <h1 className=\"Hero-title\">{app.forum.attribute('welcomeTitle')}</h1>, 100);\n\n    items.add('subtitle', <div className=\"Hero-subtitle\">{m.trust(app.forum.attribute('welcomeMessage'))}</div>);\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport ComposerBody from './ComposerBody';\nimport extractText from '../../common/utils/extractText';\nimport Stream from '../../common/utils/Stream';\n\n/**\n * The `DiscussionComposer` component displays the composer content for starting\n * a new discussion. It adds a text field as a header control so the user can\n * enter the title of their discussion. It also overrides the `submit` and\n * `willExit` actions to account for the title.\n *\n * ### Attrs\n *\n * - All of the attrs for ComposerBody\n * - `titlePlaceholder`\n */\nexport default class DiscussionComposer extends ComposerBody {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.placeholder = attrs.placeholder || extractText(app.translator.trans('core.forum.composer_discussion.body_placeholder'));\n    attrs.submitLabel = attrs.submitLabel || app.translator.trans('core.forum.composer_discussion.submit_button');\n    attrs.confirmExit = attrs.confirmExit || extractText(app.translator.trans('core.forum.composer_discussion.discard_confirmation'));\n    attrs.titlePlaceholder = attrs.titlePlaceholder || extractText(app.translator.trans('core.forum.composer_discussion.title_placeholder'));\n    attrs.className = 'ComposerBody--discussion';\n  }\n\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.composer.fields.title = this.composer.fields.title || Stream('');\n\n    /**\n     * The value of the title input.\n     *\n     * @type {Function}\n     */\n    this.title = this.composer.fields.title;\n  }\n\n  headerItems() {\n    const items = super.headerItems();\n\n    items.add('title', <h3>{app.translator.trans('core.forum.composer_discussion.title')}</h3>, 100);\n\n    items.add(\n      'discussionTitle',\n      <h3>\n        <input\n          className=\"FormControl\"\n          bidi={this.title}\n          placeholder={this.attrs.titlePlaceholder}\n          disabled={!!this.attrs.disabled}\n          onkeydown={this.onkeydown.bind(this)}\n        />\n      </h3>\n    );\n\n    return items;\n  }\n\n  /**\n   * Handle the title input's keydown event. When the return key is pressed,\n   * move the focus to the start of the text editor.\n   *\n   * @param {KeyboardEvent} e\n   */\n  onkeydown(e) {\n    if (e.which === 13) {\n      // Return\n      e.preventDefault();\n      this.composer.editor.moveCursorTo(0);\n    }\n\n    e.redraw = false;\n  }\n\n  hasChanges() {\n    return this.title() || this.composer.fields.content();\n  }\n\n  /**\n   * Get the data to submit to the server when the discussion is saved.\n   *\n   * @return {Record<string, unknown>}\n   */\n  data() {\n    return {\n      title: this.title(),\n      content: this.composer.fields.content(),\n    };\n  }\n\n  onsubmit() {\n    this.loading = true;\n\n    const data = this.data();\n\n    app.store\n      .createRecord('discussions')\n      .save(data)\n      .then((discussion) => {\n        this.composer.hide();\n        app.discussions.refresh();\n        m.route.set(app.route.discussion(discussion));\n      }, this.loaded.bind(this));\n  }\n}\n","import app from '../../forum/app';\nimport Page, { IPageAttrs } from '../../common/components/Page';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\nimport DiscussionList from './DiscussionList';\nimport WelcomeHero from './WelcomeHero';\nimport DiscussionComposer from './DiscussionComposer';\nimport LogInModal from './LogInModal';\nimport DiscussionPage from './DiscussionPage';\nimport Dropdown from '../../common/components/Dropdown';\nimport Button from '../../common/components/Button';\nimport LinkButton from '../../common/components/LinkButton';\nimport SelectDropdown from '../../common/components/SelectDropdown';\nimport extractText from '../../common/utils/extractText';\nimport type Mithril from 'mithril';\nimport type Discussion from '../../common/models/Discussion';\n\nexport interface IIndexPageAttrs extends IPageAttrs {}\n\n/**\n * The `IndexPage` component displays the index page, including the welcome\n * hero, the sidebar, and the discussion list.\n */\nexport default class IndexPage<CustomAttrs extends IIndexPageAttrs = IIndexPageAttrs, CustomState = {}> extends Page<CustomAttrs, CustomState> {\n  static providesInitialSearch = true;\n  lastDiscussion?: Discussion;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    // If the user is returning from a discussion page, then take note of which\n    // discussion they have just visited. After the view is rendered, we will\n    // scroll down so that this discussion is in view.\n    if (app.previous.matches(DiscussionPage)) {\n      this.lastDiscussion = app.previous.get('discussion');\n    }\n\n    // If the user is coming from the discussion list, then they have either\n    // just switched one of the parameters (filter, sort, search) or they\n    // probably want to refresh the results. We will clear the discussion list\n    // cache so that results are reloaded.\n    if (app.previous.matches(IndexPage)) {\n      app.discussions.clear();\n    }\n\n    app.discussions.refreshParams(app.search.params(), (m.route.param('page') && Number(m.route.param('page'))) || 1);\n\n    app.history.push('index', extractText(app.translator.trans('core.forum.header.back_to_index_tooltip')));\n\n    this.bodyClass = 'App--index';\n    this.scrollTopOnCreate = false;\n  }\n\n  view() {\n    return (\n      <div className=\"IndexPage\">\n        {this.hero()}\n        <div className=\"container\">\n          <div className=\"sideNavContainer\">\n            <nav className=\"IndexPage-nav sideNav\">\n              <ul>{listItems(this.sidebarItems().toArray())}</ul>\n            </nav>\n            <div className=\"IndexPage-results sideNavOffset\">{this.contentItems().toArray()}</div>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  contentItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('toolbar', <div className=\"IndexPage-toolbar\">{this.toolbarItems().toArray()}</div>, 100);\n    items.add('discussionList', <DiscussionList state={app.discussions} />, 90);\n\n    return items;\n  }\n\n  toolbarItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('view', <ul className=\"IndexPage-toolbar-view\">{listItems(this.viewItems().toArray())}</ul>, 100);\n    items.add('action', <ul className=\"IndexPage-toolbar-action\">{listItems(this.actionItems().toArray())}</ul>, 90);\n\n    return items;\n  }\n\n  setTitle() {\n    app.setTitle(extractText(app.translator.trans('core.forum.index.meta_title_text')));\n    app.setTitleCount(0);\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    this.setTitle();\n\n    // Work out the difference between the height of this hero and that of the\n    // previous hero. Maintain the same scroll position relative to the bottom\n    // of the hero so that the sidebar doesn't jump around.\n    const oldHeroHeight = app.cache.heroHeight as number;\n    const heroHeight = (app.cache.heroHeight = this.$('.Hero').outerHeight() || 0);\n    const scrollTop = app.cache.scrollTop as number;\n\n    $('#app').css('min-height', ($(window).height() || 0) + heroHeight);\n\n    // Let browser handle scrolling on page reload.\n    if (app.previous.type == null) return;\n\n    // Only retain scroll position if we're coming from a discussion page.\n    // Otherwise, we've just changed the filter, so we should go to the top of the page.\n    if (this.lastDiscussion) {\n      $(window).scrollTop(scrollTop - oldHeroHeight + heroHeight);\n    } else {\n      $(window).scrollTop(0);\n    }\n\n    // If we've just returned from a discussion page, then the constructor will\n    // have set the `lastDiscussion` property. If this is the case, we want to\n    // scroll down to that discussion so that it's in view.\n    if (this.lastDiscussion) {\n      const $discussion = this.$(`li[data-id=\"${this.lastDiscussion.id()}\"] .DiscussionListItem`);\n\n      if ($discussion.length) {\n        const indexTop = $('#header').outerHeight() || 0;\n        const indexBottom = $(window).height() || 0;\n        const discussionOffset = $discussion.offset();\n        const discussionTop = (discussionOffset && discussionOffset.top) || 0;\n        const discussionBottom = discussionTop + ($discussion.outerHeight() || 0);\n\n        if (discussionTop < scrollTop + indexTop || discussionBottom > scrollTop + indexBottom) {\n          $(window).scrollTop(discussionTop - indexTop);\n        }\n      }\n    }\n  }\n\n  onbeforeremove(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onbeforeremove(vnode);\n\n    // Save the scroll position so we can restore it when we return to the\n    // discussion list.\n    app.cache.scrollTop = $(window).scrollTop();\n  }\n\n  onremove(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onremove(vnode);\n\n    $('#app').css('min-height', '');\n  }\n\n  /**\n   * Get the component to display as the hero.\n   */\n  hero() {\n    return <WelcomeHero />;\n  }\n\n  /**\n   * Build an item list for the sidebar of the index page. By default this is a\n   * \"New Discussion\" button, and then a DropdownSelect component containing a\n   * list of navigation items.\n   */\n  sidebarItems() {\n    const items = new ItemList<Mithril.Children>();\n    const canStartDiscussion = app.forum.attribute('canStartDiscussion') || !app.session.user;\n\n    items.add(\n      'newDiscussion',\n      <Button\n        icon=\"fas fa-edit\"\n        className=\"Button Button--primary IndexPage-newDiscussion\"\n        itemClassName=\"App-primaryControl\"\n        onclick={() => {\n          // If the user is not logged in, the promise rejects, and a login modal shows up.\n          // Since that's already handled, we dont need to show an error message in the console.\n          return this.newDiscussionAction().catch(() => {});\n        }}\n        disabled={!canStartDiscussion}\n      >\n        {app.translator.trans(`core.forum.index.${canStartDiscussion ? 'start_discussion_button' : 'cannot_start_discussion_button'}`)}\n      </Button>\n    );\n\n    items.add(\n      'nav',\n      <SelectDropdown\n        buttonClassName=\"Button\"\n        className=\"App-titleControl\"\n        accessibleToggleLabel={app.translator.trans('core.forum.index.toggle_sidenav_dropdown_accessible_label')}\n      >\n        {this.navItems().toArray()}\n      </SelectDropdown>\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the navigation in the sidebar of the index page. By\n   * default this is just the 'All Discussions' link.\n   */\n  navItems() {\n    const items = new ItemList<Mithril.Children>();\n    const params = app.search.stickyParams();\n\n    items.add(\n      'allDiscussions',\n      <LinkButton href={app.route('index', params)} icon=\"far fa-comments\">\n        {app.translator.trans('core.forum.index.all_discussions_link')}\n      </LinkButton>,\n      100\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the part of the toolbar which is concerned with how\n   * the results are displayed. By default this is just a select box to change\n   * the way discussions are sorted.\n   */\n  viewItems() {\n    const items = new ItemList<Mithril.Children>();\n    const sortMap = app.discussions.sortMap();\n\n    const sortOptions = Object.keys(sortMap).reduce((acc: any, sortId) => {\n      acc[sortId] = app.translator.trans(`core.forum.index_sort.${sortId}_button`);\n      return acc;\n    }, {});\n\n    items.add(\n      'sort',\n      <Dropdown\n        buttonClassName=\"Button\"\n        label={sortOptions[app.search.params().sort] || Object.keys(sortMap).map((key) => sortOptions[key])[0]}\n        accessibleToggleLabel={app.translator.trans('core.forum.index_sort.toggle_dropdown_accessible_label')}\n      >\n        {Object.keys(sortOptions).map((value) => {\n          const label = sortOptions[value];\n          const active = (app.search.params().sort || Object.keys(sortMap)[0]) === value;\n\n          return (\n            <Button icon={active ? 'fas fa-check' : true} onclick={app.search.changeSort.bind(app.search, value)} active={active}>\n              {label}\n            </Button>\n          );\n        })}\n      </Dropdown>\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the part of the toolbar which is about taking action\n   * on the results. By default this is just a \"mark all as read\" button.\n   */\n  actionItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'refresh',\n      <Button\n        title={app.translator.trans('core.forum.index.refresh_tooltip')}\n        icon=\"fas fa-sync\"\n        className=\"Button Button--icon\"\n        onclick={() => {\n          app.discussions.refresh();\n          if (app.session.user) {\n            app.store.find('users', app.session.user.id()!);\n            m.redraw();\n          }\n        }}\n      />\n    );\n\n    if (app.session.user) {\n      items.add(\n        'markAllAsRead',\n        <Button\n          title={app.translator.trans('core.forum.index.mark_all_as_read_tooltip')}\n          icon=\"fas fa-check\"\n          className=\"Button Button--icon\"\n          onclick={this.markAllAsRead.bind(this)}\n        />\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Open the composer for a new discussion or prompt the user to login.\n   */\n  newDiscussionAction(): Promise<unknown> {\n    return new Promise((resolve, reject) => {\n      if (app.session.user) {\n        app.composer.load(DiscussionComposer, { user: app.session.user });\n        app.composer.show();\n\n        return resolve(app.composer);\n      } else {\n        app.modal.show(LogInModal);\n\n        return reject();\n      }\n    });\n  }\n\n  /**\n   * Mark all discussions as read.\n   */\n  markAllAsRead() {\n    const confirmation = confirm(extractText(app.translator.trans('core.forum.index.mark_all_as_read_confirmation')));\n\n    if (confirmation) {\n      app.session.user?.save({ markedAllAsReadAt: new Date() });\n    }\n  }\n}\n","import app from '../../forum/app';\nimport UserPage, { IUserPageAttrs } from './UserPage';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport Placeholder from '../../common/components/Placeholder';\nimport CommentPost from './CommentPost';\nimport type Post from '../../common/models/Post';\nimport type Mithril from 'mithril';\nimport type User from '../../common/models/User';\n\n/**\n * The `PostsUserPage` component shows a user's activity feed inside of their\n * profile.\n */\nexport default class PostsUserPage extends UserPage {\n  /**\n   * Whether or not the activity feed is currently loading.\n   */\n  loading: boolean = true;\n\n  /**\n   * Whether or not there are any more activity items that can be loaded.\n   */\n  moreResults: boolean = false;\n\n  /**\n   * The Post models in the feed.\n   */\n  posts: Post[] = [];\n\n  /**\n   * The number of activity items to load per request.\n   */\n  loadLimit: number = 20;\n\n  oninit(vnode: Mithril.Vnode<IUserPageAttrs, this>) {\n    super.oninit(vnode);\n\n    this.loadUser(m.route.param('username'));\n  }\n\n  content() {\n    if (this.posts.length === 0 && !this.loading) {\n      return (\n        <div className=\"PostsUserPage\">\n          <Placeholder text={app.translator.trans('core.forum.user.posts_empty_text')} />\n        </div>\n      );\n    }\n\n    let footer;\n\n    if (this.loading) {\n      footer = <LoadingIndicator />;\n    } else if (this.moreResults) {\n      footer = (\n        <div className=\"PostsUserPage-loadMore\">\n          <Button className=\"Button\" onclick={this.loadMore.bind(this)}>\n            {app.translator.trans('core.forum.user.posts_load_more_button')}\n          </Button>\n        </div>\n      );\n    }\n\n    return (\n      <div className=\"PostsUserPage\">\n        <ul className=\"PostsUserPage-list\">\n          {this.posts.map((post) => (\n            <li>\n              <div className=\"PostsUserPage-discussion\">\n                {app.translator.trans('core.forum.user.in_discussion_text', {\n                  discussion: <Link href={app.route.post(post)}>{this.discussionTitle(post)}</Link>,\n                })}\n              </div>\n\n              <CommentPost post={post} />\n            </li>\n          ))}\n        </ul>\n        <div className=\"PostsUserPage-loadMore\">{footer}</div>\n      </div>\n    );\n  }\n\n  /**\n   * Initialize the component with a user, and trigger the loading of their\n   * activity feed.\n   */\n  show(user: User): void {\n    super.show(user);\n\n    this.refresh();\n  }\n\n  /**\n   * Clear and reload the user's activity feed.\n   */\n  refresh() {\n    this.loading = true;\n    this.posts = [];\n\n    m.redraw();\n\n    this.loadResults().then(this.parseResults.bind(this));\n  }\n\n  /**\n   * Load a new page of the user's activity feed.\n   *\n   * @protected\n   */\n  loadResults(offset = 0) {\n    return app.store.find<Post[]>('posts', {\n      filter: {\n        author: this.user!.username(),\n        type: 'comment',\n      },\n      page: { offset, limit: this.loadLimit },\n      sort: '-createdAt',\n    });\n  }\n\n  /**\n   * Load the next page of results.\n   */\n  loadMore() {\n    this.loading = true;\n    this.loadResults(this.posts.length).then(this.parseResults.bind(this));\n  }\n\n  /**\n   * Parse results and append them to the activity feed.\n   */\n  parseResults(results: Post[]): Post[] {\n    this.loading = false;\n\n    this.posts.push(...results);\n\n    this.moreResults = results.length >= this.loadLimit;\n    m.redraw();\n\n    return results;\n  }\n\n  discussionTitle(post: Post): string {\n    return post.discussion().title();\n  }\n}\n","import app from '../../common/app';\nimport Model from '../Model';\nimport { ApiQueryParamsPlural, ApiResponsePlural } from '../Store';\n\nexport interface Page<TModel> {\n  number: number;\n  items: TModel[];\n\n  hasPrev?: boolean;\n  hasNext?: boolean;\n}\n\nexport interface PaginationLocation {\n  page: number;\n  startIndex?: number;\n  endIndex?: number;\n}\n\nexport interface PaginatedListParams {\n  [key: string]: any;\n}\n\nexport interface PaginatedListRequestParams extends Omit<ApiQueryParamsPlural, 'include'> {\n  include?: string | string[];\n}\n\nexport default abstract class PaginatedListState<T extends Model, P extends PaginatedListParams = PaginatedListParams> {\n  protected location!: PaginationLocation;\n  protected pageSize: number;\n\n  protected pages: Page<T>[] = [];\n  protected params: P = {} as P;\n\n  protected initialLoading: boolean = false;\n  protected loadingPrev: boolean = false;\n  protected loadingNext: boolean = false;\n\n  protected constructor(params: P = {} as P, page: number = 1, pageSize: number = 20) {\n    this.params = params;\n\n    this.location = { page };\n    this.pageSize = pageSize;\n  }\n\n  abstract get type(): string;\n\n  public clear(): void {\n    this.pages = [];\n\n    m.redraw();\n  }\n\n  public loadPrev(): Promise<void> {\n    if (this.loadingPrev || this.getLocation().page === 1) return Promise.resolve();\n\n    this.loadingPrev = true;\n\n    const page: number = this.getPrevPageNumber();\n\n    return this.loadPage(page)\n      .then(this.parseResults.bind(this, page))\n      .finally(() => (this.loadingPrev = false));\n  }\n\n  public loadNext(): Promise<void> {\n    if (this.loadingNext) return Promise.resolve();\n\n    this.loadingNext = true;\n\n    const page: number = this.getNextPageNumber();\n\n    return this.loadPage(page)\n      .then(this.parseResults.bind(this, page))\n      .finally(() => (this.loadingNext = false));\n  }\n\n  protected parseResults(pg: number, results: ApiResponsePlural<T>): void {\n    const pageNum = Number(pg);\n\n    const links = results.payload?.links;\n    const page = {\n      number: pageNum,\n      items: results,\n      hasNext: !!links?.next,\n      hasPrev: !!links?.prev,\n    };\n\n    if (this.isEmpty() || pageNum > this.getNextPageNumber() - 1) {\n      this.pages.push(page);\n    } else {\n      this.pages.unshift(page);\n    }\n\n    this.location = { page: pageNum };\n\n    m.redraw();\n  }\n\n  /**\n   * Load a new page of results.\n   */\n  protected loadPage(page = 1): Promise<ApiResponsePlural<T>> {\n    const reqParams = this.requestParams();\n\n    const include = Array.isArray(reqParams.include) ? reqParams.include.join(',') : reqParams.include;\n\n    const params: ApiQueryParamsPlural = {\n      ...reqParams,\n      page: {\n        ...reqParams.page,\n        offset: this.pageSize * (page - 1),\n      },\n      include,\n    };\n\n    return app.store.find<T[]>(this.type, params);\n  }\n\n  /**\n   * Get the parameters that should be passed in the API request.\n   * Do not include page offset unless subclass overrides loadPage.\n   *\n   * @abstract\n   * @see loadPage\n   */\n  protected requestParams(): PaginatedListRequestParams {\n    return this.params;\n  }\n\n  /**\n   * Update the `this.params` object, calling `refresh` if they have changed.\n   * Use `requestParams` for converting `this.params` into API parameters\n   *\n   * @param newParams\n   * @param page\n   * @see requestParams\n   */\n  public refreshParams(newParams: P, page: number): Promise<void> {\n    if (this.isEmpty() || this.paramsChanged(newParams)) {\n      this.params = newParams;\n\n      return this.refresh(page);\n    }\n\n    return Promise.resolve();\n  }\n\n  public refresh(page: number = 1): Promise<void> {\n    this.initialLoading = true;\n    this.loadingPrev = false;\n    this.loadingNext = false;\n\n    this.clear();\n\n    this.location = { page };\n\n    return this.loadPage()\n      .then((results) => {\n        this.pages = [];\n        this.parseResults(this.location.page, results);\n      })\n      .finally(() => (this.initialLoading = false));\n  }\n\n  public getPages(): Page<T>[] {\n    return this.pages;\n  }\n  public getLocation(): PaginationLocation {\n    return this.location;\n  }\n\n  public isLoading(): boolean {\n    return this.initialLoading || this.loadingNext || this.loadingPrev;\n  }\n  public isInitialLoading(): boolean {\n    return this.initialLoading;\n  }\n  public isLoadingPrev(): boolean {\n    return this.loadingPrev;\n  }\n  public isLoadingNext(): boolean {\n    return this.loadingNext;\n  }\n\n  /**\n   * Returns true when the number of items across all loaded pages is not 0.\n   *\n   * @see isEmpty\n   */\n  public hasItems(): boolean {\n    return !!this.getAllItems().length;\n  }\n\n  /**\n   * Returns true when there aren't any items *and* the state has already done its initial loading.\n   * If you want to know whether there are items regardless of load state, use `hasItems()` instead\n   *\n   * @see hasItems\n   */\n  public isEmpty(): boolean {\n    return !this.isInitialLoading() && !this.hasItems();\n  }\n\n  public hasPrev(): boolean {\n    return !!this.pages[0]?.hasPrev;\n  }\n  public hasNext(): boolean {\n    return !!this.pages[this.pages.length - 1]?.hasNext;\n  }\n\n  /**\n   * Stored state parameters.\n   */\n  public getParams(): P {\n    return this.params;\n  }\n\n  protected getNextPageNumber(): number {\n    const pg = this.pages[this.pages.length - 1]?.number;\n\n    if (pg && !isNaN(pg)) {\n      return pg + 1;\n    } else {\n      return this.location.page;\n    }\n  }\n  protected getPrevPageNumber(): number {\n    const pg = this.pages[0]?.number;\n\n    if (pg && !isNaN(pg)) {\n      // If the calculated page number is less than 1,\n      // return 1 as the prev page (first possible page number)\n      return Math.max(pg - 1, 1);\n    } else {\n      return this.location.page;\n    }\n  }\n\n  protected paramsChanged(newParams: P): boolean {\n    return Object.keys(newParams).some((key) => this.getParams()[key] !== newParams[key]);\n  }\n\n  protected getAllItems(): T[] {\n    return this.getPages()\n      .map((pg) => pg.items)\n      .flat();\n  }\n}\n","export default class EventEmitter {\n  protected events: any = {};\n\n  public constructor() {\n    this.events = {};\n  }\n\n  public on(event: string, listener: Function): EventEmitter {\n    if (!this.events[event]) {\n      this.events[event] = [];\n    }\n\n    this.events[event].push(listener);\n\n    return this;\n  }\n\n  public emit(event: string, ...args: any[]): void {\n    if (this.events[event]) {\n      this.events[event].forEach((listener: Function) => listener(...args));\n    }\n  }\n}\n","import app from '../../forum/app';\nimport PaginatedListState, { Page, PaginatedListParams, PaginatedListRequestParams } from '../../common/states/PaginatedListState';\nimport Discussion from '../../common/models/Discussion';\nimport { ApiResponsePlural } from '../../common/Store';\nimport EventEmitter from '../../common/utils/EventEmitter';\n\nexport interface DiscussionListParams extends PaginatedListParams {\n  sort?: string;\n}\n\nconst globalEventEmitter = new EventEmitter();\n\nexport default class DiscussionListState<P extends DiscussionListParams = DiscussionListParams> extends PaginatedListState<Discussion, P> {\n  protected extraDiscussions: Discussion[] = [];\n  protected eventEmitter: EventEmitter;\n\n  constructor(params: P, page: number = 1) {\n    super(params, page, 20);\n\n    this.eventEmitter = globalEventEmitter.on('discussion.deleted', this.deleteDiscussion.bind(this));\n  }\n\n  get type(): string {\n    return 'discussions';\n  }\n\n  requestParams(): PaginatedListRequestParams {\n    const params = {\n      include: ['user', 'lastPostedUser'],\n      filter: this.params.filter || {},\n      sort: this.sortMap()[this.params.sort ?? ''],\n    };\n\n    if (this.params.q) {\n      params.filter.q = this.params.q;\n      params.include.push('mostRelevantPost', 'mostRelevantPost.user');\n    }\n\n    return params;\n  }\n\n  protected loadPage(page: number = 1): Promise<ApiResponsePlural<Discussion>> {\n    const preloadedDiscussions = app.preloadedApiDocument<Discussion[]>();\n\n    if (preloadedDiscussions) {\n      this.initialLoading = false;\n\n      return Promise.resolve(preloadedDiscussions);\n    }\n\n    return super.loadPage(page);\n  }\n\n  clear(): void {\n    super.clear();\n\n    this.extraDiscussions = [];\n  }\n\n  /**\n   * Get a map of sort keys (which appear in the URL, and are used for\n   * translation) to the API sort value that they represent.\n   */\n  sortMap() {\n    const map: any = {};\n\n    if (this.params.q) {\n      map.relevance = '';\n    }\n    map.latest = '-lastPostedAt';\n    map.top = '-commentCount';\n    map.newest = '-createdAt';\n    map.oldest = 'createdAt';\n\n    return map;\n  }\n\n  /**\n   * In the last request, has the user searched for a discussion?\n   */\n  isSearchResults(): boolean {\n    return !!this.params.q;\n  }\n\n  removeDiscussion(discussion: Discussion): void {\n    this.eventEmitter.emit('discussion.deleted', discussion);\n  }\n\n  deleteDiscussion(discussion: Discussion): void {\n    for (const page of this.pages) {\n      const index = page.items.indexOf(discussion);\n\n      if (index !== -1) {\n        page.items.splice(index, 1);\n        break;\n      }\n    }\n\n    const index = this.extraDiscussions.indexOf(discussion);\n\n    if (index !== -1) {\n      this.extraDiscussions.splice(index);\n    }\n\n    m.redraw();\n  }\n\n  /**\n   * Add a discussion to the top of the list.\n   */\n  addDiscussion(discussion: Discussion): void {\n    this.removeDiscussion(discussion);\n    this.extraDiscussions.unshift(discussion);\n\n    m.redraw();\n  }\n\n  protected getAllItems(): Discussion[] {\n    return this.extraDiscussions.concat(super.getAllItems());\n  }\n\n  public getPages(): Page<Discussion>[] {\n    const pages = super.getPages();\n\n    if (this.extraDiscussions.length) {\n      return [\n        {\n          number: -1,\n          items: this.extraDiscussions,\n        },\n        ...pages,\n      ];\n    }\n\n    return pages;\n  }\n}\n","import UserPage, { IUserPageAttrs } from './UserPage';\nimport DiscussionList from './DiscussionList';\nimport DiscussionListState from '../states/DiscussionListState';\nimport type Mithril from 'mithril';\nimport type User from '../../common/models/User';\n\n/**\n * The `DiscussionsUserPage` component shows a discussion list inside of a user\n * page.\n */\nexport default class DiscussionsUserPage extends UserPage<IUserPageAttrs, DiscussionListState> {\n  oninit(vnode: Mithril.Vnode<IUserPageAttrs, this>) {\n    super.oninit(vnode);\n\n    this.loadUser(m.route.param('username'));\n  }\n\n  show(user: User): void {\n    super.show(user);\n\n    this.state = new DiscussionListState({\n      filter: { author: user.username() },\n      sort: 'newest',\n    });\n\n    this.state.refresh();\n  }\n\n  content() {\n    return (\n      <div className=\"DiscussionsUserPage\">\n        <DiscussionList state={this.state} />\n      </div>\n    );\n  }\n}\n","/**\n * An event handler factory that makes it simpler to implement data binding\n * for component event listeners.\n *\n * The handler created by this factory passes the DOM element's attribute\n * identified by the first argument to the callback (usually a bidirectional\n * Mithril stream: https://mithril.js.org/stream.html#bidirectional-bindings).\n *\n * Replaces m.withAttr for Mithril 2.0.\n * @see https://mithril.js.org/archive/v0.2.5/mithril.withAttr.html\n */\nexport default (key: string, cb: Function) =>\n  function (this: Element) {\n    cb(this.getAttribute(key) || (this as any)[key]);\n  };\n","import Component, { ComponentAttrs } from '../Component';\nimport LoadingIndicator from './LoadingIndicator';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport withAttr from '../utils/withAttr';\nimport type Mithril from 'mithril';\n\nexport interface ICheckboxAttrs extends ComponentAttrs {\n  state?: boolean;\n  loading?: boolean;\n  disabled?: boolean;\n  onchange: (checked: boolean, component: Checkbox<this>) => void;\n}\n\n/**\n * The `Checkbox` component defines a checkbox input.\n *\n * ### Attrs\n *\n * - `state` Whether or not the checkbox is checked.\n * - `className` The class name for the root element.\n * - `disabled` Whether or not the checkbox is disabled.\n * - `loading` Whether or not the checkbox is loading.\n * - `onchange` A callback to run when the checkbox is checked/unchecked.\n * - `children` A text label to display next to the checkbox.\n */\nexport default class Checkbox<CustomAttrs extends ICheckboxAttrs = ICheckboxAttrs> extends Component<CustomAttrs> {\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    const className = classList([\n      'Checkbox',\n      this.attrs.state ? 'on' : 'off',\n      this.attrs.className,\n      this.attrs.loading && 'loading',\n      this.attrs.disabled && 'disabled',\n    ]);\n\n    return (\n      <label className={className}>\n        <input type=\"checkbox\" checked={this.attrs.state} disabled={this.attrs.disabled} onchange={withAttr('checked', this.onchange.bind(this))} />\n        <div className=\"Checkbox-display\" aria-hidden=\"true\">\n          {this.getDisplay()}\n        </div>\n        {vnode.children}\n      </label>\n    );\n  }\n\n  /**\n   * Get the template for the checkbox's display (tick/cross icon).\n   */\n  protected getDisplay(): Mithril.Children {\n    return this.attrs.loading ? <LoadingIndicator display=\"unset\" size=\"small\" /> : icon(this.attrs.state ? 'fas fa-check' : 'fas fa-times');\n  }\n\n  /**\n   * Run a callback when the state of the checkbox is changed.\n   */\n  protected onchange(checked: boolean): void {\n    if (this.attrs.onchange) this.attrs.onchange(checked, this);\n  }\n}\n","import classList from '../utils/classList';\nimport Checkbox, { ICheckboxAttrs } from './Checkbox';\n\n/**\n * The `Switch` component is a `Checkbox`, but with a switch display instead of\n * a tick/cross one.\n */\nexport default class Switch extends Checkbox {\n  static initAttrs(attrs: ICheckboxAttrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = classList(attrs.className, 'Checkbox--switch');\n  }\n\n  getDisplay() {\n    return !!this.attrs.loading && super.getDisplay();\n  }\n}\n","import Component from '../Component';\nimport listItems from '../helpers/listItems';\n\n/**\n * The `FieldSet` component defines a collection of fields, displayed in a list\n * underneath a title. Accepted properties are:\n *\n * - `className` The class name for the fieldset.\n * - `label` The title of this group of fields.\n *\n * The children should be an array of items to show in the fieldset.\n */\nexport default class FieldSet extends Component {\n  view(vnode) {\n    return (\n      <fieldset className={this.attrs.className}>\n        <legend>{this.attrs.label}</legend>\n        <ul>{listItems(vnode.children)}</ul>\n      </fieldset>\n    );\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport Checkbox from '../../common/components/Checkbox';\nimport icon from '../../common/helpers/icon';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `NotificationGrid` component displays a table of notification types and\n * methods, allowing the user to toggle each combination.\n *\n * ### Attrs\n *\n * - `user`\n */\nexport default class NotificationGrid extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * Information about the available notification methods.\n     *\n     * @type {({ name: string, icon: string, label: import('mithril').Children })[]}\n     */\n    this.methods = this.notificationMethods().toArray();\n\n    /**\n     * A map of which notification checkboxes are loading.\n     *\n     * @type {Record<string, boolean>}\n     */\n    this.loading = {};\n\n    /**\n     * Information about the available notification types.\n     *\n     * @type {({ name: string, icon: string, label: import('mithril').Children })[]}\n     */\n    this.types = this.notificationTypes().toArray();\n  }\n\n  view() {\n    const preferences = this.attrs.user.preferences();\n\n    return (\n      <table className=\"NotificationGrid\">\n        <thead>\n          <tr>\n            <td />\n            {this.methods.map((method) => (\n              <th className=\"NotificationGrid-groupToggle\" onclick={this.toggleMethod.bind(this, method.name)}>\n                {icon(method.icon)} {method.label}\n              </th>\n            ))}\n          </tr>\n        </thead>\n\n        <tbody>\n          {this.types.map((type) => (\n            <tr>\n              <td className=\"NotificationGrid-groupToggle\" onclick={this.toggleType.bind(this, type.name)}>\n                {icon(type.icon)} {type.label}\n              </td>\n              {this.methods.map((method) => {\n                const key = this.preferenceKey(type.name, method.name);\n\n                return (\n                  <td className=\"NotificationGrid-checkbox\">\n                    <Checkbox\n                      state={!!preferences[key]}\n                      loading={this.loading[key]}\n                      disabled={!(key in preferences)}\n                      onchange={this.toggle.bind(this, [key])}\n                    >\n                      <span className=\"sr-only\">\n                        {app.translator.trans('core.forum.settings.notification_checkbox_a11y_label_template', {\n                          description: type.label,\n                          method: method.label,\n                        })}\n                      </span>\n                    </Checkbox>\n                  </td>\n                );\n              })}\n            </tr>\n          ))}\n        </tbody>\n      </table>\n    );\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.$('thead .NotificationGrid-groupToggle').bind('mouseenter mouseleave', function (e) {\n      const i = parseInt($(this).index(), 10) + 1;\n      $(this)\n        .parents('table')\n        .find('td:nth-child(' + i + ')')\n        .toggleClass('highlighted', e.type === 'mouseenter');\n    });\n\n    this.$('tbody .NotificationGrid-groupToggle').bind('mouseenter mouseleave', function (e) {\n      $(this)\n        .parent()\n        .find('td')\n        .toggleClass('highlighted', e.type === 'mouseenter');\n    });\n  }\n\n  /**\n   * Toggle the state of the given preferences, based on the value of the first\n   * one.\n   *\n   * @param {string[]} keys\n   */\n  toggle(keys) {\n    const user = this.attrs.user;\n    const preferences = user.preferences();\n    const enabled = !preferences[keys[0]];\n\n    keys.forEach((key) => {\n      this.loading[key] = true;\n      preferences[key] = enabled;\n    });\n\n    m.redraw();\n\n    user.save({ preferences }).then(() => {\n      keys.forEach((key) => (this.loading[key] = false));\n\n      m.redraw();\n    });\n  }\n\n  /**\n   * Toggle all notification types for the given method.\n   *\n   * @param {string} method\n   */\n  toggleMethod(method) {\n    const keys = this.types.map((type) => this.preferenceKey(type.name, method)).filter((key) => key in this.attrs.user.preferences());\n\n    this.toggle(keys);\n  }\n\n  /**\n   * Toggle all notification methods for the given type.\n   *\n   * @param {string} type\n   */\n  toggleType(type) {\n    const keys = this.methods.map((method) => this.preferenceKey(type, method.name)).filter((key) => key in this.attrs.user.preferences());\n\n    this.toggle(keys);\n  }\n\n  /**\n   * Get the name of the preference key for the given notification type-method\n   * combination.\n   *\n   * @param {string} type\n   * @param {string} method\n   * @return {string}\n   */\n  preferenceKey(type, method) {\n    return 'notify_' + type + '_' + method;\n  }\n\n  /**\n   * Build an item list for the notification methods to display in the grid.\n   *\n   * Each notification method is an object which has the following properties:\n   *\n   * - `name` The name of the notification method.\n   * - `icon` The icon to display in the column header.\n   * - `label` The label to display in the column header.\n   *\n   * @return {ItemList<{ name: string, icon: string, label: import('mithril').Children }>}\n   */\n  notificationMethods() {\n    const items = new ItemList();\n\n    items.add('alert', {\n      name: 'alert',\n      icon: 'fas fa-bell',\n      label: app.translator.trans('core.forum.settings.notify_by_web_heading'),\n    });\n\n    items.add('email', {\n      name: 'email',\n      icon: 'far fa-envelope',\n      label: app.translator.trans('core.forum.settings.notify_by_email_heading'),\n    });\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the notification types to display in the grid.\n   *\n   * Each notification type is an object which has the following properties:\n   *\n   * - `name` The name of the notification type.\n   * - `icon` The icon to display in the notification grid row.\n   * - `label` The label to display in the notification grid row.\n   *\n   * @return {ItemList<{ name: string, icon: string, label: import('mithril').Children}>}\n   */\n  notificationTypes() {\n    const items = new ItemList();\n\n    items.add('discussionRenamed', {\n      name: 'discussionRenamed',\n      icon: 'fas fa-pencil-alt',\n      label: app.translator.trans('core.forum.settings.notify_discussion_renamed_label'),\n    });\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport Mithril from 'mithril';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `ChangePasswordModal` component shows a modal dialog which allows the\n * user to send themself a password reset email.\n */\nexport default class ChangePasswordModal<CustomAttrs extends IInternalModalAttrs = IInternalModalAttrs> extends Modal<CustomAttrs> {\n  className() {\n    return 'ChangePasswordModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.change_password.title');\n  }\n\n  content() {\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">{this.fields().toArray()}</div>\n      </div>\n    );\n  }\n\n  fields() {\n    const fields = new ItemList<Mithril.Children>();\n\n    fields.add('help', <p className=\"helpText\">{app.translator.trans('core.forum.change_password.text')}</p>);\n\n    fields.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.forum.change_password.send_button')}\n        </Button>\n      </div>\n    );\n\n    return fields;\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    app\n      .request({\n        method: 'POST',\n        url: app.forum.attribute('apiUrl') + '/forgot',\n        body: this.requestBody(),\n      })\n      .then(this.hide.bind(this), this.loaded.bind(this));\n  }\n\n  requestBody() {\n    return { email: app.session.user!.email() };\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport Stream from '../../common/utils/Stream';\nimport type Mithril from 'mithril';\nimport RequestError from '../../common/utils/RequestError';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `ChangeEmailModal` component shows a modal dialog which allows the user\n * to change their email address.\n */\nexport default class ChangeEmailModal<CustomAttrs extends IInternalModalAttrs = IInternalModalAttrs> extends Modal<CustomAttrs> {\n  /**\n   * The value of the email input.\n   */\n  email!: Stream<string>;\n\n  /**\n   * The value of the password input.\n   */\n  password!: Stream<string>;\n\n  /**\n   * Whether or not the email has been changed successfully.\n   */\n  success: boolean = false;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.email = Stream(app.session.user!.email() || '');\n    this.password = Stream('');\n  }\n\n  className() {\n    return 'ChangeEmailModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.change_email.title');\n  }\n\n  content() {\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">{this.fields().toArray()}</div>\n      </div>\n    );\n  }\n\n  fields(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.success) {\n      items.add(\n        'help',\n        <p className=\"helpText\">\n          {app.translator.trans('core.forum.change_email.confirmation_message', {\n            email: <strong>{this.email()}</strong>,\n          })}\n        </p>\n      );\n\n      items.add(\n        'dismiss',\n        <div className=\"Form-group\">\n          <Button className=\"Button Button--primary Button--block\" onclick={this.hide.bind(this)}>\n            {app.translator.trans('core.forum.change_email.dismiss_button')}\n          </Button>\n        </div>\n      );\n    } else {\n      items.add(\n        'email',\n        <div className=\"Form-group\">\n          <input\n            type=\"email\"\n            name=\"email\"\n            className=\"FormControl\"\n            placeholder={app.session.user!.email()}\n            bidi={this.email}\n            disabled={this.loading}\n          />\n        </div>\n      );\n\n      items.add(\n        'password',\n        <div className=\"Form-group\">\n          <input\n            type=\"password\"\n            name=\"password\"\n            className=\"FormControl\"\n            autocomplete=\"current-password\"\n            placeholder={app.translator.trans('core.forum.change_email.confirm_password_placeholder')}\n            bidi={this.password}\n            disabled={this.loading}\n          />\n        </div>\n      );\n\n      items.add(\n        'submit',\n        <div className=\"Form-group\">\n          <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n            {app.translator.trans('core.forum.change_email.submit_button')}\n          </Button>\n        </div>\n      );\n    }\n\n    return items;\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    // If the user hasn't actually entered a different email address, we don't\n    // need to do anything. Woot!\n    if (this.email() === app.session.user!.email()) {\n      this.hide();\n      return;\n    }\n\n    this.loading = true;\n    this.alertAttrs = null;\n\n    app.session\n      .user!.save(this.requestAttributes(), {\n        errorHandler: this.onerror.bind(this),\n        meta: { password: this.password() },\n      })\n      .then(() => {\n        this.success = true;\n      })\n      .catch(() => {})\n      .then(this.loaded.bind(this));\n  }\n\n  requestAttributes() {\n    return { email: this.email() };\n  }\n\n  onerror(error: RequestError) {\n    if (error.status === 401 && error.alert) {\n      error.alert.content = app.translator.trans('core.forum.change_email.incorrect_password_message');\n    }\n\n    super.onerror(error);\n  }\n}\n","import app from '../../forum/app';\nimport UserPage, { IUserPageAttrs } from './UserPage';\nimport ItemList from '../../common/utils/ItemList';\nimport Switch from '../../common/components/Switch';\nimport Button from '../../common/components/Button';\nimport FieldSet from '../../common/components/FieldSet';\nimport NotificationGrid from './NotificationGrid';\nimport ChangePasswordModal from './ChangePasswordModal';\nimport ChangeEmailModal from './ChangeEmailModal';\nimport listItems from '../../common/helpers/listItems';\nimport extractText from '../../common/utils/extractText';\nimport type Mithril from 'mithril';\n\n/**\n * The `SettingsPage` component displays the user's settings control panel, in\n * the context of their user profile.\n */\nexport default class SettingsPage<CustomAttrs extends IUserPageAttrs = IUserPageAttrs> extends UserPage<CustomAttrs> {\n  discloseOnlineLoading?: boolean;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.show(app.session.user!);\n\n    app.setTitle(extractText(app.translator.trans('core.forum.settings.title')));\n  }\n\n  content() {\n    return (\n      <div className=\"SettingsPage\">\n        <ul>{listItems(this.settingsItems().toArray())}</ul>\n      </div>\n    );\n  }\n\n  /**\n   * Build an item list for the user's settings controls.\n   */\n  settingsItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    ['account', 'notifications', 'privacy'].forEach((section, index) => {\n      const sectionItems = `${section}Items` as 'accountItems' | 'notificationsItems' | 'privacyItems';\n\n      items.add(\n        section,\n        <FieldSet className={`Settings-${section}`} label={app.translator.trans(`core.forum.settings.${section}_heading`)}>\n          {this[sectionItems]().toArray()}\n        </FieldSet>,\n        100 - index * 10\n      );\n    });\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's account settings.\n   */\n  accountItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'changePassword',\n      <Button className=\"Button\" onclick={() => app.modal.show(ChangePasswordModal)}>\n        {app.translator.trans('core.forum.settings.change_password_button')}\n      </Button>,\n      100\n    );\n\n    items.add(\n      'changeEmail',\n      <Button className=\"Button\" onclick={() => app.modal.show(ChangeEmailModal)}>\n        {app.translator.trans('core.forum.settings.change_email_button')}\n      </Button>,\n      90\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's notification settings.\n   */\n  notificationsItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('notificationGrid', <NotificationGrid user={this.user} />, 100);\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's privacy settings.\n   */\n  privacyItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'discloseOnline',\n      <Switch\n        state={this.user!.preferences()?.discloseOnline}\n        onchange={(value: boolean) => {\n          this.discloseOnlineLoading = true;\n\n          this.user!.savePreferences({ discloseOnline: value }).then(() => {\n            this.discloseOnlineLoading = false;\n            m.redraw();\n          });\n        }}\n        loading={this.discloseOnlineLoading}\n      >\n        {app.translator.trans('core.forum.settings.privacy_disclose_online_label')}\n      </Switch>,\n      100\n    );\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Page, { IPageAttrs } from '../../common/components/Page';\nimport NotificationList from './NotificationList';\nimport type Mithril from 'mithril';\nimport extractText from '../../common/utils/extractText';\n\n/**\n * The `NotificationsPage` component shows the notifications list. It is only\n * used on mobile devices where the notifications dropdown is within the drawer.\n */\nexport default class NotificationsPage<CustomAttrs extends IPageAttrs = IPageAttrs> extends Page<CustomAttrs> {\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    app.history.push('notifications', extractText(app.translator.trans('core.forum.notifications.title')));\n\n    app.notifications.load();\n\n    this.bodyClass = 'App--notifications';\n  }\n\n  view() {\n    return (\n      <div className=\"NotificationsPage\">\n        <NotificationList state={app.notifications}></NotificationList>\n      </div>\n    );\n  }\n}\n","import type Mithril from 'mithril';\nimport type { RouteResolver } from '../Application';\nimport type { default as Component, ComponentAttrs } from '../Component';\n\n/**\n * Generates a route resolver for a given component.\n *\n * In addition to regular route resolver functionality:\n * - It provide the current route name as an attr\n * - It sets a key on the component so a rerender will be triggered on route change.\n */\nexport default class DefaultResolver<\n  Attrs extends ComponentAttrs,\n  Comp extends Component<Attrs & { routeName: string }>,\n  RouteArgs extends Record<string, unknown> = {}\n> implements RouteResolver<Attrs, Comp, RouteArgs>\n{\n  component: new () => Comp;\n  routeName: string;\n\n  constructor(component: new () => Comp, routeName: string) {\n    this.component = component;\n    this.routeName = routeName;\n  }\n\n  /**\n   * When a route change results in a changed key, a full page\n   * rerender occurs. This method can be overriden in subclasses\n   * to prevent rerenders on some route changes.\n   */\n  makeKey(): string {\n    return this.routeName + JSON.stringify(m.route.param());\n  }\n\n  makeAttrs(vnode: Mithril.Vnode<Attrs, Comp>): Attrs & { routeName: string } {\n    return {\n      ...vnode.attrs,\n      routeName: this.routeName,\n    };\n  }\n\n  onmatch(args: RouteArgs, requestedPath: string, route: string): { new (): Comp } {\n    return this.component;\n  }\n\n  render(vnode: Mithril.Vnode<Attrs, Comp>): Mithril.Children {\n    return [{ ...vnode, attrs: this.makeAttrs(vnode), key: this.makeKey() }];\n  }\n}\n","import type Mithril from 'mithril';\n\nimport app from '../../forum/app';\nimport DefaultResolver from '../../common/resolvers/DefaultResolver';\nimport DiscussionPage, { IDiscussionPageAttrs } from '../components/DiscussionPage';\n\n/**\n * A custom route resolver for DiscussionPage that generates the same key to all posts\n * on the same discussion. It triggers a scroll when going from one post to another\n * in the same discussion.\n */\nexport default class DiscussionPageResolver<\n  Attrs extends IDiscussionPageAttrs = IDiscussionPageAttrs,\n  RouteArgs extends Record<string, unknown> = {}\n> extends DefaultResolver<Attrs, DiscussionPage<Attrs>, RouteArgs> {\n  static scrollToPostNumber: number | null = null;\n\n  /**\n   * Remove optional parts of a discussion's slug to keep the substring\n   * that bijectively maps to a discussion object. By default this just\n   * extracts the numerical ID from the slug. If a custom discussion\n   * slugging driver is used, this may need to be overriden.\n   * @param slug\n   */\n  canonicalizeDiscussionSlug(slug: string | undefined) {\n    if (!slug) return;\n    return slug.split('-')[0];\n  }\n\n  /**\n   * @inheritdoc\n   */\n  makeKey() {\n    const params = { ...m.route.param() };\n    if ('near' in params) {\n      delete params.near;\n    }\n    params.id = this.canonicalizeDiscussionSlug(params.id);\n    return this.routeName.replace('.near', '') + JSON.stringify(params);\n  }\n\n  onmatch(args: Attrs & RouteArgs, requestedPath: string, route: string) {\n    if (app.current.matches(DiscussionPage) && this.canonicalizeDiscussionSlug(args.id) === this.canonicalizeDiscussionSlug(m.route.param('id'))) {\n      // By default, the first post number of any discussion is 1\n      DiscussionPageResolver.scrollToPostNumber = args.near || 1;\n    }\n\n    return super.onmatch(args, requestedPath, route);\n  }\n\n  render(vnode: Mithril.Vnode<Attrs, DiscussionPage<Attrs>>) {\n    if (DiscussionPageResolver.scrollToPostNumber !== null) {\n      const number = DiscussionPageResolver.scrollToPostNumber;\n      // Scroll after a timeout to avoid clashes with the render.\n      setTimeout(() => app.current.get('stream').goToNumber(number));\n      DiscussionPageResolver.scrollToPostNumber = null;\n    }\n\n    return super.render(vnode);\n  }\n}\n","import Component, { ComponentAttrs } from '../Component';\nimport type Mithril from 'mithril';\nimport app from '../app';\n\nexport interface ILabelValueAttrs extends ComponentAttrs {\n  label: Mithril.Children;\n  value: Mithril.Children;\n}\n\n/**\n * A generic component for displaying a label and value inline.\n * Created to avoid reinventing the wheel.\n *\n * `label: value`\n */\nexport default class LabelValue<CustomAttrs extends ILabelValueAttrs = ILabelValueAttrs> extends Component<CustomAttrs> {\n  view(vnode: Mithril.Vnode<CustomAttrs, this>): Mithril.Children {\n    return (\n      <div className=\"LabelValue\">\n        <div className=\"LabelValue-label\">\n          {app.translator.trans('core.lib.data_segment.label', {\n            label: this.attrs.label,\n          })}\n        </div>\n        <div className=\"LabelValue-value\">{this.attrs.value}</div>\n      </div>\n    );\n  }\n}\n","import app from '../app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport icon from '../../common/helpers/icon';\nimport Button from '../../common/components/Button';\nimport humanTime from '../../common/helpers/humanTime';\nimport ItemList from '../../common/utils/ItemList';\nimport LabelValue from '../../common/components/LabelValue';\nimport extractText from '../../common/utils/extractText';\nimport classList from '../../common/utils/classList';\nimport Tooltip from '../../common/components/Tooltip';\nimport type Mithril from 'mithril';\nimport type AccessToken from '../../common/models/AccessToken';\nimport { NestedStringArray } from '@askvortsov/rich-icu-message-formatter';\nimport IPAddress from '../../common/components/IPAddress';\n\nexport interface IAccessTokensListAttrs extends ComponentAttrs {\n  tokens: AccessToken[];\n  type: 'session' | 'developer_token';\n  hideTokens?: boolean;\n  icon?: string;\n  ondelete?: (token: AccessToken) => void;\n}\n\nexport default class AccessTokensList<CustomAttrs extends IAccessTokensListAttrs = IAccessTokensListAttrs> extends Component<CustomAttrs> {\n  protected loading: Record<string, boolean | undefined> = {};\n  protected showingTokens: Record<string, boolean | undefined> = {};\n\n  view(vnode: Mithril.Vnode<CustomAttrs, this>): Mithril.Children {\n    return (\n      <div className=\"AccessTokensList\">\n        {this.attrs.tokens.length ? (\n          this.attrs.tokens.map(this.tokenView.bind(this))\n        ) : (\n          <div className=\"AccessTokensList--empty\">{app.translator.trans('core.forum.security.empty_text')}</div>\n        )}\n      </div>\n    );\n  }\n\n  tokenView(token: AccessToken): Mithril.Children {\n    return (\n      <div\n        className={classList('AccessTokensList-item', {\n          'AccessTokensList-item--active': token.isCurrent(),\n        })}\n        key={token.id()!}\n      >\n        {this.tokenViewItems(token).toArray()}\n      </div>\n    );\n  }\n\n  tokenViewItems(token: AccessToken): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('icon', <div className=\"AccessTokensList-item-icon\">{icon(this.attrs.icon || 'fas fa-key')}</div>, 50);\n\n    items.add('info', <div className=\"AccessTokensList-item-info\">{this.tokenInfoItems(token).toArray()}</div>, 40);\n\n    items.add('actions', <div className=\"AccessTokensList-item-actions\">{this.tokenActionItems(token).toArray()}</div>, 30);\n\n    return items;\n  }\n\n  tokenInfoItems(token: AccessToken) {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.attrs.type === 'session') {\n      items.add(\n        'title',\n        <div className=\"AccessTokensList-item-title\">\n          <span className=\"AccessTokensList-item-title-main\">{token.device()}</span>\n          {token.isCurrent() && [\n            ' — ',\n            <span className=\"AccessTokensList-item-title-sub\">{app.translator.trans('core.forum.security.current_active_session')}</span>,\n          ]}\n        </div>\n      );\n    } else {\n      items.add(\n        'title',\n        <div className=\"AccessTokensList-item-title\">\n          <span className=\"AccessTokensList-item-title-main\">{this.generateTokenTitle(token)}</span>\n        </div>\n      );\n    }\n\n    items.add(\n      'createdAt',\n      <div className=\"AccessTokensList-item-createdAt\">\n        <LabelValue label={app.translator.trans('core.forum.security.created')} value={humanTime(token.createdAt())} />\n      </div>\n    );\n\n    items.add(\n      'lastActivityAt',\n      <div className=\"AccessTokensList-item-lastActivityAt\">\n        <LabelValue\n          label={app.translator.trans('core.forum.security.last_activity')}\n          value={\n            token.lastActivityAt() ? (\n              <>\n                {humanTime(token.lastActivityAt())}\n                {token.lastIpAddress() && (\n                  <span>\n                    {' '}\n                    — <IPAddress ip={token.lastIpAddress()} />\n                  </span>\n                )}\n                {this.attrs.type === 'developer_token' && token.device() && (\n                  <>\n                    {' '}\n                    — <span className=\"AccessTokensList-item-title-sub\">{token.device()}</span>\n                  </>\n                )}\n              </>\n            ) : (\n              app.translator.trans('core.forum.security.never')\n            )\n          }\n        />\n      </div>\n    );\n\n    return items;\n  }\n\n  tokenActionItems(token: AccessToken) {\n    const items = new ItemList<Mithril.Children>();\n\n    const deleteKey = {\n      session: 'terminate_session',\n      developer_token: 'revoke_access_token',\n    }[this.attrs.type];\n\n    if (this.attrs.type === 'developer_token') {\n      const isHidden = !this.showingTokens[token.id()!];\n      const displayKey = isHidden ? 'show_access_token' : 'hide_access_token';\n\n      items.add(\n        'toggleDisplay',\n        <Button\n          className=\"Button Button--inverted\"\n          icon={isHidden ? 'fas fa-eye' : 'fas fa-eye-slash'}\n          onclick={() => {\n            this.showingTokens[token.id()!] = isHidden;\n            m.redraw();\n          }}\n        >\n          {app.translator.trans(`core.forum.security.${displayKey}`)}\n        </Button>\n      );\n    }\n\n    let revokeButton = (\n      <Button className=\"Button Button--danger\" disabled={token.isCurrent()} loading={!!this.loading[token.id()!]} onclick={() => this.revoke(token)}>\n        {app.translator.trans(`core.forum.security.${deleteKey}`)}\n      </Button>\n    );\n\n    if (token.isCurrent()) {\n      revokeButton = (\n        <Tooltip text={app.translator.trans('core.forum.security.cannot_terminate_current_session')}>\n          <div tabindex=\"0\">{revokeButton}</div>\n        </Tooltip>\n      );\n    }\n\n    items.add('revoke', revokeButton);\n\n    return items;\n  }\n\n  async revoke(token: AccessToken) {\n    if (!confirm(extractText(app.translator.trans('core.forum.security.revoke_access_token_confirmation')))) return;\n\n    this.loading[token.id()!] = true;\n\n    await token.delete();\n\n    this.loading[token.id()!] = false;\n    this.attrs.ondelete?.(token);\n\n    const key = this.attrs.type === 'session' ? 'session_terminated' : 'token_revoked';\n\n    app.alerts.show({ type: 'success' }, app.translator.trans(`core.forum.security.${key}`, { count: 1 }));\n    m.redraw();\n  }\n\n  generateTokenTitle(token: AccessToken): NestedStringArray {\n    const name = token.title() || app.translator.trans('core.forum.security.token_title_placeholder');\n    const value = this.tokenValueDisplay(token);\n\n    return app.translator.trans('core.forum.security.token_item_title', { title: name, token: value });\n  }\n\n  tokenValueDisplay(token: AccessToken): Mithril.Children {\n    const obfuscatedName = Array(12).fill('*').join('');\n    const value = this.showingTokens[token.id()!] ? token.token() : obfuscatedName;\n\n    return <code className=\"AccessTokensList-item-token\">{value}</code>;\n  }\n}\n","import app from '../app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport Stream from '../../common/utils/Stream';\nimport type AccessToken from '../../common/models/AccessToken';\nimport type { SaveAttributes } from '../../common/Model';\nimport type Mithril from 'mithril';\n\nexport interface INewAccessTokenModalAttrs extends IInternalModalAttrs {\n  onsuccess: (token: AccessToken) => void;\n}\n\nexport default class NewAccessTokenModal<CustomAttrs extends INewAccessTokenModalAttrs = INewAccessTokenModalAttrs> extends Modal<CustomAttrs> {\n  protected titleInput = Stream('');\n\n  className(): string {\n    return 'Modal--small NewAccessTokenModal';\n  }\n\n  title(): Mithril.Children {\n    return app.translator.trans('core.forum.security.new_access_token_modal.title');\n  }\n\n  content(): Mithril.Children {\n    const titleLabel = app.translator.trans('core.forum.security.new_access_token_modal.title_placeholder');\n\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">\n          <div className=\"Form-group\">\n            <input type=\"text\" className=\"FormControl\" bidi={this.titleInput} placeholder={titleLabel} aria-label={titleLabel} />\n          </div>\n          <div className=\"Form-group\">\n            <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n              {app.translator.trans('core.forum.security.new_access_token_modal.submit_button')}\n            </Button>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  submitData(): SaveAttributes {\n    return {\n      title: this.titleInput(),\n    };\n  }\n\n  onsubmit(e: SubmitEvent) {\n    super.onsubmit(e);\n    e.preventDefault();\n\n    this.loading = true;\n\n    app.store\n      .createRecord<AccessToken>('access-tokens')\n      .save(this.submitData())\n      .then((token) => {\n        this.attrs.onsuccess(token);\n        app.modal.close();\n      })\n      .finally(this.loaded.bind(this));\n  }\n}\n","import AccessToken from '../../common/models/AccessToken';\n\nexport default class UserSecurityPageState {\n  protected tokens: AccessToken[] | null = null;\n  public loadingTerminateSessions: boolean = false;\n  public loadingGlobalLogout: boolean = false;\n\n  public hasLoadedTokens(): boolean {\n    return this.tokens !== null;\n  }\n\n  public getTokens(): AccessToken[] | null {\n    return this.tokens;\n  }\n\n  public setTokens(tokens: AccessToken[]): void {\n    this.tokens = tokens;\n  }\n\n  public pushToken(token: AccessToken): void {\n    this.tokens?.push(token);\n  }\n\n  public removeToken(token: AccessToken): void {\n    this.tokens = this.tokens!.filter((t) => t !== token);\n  }\n\n  public getSessionTokens(): AccessToken[] {\n    return this.tokens?.filter((token) => token.isSessionToken()).sort((a, b) => (b.isCurrent() ? 1 : -1)) || [];\n  }\n\n  public getDeveloperTokens(): AccessToken[] | null {\n    return this.tokens?.filter((token) => !token.isSessionToken()) || null;\n  }\n\n  /**\n   * Look up session tokens other than the current one.\n   */\n  public getOtherSessionTokens(): AccessToken[] {\n    return this.tokens?.filter((token) => token.isSessionToken() && !token.isCurrent()) || [];\n  }\n\n  public hasOtherActiveSessions(): boolean {\n    return (this.getOtherSessionTokens() || []).length > 0;\n  }\n\n  public removeOtherSessionTokens() {\n    this.tokens = this.tokens!.filter((token) => !token.isSessionToken() || token.isCurrent());\n  }\n}\n","import app from '../../forum/app';\nimport UserPage, { IUserPageAttrs } from './UserPage';\nimport ItemList from '../../common/utils/ItemList';\nimport FieldSet from '../../common/components/FieldSet';\nimport listItems from '../../common/helpers/listItems';\nimport extractText from '../../common/utils/extractText';\nimport AccessTokensList from './AccessTokensList';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport Button from '../../common/components/Button';\nimport NewAccessTokenModal from './NewAccessTokenModal';\nimport { camelCaseToSnakeCase } from '../../common/utils/string';\nimport type AccessToken from '../../common/models/AccessToken';\nimport type Mithril from 'mithril';\nimport Tooltip from '../../common/components/Tooltip';\nimport UserSecurityPageState from '../states/UserSecurityPageState';\n\n/**\n * The `UserSecurityPage` component displays the user's security control panel, in\n * the context of their user profile.\n */\nexport default class UserSecurityPage<CustomAttrs extends IUserPageAttrs = IUserPageAttrs> extends UserPage<CustomAttrs, UserSecurityPageState> {\n  state = new UserSecurityPageState();\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    const routeUsername = m.route.param('username');\n\n    if (routeUsername !== app.session.user?.slug() && !app.forum.attribute<boolean>('canModerateAccessTokens')) {\n      m.route.set('/');\n    }\n\n    this.loadUser(routeUsername);\n\n    app.setTitle(extractText(app.translator.trans('core.forum.security.title')));\n\n    this.loadTokens();\n  }\n\n  content() {\n    return (\n      <div className=\"UserSecurityPage\">\n        <ul>{listItems(this.settingsItems().toArray())}</ul>\n      </div>\n    );\n  }\n\n  /**\n   * Build an item list for the user's settings controls.\n   */\n  settingsItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    if (\n      app.forum.attribute('canCreateAccessToken') ||\n      app.forum.attribute('canModerateAccessTokens') ||\n      (this.state.hasLoadedTokens() && this.state.getDeveloperTokens()?.length)\n    ) {\n      items.add(\n        'developerTokens',\n        <FieldSet className=\"UserSecurityPage-developerTokens\" label={app.translator.trans(`core.forum.security.developer_tokens_heading`)}>\n          {this.developerTokensItems().toArray()}\n        </FieldSet>\n      );\n    } else if (!this.state.hasLoadedTokens()) {\n      items.add('developerTokens', <LoadingIndicator />);\n    }\n\n    items.add(\n      'sessions',\n      <FieldSet className=\"UserSecurityPage-sessions\" label={app.translator.trans(`core.forum.security.sessions_heading`)}>\n        {this.sessionsItems().toArray()}\n      </FieldSet>\n    );\n\n    if (this.user!.id() === app.session.user!.id()) {\n      items.add(\n        'globalLogout',\n        <FieldSet className=\"UserSecurityPage-globalLogout\" label={app.translator.trans('core.forum.security.global_logout.heading')}>\n          <span className=\"helpText\">{app.translator.trans('core.forum.security.global_logout.help_text')}</span>\n          <Button\n            className=\"Button\"\n            icon=\"fas fa-sign-out-alt\"\n            onclick={this.globalLogout.bind(this)}\n            loading={this.state.loadingGlobalLogout}\n            disabled={this.state.loadingTerminateSessions}\n          >\n            {app.translator.trans('core.forum.security.global_logout.log_out_button')}\n          </Button>\n        </FieldSet>\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's access accessToken settings.\n   */\n  developerTokensItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'accessTokenList',\n      !this.state.hasLoadedTokens() ? (\n        <LoadingIndicator />\n      ) : (\n        <AccessTokensList\n          type=\"developer_token\"\n          ondelete={(token: AccessToken) => {\n            this.state.removeToken(token);\n            m.redraw();\n          }}\n          tokens={this.state.getDeveloperTokens()}\n          icon=\"fas fa-key\"\n          hideTokens={false}\n        />\n      )\n    );\n\n    if (this.user!.id() === app.session.user!.id()) {\n      items.add(\n        'newAccessToken',\n        <Button\n          className=\"Button\"\n          disabled={!app.forum.attribute<boolean>('canCreateAccessToken')}\n          onclick={() =>\n            app.modal.show(NewAccessTokenModal, {\n              onsuccess: (token: AccessToken) => {\n                this.state.pushToken(token);\n                m.redraw();\n              },\n            })\n          }\n        >\n          {app.translator.trans('core.forum.security.new_access_token_button')}\n        </Button>\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's access accessToken settings.\n   */\n  sessionsItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'sessionsList',\n      !this.state.hasLoadedTokens() ? (\n        <LoadingIndicator />\n      ) : (\n        <AccessTokensList\n          type=\"session\"\n          ondelete={(token: AccessToken) => {\n            this.state.removeToken(token);\n            m.redraw();\n          }}\n          tokens={this.state.getSessionTokens()}\n          icon=\"fas fa-laptop\"\n          hideTokens={true}\n        />\n      )\n    );\n\n    if (this.user!.id() === app.session.user!.id()) {\n      const isDisabled = !this.state.hasOtherActiveSessions();\n\n      let terminateAllOthersButton = (\n        <Button\n          className=\"Button\"\n          onclick={this.terminateAllOtherSessions.bind(this)}\n          loading={this.state.loadingTerminateSessions}\n          disabled={this.state.loadingGlobalLogout || isDisabled}\n        >\n          {app.translator.trans('core.forum.security.terminate_all_other_sessions')}\n        </Button>\n      );\n\n      if (isDisabled) {\n        terminateAllOthersButton = (\n          <Tooltip text={app.translator.trans('core.forum.security.cannot_terminate_current_session')}>\n            <span tabindex=\"0\">{terminateAllOthersButton}</span>\n          </Tooltip>\n        );\n      }\n\n      items.add('terminateAllOtherSessions', terminateAllOthersButton);\n    }\n\n    return items;\n  }\n\n  loadTokens() {\n    return app.store\n      .find<AccessToken[]>('access-tokens', {\n        filter: { user: this.user!.id()! },\n      })\n      .then((tokens) => {\n        this.state.setTokens(tokens);\n        m.redraw();\n      });\n  }\n\n  terminateAllOtherSessions() {\n    if (!confirm(extractText(app.translator.trans('core.forum.security.terminate_all_other_sessions_confirmation')))) return;\n\n    this.state.loadingTerminateSessions = true;\n\n    return app\n      .request({\n        method: 'DELETE',\n        url: app.forum.attribute('apiUrl') + '/sessions',\n      })\n      .then(() => {\n        // Count terminated sessions first.\n        const count = this.state.getOtherSessionTokens().length;\n\n        this.state.removeOtherSessionTokens();\n\n        app.alerts.show({ type: 'success' }, app.translator.trans('core.forum.security.session_terminated', { count }));\n      })\n      .catch(() => {\n        app.alerts.show({ type: 'error' }, app.translator.trans('core.forum.security.session_termination_failed'));\n      })\n      .finally(() => {\n        this.state.loadingTerminateSessions = false;\n        m.redraw();\n      });\n  }\n\n  globalLogout() {\n    this.state.loadingGlobalLogout = true;\n\n    return app\n      .request({\n        method: 'POST',\n        url: app.forum.attribute<string>('baseUrl') + '/global-logout',\n      })\n      .then(() => window.location.reload())\n      .finally(() => {\n        this.state.loadingGlobalLogout = false;\n        m.redraw();\n      });\n  }\n}\n","import ForumApplication from './ForumApplication';\nimport IndexPage from './components/IndexPage';\nimport DiscussionPage from './components/DiscussionPage';\nimport PostsUserPage from './components/PostsUserPage';\nimport DiscussionsUserPage from './components/DiscussionsUserPage';\nimport SettingsPage from './components/SettingsPage';\nimport NotificationsPage from './components/NotificationsPage';\nimport DiscussionPageResolver from './resolvers/DiscussionPageResolver';\nimport Discussion from '../common/models/Discussion';\nimport type Post from '../common/models/Post';\nimport type User from '../common/models/User';\nimport UserSecurityPage from './components/UserSecurityPage';\n\n/**\n * Helper functions to generate URLs to form pages.\n */\nexport interface ForumRoutes {\n  discussion: (discussion: Discussion, near?: number) => string;\n  post: (post: Post) => string;\n  user: (user: User) => string;\n}\n\n/**\n * The `routes` initializer defines the forum app's routes.\n */\nexport default function (app: ForumApplication) {\n  app.routes = {\n    index: { path: '/all', component: IndexPage },\n\n    discussion: { path: '/d/:id', component: DiscussionPage, resolverClass: DiscussionPageResolver },\n    'discussion.near': { path: '/d/:id/:near', component: DiscussionPage, resolverClass: DiscussionPageResolver },\n\n    user: { path: '/u/:username', component: PostsUserPage },\n    'user.posts': { path: '/u/:username', component: PostsUserPage },\n    'user.discussions': { path: '/u/:username/discussions', component: DiscussionsUserPage },\n\n    settings: { path: '/settings', component: SettingsPage },\n    'user.security': { path: '/u/:username/security', component: UserSecurityPage },\n    notifications: { path: '/notifications', component: NotificationsPage },\n  };\n}\n\nexport function makeRouteHelpers(app: ForumApplication) {\n  return {\n    /**\n     * Generate a URL to a discussion.\n     */\n    discussion: (discussion: Discussion, near?: number) => {\n      return app.route(near && near !== 1 ? 'discussion.near' : 'discussion', {\n        id: discussion.slug(),\n        near: near && near !== 1 ? near : undefined,\n      });\n    },\n\n    /**\n     * Generate a URL to a post.\n     */\n    post: (post: Post) => {\n      return app.route.discussion(post.discussion(), post.number());\n    },\n\n    /**\n     * Generate a URL to a user.\n     */\n    user: (user: User) => {\n      return app.route('user', {\n        username: user.slug(),\n      });\n    },\n  };\n}\n","import Alert from '../../common/components/Alert';\nimport Button from '../../common/components/Button';\nimport icon from '../../common/helpers/icon';\nimport Component from '../../common/Component';\n\n/**\n * Shows an alert if the user has not yet confirmed their email address.\n *\n * @param {import('../ForumApplication').default} app\n */\nexport default function alertEmailConfirmation(app) {\n  const user = app.session.user;\n\n  if (!user || user.isEmailConfirmed()) return;\n\n  class ResendButton extends Component {\n    oninit(vnode) {\n      super.oninit(vnode);\n\n      this.loading = false;\n      this.sent = false;\n    }\n\n    view() {\n      return (\n        <Button className=\"Button Button--link\" onclick={this.onclick.bind(this)} loading={this.loading} disabled={this.sent}>\n          {this.sent\n            ? [icon('fas fa-check'), ' ', app.translator.trans('core.forum.user_email_confirmation.sent_message')]\n            : app.translator.trans('core.forum.user_email_confirmation.resend_button')}\n        </Button>\n      );\n    }\n\n    onclick() {\n      this.loading = true;\n      m.redraw();\n\n      app\n        .request({\n          method: 'POST',\n          url: app.forum.attribute('apiUrl') + '/users/' + user.id() + '/send-confirmation',\n        })\n        .then(() => {\n          this.loading = false;\n          this.sent = true;\n          m.redraw();\n        })\n        .catch(() => {\n          this.loading = false;\n          m.redraw();\n        });\n    }\n  }\n\n  class ContainedAlert extends Alert {\n    view(vnode) {\n      const vdom = super.view(vnode);\n      return { ...vdom, children: [<div className=\"container\">{vdom.children}</div>] };\n    }\n  }\n\n  m.mount($('<div className=\"App-notices\"/>').insertBefore('#content')[0], {\n    view: () => (\n      <ContainedAlert dismissible={false} controls={[<ResendButton />]} className=\"Alert--emailConfirmation\">\n        {app.translator.trans('core.forum.user_email_confirmation.alert_message', { email: <strong>{user.email()}</strong> })}\n      </ContainedAlert>\n    ),\n  });\n}\n","const candidateSelectors = [\n  'input',\n  'select',\n  'textarea',\n  'a[href]',\n  'button',\n  '[tabindex]:not(slot)',\n  'audio[controls]',\n  'video[controls]',\n  '[contenteditable]:not([contenteditable=\"false\"])',\n  'details>summary:first-of-type',\n  'details',\n];\nconst candidateSelector = /* #__PURE__ */ candidateSelectors.join(',');\n\nconst NoElement = typeof Element === 'undefined';\n\nconst matches = NoElement\n  ? function () {}\n  : Element.prototype.matches ||\n    Element.prototype.msMatchesSelector ||\n    Element.prototype.webkitMatchesSelector;\n\nconst getRootNode =\n  !NoElement && Element.prototype.getRootNode\n    ? (element) => element.getRootNode()\n    : (element) => element.ownerDocument;\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nconst getCandidates = function (el, includeContainer, filter) {\n  let candidates = Array.prototype.slice.apply(\n    el.querySelectorAll(candidateSelector)\n  );\n  if (includeContainer && matches.call(el, candidateSelector)) {\n    candidates.unshift(el);\n  }\n  candidates = candidates.filter(filter);\n  return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidatesScope\n * @property {Element} scope contains inner candidates\n * @property {Element[]} candidates\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n *  if a function, implies shadow support is enabled and either returns the shadow root of an element\n *  or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidatesScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.<Element|CandidatesScope>}\n */\nconst getCandidatesIteratively = function (\n  elements,\n  includeContainer,\n  options\n) {\n  const candidates = [];\n  const elementsToCheck = Array.from(elements);\n  while (elementsToCheck.length) {\n    const element = elementsToCheck.shift();\n    if (element.tagName === 'SLOT') {\n      // add shadow dom slot scope (slot itself cannot be focusable)\n      const assigned = element.assignedElements();\n      const content = assigned.length ? assigned : element.children;\n      const nestedCandidates = getCandidatesIteratively(content, true, options);\n      if (options.flatten) {\n        candidates.push(...nestedCandidates);\n      } else {\n        candidates.push({\n          scope: element,\n          candidates: nestedCandidates,\n        });\n      }\n    } else {\n      // check candidate element\n      const validCandidate = matches.call(element, candidateSelector);\n      if (\n        validCandidate &&\n        options.filter(element) &&\n        (includeContainer || !elements.includes(element))\n      ) {\n        candidates.push(element);\n      }\n\n      // iterate over shadow content if possible\n      const shadowRoot =\n        element.shadowRoot ||\n        // check for an undisclosed shadow\n        (typeof options.getShadowRoot === 'function' &&\n          options.getShadowRoot(element));\n\n      const validShadowRoot =\n        !options.shadowRootFilter || options.shadowRootFilter(element);\n\n      if (shadowRoot && validShadowRoot) {\n        // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n        //  shadow exists, so look at light dom children as fallback BUT create a scope for any\n        //  child candidates found because they're likely slotted elements (elements that are\n        //  children of the web component element (which has the shadow), in the light dom, but\n        //  slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n        //  _after_ we return from this recursive call\n        const nestedCandidates = getCandidatesIteratively(\n          shadowRoot === true ? element.children : shadowRoot.children,\n          true,\n          options\n        );\n\n        if (options.flatten) {\n          candidates.push(...nestedCandidates);\n        } else {\n          candidates.push({\n            scope: element,\n            candidates: nestedCandidates,\n          });\n        }\n      } else {\n        // there's not shadow so just dig into the element's (light dom) children\n        //  __without__ giving the element special scope treatment\n        elementsToCheck.unshift(...element.children);\n      }\n    }\n  }\n  return candidates;\n};\n\nconst getTabindex = function (node, isScope) {\n  if (node.tabIndex < 0) {\n    // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n    // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n    // yet they are still part of the regular tab order; in FF, they get a default\n    // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n    // order, consider their tab index to be 0.\n    // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n    // so if they don't have a tabindex attribute specifically set, assume it's 0.\n    //\n    // isScope is positive for custom element with shadow root or slot that by default\n    // have tabIndex -1, but need to be sorted by document order in order for their\n    // content to be inserted in the correct position\n    if (\n      (isScope ||\n        /^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) ||\n        node.isContentEditable) &&\n      isNaN(parseInt(node.getAttribute('tabindex'), 10))\n    ) {\n      return 0;\n    }\n  }\n\n  return node.tabIndex;\n};\n\nconst sortOrderedTabbables = function (a, b) {\n  return a.tabIndex === b.tabIndex\n    ? a.documentOrder - b.documentOrder\n    : a.tabIndex - b.tabIndex;\n};\n\nconst isInput = function (node) {\n  return node.tagName === 'INPUT';\n};\n\nconst isHiddenInput = function (node) {\n  return isInput(node) && node.type === 'hidden';\n};\n\nconst isDetailsWithSummary = function (node) {\n  const r =\n    node.tagName === 'DETAILS' &&\n    Array.prototype.slice\n      .apply(node.children)\n      .some((child) => child.tagName === 'SUMMARY');\n  return r;\n};\n\nconst getCheckedRadio = function (nodes, form) {\n  for (let i = 0; i < nodes.length; i++) {\n    if (nodes[i].checked && nodes[i].form === form) {\n      return nodes[i];\n    }\n  }\n};\n\nconst isTabbableRadio = function (node) {\n  if (!node.name) {\n    return true;\n  }\n  const radioScope = node.form || getRootNode(node);\n  const queryRadios = function (name) {\n    return radioScope.querySelectorAll(\n      'input[type=\"radio\"][name=\"' + name + '\"]'\n    );\n  };\n\n  let radioSet;\n  if (\n    typeof window !== 'undefined' &&\n    typeof window.CSS !== 'undefined' &&\n    typeof window.CSS.escape === 'function'\n  ) {\n    radioSet = queryRadios(window.CSS.escape(node.name));\n  } else {\n    try {\n      radioSet = queryRadios(node.name);\n    } catch (err) {\n      // eslint-disable-next-line no-console\n      console.error(\n        'Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s',\n        err.message\n      );\n      return false;\n    }\n  }\n\n  const checked = getCheckedRadio(radioSet, node.form);\n  return !checked || checked === node;\n};\n\nconst isRadio = function (node) {\n  return isInput(node) && node.type === 'radio';\n};\n\nconst isNonTabbableRadio = function (node) {\n  return isRadio(node) && !isTabbableRadio(node);\n};\n\nconst isZeroArea = function (node) {\n  const { width, height } = node.getBoundingClientRect();\n  return width === 0 && height === 0;\n};\nconst isHidden = function (node, { displayCheck, getShadowRoot }) {\n  // NOTE: visibility will be `undefined` if node is detached from the document\n  //  (see notes about this further down), which means we will consider it visible\n  //  (this is legacy behavior from a very long way back)\n  // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n  //  _visibility_ check, not a _display_ check\n  if (getComputedStyle(node).visibility === 'hidden') {\n    return true;\n  }\n\n  const isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n  const nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n  if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n    return true;\n  }\n\n  // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n  //  (but NOT _the_ document; see second 'If' comment below for more).\n  // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n  //  is attached, and the one we need to check if it's in the document or not (because the\n  //  shadow, and all nodes it contains, is never considered in the document since shadows\n  //  behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n  //  is hidden, or is not in the document itself but is detached, it will affect the shadow's\n  //  visibility, including all the nodes it contains). The host could be any normal node,\n  //  or a custom element (i.e. web component). Either way, that's the one that is considered\n  //  part of the document, not the shadow root, nor any of its children (i.e. the node being\n  //  tested).\n  // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n  //  document (per the docs) and while it's a Document-type object, that document does not\n  //  appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n  //  to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n  //  using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n  //  node is actually detached.\n  const nodeRootHost = getRootNode(node).host;\n  const nodeIsAttached =\n    nodeRootHost?.ownerDocument.contains(nodeRootHost) ||\n    node.ownerDocument.contains(node);\n\n  if (!displayCheck || displayCheck === 'full') {\n    if (typeof getShadowRoot === 'function') {\n      // figure out if we should consider the node to be in an undisclosed shadow and use the\n      //  'non-zero-area' fallback\n      const originalNode = node;\n      while (node) {\n        const parentElement = node.parentElement;\n        const rootNode = getRootNode(node);\n        if (\n          parentElement &&\n          !parentElement.shadowRoot &&\n          getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n        ) {\n          // node has an undisclosed shadow which means we can only treat it as a black box, so we\n          //  fall back to a non-zero-area test\n          return isZeroArea(node);\n        } else if (node.assignedSlot) {\n          // iterate up slot\n          node = node.assignedSlot;\n        } else if (!parentElement && rootNode !== node.ownerDocument) {\n          // cross shadow boundary\n          node = rootNode.host;\n        } else {\n          // iterate up normal dom\n          node = parentElement;\n        }\n      }\n\n      node = originalNode;\n    }\n    // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n    //  (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n    //  it might be a falsy value, which means shadow DOM support is disabled\n\n    // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n    //  now we can just test to see if it would normally be visible or not, provided it's\n    //  attached to the main document.\n    // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n    //  `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n    if (nodeIsAttached) {\n      // this works wherever the node is: if there's at least one client rect, it's\n      //  somehow displayed; it also covers the CSS 'display: contents' case where the\n      //  node itself is hidden in place of its contents; and there's no need to search\n      //  up the hierarchy either\n      return !node.getClientRects().length;\n    }\n\n    // Else, the node isn't attached to the document, which means the `getClientRects()`\n    //  API will __always__ return zero rects (this can happen, for example, if React\n    //  is used to render nodes onto a detached tree, as confirmed in this thread:\n    //  https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n    //\n    // It also means that even window.getComputedStyle(node).display will return `undefined`\n    //  because styles are only computed for nodes that are in the document.\n    //\n    // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n    //  somehow. Though it was never stated officially, anyone who has ever used tabbable\n    //  APIs on nodes in detached containers has actually implicitly used tabbable in what\n    //  was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n    //  considering __everything__ to be visible because of the innability to determine styles.\n  } else if (displayCheck === 'non-zero-area') {\n    // NOTE: Even though this tests that the node's client rect is non-zero to determine\n    //  whether it's displayed, and that a detached node will __always__ have a zero-area\n    //  client rect, we don't special-case for whether the node is attached or not. In\n    //  this mode, we do want to consider nodes that have a zero area to be hidden at all\n    //  times, and that includes attached or not.\n    return isZeroArea(node);\n  }\n\n  // visible, as far as we can tell, or per current `displayCheck` mode\n  return false;\n};\n\n// form fields (nested) inside a disabled fieldset are not focusable/tabbable\n//  unless they are in the _first_ <legend> element of the top-most disabled\n//  fieldset\nconst isDisabledFromFieldset = function (node) {\n  if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n    let parentNode = node.parentElement;\n    // check if `node` is contained in a disabled <fieldset>\n    while (parentNode) {\n      if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n        // look for the first <legend> among the children of the disabled <fieldset>\n        for (let i = 0; i < parentNode.children.length; i++) {\n          const child = parentNode.children.item(i);\n          // when the first <legend> (in document order) is found\n          if (child.tagName === 'LEGEND') {\n            // if its parent <fieldset> is not nested in another disabled <fieldset>,\n            // return whether `node` is a descendant of its first <legend>\n            return matches.call(parentNode, 'fieldset[disabled] *')\n              ? true\n              : !child.contains(node);\n          }\n        }\n        // the disabled <fieldset> containing `node` has no <legend>\n        return true;\n      }\n      parentNode = parentNode.parentElement;\n    }\n  }\n\n  // else, node's tabbable/focusable state should not be affected by a fieldset's\n  //  enabled/disabled state\n  return false;\n};\n\nconst isNodeMatchingSelectorFocusable = function (options, node) {\n  if (\n    node.disabled ||\n    isHiddenInput(node) ||\n    isHidden(node, options) ||\n    // For a details element with a summary, the summary element gets the focus\n    isDetailsWithSummary(node) ||\n    isDisabledFromFieldset(node)\n  ) {\n    return false;\n  }\n  return true;\n};\n\nconst isNodeMatchingSelectorTabbable = function (options, node) {\n  if (\n    isNonTabbableRadio(node) ||\n    getTabindex(node) < 0 ||\n    !isNodeMatchingSelectorFocusable(options, node)\n  ) {\n    return false;\n  }\n  return true;\n};\n\nconst isValidShadowRootTabbable = function (shadowHostNode) {\n  const tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n  if (isNaN(tabIndex) || tabIndex >= 0) {\n    return true;\n  }\n  // If a custom element has an explicit negative tabindex,\n  // browsers will not allow tab targeting said element's children.\n  return false;\n};\n\n/**\n * @param {Array.<Element|CandidatesScope>} candidates\n * @returns Element[]\n */\nconst sortByOrder = function (candidates) {\n  const regularTabbables = [];\n  const orderedTabbables = [];\n  candidates.forEach(function (item, i) {\n    const isScope = !!item.scope;\n    const element = isScope ? item.scope : item;\n    const candidateTabindex = getTabindex(element, isScope);\n    const elements = isScope ? sortByOrder(item.candidates) : element;\n    if (candidateTabindex === 0) {\n      isScope\n        ? regularTabbables.push(...elements)\n        : regularTabbables.push(element);\n    } else {\n      orderedTabbables.push({\n        documentOrder: i,\n        tabIndex: candidateTabindex,\n        item: item,\n        isScope: isScope,\n        content: elements,\n      });\n    }\n  });\n\n  return orderedTabbables\n    .sort(sortOrderedTabbables)\n    .reduce((acc, sortable) => {\n      sortable.isScope\n        ? acc.push(...sortable.content)\n        : acc.push(sortable.content);\n      return acc;\n    }, [])\n    .concat(regularTabbables);\n};\n\nconst tabbable = function (el, options) {\n  options = options || {};\n\n  let candidates;\n  if (options.getShadowRoot) {\n    candidates = getCandidatesIteratively([el], options.includeContainer, {\n      filter: isNodeMatchingSelectorTabbable.bind(null, options),\n      flatten: false,\n      getShadowRoot: options.getShadowRoot,\n      shadowRootFilter: isValidShadowRootTabbable,\n    });\n  } else {\n    candidates = getCandidates(\n      el,\n      options.includeContainer,\n      isNodeMatchingSelectorTabbable.bind(null, options)\n    );\n  }\n  return sortByOrder(candidates);\n};\n\nconst focusable = function (el, options) {\n  options = options || {};\n\n  let candidates;\n  if (options.getShadowRoot) {\n    candidates = getCandidatesIteratively([el], options.includeContainer, {\n      filter: isNodeMatchingSelectorFocusable.bind(null, options),\n      flatten: true,\n      getShadowRoot: options.getShadowRoot,\n    });\n  } else {\n    candidates = getCandidates(\n      el,\n      options.includeContainer,\n      isNodeMatchingSelectorFocusable.bind(null, options)\n    );\n  }\n\n  return candidates;\n};\n\nconst isTabbable = function (node, options) {\n  options = options || {};\n  if (!node) {\n    throw new Error('No node provided');\n  }\n  if (matches.call(node, candidateSelector) === false) {\n    return false;\n  }\n  return isNodeMatchingSelectorTabbable(options, node);\n};\n\nconst focusableCandidateSelector = /* #__PURE__ */ candidateSelectors\n  .concat('iframe')\n  .join(',');\n\nconst isFocusable = function (node, options) {\n  options = options || {};\n  if (!node) {\n    throw new Error('No node provided');\n  }\n  if (matches.call(node, focusableCandidateSelector) === false) {\n    return false;\n  }\n  return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { tabbable, focusable, isTabbable, isFocusable };\n","import { tabbable, focusable, isFocusable, isTabbable } from 'tabbable';\n\nconst activeFocusTraps = (function () {\n  const trapQueue = [];\n  return {\n    activateTrap(trap) {\n      if (trapQueue.length > 0) {\n        const activeTrap = trapQueue[trapQueue.length - 1];\n        if (activeTrap !== trap) {\n          activeTrap.pause();\n        }\n      }\n\n      const trapIndex = trapQueue.indexOf(trap);\n      if (trapIndex === -1) {\n        trapQueue.push(trap);\n      } else {\n        // move this existing trap to the front of the queue\n        trapQueue.splice(trapIndex, 1);\n        trapQueue.push(trap);\n      }\n    },\n\n    deactivateTrap(trap) {\n      const trapIndex = trapQueue.indexOf(trap);\n      if (trapIndex !== -1) {\n        trapQueue.splice(trapIndex, 1);\n      }\n\n      if (trapQueue.length > 0) {\n        trapQueue[trapQueue.length - 1].unpause();\n      }\n    },\n  };\n})();\n\nconst isSelectableInput = function (node) {\n  return (\n    node.tagName &&\n    node.tagName.toLowerCase() === 'input' &&\n    typeof node.select === 'function'\n  );\n};\n\nconst isEscapeEvent = function (e) {\n  return e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27;\n};\n\nconst isTabEvent = function (e) {\n  return e.key === 'Tab' || e.keyCode === 9;\n};\n\nconst delay = function (fn) {\n  return setTimeout(fn, 0);\n};\n\n// Array.find/findIndex() are not supported on IE; this replicates enough\n//  of Array.findIndex() for our needs\nconst findIndex = function (arr, fn) {\n  let idx = -1;\n\n  arr.every(function (value, i) {\n    if (fn(value)) {\n      idx = i;\n      return false; // break\n    }\n\n    return true; // next\n  });\n\n  return idx;\n};\n\n/**\n * Get an option's value when it could be a plain value, or a handler that provides\n *  the value.\n * @param {*} value Option's value to check.\n * @param {...*} [params] Any parameters to pass to the handler, if `value` is a function.\n * @returns {*} The `value`, or the handler's returned value.\n */\nconst valueOrHandler = function (value, ...params) {\n  return typeof value === 'function' ? value(...params) : value;\n};\n\nconst getActualTarget = function (event) {\n  // NOTE: If the trap is _inside_ a shadow DOM, event.target will always be the\n  //  shadow host. However, event.target.composedPath() will be an array of\n  //  nodes \"clicked\" from inner-most (the actual element inside the shadow) to\n  //  outer-most (the host HTML document). If we have access to composedPath(),\n  //  then use its first element; otherwise, fall back to event.target (and\n  //  this only works for an _open_ shadow DOM; otherwise,\n  //  composedPath()[0] === event.target always).\n  return event.target.shadowRoot && typeof event.composedPath === 'function'\n    ? event.composedPath()[0]\n    : event.target;\n};\n\nconst createFocusTrap = function (elements, userOptions) {\n  // SSR: a live trap shouldn't be created in this type of environment so this\n  //  should be safe code to execute if the `document` option isn't specified\n  const doc = userOptions?.document || document;\n\n  const config = {\n    returnFocusOnDeactivate: true,\n    escapeDeactivates: true,\n    delayInitialFocus: true,\n    ...userOptions,\n  };\n\n  const state = {\n    // containers given to createFocusTrap()\n    // @type {Array<HTMLElement>}\n    containers: [],\n\n    // list of objects identifying tabbable nodes in `containers` in the trap\n    // NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap\n    //  is active, but the trap should never get to a state where there isn't at least one group\n    //  with at least one tabbable node in it (that would lead to an error condition that would\n    //  result in an error being thrown)\n    // @type {Array<{\n    //   container: HTMLElement,\n    //   tabbableNodes: Array<HTMLElement>, // empty if none\n    //   focusableNodes: Array<HTMLElement>, // empty if none\n    //   firstTabbableNode: HTMLElement|null,\n    //   lastTabbableNode: HTMLElement|null,\n    //   nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined\n    // }>}\n    containerGroups: [], // same order/length as `containers` list\n\n    // references to objects in `containerGroups`, but only those that actually have\n    //  tabbable nodes in them\n    // NOTE: same order as `containers` and `containerGroups`, but __not necessarily__\n    //  the same length\n    tabbableGroups: [],\n\n    nodeFocusedBeforeActivation: null,\n    mostRecentlyFocusedNode: null,\n    active: false,\n    paused: false,\n\n    // timer ID for when delayInitialFocus is true and initial focus in this trap\n    //  has been delayed during activation\n    delayInitialFocusTimer: undefined,\n  };\n\n  let trap; // eslint-disable-line prefer-const -- some private functions reference it, and its methods reference private functions, so we must declare here and define later\n\n  /**\n   * Gets a configuration option value.\n   * @param {Object|undefined} configOverrideOptions If true, and option is defined in this set,\n   *  value will be taken from this object. Otherwise, value will be taken from base configuration.\n   * @param {string} optionName Name of the option whose value is sought.\n   * @param {string|undefined} [configOptionName] Name of option to use __instead of__ `optionName`\n   *  IIF `configOverrideOptions` is not defined. Otherwise, `optionName` is used.\n   */\n  const getOption = (configOverrideOptions, optionName, configOptionName) => {\n    return configOverrideOptions &&\n      configOverrideOptions[optionName] !== undefined\n      ? configOverrideOptions[optionName]\n      : config[configOptionName || optionName];\n  };\n\n  /**\n   * Finds the index of the container that contains the element.\n   * @param {HTMLElement} element\n   * @returns {number} Index of the container in either `state.containers` or\n   *  `state.containerGroups` (the order/length of these lists are the same); -1\n   *  if the element isn't found.\n   */\n  const findContainerIndex = function (element) {\n    // NOTE: search `containerGroups` because it's possible a group contains no tabbable\n    //  nodes, but still contains focusable nodes (e.g. if they all have `tabindex=-1`)\n    //  and we still need to find the element in there\n    return state.containerGroups.findIndex(\n      ({ container, tabbableNodes }) =>\n        container.contains(element) ||\n        // fall back to explicit tabbable search which will take into consideration any\n        //  web components if the `tabbableOptions.getShadowRoot` option was used for\n        //  the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't\n        //  look inside web components even if open)\n        tabbableNodes.find((node) => node === element)\n    );\n  };\n\n  /**\n   * Gets the node for the given option, which is expected to be an option that\n   *  can be either a DOM node, a string that is a selector to get a node, `false`\n   *  (if a node is explicitly NOT given), or a function that returns any of these\n   *  values.\n   * @param {string} optionName\n   * @returns {undefined | false | HTMLElement | SVGElement} Returns\n   *  `undefined` if the option is not specified; `false` if the option\n   *  resolved to `false` (node explicitly not given); otherwise, the resolved\n   *  DOM node.\n   * @throws {Error} If the option is set, not `false`, and is not, or does not\n   *  resolve to a node.\n   */\n  const getNodeForOption = function (optionName, ...params) {\n    let optionValue = config[optionName];\n\n    if (typeof optionValue === 'function') {\n      optionValue = optionValue(...params);\n    }\n\n    if (optionValue === true) {\n      optionValue = undefined; // use default value\n    }\n\n    if (!optionValue) {\n      if (optionValue === undefined || optionValue === false) {\n        return optionValue;\n      }\n      // else, empty string (invalid), null (invalid), 0 (invalid)\n\n      throw new Error(\n        `\\`${optionName}\\` was specified but was not a node, or did not return a node`\n      );\n    }\n\n    let node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point\n\n    if (typeof optionValue === 'string') {\n      node = doc.querySelector(optionValue); // resolve to node, or null if fails\n      if (!node) {\n        throw new Error(\n          `\\`${optionName}\\` as selector refers to no known node`\n        );\n      }\n    }\n\n    return node;\n  };\n\n  const getInitialFocusNode = function () {\n    let node = getNodeForOption('initialFocus');\n\n    // false explicitly indicates we want no initialFocus at all\n    if (node === false) {\n      return false;\n    }\n\n    if (node === undefined) {\n      // option not specified: use fallback options\n      if (findContainerIndex(doc.activeElement) >= 0) {\n        node = doc.activeElement;\n      } else {\n        const firstTabbableGroup = state.tabbableGroups[0];\n        const firstTabbableNode =\n          firstTabbableGroup && firstTabbableGroup.firstTabbableNode;\n\n        // NOTE: `fallbackFocus` option function cannot return `false` (not supported)\n        node = firstTabbableNode || getNodeForOption('fallbackFocus');\n      }\n    }\n\n    if (!node) {\n      throw new Error(\n        'Your focus-trap needs to have at least one focusable element'\n      );\n    }\n\n    return node;\n  };\n\n  const updateTabbableNodes = function () {\n    state.containerGroups = state.containers.map((container) => {\n      const tabbableNodes = tabbable(container, config.tabbableOptions);\n\n      // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes\n      //  are a superset of tabbable nodes\n      const focusableNodes = focusable(container, config.tabbableOptions);\n\n      return {\n        container,\n        tabbableNodes,\n        focusableNodes,\n        firstTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[0] : null,\n        lastTabbableNode:\n          tabbableNodes.length > 0\n            ? tabbableNodes[tabbableNodes.length - 1]\n            : null,\n\n        /**\n         * Finds the __tabbable__ node that follows the given node in the specified direction,\n         *  in this container, if any.\n         * @param {HTMLElement} node\n         * @param {boolean} [forward] True if going in forward tab order; false if going\n         *  in reverse.\n         * @returns {HTMLElement|undefined} The next tabbable node, if any.\n         */\n        nextTabbableNode(node, forward = true) {\n          // NOTE: If tabindex is positive (in order to manipulate the tab order separate\n          //  from the DOM order), this __will not work__ because the list of focusableNodes,\n          //  while it contains tabbable nodes, does not sort its nodes in any order other\n          //  than DOM order, because it can't: Where would you place focusable (but not\n          //  tabbable) nodes in that order? They have no order, because they aren't tabbale...\n          // Support for positive tabindex is already broken and hard to manage (possibly\n          //  not supportable, TBD), so this isn't going to make things worse than they\n          //  already are, and at least makes things better for the majority of cases where\n          //  tabindex is either 0/unset or negative.\n          // FYI, positive tabindex issue: https://github.com/focus-trap/focus-trap/issues/375\n          const nodeIdx = focusableNodes.findIndex((n) => n === node);\n          if (nodeIdx < 0) {\n            return undefined;\n          }\n\n          if (forward) {\n            return focusableNodes\n              .slice(nodeIdx + 1)\n              .find((n) => isTabbable(n, config.tabbableOptions));\n          }\n\n          return focusableNodes\n            .slice(0, nodeIdx)\n            .reverse()\n            .find((n) => isTabbable(n, config.tabbableOptions));\n        },\n      };\n    });\n\n    state.tabbableGroups = state.containerGroups.filter(\n      (group) => group.tabbableNodes.length > 0\n    );\n\n    // throw if no groups have tabbable nodes and we don't have a fallback focus node either\n    if (\n      state.tabbableGroups.length <= 0 &&\n      !getNodeForOption('fallbackFocus') // returning false not supported for this option\n    ) {\n      throw new Error(\n        'Your focus-trap must have at least one container with at least one tabbable node in it at all times'\n      );\n    }\n  };\n\n  const tryFocus = function (node) {\n    if (node === false) {\n      return;\n    }\n\n    if (node === doc.activeElement) {\n      return;\n    }\n\n    if (!node || !node.focus) {\n      tryFocus(getInitialFocusNode());\n      return;\n    }\n\n    node.focus({ preventScroll: !!config.preventScroll });\n    state.mostRecentlyFocusedNode = node;\n\n    if (isSelectableInput(node)) {\n      node.select();\n    }\n  };\n\n  const getReturnFocusNode = function (previousActiveElement) {\n    const node = getNodeForOption('setReturnFocus', previousActiveElement);\n    return node ? node : node === false ? false : previousActiveElement;\n  };\n\n  // This needs to be done on mousedown and touchstart instead of click\n  // so that it precedes the focus event.\n  const checkPointerDown = function (e) {\n    const target = getActualTarget(e);\n\n    if (findContainerIndex(target) >= 0) {\n      // allow the click since it ocurred inside the trap\n      return;\n    }\n\n    if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n      // immediately deactivate the trap\n      trap.deactivate({\n        // if, on deactivation, we should return focus to the node originally-focused\n        //  when the trap was activated (or the configured `setReturnFocus` node),\n        //  then assume it's also OK to return focus to the outside node that was\n        //  just clicked, causing deactivation, as long as that node is focusable;\n        //  if it isn't focusable, then return focus to the original node focused\n        //  on activation (or the configured `setReturnFocus` node)\n        // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,\n        //  which will result in the outside click setting focus to the node\n        //  that was clicked, whether it's focusable or not; by setting\n        //  `returnFocus: true`, we'll attempt to re-focus the node originally-focused\n        //  on activation (or the configured `setReturnFocus` node)\n        returnFocus:\n          config.returnFocusOnDeactivate &&\n          !isFocusable(target, config.tabbableOptions),\n      });\n      return;\n    }\n\n    // This is needed for mobile devices.\n    // (If we'll only let `click` events through,\n    // then on mobile they will be blocked anyways if `touchstart` is blocked.)\n    if (valueOrHandler(config.allowOutsideClick, e)) {\n      // allow the click outside the trap to take place\n      return;\n    }\n\n    // otherwise, prevent the click\n    e.preventDefault();\n  };\n\n  // In case focus escapes the trap for some strange reason, pull it back in.\n  const checkFocusIn = function (e) {\n    const target = getActualTarget(e);\n    const targetContained = findContainerIndex(target) >= 0;\n\n    // In Firefox when you Tab out of an iframe the Document is briefly focused.\n    if (targetContained || target instanceof Document) {\n      if (targetContained) {\n        state.mostRecentlyFocusedNode = target;\n      }\n    } else {\n      // escaped! pull it back in to where it just left\n      e.stopImmediatePropagation();\n      tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());\n    }\n  };\n\n  // Hijack Tab events on the first and last focusable nodes of the trap,\n  // in order to prevent focus from escaping. If it escapes for even a\n  // moment it can end up scrolling the page and causing confusion so we\n  // kind of need to capture the action at the keydown phase.\n  const checkTab = function (e) {\n    const target = getActualTarget(e);\n    updateTabbableNodes();\n\n    let destinationNode = null;\n\n    if (state.tabbableGroups.length > 0) {\n      // make sure the target is actually contained in a group\n      // NOTE: the target may also be the container itself if it's focusable\n      //  with tabIndex='-1' and was given initial focus\n      const containerIndex = findContainerIndex(target);\n      const containerGroup =\n        containerIndex >= 0 ? state.containerGroups[containerIndex] : undefined;\n\n      if (containerIndex < 0) {\n        // target not found in any group: quite possible focus has escaped the trap,\n        //  so bring it back in to...\n        if (e.shiftKey) {\n          // ...the last node in the last group\n          destinationNode =\n            state.tabbableGroups[state.tabbableGroups.length - 1]\n              .lastTabbableNode;\n        } else {\n          // ...the first node in the first group\n          destinationNode = state.tabbableGroups[0].firstTabbableNode;\n        }\n      } else if (e.shiftKey) {\n        // REVERSE\n\n        // is the target the first tabbable node in a group?\n        let startOfGroupIndex = findIndex(\n          state.tabbableGroups,\n          ({ firstTabbableNode }) => target === firstTabbableNode\n        );\n\n        if (\n          startOfGroupIndex < 0 &&\n          (containerGroup.container === target ||\n            (isFocusable(target, config.tabbableOptions) &&\n              !isTabbable(target, config.tabbableOptions) &&\n              !containerGroup.nextTabbableNode(target, false)))\n        ) {\n          // an exception case where the target is either the container itself, or\n          //  a non-tabbable node that was given focus (i.e. tabindex is negative\n          //  and user clicked on it or node was programmatically given focus)\n          //  and is not followed by any other tabbable node, in which\n          //  case, we should handle shift+tab as if focus were on the container's\n          //  first tabbable node, and go to the last tabbable node of the LAST group\n          startOfGroupIndex = containerIndex;\n        }\n\n        if (startOfGroupIndex >= 0) {\n          // YES: then shift+tab should go to the last tabbable node in the\n          //  previous group (and wrap around to the last tabbable node of\n          //  the LAST group if it's the first tabbable node of the FIRST group)\n          const destinationGroupIndex =\n            startOfGroupIndex === 0\n              ? state.tabbableGroups.length - 1\n              : startOfGroupIndex - 1;\n\n          const destinationGroup = state.tabbableGroups[destinationGroupIndex];\n          destinationNode = destinationGroup.lastTabbableNode;\n        }\n      } else {\n        // FORWARD\n\n        // is the target the last tabbable node in a group?\n        let lastOfGroupIndex = findIndex(\n          state.tabbableGroups,\n          ({ lastTabbableNode }) => target === lastTabbableNode\n        );\n\n        if (\n          lastOfGroupIndex < 0 &&\n          (containerGroup.container === target ||\n            (isFocusable(target, config.tabbableOptions) &&\n              !isTabbable(target, config.tabbableOptions) &&\n              !containerGroup.nextTabbableNode(target)))\n        ) {\n          // an exception case where the target is the container itself, or\n          //  a non-tabbable node that was given focus (i.e. tabindex is negative\n          //  and user clicked on it or node was programmatically given focus)\n          //  and is not followed by any other tabbable node, in which\n          //  case, we should handle tab as if focus were on the container's\n          //  last tabbable node, and go to the first tabbable node of the FIRST group\n          lastOfGroupIndex = containerIndex;\n        }\n\n        if (lastOfGroupIndex >= 0) {\n          // YES: then tab should go to the first tabbable node in the next\n          //  group (and wrap around to the first tabbable node of the FIRST\n          //  group if it's the last tabbable node of the LAST group)\n          const destinationGroupIndex =\n            lastOfGroupIndex === state.tabbableGroups.length - 1\n              ? 0\n              : lastOfGroupIndex + 1;\n\n          const destinationGroup = state.tabbableGroups[destinationGroupIndex];\n          destinationNode = destinationGroup.firstTabbableNode;\n        }\n      }\n    } else {\n      // NOTE: the fallbackFocus option does not support returning false to opt-out\n      destinationNode = getNodeForOption('fallbackFocus');\n    }\n\n    if (destinationNode) {\n      e.preventDefault();\n      tryFocus(destinationNode);\n    }\n    // else, let the browser take care of [shift+]tab and move the focus\n  };\n\n  const checkKey = function (e) {\n    if (\n      isEscapeEvent(e) &&\n      valueOrHandler(config.escapeDeactivates, e) !== false\n    ) {\n      e.preventDefault();\n      trap.deactivate();\n      return;\n    }\n\n    if (isTabEvent(e)) {\n      checkTab(e);\n      return;\n    }\n  };\n\n  const checkClick = function (e) {\n    const target = getActualTarget(e);\n\n    if (findContainerIndex(target) >= 0) {\n      return;\n    }\n\n    if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n      return;\n    }\n\n    if (valueOrHandler(config.allowOutsideClick, e)) {\n      return;\n    }\n\n    e.preventDefault();\n    e.stopImmediatePropagation();\n  };\n\n  //\n  // EVENT LISTENERS\n  //\n\n  const addListeners = function () {\n    if (!state.active) {\n      return;\n    }\n\n    // There can be only one listening focus trap at a time\n    activeFocusTraps.activateTrap(trap);\n\n    // Delay ensures that the focused element doesn't capture the event\n    // that caused the focus trap activation.\n    state.delayInitialFocusTimer = config.delayInitialFocus\n      ? delay(function () {\n          tryFocus(getInitialFocusNode());\n        })\n      : tryFocus(getInitialFocusNode());\n\n    doc.addEventListener('focusin', checkFocusIn, true);\n    doc.addEventListener('mousedown', checkPointerDown, {\n      capture: true,\n      passive: false,\n    });\n    doc.addEventListener('touchstart', checkPointerDown, {\n      capture: true,\n      passive: false,\n    });\n    doc.addEventListener('click', checkClick, {\n      capture: true,\n      passive: false,\n    });\n    doc.addEventListener('keydown', checkKey, {\n      capture: true,\n      passive: false,\n    });\n\n    return trap;\n  };\n\n  const removeListeners = function () {\n    if (!state.active) {\n      return;\n    }\n\n    doc.removeEventListener('focusin', checkFocusIn, true);\n    doc.removeEventListener('mousedown', checkPointerDown, true);\n    doc.removeEventListener('touchstart', checkPointerDown, true);\n    doc.removeEventListener('click', checkClick, true);\n    doc.removeEventListener('keydown', checkKey, true);\n\n    return trap;\n  };\n\n  //\n  // TRAP DEFINITION\n  //\n\n  trap = {\n    get active() {\n      return state.active;\n    },\n\n    get paused() {\n      return state.paused;\n    },\n\n    activate(activateOptions) {\n      if (state.active) {\n        return this;\n      }\n\n      const onActivate = getOption(activateOptions, 'onActivate');\n      const onPostActivate = getOption(activateOptions, 'onPostActivate');\n      const checkCanFocusTrap = getOption(activateOptions, 'checkCanFocusTrap');\n\n      if (!checkCanFocusTrap) {\n        updateTabbableNodes();\n      }\n\n      state.active = true;\n      state.paused = false;\n      state.nodeFocusedBeforeActivation = doc.activeElement;\n\n      if (onActivate) {\n        onActivate();\n      }\n\n      const finishActivation = () => {\n        if (checkCanFocusTrap) {\n          updateTabbableNodes();\n        }\n        addListeners();\n        if (onPostActivate) {\n          onPostActivate();\n        }\n      };\n\n      if (checkCanFocusTrap) {\n        checkCanFocusTrap(state.containers.concat()).then(\n          finishActivation,\n          finishActivation\n        );\n        return this;\n      }\n\n      finishActivation();\n      return this;\n    },\n\n    deactivate(deactivateOptions) {\n      if (!state.active) {\n        return this;\n      }\n\n      const options = {\n        onDeactivate: config.onDeactivate,\n        onPostDeactivate: config.onPostDeactivate,\n        checkCanReturnFocus: config.checkCanReturnFocus,\n        ...deactivateOptions,\n      };\n\n      clearTimeout(state.delayInitialFocusTimer); // noop if undefined\n      state.delayInitialFocusTimer = undefined;\n\n      removeListeners();\n      state.active = false;\n      state.paused = false;\n\n      activeFocusTraps.deactivateTrap(trap);\n\n      const onDeactivate = getOption(options, 'onDeactivate');\n      const onPostDeactivate = getOption(options, 'onPostDeactivate');\n      const checkCanReturnFocus = getOption(options, 'checkCanReturnFocus');\n      const returnFocus = getOption(\n        options,\n        'returnFocus',\n        'returnFocusOnDeactivate'\n      );\n\n      if (onDeactivate) {\n        onDeactivate();\n      }\n\n      const finishDeactivation = () => {\n        delay(() => {\n          if (returnFocus) {\n            tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));\n          }\n          if (onPostDeactivate) {\n            onPostDeactivate();\n          }\n        });\n      };\n\n      if (returnFocus && checkCanReturnFocus) {\n        checkCanReturnFocus(\n          getReturnFocusNode(state.nodeFocusedBeforeActivation)\n        ).then(finishDeactivation, finishDeactivation);\n        return this;\n      }\n\n      finishDeactivation();\n      return this;\n    },\n\n    pause() {\n      if (state.paused || !state.active) {\n        return this;\n      }\n\n      state.paused = true;\n      removeListeners();\n\n      return this;\n    },\n\n    unpause() {\n      if (!state.paused || !state.active) {\n        return this;\n      }\n\n      state.paused = false;\n      updateTabbableNodes();\n      addListeners();\n\n      return this;\n    },\n\n    updateContainerElements(containerElements) {\n      const elementsAsArray = [].concat(containerElements).filter(Boolean);\n\n      state.containers = elementsAsArray.map((element) =>\n        typeof element === 'string' ? doc.querySelector(element) : element\n      );\n\n      if (state.active) {\n        updateTabbableNodes();\n      }\n\n      return this;\n    },\n  };\n\n  // initialize container elements\n  trap.updateContainerElements(elements);\n\n  return trap;\n};\n\nexport { createFocusTrap };\n","import { createFocusTrap as _createFocusTrap } from 'focus-trap';\n\n/**\n * Creates a focus trap for the given element with the given options.\n * \n * This function applies some default options that are different to the library.\n * Your own options still override these custom defaults:\n * \n * ```json\n * {\n     escapeDeactivates: false,\n * }\n * ```\n * \n * @param element The element to be the focus trap, or a selector that will be used to find the element.\n * \n * @see https://github.com/focus-trap/focus-trap#readme - Library documentation\n */\nfunction createFocusTrap(...args: Parameters<typeof _createFocusTrap>): ReturnType<typeof _createFocusTrap> {\n  args[1] = {\n    escapeDeactivates: false,\n    ...args[1],\n  };\n\n  return _createFocusTrap(...args);\n}\n\nexport * from 'focus-trap';\nexport { createFocusTrap };\n","function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n// Older browsers don't support event options, feature detect it.\n\n// Adopted and modified solution from Bohdan Didukh (2017)\n// https://stackoverflow.com/questions/41594997/ios-10-safari-prevent-scrolling-behind-a-fixed-overlay-and-maintain-scroll-posi\n\nvar hasPassiveEvents = false;\nif (typeof window !== 'undefined') {\n  var passiveTestOptions = {\n    get passive() {\n      hasPassiveEvents = true;\n      return undefined;\n    }\n  };\n  window.addEventListener('testPassive', null, passiveTestOptions);\n  window.removeEventListener('testPassive', null, passiveTestOptions);\n}\n\nvar isIosDevice = typeof window !== 'undefined' && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === 'MacIntel' && window.navigator.maxTouchPoints > 1);\n\n\nvar locks = [];\nvar documentListenerAdded = false;\nvar initialClientY = -1;\nvar previousBodyOverflowSetting = void 0;\nvar previousBodyPosition = void 0;\nvar previousBodyPaddingRight = void 0;\n\n// returns true if `el` should be allowed to receive touchmove events.\nvar allowTouchMove = function allowTouchMove(el) {\n  return locks.some(function (lock) {\n    if (lock.options.allowTouchMove && lock.options.allowTouchMove(el)) {\n      return true;\n    }\n\n    return false;\n  });\n};\n\nvar preventDefault = function preventDefault(rawEvent) {\n  var e = rawEvent || window.event;\n\n  // For the case whereby consumers adds a touchmove event listener to document.\n  // Recall that we do document.addEventListener('touchmove', preventDefault, { passive: false })\n  // in disableBodyScroll - so if we provide this opportunity to allowTouchMove, then\n  // the touchmove event on document will break.\n  if (allowTouchMove(e.target)) {\n    return true;\n  }\n\n  // Do not prevent if the event has more than one touch (usually meaning this is a multi touch gesture like pinch to zoom).\n  if (e.touches.length > 1) return true;\n\n  if (e.preventDefault) e.preventDefault();\n\n  return false;\n};\n\nvar setOverflowHidden = function setOverflowHidden(options) {\n  // If previousBodyPaddingRight is already set, don't set it again.\n  if (previousBodyPaddingRight === undefined) {\n    var _reserveScrollBarGap = !!options && options.reserveScrollBarGap === true;\n    var scrollBarGap = window.innerWidth - document.documentElement.clientWidth;\n\n    if (_reserveScrollBarGap && scrollBarGap > 0) {\n      var computedBodyPaddingRight = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'), 10);\n      previousBodyPaddingRight = document.body.style.paddingRight;\n      document.body.style.paddingRight = computedBodyPaddingRight + scrollBarGap + 'px';\n    }\n  }\n\n  // If previousBodyOverflowSetting is already set, don't set it again.\n  if (previousBodyOverflowSetting === undefined) {\n    previousBodyOverflowSetting = document.body.style.overflow;\n    document.body.style.overflow = 'hidden';\n  }\n};\n\nvar restoreOverflowSetting = function restoreOverflowSetting() {\n  if (previousBodyPaddingRight !== undefined) {\n    document.body.style.paddingRight = previousBodyPaddingRight;\n\n    // Restore previousBodyPaddingRight to undefined so setOverflowHidden knows it\n    // can be set again.\n    previousBodyPaddingRight = undefined;\n  }\n\n  if (previousBodyOverflowSetting !== undefined) {\n    document.body.style.overflow = previousBodyOverflowSetting;\n\n    // Restore previousBodyOverflowSetting to undefined\n    // so setOverflowHidden knows it can be set again.\n    previousBodyOverflowSetting = undefined;\n  }\n};\n\nvar setPositionFixed = function setPositionFixed() {\n  return window.requestAnimationFrame(function () {\n    // If previousBodyPosition is already set, don't set it again.\n    if (previousBodyPosition === undefined) {\n      previousBodyPosition = {\n        position: document.body.style.position,\n        top: document.body.style.top,\n        left: document.body.style.left\n      };\n\n      // Update the dom inside an animation frame \n      var _window = window,\n          scrollY = _window.scrollY,\n          scrollX = _window.scrollX,\n          innerHeight = _window.innerHeight;\n\n      document.body.style.position = 'fixed';\n      document.body.style.top = -scrollY;\n      document.body.style.left = -scrollX;\n\n      setTimeout(function () {\n        return window.requestAnimationFrame(function () {\n          // Attempt to check if the bottom bar appeared due to the position change\n          var bottomBarHeight = innerHeight - window.innerHeight;\n          if (bottomBarHeight && scrollY >= innerHeight) {\n            // Move the content further up so that the bottom bar doesn't hide it\n            document.body.style.top = -(scrollY + bottomBarHeight);\n          }\n        });\n      }, 300);\n    }\n  });\n};\n\nvar restorePositionSetting = function restorePositionSetting() {\n  if (previousBodyPosition !== undefined) {\n    // Convert the position from \"px\" to Int\n    var y = -parseInt(document.body.style.top, 10);\n    var x = -parseInt(document.body.style.left, 10);\n\n    // Restore styles\n    document.body.style.position = previousBodyPosition.position;\n    document.body.style.top = previousBodyPosition.top;\n    document.body.style.left = previousBodyPosition.left;\n\n    // Restore scroll\n    window.scrollTo(x, y);\n\n    previousBodyPosition = undefined;\n  }\n};\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#Problems_and_solutions\nvar isTargetElementTotallyScrolled = function isTargetElementTotallyScrolled(targetElement) {\n  return targetElement ? targetElement.scrollHeight - targetElement.scrollTop <= targetElement.clientHeight : false;\n};\n\nvar handleScroll = function handleScroll(event, targetElement) {\n  var clientY = event.targetTouches[0].clientY - initialClientY;\n\n  if (allowTouchMove(event.target)) {\n    return false;\n  }\n\n  if (targetElement && targetElement.scrollTop === 0 && clientY > 0) {\n    // element is at the top of its scroll.\n    return preventDefault(event);\n  }\n\n  if (isTargetElementTotallyScrolled(targetElement) && clientY < 0) {\n    // element is at the bottom of its scroll.\n    return preventDefault(event);\n  }\n\n  event.stopPropagation();\n  return true;\n};\n\nexport var disableBodyScroll = function disableBodyScroll(targetElement, options) {\n  // targetElement must be provided\n  if (!targetElement) {\n    // eslint-disable-next-line no-console\n    console.error('disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.');\n    return;\n  }\n\n  // disableBodyScroll must not have been called on this targetElement before\n  if (locks.some(function (lock) {\n    return lock.targetElement === targetElement;\n  })) {\n    return;\n  }\n\n  var lock = {\n    targetElement: targetElement,\n    options: options || {}\n  };\n\n  locks = [].concat(_toConsumableArray(locks), [lock]);\n\n  if (isIosDevice) {\n    setPositionFixed();\n  } else {\n    setOverflowHidden(options);\n  }\n\n  if (isIosDevice) {\n    targetElement.ontouchstart = function (event) {\n      if (event.targetTouches.length === 1) {\n        // detect single touch.\n        initialClientY = event.targetTouches[0].clientY;\n      }\n    };\n    targetElement.ontouchmove = function (event) {\n      if (event.targetTouches.length === 1) {\n        // detect single touch.\n        handleScroll(event, targetElement);\n      }\n    };\n\n    if (!documentListenerAdded) {\n      document.addEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);\n      documentListenerAdded = true;\n    }\n  }\n};\n\nexport var clearAllBodyScrollLocks = function clearAllBodyScrollLocks() {\n  if (isIosDevice) {\n    // Clear all locks ontouchstart/ontouchmove handlers, and the references.\n    locks.forEach(function (lock) {\n      lock.targetElement.ontouchstart = null;\n      lock.targetElement.ontouchmove = null;\n    });\n\n    if (documentListenerAdded) {\n      document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);\n      documentListenerAdded = false;\n    }\n\n    // Reset initial clientY.\n    initialClientY = -1;\n  }\n\n  if (isIosDevice) {\n    restorePositionSetting();\n  } else {\n    restoreOverflowSetting();\n  }\n\n  locks = [];\n};\n\nexport var enableBodyScroll = function enableBodyScroll(targetElement) {\n  if (!targetElement) {\n    // eslint-disable-next-line no-console\n    console.error('enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.');\n    return;\n  }\n\n  locks = locks.filter(function (lock) {\n    return lock.targetElement !== targetElement;\n  });\n\n  if (isIosDevice) {\n    targetElement.ontouchstart = null;\n    targetElement.ontouchmove = null;\n\n    if (documentListenerAdded && locks.length === 0) {\n      document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);\n      documentListenerAdded = false;\n    }\n  }\n\n  if (isIosDevice) {\n    restorePositionSetting();\n  } else {\n    restoreOverflowSetting();\n  }\n};\n\n","/* \n * Copyright 2019, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {parseCases} from './utilities.js';\n\nlet pluralFormatter;\n\nlet keyCounter = 0;\n\n// All the special keywords that can be used in `plural` blocks for the various branches\nconst ONE   = 'one';\nconst OTHER = 'other';\n\n/**\n * @private\n * @param {String} caseBody\n * @param {Number} value\n * @return {Object} {caseBody: string, numberValues: object}\n */\nfunction replaceNumberSign(caseBody, value) {\n\tlet i = 0;\n\tlet output = '';\n\tlet numBraces = 0;\n\tconst numberValues = {};\n\n\twhile (i < caseBody.length) {\n\t\tif (caseBody[i] === '#' && !numBraces) {\n\t\t\tlet keyParam = `__hashToken${keyCounter++}`;\n\t\t\toutput += `{${keyParam}, number}`;\n\t\t\tnumberValues[keyParam] = value;\n\t\t}\n\t\telse {\n\t\t\toutput += caseBody[i];\n\t\t}\n\n\t\tif (caseBody[i] === '{') {\n\t\t\tnumBraces++;\n\t\t}\n\t\telse if (caseBody[i] === '}') {\n\t\t\tnumBraces--;\n\t\t}\n\n\t\ti++;\n\t}\n\n\treturn {\n\t\tcaseBody: output,\n\t\tnumberValues\n\t};\n}\n\n/**\n * Handler for `plural` statements within ICU message syntax strings.  Returns\n * a formatted string for the branch that closely matches the current value.\n * \n * See https://formatjs.io/docs/core-concepts/icu-syntax#plural-format for more\n * details on how the `plural` statement works.\n * \n * @param {String} value\n * @param {String} matches\n * @param {String} locale\n * @param {String} values\n * @param {Function} format\n * @return {String}\n */\nexport default function pluralTypeHandler(value, matches = '', locale, values, format) {\n\tconst { args, cases } = parseCases(matches);\n\n\tlet intValue = parseInt(value);\n\n\targs.forEach((arg) => {\n\t\tif (arg.startsWith('offset:')) {\n\t\t\tintValue -= parseInt(arg.slice('offset:'.length));\n\t\t}\n\t});\n\n\tconst keywordPossibilities = [];\n\n\tif ('PluralRules' in Intl) {\n\t\t// Effectively memoize because instantiation of `Int.*` objects is expensive.\n\t\tif (pluralFormatter === undefined || pluralFormatter.resolvedOptions().locale !== locale) {\n\t\t\tpluralFormatter = new Intl.PluralRules(locale);\n\t\t}\n\n\t\tconst pluralKeyword = pluralFormatter.select(intValue);\n\n\t\t// Other is always added last with least priority, so we don't want to add it here.\n\t\tif (pluralKeyword !== OTHER) {\n\t\t\tkeywordPossibilities.push(pluralKeyword);\n\t\t}\n\t}\n\tif (intValue === 1) {\n\t\tkeywordPossibilities.push(ONE);\n\t}\n\tkeywordPossibilities.push(`=${intValue}`, OTHER);\n\n\tfor (let i = 0; i < keywordPossibilities.length; i++) {\n\t\tconst keyword = keywordPossibilities[i];\n\t\tif (keyword in cases) {\n\t\t\tconst { caseBody, numberValues } = replaceNumberSign(cases[keyword], intValue);\n\t\t\treturn format(caseBody, {\n\t\t\t\t...values,\n\t\t\t\t...numberValues\n\t\t\t});\n\t\t}\n\t}\n\n\treturn value;\n}\n","import Component from '../Component';\n\nimport { createFocusTrap, FocusTrap } from '../utils/focusTrap';\n\nimport { disableBodyScroll, clearAllBodyScrollLocks } from 'body-scroll-lock';\n\nimport type ModalManagerState from '../states/ModalManagerState';\nimport type Mithril from 'mithril';\n\ninterface IModalManagerAttrs {\n  state: ModalManagerState;\n}\n\n/**\n * The `ModalManager` component manages one or more modal dialogs. Stacking modals\n * is supported. Multiple dialogs can be shown at once; loading a new component\n * into the ModalManager will overwrite the previous one.\n */\nexport default class ModalManager extends Component<IModalManagerAttrs> {\n  // Current focus trap\n  protected focusTrap: FocusTrap | undefined;\n\n  // Keep track of the last set focus trap\n  protected lastSetFocusTrap: number | undefined;\n\n  // Keep track if there's an modal closing\n  protected modalClosing: boolean = false;\n\n  protected keyUpListener: null | ((e: KeyboardEvent) => void) = null;\n\n  view(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): Mithril.Children {\n    return (\n      <>\n        {this.attrs.state.modalList.map((modal, i) => {\n          const Tag = modal?.componentClass;\n\n          return (\n            <div\n              key={modal.key}\n              className=\"ModalManager modal\"\n              data-modal-key={modal.key}\n              data-modal-number={i}\n              role=\"dialog\"\n              aria-modal=\"true\"\n              style={{ '--modal-number': i }}\n              aria-hidden={this.attrs.state.modal !== modal && 'true'}\n            >\n              {!!Tag && [\n                <Tag\n                  key={modal.key}\n                  {...modal.attrs}\n                  animateShow={this.animateShow.bind(this)}\n                  animateHide={this.animateHide.bind(this)}\n                  state={this.attrs.state}\n                />,\n                /* This backdrop is invisible and used for outside clicks to close the modal. */\n                <div key={modal.key} className=\"ModalManager-invisibleBackdrop\" onclick={this.handlePossibleBackdropClick.bind(this)} />,\n              ]}\n            </div>\n          );\n        })}\n\n        {this.attrs.state.backdropShown && (\n          <div\n            className=\"Modal-backdrop backdrop\"\n            ontransitionend={this.onBackdropTransitionEnd.bind(this)}\n            data-showing={!!this.attrs.state.modalList.length}\n            style={{ '--modal-count': this.attrs.state.modalList.length }}\n          />\n        )}\n      </>\n    );\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): void {\n    super.oncreate(vnode);\n\n    this.keyUpListener = this.handleEscPress.bind(this);\n    document.body.addEventListener('keyup', this.keyUpListener);\n  }\n\n  onbeforeremove(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): void {\n    super.onbeforeremove(vnode);\n\n    this.keyUpListener && document.body.removeEventListener('keyup', this.keyUpListener);\n    this.keyUpListener = null;\n  }\n\n  onupdate(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): void {\n    super.onupdate(vnode);\n\n    requestAnimationFrame(() => {\n      try {\n        // Main content should gain or lose `aria-hidden` when modals are shown/removed\n        // See: http://web-accessibility.carnegiemuseums.org/code/dialogs/\n\n        if (!this.attrs.state.isModalOpen()) {\n          document.getElementById('app')?.setAttribute('aria-hidden', 'false');\n          this.focusTrap!.deactivate?.();\n          clearAllBodyScrollLocks();\n\n          return;\n        }\n\n        document.getElementById('app')?.setAttribute('aria-hidden', 'true');\n\n        // Get current dialog key\n        const dialogKey = this.attrs.state.modal!.key;\n\n        // Deactivate focus trap if there's a new dialog/closed\n        if (this.focusTrap && this.lastSetFocusTrap !== dialogKey) {\n          this.focusTrap!.deactivate?.();\n\n          clearAllBodyScrollLocks();\n        }\n\n        // Activate focus trap if there's a new dialog which is not trapped yet\n        if (this.activeDialogElement && this.lastSetFocusTrap !== dialogKey) {\n          this.focusTrap = createFocusTrap(this.activeDialogElement as HTMLElement, { allowOutsideClick: true });\n          this.focusTrap!.activate?.();\n\n          disableBodyScroll(this.activeDialogManagerElement!, { reserveScrollBarGap: true });\n        }\n\n        // Update key of current opened modal\n        this.lastSetFocusTrap = dialogKey;\n      } catch {\n        // We can expect errors to occur here due to the nature of mithril rendering\n      }\n    });\n  }\n\n  /**\n   * Get current active dialog\n   */\n  private get activeDialogElement(): HTMLElement {\n    return document.body.querySelector(`.ModalManager[data-modal-key=\"${this.attrs.state.modal?.key}\"] .Modal`) as HTMLElement;\n  }\n\n  /**\n   * Get current active dialog\n   */\n  private get activeDialogManagerElement(): HTMLElement {\n    return document.body.querySelector(`.ModalManager[data-modal-key=\"${this.attrs.state.modal?.key}\"]`) as HTMLElement;\n  }\n\n  animateShow(readyCallback: () => void = () => {}): void {\n    if (!this.attrs.state.modal) return;\n\n    this.activeDialogElement.addEventListener(\n      'transitionend',\n      () => {\n        readyCallback();\n      },\n      { once: true }\n    );\n\n    requestAnimationFrame(() => {\n      this.activeDialogElement.classList.add('in');\n    });\n  }\n\n  animateHide(closedCallback: () => void = () => {}): void {\n    if (this.modalClosing) return;\n    this.modalClosing = true;\n\n    const afterModalClosedCallback = () => {\n      this.modalClosing = false;\n\n      // Close the dialog\n      this.attrs.state.close();\n\n      closedCallback();\n    };\n\n    this.activeDialogElement.addEventListener('transitionend', afterModalClosedCallback, { once: true });\n\n    this.activeDialogElement.classList.remove('in');\n    this.activeDialogElement.classList.add('out');\n  }\n\n  protected handleEscPress(e: KeyboardEvent): void {\n    if (!this.attrs.state.modal) return;\n\n    const dismissibleState = this.attrs.state.modal.componentClass.dismissibleOptions;\n\n    // Close the dialog if the escape key was pressed\n    // Check if closing via escape key is enabled\n    if (e.key === 'Escape' && dismissibleState.viaEscKey) {\n      e.preventDefault();\n\n      this.animateHide();\n    }\n  }\n\n  protected handlePossibleBackdropClick(e: MouseEvent): void {\n    if (!this.attrs.state.modal || !this.attrs.state.modal.componentClass.dismissibleOptions.viaBackdropClick) return;\n\n    this.animateHide();\n  }\n\n  protected onBackdropTransitionEnd(e: TransitionEvent) {\n    if (e.propertyName === 'opacity') {\n      const backdrop = e.currentTarget as HTMLDivElement;\n\n      if (backdrop.getAttribute('data-showing') === null) {\n        // Backdrop is fading out\n        this.attrs.state.backdropShown = false;\n        m.redraw();\n      }\n    }\n  }\n}\n","import Component, { ComponentAttrs } from '../Component';\nimport AlertManagerState from '../states/AlertManagerState';\nimport type Mithril from 'mithril';\n\nexport interface IAlertManagerAttrs extends ComponentAttrs {\n  state: AlertManagerState;\n}\n\n/**\n * The `AlertManager` component provides an area in which `Alert` components can\n * be shown and dismissed.\n */\nexport default class AlertManager<CustomAttrs extends IAlertManagerAttrs = IAlertManagerAttrs> extends Component<CustomAttrs, AlertManagerState> {\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.state = this.attrs.state;\n  }\n\n  view() {\n    const activeAlerts = this.state.getActiveAlerts();\n\n    return (\n      <div className=\"AlertManager\">\n        {Object.keys(activeAlerts)\n          .map(Number)\n          .map((key) => {\n            const alert = activeAlerts[key];\n            const urgent = alert.attrs.type === 'error';\n\n            return (\n              <div className=\"AlertManager-alert\" role=\"alert\" aria-live={urgent ? 'assertive' : 'polite'}>\n                <alert.componentClass {...alert.attrs} ondismiss={this.state.dismiss.bind(this.state, key)}>\n                  {alert.children}\n                </alert.componentClass>\n              </div>\n            );\n          })}\n      </div>\n    );\n  }\n}\n","import type RequestError from '../utils/RequestError';\nimport Modal, { IInternalModalAttrs } from './Modal';\n\nexport interface IRequestErrorModalAttrs extends IInternalModalAttrs {\n  error: RequestError;\n  formattedError: string[];\n}\n\nexport default class RequestErrorModal<CustomAttrs extends IRequestErrorModalAttrs = IRequestErrorModalAttrs> extends Modal<CustomAttrs> {\n  className() {\n    return 'RequestErrorModal Modal--large';\n  }\n\n  title() {\n    return !!this.attrs.error.xhr && `${this.attrs.error.xhr.status} ${this.attrs.error.xhr.statusText}`;\n  }\n\n  content() {\n    const { error, formattedError } = this.attrs;\n\n    let responseText;\n\n    // If the error is already formatted, just add line endings;\n    // else try to parse it as JSON and stringify it with indentation\n    if (formattedError.length) {\n      responseText = formattedError.join('\\n\\n');\n    } else if (error.response) {\n      responseText = JSON.stringify(error.response, null, 2);\n    } else {\n      responseText = error.responseText;\n    }\n\n    return (\n      <div className=\"Modal-body\">\n        <pre>\n          {this.attrs.error.options.method} {this.attrs.error.options.url}\n          <br />\n          <br />\n          {responseText}\n        </pre>\n      </div>\n    );\n  }\n}\n","/* \n * Copyright 2017, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Flattens an array of arrays of infinite depth into a single-dimension array.\n * \n * > This is now natively in JavaScript as the `flat` method on an Array\n * > instance.  [Check MDN for which browsers have access to this feature](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat).\n * > If you can't use `flat`, then this method will do the job 🙂\n * \n * @param {Array} array\n * @return {Array} Flattened array.\n */\nexport function flatten(array) {\n\n\treturn array.reduce((accumulator, value) => {\n\t\treturn accumulator.concat(Array.isArray(value) ? flatten(value) : value);\n\t}, []);\n}\n\n/**\n * Creates an array of numbers from the starting value (inclusive) to the end\n * (exclusive), with an optional step (the gap between values).\n * \n * @param {Number} start\n *   The value to start at, the first item in the returned array.\n * @param {Number} end\n *   The value to end with, the last item in the returned array.\n * @param {Number} [step=1]\n *   The increment/gap between values, defaults to 1.\n * @return {Array} An array encompassing the given range.\n */\nexport function range(start, end, step = 1) {\n\n\treturn Array.apply(0, Array(Math.ceil((end - start) / step))).map((empty, index) => index * step + start);\n}\n\n/**\n * Remove and return the first item from `array` that matches the predicate\n * function.\n * \n * @param {Array} array\n * @param {Function} predicate\n *   Invoked with the array item.\n * @return {Object} The matching item, or `null` if no match was found.\n */\nexport function remove(array, predicate) {\n\n\treturn array.find((item, index) => {\n\t\tif (predicate(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\treturn item;\n\t\t}\n\t});\n}\n","/**\n * A higher-order function to apply [memoization](https://en.wikipedia.org/wiki/Memoization).\n * \n * If memoizing a recursive function, then memoize and define the function at\n * the same time so you can make a call to the memoized function, eg:\n * \n * ```javascript\n * const myFunction = memoize(() => myFunction());\n * ```\n * \n * @param {Function} func\n * @return {Function} \n */\nexport function memoize(func) {\n\tconst cache = {};\n\treturn function(...args) {\n\t\tlet key = args.length ? args\n\t\t\t.map(arg =>\n\t\t\t\targ === null ? 'null' :\n\t\t\t\targ === undefined ? 'undefined' :\n\t\t\t\ttypeof arg === 'function' ? arg.toString() :\n\t\t\t\targ instanceof Date ? arg.toISOString() :\n\t\t\t\tJSON.stringify(arg)\n\t\t\t)\n\t\t\t.join('|') :\n\t\t\t'_(no-args)_';\n\t\tif (Object.prototype.hasOwnProperty.call(cache, key)) {\n\t\t\treturn cache[key];\n\t\t}\n\t\tlet result = func(...args);\n\t\tcache[key] = result;\n\t\treturn result;\n\t};\n}\n","/* \n * Copyright 2019, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Most branch-based type handlers are based around \"cases\".\n * For example, `select` and `plural` compare compare a value\n * to \"case keys\" to choose a subtranslation.\n * \n * This util splits \"matches\" portions provided to the aforementioned\n * handlers into case strings, and extracts any prepended arguments\n * (for example, `plural` supports an `offset:n` argument used for\n * populating the magic `#` variable).\n * \n * @param {String} string\n * @return {Object} The `cases` key points to a map of all cases.\n *                  The `arguments` key points to a list of prepended arguments.\n */\nexport function parseCases(string) {\n\tconst isWhitespace = ch => /\\s/.test(ch);\n\n\tconst args = [];\n\tconst cases = {};\n\n\tlet currTermStart = 0;\n\tlet latestTerm = null;\n\tlet inTerm = false;\n\n\tlet i = 0;\n\twhile (i < string.length) {\n\t\t// Term ended\n\t\tif (inTerm && (isWhitespace(string[i]) || string[i] === '{')) {\n\t\t\tinTerm = false;\n\t\t\tlatestTerm = string.slice(currTermStart, i);\n\n\t\t\t// We want to process the opening char again so the case will be properly registered.\n\t\t\tif (string[i] === '{') {\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\n\t\t// New term\n\t\telse if (!inTerm && !isWhitespace(string[i])) {\n\t\t\tconst caseBody = string[i] === '{';\n\n\t\t\t// If there's a previous term, we can either handle a whole\n\t\t\t// case, or add that as an argument.\n\t\t\tif (latestTerm && caseBody) {\n\t\t\t\tconst branchEndIndex = findClosingBracket(string, i);\n\n\t\t\t\tif (branchEndIndex === -1) {\n\t\t\t\t\tthrow new Error(`Unbalanced curly braces in string: \"${string}\"`);\n\t\t\t\t}\n\n\t\t\t\tcases[latestTerm] = string.slice(i + 1, branchEndIndex);  // Don't include the braces\n\n\t\t\t\ti = branchEndIndex; // Will be moved up where needed at end of loop.\n\t\t\t\tlatestTerm = null;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (latestTerm) {\n\t\t\t\t\targs.push(latestTerm);\n\t\t\t\t\tlatestTerm = null;\n\t\t\t\t}\n\n\t\t\t\tinTerm = true;\n\t\t\t\tcurrTermStart = i;\n\t\t\t}\n\t\t}\n\t\ti++;\n\t}\n\n\tif (inTerm) {\n\t\tlatestTerm = string.slice(currTermStart);\n\t}\n\n\tif (latestTerm) {\n\t\targs.push(latestTerm);\n\t}\n\n\treturn {\n\t\targs,\n\t\tcases\n\t};\n}\n\n/**\n * Finds the index of the matching closing curly bracket, including through\n * strings that could have nested brackets.\n * \n * @param {String} string\n * @param {Number} fromIndex\n * @return {Number} The index of the matching closing bracket, or -1 if no\n *   closing bracket could be found.\n */\nexport function findClosingBracket(string, fromIndex) {\n\tlet depth = 0;\n\tfor (let i = fromIndex + 1; i < string.length; i++) {\n\t\tlet char = string.charAt(i);\n\t\tif (char === '}') {\n\t\t\tif (depth === 0) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t\tdepth--;\n\t\t}\n\t\telse if (char === '{') {\n\t\t\tdepth++;\n\t\t}\n\t}\n\treturn -1;\n}\n\n/**\n * Split a `{key, type, format}` block into those 3 parts, taking into account\n * nested message syntax that can exist in the `format` part.\n * \n * @param {String} block\n * @return {Array}\n *   An array with `key`, `type`, and `format` items in that order, if present\n *   in the formatted argument block.\n */\nexport function splitFormattedArgument(block) {\n\treturn split(block.slice(1, -1), ',', 3);\n}\n\n/**\n * Like `String.prototype.split()` but where the limit parameter causes the\n * remainder of the string to be grouped together in a final entry.\n * \n * @private\n * @param {String} string\n * @param {String} separator\n * @param {Number} limit\n * @param {Array} [accumulator=[]]\n * @return {Array}\n */\nfunction split(string, separator, limit, accumulator = []) {\n\tif (!string) {\n\t\treturn accumulator;\n\t}\n\tif (limit === 1) {\n\t\taccumulator.push(string);\n\t\treturn accumulator;\n\t}\n\tlet indexOfDelimiter = string.indexOf(separator);\n\tif (indexOfDelimiter === -1) {\n\t\taccumulator.push(string);\n\t\treturn accumulator;\n\t}\n\tlet head = string.substring(0, indexOfDelimiter).trim();\n\tlet tail = string.substring(indexOfDelimiter + separator.length + 1).trim();\n\taccumulator.push(head);\n\treturn split(tail, separator, limit - 1, accumulator);\n}\n","/* \n * Copyright 2019, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {parseCases} from './utilities.js';\n\nconst OTHER = 'other';\n\n/**\n * Handler for `select` statements within ICU message syntax strings.  Returns\n * a formatted string for the branch that closely matches the current value.\n * \n * See https://formatjs.io/docs/core-concepts/icu-syntax#select-format for more\n * details on how the `select` statement works.\n * \n * @param {String} value\n * @param {String} matches\n * @param {String} locale\n * @param {String} values\n * @param {Function} format\n * @return {String}\n */\nexport default function selectTypeHandler(value, matches = '', locale, values, format) {\n\tconst { cases } = parseCases(matches);\n\n\tif (value in cases) {\n\t\treturn format(cases[value], values);\n\t}\n\telse if (OTHER in cases) {\n\t\treturn format(cases[OTHER], values);\n\t}\n\n\treturn value;\n}\n","import { unEscapeHtml } from './utilities';\n\nexport default function defaultRichHandler(tag, values, contents) {\n\treturn `<${tag}>${unEscapeHtml(contents)}</${tag}>`;\n}\n","import { MessageFormatter } from '@ultraq/icu-message-formatter';\nimport { flatten } from '@ultraq/array-utils';\n\nimport defaultRichHandler from './defaultRichHandler';\nimport { replaceRichTags, sanitizeValues } from './utilities';\n\nexport default class RichMessageFormatter extends MessageFormatter {\n\tconstructor(locale, typeHandlers = {}, richHandler = null) {\n\t\tsuper(locale, typeHandlers);\n\t\tthis.richHandler = richHandler ? richHandler : defaultRichHandler;\n\t}\n\n\trich(message, values = {}) {\n\t\tconst cleanedValues = sanitizeValues(values);\n\n\t\tconst formatted = flatten(this.process(message, cleanedValues));\n\n\t\t// TODO\n\t\t// Should be a symbol but isn't because of conversion issues.\n\t\t// We use a random string instead. \n\t\tlet sym = Math.random().toString(36) + Math.random().toString(36) + Math.random().toString(36);\n\t\tconst fakeValues = Object.fromEntries(Object.entries(values).map(([key, _value]) => [key, sym]));\n\t\tconst formattedFake = flatten(this.process(message, fakeValues));\n\t\tconst replaceFake = replaceRichTags(formattedFake, fakeValues, () => sym);\n\t\tconst originalTemplateSegmentIndices = replaceFake.map((v, i) => v === sym ? null: i).filter(i => i !== null);\n\n\t\treturn replaceRichTags(formatted, cleanedValues, this.richHandler, originalTemplateSegmentIndices);\n\t}\n}\n","/* \n * Copyright 2019, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {findClosingBracket, splitFormattedArgument} from './utilities.js';\n\nimport {flatten} from '@ultraq/array-utils';\nimport {memoize} from '@ultraq/function-utils';\n\n/**\n * The main class for formatting messages.\n * \n * @author Emanuel Rabina\n */\nexport default class MessageFormatter {\n\n\t/**\n\t * Creates a new formatter that can work using any of the custom type handlers\n\t * you register.\n\t * \n\t * @param {String} locale\n\t * @param {Object} [typeHandlers={}]\n\t *   Optional object where the keys are the names of the types to register,\n\t *   their values being the functions that will return a nicely formatted\n\t *   string for the data and locale they are given.\n\t */\n\tconstructor(locale, typeHandlers = {}) {\n\n\t\tthis.locale = locale;\n\t\tthis.typeHandlers = typeHandlers;\n\t}\n\n\t/**\n\t * Formats an ICU message syntax string using `values` for placeholder data\n\t * and any currently-registered type handlers.\n\t * \n\t * @param {String} message\n\t * @param {Object} [values={}]\n\t * @return {String}\n\t */\n\tformat = memoize((message, values = {}) => {\n\n\t\treturn flatten(this.process(message, values)).join('');\n\t})\n\n\t/**\n\t * Process an ICU message syntax string using `values` for placeholder data\n\t * and any currently-registered type handlers.  The result of this method is\n\t * an array of the component parts after they have been processed in turn by\n\t * their own type handlers.  This raw output is useful for other renderers,\n\t * eg: React where components can be used instead of being forced to return\n\t * raw strings.\n\t * \n\t * This method is used by {@link MessageFormatter#format} where it acts as a\n\t * string renderer.\n\t * \n\t * @param {String} message\n\t * @param {Object} [values={}]\n\t * @return {Array}\n\t */\n\tprocess(message, values = {}) {\n\n\t\tif (!message) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet blockStartIndex = message.indexOf('{');\n\t\tif (blockStartIndex !== -1) {\n\t\t\tlet blockEndIndex = findClosingBracket(message, blockStartIndex);\n\t\t\tif (blockEndIndex !== -1) {\n\t\t\t\tlet block = message.substring(blockStartIndex, blockEndIndex + 1);\n\t\t\t\tif (block) {\n\t\t\t\t\tlet result = [];\n\t\t\t\t\tlet head = message.substring(0, blockStartIndex);\n\t\t\t\t\tif (head) {\n\t\t\t\t\t\tresult.push(head);\n\t\t\t\t\t}\n\t\t\t\t\tlet [key, type, format] = splitFormattedArgument(block);\n\t\t\t\t\tlet body = values[key];\n\t\t\t\t\tif (body === null || body === undefined) {\n\t\t\t\t\t\tbody = '';\n\t\t\t\t\t}\n\t\t\t\t\tlet typeHandler = type && this.typeHandlers[type];\n\t\t\t\t\tresult.push(typeHandler ?\n\t\t\t\t\t\ttypeHandler(body, format, this.locale, values, this.process.bind(this)) :\n\t\t\t\t\t\tbody);\n\t\t\t\t\tlet tail = message.substring(blockEndIndex + 1);\n\t\t\t\t\tif (tail) {\n\t\t\t\t\t\tresult.push(this.process(tail, values));\n\t\t\t\t\t}\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new Error(`Unbalanced curly braces in string: \"${message}\"`);\n\t\t\t}\n\t\t}\n\t\treturn [message];\n\t}\n}\n","import { unEscapeHtml } from './utilities';\n\nexport default function mithrilRichHandler(tag, values, contents) {\n\tconst vnode = values[tag] || m(tag);\n\tlet children = unEscapeHtml(m.fragment(contents).children);\n\treturn { ...vnode, children };\n}\n","import { RichMessageFormatter, mithrilRichHandler } from '@askvortsov/rich-icu-message-formatter';\nimport { pluralTypeHandler, selectTypeHandler } from '@ultraq/icu-message-formatter';\nimport username from './helpers/username';\nimport User from './models/User';\nimport extract from './utils/extract';\n\ntype Translations = Record<string, string>;\ntype TranslatorParameters = Record<string, unknown>;\n\nexport default class Translator {\n  /**\n   * A map of translation keys to their translated values.\n   */\n  translations: Translations = {};\n\n  /**\n   * The underlying ICU MessageFormatter util.\n   */\n  protected formatter = new RichMessageFormatter(null, this.formatterTypeHandlers(), mithrilRichHandler);\n\n  /**\n   * Sets the formatter's locale to the provided value.\n   */\n  setLocale(locale: string) {\n    this.formatter.locale = locale;\n  }\n\n  /**\n   * Returns the formatter's current locale.\n   */\n  getLocale() {\n    return this.formatter.locale;\n  }\n\n  addTranslations(translations: Translations) {\n    Object.assign(this.translations, translations);\n  }\n\n  /**\n   * An extensible entrypoint for extenders to register type handlers for translations.\n   */\n  protected formatterTypeHandlers() {\n    return {\n      plural: pluralTypeHandler,\n      select: selectTypeHandler,\n    };\n  }\n\n  /**\n   * A temporary system to preprocess parameters.\n   * Should not be used by extensions.\n   * TODO: An extender will be added in v1.x.\n   *\n   * @internal\n   */\n  protected preprocessParameters(parameters: TranslatorParameters) {\n    // If we've been given a user model as one of the input parameters, then\n    // we'll extract the username and use that for the translation. In the\n    // future there should be a hook here to inspect the user and change the\n    // translation key. This will allow a gender property to determine which\n    // translation key is used.\n\n    if ('user' in parameters) {\n      const user = extract(parameters, 'user') as User;\n\n      if (!parameters.username) parameters.username = username(user);\n    }\n\n    return parameters;\n  }\n\n  trans(id: string, parameters: TranslatorParameters = {}) {\n    const translation = this.translations[id];\n\n    if (translation) {\n      parameters = this.preprocessParameters(parameters);\n      return this.formatter.rich(translation, parameters);\n    }\n\n    return id;\n  }\n}\n","import app from '../common/app';\nimport { FlarumRequestOptions } from './Application';\nimport { fireDeprecationWarning } from './helpers/fireDebugWarning';\nimport Model, { ModelData, SavedModelData } from './Model';\n\nexport interface MetaInformation {\n  [key: string]: any;\n}\n\nexport interface ApiQueryParamsSingle {\n  fields?: string[];\n  include?: string;\n  bySlug?: boolean;\n  meta?: MetaInformation;\n}\n\nexport interface ApiQueryParamsPlural {\n  fields?: string[];\n  include?: string;\n  filter?:\n    | {\n        q: string;\n      }\n    | Record<string, string>;\n  page?: {\n    near?: number;\n    offset?: number;\n    number?: number;\n    limit?: number;\n    size?: number;\n  };\n  sort?: string;\n  meta?: MetaInformation;\n}\n\nexport type ApiQueryParams = ApiQueryParamsPlural | ApiQueryParamsSingle;\n\nexport interface ApiPayloadSingle {\n  data: SavedModelData;\n  included?: SavedModelData[];\n  meta?: MetaInformation;\n}\n\nexport interface ApiPayloadPlural {\n  data: SavedModelData[];\n  included?: SavedModelData[];\n  links?: {\n    first: string;\n    next?: string;\n    prev?: string;\n  };\n  meta?: MetaInformation;\n}\n\nexport type ApiPayload = ApiPayloadSingle | ApiPayloadPlural;\n\nexport type ApiResponseSingle<M extends Model> = M & { payload: ApiPayloadSingle };\nexport type ApiResponsePlural<M extends Model> = M[] & { payload: ApiPayloadPlural };\nexport type ApiResponse<M extends Model> = ApiResponseSingle<M> | ApiResponsePlural<M>;\n\ninterface ApiQueryRequestOptions<ResponseType> extends Omit<FlarumRequestOptions<ResponseType>, 'url'> {}\n\ninterface StoreData {\n  [type: string]: Partial<Record<string, Model>>;\n}\n\nexport function payloadIsPlural(payload: ApiPayload): payload is ApiPayloadPlural {\n  return Array.isArray((payload as ApiPayloadPlural).data);\n}\n\n/**\n * The `Store` class defines a local data store, and provides methods to\n * retrieve data from the API.\n */\nexport default class Store {\n  /**\n   * The local data store. A tree of resource types to IDs, such that\n   * accessing data[type][id] will return the model for that type/ID.\n   */\n  protected data: StoreData = {};\n\n  /**\n   * The model registry. A map of resource types to the model class that\n   * should be used to represent resources of that type.\n   */\n  models: Record<string, { new (): Model }>;\n\n  constructor(models: Record<string, { new (): Model }>) {\n    this.models = models;\n  }\n\n  /**\n   * Push resources contained within an API payload into the store.\n   *\n   * @return The model(s) representing the resource(s) contained\n   *     within the 'data' key of the payload.\n   */\n  pushPayload<M extends Model>(payload: ApiPayloadSingle): ApiResponseSingle<M>;\n  pushPayload<Ms extends Model[]>(payload: ApiPayloadPlural): ApiResponsePlural<Ms[number]>;\n  pushPayload<M extends Model | Model[]>(payload: ApiPayload): ApiResponse<FlatArray<M, 1>> {\n    if (payload.included) payload.included.map(this.pushObject.bind(this));\n\n    const models = payload.data instanceof Array ? payload.data.map((o) => this.pushObject(o, false)) : this.pushObject(payload.data, false);\n    const result = models as ApiResponse<FlatArray<M, 1>>;\n\n    // Attach the original payload to the model that we give back. This is\n    // useful to consumers as it allows them to access meta information\n    // associated with their request.\n    result.payload = payload;\n\n    return result;\n  }\n\n  /**\n   * Create a model to represent a resource object (or update an existing one),\n   * and push it into the store.\n   *\n   * @param data The resource object\n   * @return The model, or null if no model class has been\n   *     registered for this resource type.\n   */\n  pushObject<M extends Model>(data: SavedModelData): M | null;\n  pushObject<M extends Model>(data: SavedModelData, allowUnregistered: false): M;\n  pushObject<M extends Model>(data: SavedModelData, allowUnregistered = true): M | null {\n    if (!this.models[data.type]) {\n      if (!allowUnregistered) {\n        setTimeout(() =>\n          fireDeprecationWarning(`Pushing object of type \\`${data.type}\\` not allowed, as type not yet registered in the store.`, '3206')\n        );\n      }\n\n      return null;\n    }\n\n    const type = (this.data[data.type] = this.data[data.type] || {});\n\n    // Necessary for TS to narrow correctly.\n    const curr = type[data.id] as M;\n    const instance = curr ? curr.pushData(data) : this.createRecord<M>(data.type, data);\n\n    type[data.id] = instance;\n    instance.exists = true;\n\n    return instance;\n  }\n\n  /**\n   * Make a request to the API to find record(s) of a specific type.\n   */\n  async find<M extends Model>(type: string, params?: ApiQueryParamsSingle): Promise<ApiResponseSingle<M>>;\n  async find<Ms extends Model[]>(type: string, params?: ApiQueryParamsPlural): Promise<ApiResponsePlural<Ms[number]>>;\n  async find<M extends Model>(\n    type: string,\n    id: string,\n    params?: ApiQueryParamsSingle,\n    options?: ApiQueryRequestOptions<ApiPayloadSingle>\n  ): Promise<ApiResponseSingle<M>>;\n  async find<Ms extends Model[]>(\n    type: string,\n    ids: string[],\n    params?: ApiQueryParamsPlural,\n    options?: ApiQueryRequestOptions<ApiPayloadPlural>\n  ): Promise<ApiResponsePlural<Ms[number]>>;\n  async find<M extends Model | Model[]>(\n    type: string,\n    idOrParams: undefined | string | string[] | ApiQueryParams,\n    query: ApiQueryParams = {},\n    options: ApiQueryRequestOptions<M extends Array<infer _T> ? ApiPayloadPlural : ApiPayloadSingle> = {}\n  ): Promise<ApiResponse<FlatArray<M, 1>>> {\n    let params = query;\n    let url = app.forum.attribute('apiUrl') + '/' + type;\n\n    if (idOrParams instanceof Array) {\n      url += '?filter[id]=' + idOrParams.join(',');\n    } else if (typeof idOrParams === 'object') {\n      params = idOrParams;\n    } else if (idOrParams) {\n      url += '/' + idOrParams;\n    }\n\n    return app\n      .request<M extends Array<infer _T> ? ApiPayloadPlural : ApiPayloadSingle>({\n        method: 'GET',\n        url,\n        params,\n        ...options,\n      })\n      .then((payload) => {\n        if (payloadIsPlural(payload)) {\n          return this.pushPayload<FlatArray<M, 1>[]>(payload);\n        } else {\n          return this.pushPayload<FlatArray<M, 1>>(payload);\n        }\n      });\n  }\n\n  /**\n   * Get a record from the store by ID.\n   */\n  getById<M extends Model>(type: string, id: string): M | undefined {\n    return this.data?.[type]?.[id] as M;\n  }\n\n  /**\n   * Get a record from the store by the value of a model attribute.\n   *\n   * @param type The resource type.\n   * @param key The name of the method on the model.\n   * @param value The value of the model attribute.\n   */\n  getBy<M extends Model, T = unknown>(type: string, key: keyof M, value: T): M | undefined {\n    // @ts-expect-error No way to do this safely, unfortunately.\n    return this.all(type).filter((model) => model[key]() === value)[0] as M;\n  }\n\n  /**\n   * Get all loaded records of a specific type.\n   */\n  all<M extends Model>(type: string): M[] {\n    const records = this.data[type];\n\n    return records ? (Object.values(records) as M[]) : [];\n  }\n\n  /**\n   * Remove the given model from the store.\n   */\n  remove(model: Model): void {\n    delete this.data[model.data.type as string][model.id() as string];\n  }\n\n  /**\n   * Create a new record of the given type.\n   *\n   * @param type The resource type\n   * @param data Any data to initialize the model with\n   */\n  createRecord<M extends Model>(type: string, data: ModelData = {}): M {\n    data.type = data.type || type;\n\n    // @ts-expect-error this will complain about initializing abstract models,\n    // but we can safely assume that all models registered with the store are\n    // not abstract.\n    return new this.models[type](data, this);\n  }\n}\n","import app from '../common/app';\nimport User from './models/User';\nimport { FlarumRequestOptions } from './Application';\n\nexport type LoginParams = {\n  /**\n   * The username/email\n   */\n  identification: string;\n  password: string;\n  remember: boolean;\n};\n\n/**\n * The `Session` class defines the current user session. It stores a reference\n * to the current authenticated user, and provides methods to log in/out.\n */\nexport default class Session {\n  /**\n   * The current authenticated user.\n   */\n  user: User | null;\n\n  /**\n   * The CSRF token.\n   */\n  csrfToken: string;\n\n  constructor(user: User | null, csrfToken: string) {\n    this.user = user;\n    this.csrfToken = csrfToken;\n  }\n\n  /**\n   * Attempt to log in a user.\n   */\n  login(body: LoginParams, options: Omit<FlarumRequestOptions<any>, 'url' | 'body' | 'method'> = {}) {\n    return app.request({\n      method: 'POST',\n      url: `${app.forum.attribute('baseUrl')}/login`,\n      body,\n      ...options,\n    });\n  }\n\n  /**\n   * Log the user out.\n   */\n  logout() {\n    window.location.href = `${app.forum.attribute('baseUrl')}/logout?token=${this.csrfToken}`;\n  }\n}\n","import { createFocusTrap } from './focusTrap';\n\n/**\n * The `Drawer` class controls the page's drawer. The drawer is the area the\n * slides out from the left on mobile devices; it contains the header and the\n * footer.\n */\nexport default class Drawer {\n  /**\n   * @type {import('./focusTrap').FocusTrap}\n   */\n  focusTrap;\n\n  /**\n   * @type {HTMLDivElement}\n   */\n  appElement;\n\n  constructor() {\n    // Set up an event handler so that whenever the content area is tapped,\n    // the drawer will close.\n    document.getElementById('content').addEventListener('click', (e) => {\n      if (this.isOpen()) {\n        e.preventDefault();\n        this.hide();\n      }\n    });\n\n    this.appElement = document.getElementById('app');\n    // Despite the `focus-trap` documentation, both `clickOutsideDeactivates`\n    // and `allowOutsideClick` are necessary so that inputs in modals triggered\n    // from the drawer's nav components can be interacted with.\n    this.focusTrap = createFocusTrap('#drawer', { allowOutsideClick: true, clickOutsideDeactivates: true });\n    this.drawerAvailableMediaQuery = window.matchMedia(\n      `(max-width: ${getComputedStyle(document.documentElement).getPropertyValue('--screen-phone-max')})`\n    );\n  }\n\n  /**\n   * Handler for the `resize` event on `window`.\n   *\n   * This is used to close the drawer when the viewport is widened past the `phone` size.\n   * At this point, the drawer turns into the standard header that we see on desktop, but\n   * the drawer is still registered as 'open' internally.\n   *\n   * This causes issues with the focus trap, resulting in focus becoming trapped within\n   * the header on desktop viewports.\n   *\n   * @internal\n   */\n  resizeHandler = ((e) => {\n    if (!e.matches && this.isOpen()) {\n      // Drawer is open but we've made window bigger, so hide it.\n      this.hide();\n    }\n  }).bind(this);\n\n  /**\n   * @internal\n   * @type {MediaQueryList}\n   */\n  drawerAvailableMediaQuery;\n\n  /**\n   * Check whether or not the drawer is currently open.\n   *\n   * @return {boolean}\n   */\n  isOpen() {\n    return this.appElement.classList.contains('drawerOpen');\n  }\n\n  /**\n   * Hide the drawer.\n   */\n  hide() {\n    /**\n     * As part of hiding the drawer, this function also ensures that the drawer\n     * correctly animates out, while ensuring it is not part of the navigation\n     * tree while off-screen.\n     *\n     * More info: https://github.com/flarum/core/pull/2666#discussion_r595381014\n     */\n\n    this.focusTrap.deactivate();\n    this.drawerAvailableMediaQuery.removeListener(this.resizeHandler);\n\n    if (!this.isOpen()) return;\n\n    const $drawer = $('#drawer');\n\n    // Used to prevent `visibility: hidden` from breaking the exit animation\n    $drawer.css('visibility', 'visible').one('transitionend', () => $drawer.css('visibility', ''));\n\n    this.appElement.classList.remove('drawerOpen');\n\n    this.$backdrop?.remove?.();\n  }\n\n  /**\n   * Show the drawer.\n   */\n  show() {\n    this.appElement.classList.add('drawerOpen');\n\n    this.drawerAvailableMediaQuery.addListener(this.resizeHandler);\n\n    this.$backdrop = $('<div/>').addClass('drawer-backdrop fade').appendTo('body').on('click', this.hide.bind(this));\n\n    requestAnimationFrame(() => {\n      this.$backdrop.addClass('in');\n\n      this.focusTrap.activate();\n    });\n  }\n}\n","import type { FlarumGenericRoute, RouteResolver } from '../Application';\nimport type Component from '../Component';\nimport DefaultResolver from '../resolvers/DefaultResolver';\n\n/**\n * The `mapRoutes` utility converts a map of named application routes into a\n * format that can be understood by Mithril, and wraps them in route resolvers\n * to provide each route with the current route name.\n *\n * @see https://mithril.js.org/route.html#signature\n */\nexport default function mapRoutes(routes: Record<string, FlarumGenericRoute>, basePath: string = '') {\n  const map: Record<\n    string,\n    RouteResolver<Record<string, unknown>, Component<{ routeName: string; [key: string]: unknown }>, Record<string, unknown>>\n  > = {};\n\n  for (const routeName in routes) {\n    const route = routes[routeName];\n\n    if ('resolver' in route) {\n      map[basePath + route.path] = route.resolver;\n    } else if ('component' in route) {\n      const resolverClass = 'resolverClass' in route ? route.resolverClass! : DefaultResolver;\n      map[basePath + route.path] = new resolverClass(route.component, routeName);\n    } else {\n      throw new Error(`Either a resolver or a component must be provided for the route [${routeName}]`);\n    }\n  }\n\n  return map;\n}\n","import type Mithril from 'mithril';\nimport type { AlertAttrs } from '../components/Alert';\n\nexport type InternalFlarumRequestOptions<ResponseType> = Mithril.RequestOptions<ResponseType> & {\n  url: string;\n};\n\nexport default class RequestError<ResponseType = string> {\n  status: number;\n  options: InternalFlarumRequestOptions<ResponseType>;\n  xhr: XMLHttpRequest;\n\n  responseText: string | null;\n  response: {\n    [key: string]: unknown;\n    errors?: {\n      detail?: string;\n      code?: string;\n      [key: string]: unknown;\n    }[];\n  } | null;\n\n  alert: AlertAttrs | null;\n\n  constructor(status: number, responseText: string | null, options: InternalFlarumRequestOptions<ResponseType>, xhr: XMLHttpRequest) {\n    this.status = status;\n    this.responseText = responseText;\n    this.options = options;\n    this.xhr = xhr;\n\n    try {\n      this.response = JSON.parse(responseText ?? 'null');\n    } catch (e) {\n      this.response = null;\n    }\n\n    this.alert = null;\n  }\n}\n","import humanTime from './humanTime';\n\nfunction updateHumanTimes() {\n  $('[data-humantime]').each(function () {\n    const $this = $(this);\n    const ago = humanTime($this.attr('datetime'));\n\n    $this.html(ago);\n  });\n}\n\n/**\n * The `liveHumanTimes` initializer sets up a loop every 1 second to update\n * timestamps rendered with the `humanTime` helper.\n */\nexport default function liveHumanTimes() {\n  setInterval(updateHumanTimes, 10000);\n}\n","/**\n * Extend an object's method by running its output through a mutating callback\n * every time it is called.\n *\n * The callback accepts the method's return value and should perform any\n * mutations directly on this value. For this reason, this function will not be\n * effective on methods which return scalar values (numbers, strings, booleans).\n *\n * Care should be taken to extend the correct object – in most cases, a class'\n * prototype will be the desired target of extension, not the class itself.\n *\n * @example <caption>Example usage of extending one method.</caption>\n * extend(Discussion.prototype, 'badges', function(badges) {\n *   // do something with `badges`\n * });\n *\n * @example <caption>Example usage of extending multiple methods.</caption>\n * extend(IndexPage.prototype, ['oncreate', 'onupdate'], function(vnode) {\n *   // something that needs to be run on creation and update\n * });\n *\n * @param object The object that owns the method\n * @param methods The name or names of the method(s) to extend\n * @param callback A callback which mutates the method's output\n */\nexport function extend<T extends Record<string, any>, K extends KeyOfType<T, Function>>(\n  object: T,\n  methods: K | K[],\n  callback: (this: T, val: ReturnType<T[K]>, ...args: Parameters<T[K]>) => void\n) {\n  const allMethods = Array.isArray(methods) ? methods : [methods];\n\n  allMethods.forEach((method: K) => {\n    const original: Function | undefined = object[method];\n\n    object[method] = function (this: T, ...args: Parameters<T[K]>) {\n      const value = original ? original.apply(this, args) : undefined;\n\n      callback.apply(this, [value, ...args]);\n\n      return value;\n    } as T[K];\n\n    Object.assign(object[method], original);\n  });\n}\n\n/**\n * Override an object's method by replacing it with a new function, so that the\n * new function will be run every time the object's method is called.\n *\n * The replacement function accepts the original method as its first argument,\n * which is like a call to `super`. Any arguments passed to the original method\n * are also passed to the replacement.\n *\n * Care should be taken to extend the correct object – in most cases, a class'\n * prototype will be the desired target of extension, not the class itself.\n *\n * @example <caption>Example usage of overriding one method.</caption>\n * override(Discussion.prototype, 'badges', function(original) {\n *   const badges = original();\n *   // do something with badges\n *   return badges;\n * });\n *\n * @example <caption>Example usage of overriding multiple methods.</caption>\n * extend(Discussion.prototype, ['oncreate', 'onupdate'], function(original, vnode) {\n *   // something that needs to be run on creation and update\n * });\n *\n * @param object The object that owns the method\n * @param methods The name or names of the method(s) to override\n * @param newMethod The method to replace it with\n */\nexport function override<T extends Record<any, any>, K extends KeyOfType<T, Function>>(\n  object: T,\n  methods: K | K[],\n  newMethod: (this: T, orig: T[K], ...args: Parameters<T[K]>) => void\n) {\n  const allMethods = Array.isArray(methods) ? methods : [methods];\n\n  allMethods.forEach((method) => {\n    const original: Function = object[method];\n\n    object[method] = function (this: T, ...args: Parameters<T[K]>) {\n      return newMethod.apply(this, [original.bind(this), ...args]);\n    } as T[K];\n\n    Object.assign(object[method], original);\n  });\n}\n","import Model from '../Model';\n\nexport default class Forum extends Model {\n  apiEndpoint() {\n    return '/';\n  }\n}\n","type RGB = { r: number; g: number; b: number };\n\nfunction hsvToRgb(h: number, s: number, v: number): RGB {\n  let r!: number;\n  let g!: number;\n  let b!: number;\n\n  const i = Math.floor(h * 6);\n  const f = h * 6 - i;\n  const p = v * (1 - s);\n  const q = v * (1 - f * s);\n  const t = v * (1 - (1 - f) * s);\n\n  switch (i % 6) {\n    case 0:\n      r = v;\n      g = t;\n      b = p;\n      break;\n    case 1:\n      r = q;\n      g = v;\n      b = p;\n      break;\n    case 2:\n      r = p;\n      g = v;\n      b = t;\n      break;\n    case 3:\n      r = p;\n      g = q;\n      b = v;\n      break;\n    case 4:\n      r = t;\n      g = p;\n      b = v;\n      break;\n    case 5:\n      r = v;\n      g = p;\n      b = q;\n      break;\n  }\n\n  return {\n    r: Math.floor(r * 255),\n    g: Math.floor(g * 255),\n    b: Math.floor(b * 255),\n  };\n}\n\n/**\n * Convert the given string to a unique color.\n */\nexport default function stringToColor(string: string): string {\n  let num = 0;\n\n  // Convert the username into a number based on the ASCII value of each\n  // character.\n  for (let i = 0; i < string.length; i++) {\n    num += string.charCodeAt(i);\n  }\n\n  // Construct a color using the remainder of that number divided by 360, and\n  // some predefined saturation and value values.\n  const hue = num % 360;\n  const rgb = hsvToRgb(hue / 360, 0.3, 0.9);\n\n  return '' + rgb.r.toString(16) + rgb.g.toString(16) + rgb.b.toString(16);\n}\n","import ColorThief, { Color } from 'color-thief-browser';\n\nimport Model from '../Model';\nimport stringToColor from '../utils/stringToColor';\nimport ItemList from '../utils/ItemList';\nimport computed from '../utils/computed';\nimport GroupBadge from '../components/GroupBadge';\nimport Mithril from 'mithril';\nimport Group from './Group';\n\nexport default class User extends Model {\n  username() {\n    return Model.attribute<string>('username').call(this);\n  }\n  slug() {\n    return Model.attribute<string>('slug').call(this);\n  }\n  displayName() {\n    return Model.attribute<string>('displayName').call(this);\n  }\n\n  email() {\n    return Model.attribute<string | undefined>('email').call(this);\n  }\n  isEmailConfirmed() {\n    return Model.attribute<boolean | undefined>('isEmailConfirmed').call(this);\n  }\n\n  password() {\n    return Model.attribute<string | undefined>('password').call(this);\n  }\n\n  avatarUrl() {\n    return Model.attribute<string | null>('avatarUrl').call(this);\n  }\n\n  preferences() {\n    return Model.attribute<Record<string, any> | null | undefined>('preferences').call(this);\n  }\n\n  groups() {\n    return Model.hasMany<Group>('groups').call(this);\n  }\n\n  isAdmin() {\n    return Model.attribute<boolean | undefined>('isAdmin').call(this);\n  }\n\n  joinTime() {\n    return Model.attribute('joinTime', Model.transformDate).call(this);\n  }\n\n  lastSeenAt() {\n    return Model.attribute('lastSeenAt', Model.transformDate).call(this);\n  }\n\n  markedAllAsReadAt() {\n    return Model.attribute('markedAllAsReadAt', Model.transformDate).call(this);\n  }\n\n  unreadNotificationCount() {\n    return Model.attribute<number | undefined>('unreadNotificationCount').call(this);\n  }\n  newNotificationCount() {\n    return Model.attribute<number | undefined>('newNotificationCount').call(this);\n  }\n\n  discussionCount() {\n    return Model.attribute<number | undefined>('discussionCount').call(this);\n  }\n  commentCount() {\n    return Model.attribute<number | undefined>('commentCount').call(this);\n  }\n\n  canEdit() {\n    return Model.attribute<boolean | undefined>('canEdit').call(this);\n  }\n  canEditCredentials() {\n    return Model.attribute<boolean | undefined>('canEditCredentials').call(this);\n  }\n  canEditGroups() {\n    return Model.attribute<boolean | undefined>('canEditGroups').call(this);\n  }\n  canDelete() {\n    return Model.attribute<boolean | undefined>('canDelete').call(this);\n  }\n\n  color() {\n    return computed<string, User>('displayName', 'avatarUrl', 'avatarColor', (displayName, avatarUrl, avatarColor) => {\n      // If we've already calculated and cached the dominant color of the user's\n      // avatar, then we can return that in RGB format. If we haven't, we'll want\n      // to calculate it. Unless the user doesn't have an avatar, in which case\n      // we generate a color from their display name.\n      if (avatarColor) {\n        return `rgb(${(avatarColor as Color).join(', ')})`;\n      } else if (avatarUrl) {\n        this.calculateAvatarColor();\n        return '';\n      }\n\n      return '#' + stringToColor(displayName as string);\n    }).call(this);\n  }\n\n  protected avatarColor: Color | null = null;\n\n  /**\n   * Check whether or not the user has been seen in the last 5 minutes.\n   */\n  isOnline(): boolean {\n    return dayjs().subtract(5, 'minutes').isBefore(this.lastSeenAt());\n  }\n\n  /**\n   * Get the Badge components that apply to this user.\n   */\n  badges(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n    const groups = this.groups();\n\n    if (groups) {\n      groups.forEach((group) => {\n        items.add(`group${group?.id()}`, <GroupBadge group={group} />);\n      });\n    }\n\n    return items;\n  }\n\n  /**\n   * Calculate the dominant color of the user's avatar. The dominant color will\n   * be set to the `avatarColor` property once it has been calculated.\n   */\n  protected calculateAvatarColor() {\n    const image = new Image();\n    const user = this;\n\n    image.addEventListener('load', function (this: HTMLImageElement) {\n      try {\n        const colorThief = new ColorThief();\n        user.avatarColor = colorThief.getColor(this);\n      } catch (e) {\n        // Completely white avatars throw errors due to a glitch in color thief\n        // See https://github.com/lokesh/color-thief/issues/40\n        if (e instanceof TypeError) {\n          user.avatarColor = [255, 255, 255];\n        } else {\n          throw e;\n        }\n      }\n      user.freshness = new Date();\n      m.redraw();\n    });\n    image.crossOrigin = 'anonymous';\n    image.src = this.avatarUrl() ?? '';\n  }\n\n  /**\n   * Update the user's preferences.\n   */\n  savePreferences(newPreferences: Record<string, unknown>): Promise<this> {\n    const preferences = this.preferences();\n\n    Object.assign(preferences ?? {}, newPreferences);\n\n    return this.save({ preferences });\n  }\n}\n","import Model from '../Model';\nimport computed from '../utils/computed';\nimport { getPlainContent } from '../utils/string';\nimport Discussion from './Discussion';\nimport User from './User';\n\nexport default class Post extends Model {\n  number() {\n    return Model.attribute<number>('number').call(this);\n  }\n  discussion() {\n    return Model.hasOne<Discussion>('discussion').call(this) as Discussion;\n  }\n\n  createdAt() {\n    return Model.attribute<Date, string>('createdAt', Model.transformDate).call(this);\n  }\n  user() {\n    return Model.hasOne<User>('user').call(this);\n  }\n\n  contentType() {\n    return Model.attribute<string | null>('contentType').call(this);\n  }\n  content() {\n    return Model.attribute<string | null | undefined>('content').call(this);\n  }\n  contentHtml() {\n    return Model.attribute<string | null | undefined>('contentHtml').call(this);\n  }\n  renderFailed() {\n    return Model.attribute<boolean | undefined>('renderFailed').call(this);\n  }\n  contentPlain() {\n    return computed<string | null | undefined>('contentHtml', (content) => {\n      if (typeof content === 'string') {\n        return getPlainContent(content);\n      }\n\n      return content as null | undefined;\n    }).call(this);\n  }\n\n  editedAt() {\n    return Model.attribute('editedAt', Model.transformDate).call(this);\n  }\n  editedUser() {\n    return Model.hasOne<User | null>('editedUser').call(this);\n  }\n  isEdited() {\n    return computed<boolean>('editedAt', (editedAt) => !!editedAt).call(this);\n  }\n\n  hiddenAt() {\n    return Model.attribute('hiddenAt', Model.transformDate).call(this);\n  }\n  hiddenUser() {\n    return Model.hasOne<User | null>('hiddenUser').call(this);\n  }\n  isHidden() {\n    return computed<boolean>('hiddenAt', (hiddenAt) => !!hiddenAt).call(this);\n  }\n\n  canEdit() {\n    return Model.attribute<boolean | undefined>('canEdit').call(this);\n  }\n  canHide() {\n    return Model.attribute<boolean | undefined>('canHide').call(this);\n  }\n  canDelete() {\n    return Model.attribute<boolean | undefined>('canDelete').call(this);\n  }\n}\n","import Model from '../Model';\nimport User from './User';\n\nexport default class Notification extends Model {\n  contentType() {\n    return Model.attribute<string>('contentType').call(this);\n  }\n  content<T = unknown>() {\n    return Model.attribute<T>('content').call(this);\n  }\n  createdAt() {\n    return Model.attribute<Date, string>('createdAt', Model.transformDate).call(this);\n  }\n\n  isRead() {\n    return Model.attribute<boolean>('isRead').call(this);\n  }\n\n  user() {\n    return Model.hasOne<User>('user').call(this);\n  }\n  fromUser() {\n    return Model.hasOne<User | null>('fromUser').call(this);\n  }\n  subject() {\n    return Model.hasOne<Model | null>('subject').call(this);\n  }\n}\n","import type Component from '../Component';\nimport Modal, { IDismissibleOptions } from '../components/Modal';\n\n/**\n * Ideally, `show` would take a higher-kinded generic, ala:\n *  `show<Attrs, C>(componentClass: C<Attrs>, attrs: Attrs): void`\n * Unfortunately, TypeScript does not support this:\n * https://github.com/Microsoft/TypeScript/issues/1213\n * Therefore, we have to use this ugly, messy workaround.\n */\ntype UnsafeModalClass = ComponentClass<any, Modal> & { get dismissibleOptions(): IDismissibleOptions; component: typeof Component.component };\n\ntype ModalItem = {\n  componentClass: UnsafeModalClass;\n  attrs?: Record<string, unknown>;\n  key: number;\n};\n\n/**\n * Class used to manage modal state.\n *\n * Accessible on the `app` object via `app.modal` property.\n */\nexport default class ModalManagerState {\n  /**\n   * @internal\n   */\n  modal: ModalItem | null = null;\n\n  /**\n   * @internal\n   */\n  modalList: ModalItem[] = [];\n\n  /**\n   * @internal\n   */\n  backdropShown: boolean = false;\n\n  /**\n   * Used to force re-initialization of modals if a modal\n   * is replaced by another of the same type.\n   */\n  private key = 0;\n\n  /**\n   * Shows a modal dialog.\n   *\n   * If `stackModal` is `true`, the modal will be shown on top of the current modal.\n   *\n   * If a value for `stackModal` is not provided, opening a new modal will close\n   * any others currently being shown for backwards compatibility.\n   *\n   * @example <caption>Show a modal</caption>\n   * app.modal.show(MyCoolModal, { attr: 'value' });\n   *\n   * @example <caption>Show a modal from a lifecycle method (`oncreate`, `view`, etc.)</caption>\n   * // This \"hack\" is needed due to quirks with nested redraws in Mithril.\n   * setTimeout(() => app.modal.show(MyCoolModal, { attr: 'value' }), 0);\n   *\n   * @example <caption>Stacking modals</caption>\n   * app.modal.show(MyCoolStackedModal, { attr: 'value' }, true);\n   */\n  show(componentClass: UnsafeModalClass, attrs: Record<string, unknown> = {}, stackModal: boolean = false): void {\n    if (!(componentClass.prototype instanceof Modal)) {\n      // This is duplicated so that if the error is caught, an error message still shows up in the debug console.\n      const invalidModalWarning = 'The ModalManager can only show Modals.';\n      console.error(invalidModalWarning);\n      throw new Error(invalidModalWarning);\n    }\n\n    this.backdropShown = true;\n    m.redraw.sync();\n\n    // We use requestAnimationFrame here, since we need to wait for the backdrop to be added\n    // to the DOM before actually adding the modal to the modal list.\n    //\n    // This is because we use RAF inside the ModalManager onupdate lifecycle hook, and if we\n    // skip this RAF call, the hook will attempt to add a focus trap as well as lock scroll\n    // onto the newly added modal before it's in the DOM, creating an extra scrollbar.\n    requestAnimationFrame(() => {\n      // Set current modal\n      this.modal = { componentClass, attrs, key: this.key++ };\n\n      // We want to stack this modal\n      if (stackModal) {\n        // Remember previously opened modal and add new modal to the modal list\n        this.modalList.push(this.modal);\n      } else {\n        // Override last modals\n        this.modalList = [this.modal];\n      }\n\n      m.redraw();\n    });\n  }\n\n  /**\n   * Closes the topmost currently open dialog, if one is open.\n   */\n  close(): void {\n    if (!this.modal) return;\n\n    // If there are two modals, remove the most recent one\n    if (this.modalList.length > 1) {\n      // Remove last modal from list\n      this.modalList.pop();\n\n      // Open last modal from list\n      this.modal = this.modalList[this.modalList.length - 1];\n    } else {\n      // Reset state\n      this.modal = null;\n      this.modalList = [];\n    }\n\n    m.redraw();\n  }\n\n  /**\n   * Checks if a modal is currently open.\n   *\n   * @return `true` if a modal dialog is currently open, otherwise `false`.\n   */\n  isModalOpen(): boolean {\n    return !!this.modal;\n  }\n}\n","import type Mithril from 'mithril';\nimport Alert, { AlertAttrs } from '../components/Alert';\n\n/**\n * Returned by `AlertManagerState.show`. Used to dismiss alerts.\n */\nexport type AlertIdentifier = number;\n\nexport type AlertArray = { [id: AlertIdentifier]: AlertState };\n\nexport interface AlertState {\n  componentClass: typeof Alert;\n  attrs: AlertAttrs;\n  children: Mithril.Children;\n}\n\nexport default class AlertManagerState {\n  protected activeAlerts: AlertArray = {};\n  protected alertId: AlertIdentifier = 0;\n\n  getActiveAlerts() {\n    return this.activeAlerts;\n  }\n\n  /**\n   * Show an Alert in the alerts area.\n   *\n   * @return The alert's ID, which can be used to dismiss the alert.\n   */\n  show(children: Mithril.Children): AlertIdentifier;\n  show(attrs: AlertAttrs, children: Mithril.Children): AlertIdentifier;\n  show(componentClass: typeof Alert, attrs: AlertAttrs, children: Mithril.Children): AlertIdentifier;\n\n  show(arg1: any, arg2?: any, arg3?: any) {\n    // Assigns variables as per the above signatures\n    let componentClass = Alert;\n    let attrs: AlertAttrs = {};\n    let children: Mithril.Children;\n\n    if (arguments.length == 1) {\n      children = arg1 as Mithril.Children;\n    } else if (arguments.length == 2) {\n      attrs = arg1 as AlertAttrs;\n      children = arg2 as Mithril.Children;\n    } else if (arguments.length == 3) {\n      componentClass = arg1 as typeof Alert;\n      attrs = arg2 as AlertAttrs;\n      children = arg3;\n    }\n\n    this.activeAlerts[++this.alertId] = { children, attrs, componentClass };\n    m.redraw();\n\n    return this.alertId;\n  }\n\n  /**\n   * Dismiss an alert.\n   */\n  dismiss(key: AlertIdentifier | null): void {\n    if (!key || !(key in this.activeAlerts)) return;\n\n    delete this.activeAlerts[key];\n    m.redraw();\n  }\n\n  /**\n   * Clear all alerts.\n   */\n  clear(): void {\n    this.activeAlerts = {};\n    m.redraw();\n  }\n}\n","import app from '../app';\n\n/**\n * Fire a Flarum error which is shown in the JS console for everyone and in an alert for the admin.\n *\n * @param userTitle: a user friendly title of the error, should be localized.\n * @param consoleTitle: an error title that goes in the console, doesn't have to be localized.\n * @param error: the error.\n */\nexport default function fireApplicationError(userTitle: string, consoleTitle: string, error: any) {\n  console.group(`%c${consoleTitle}`, 'background-color: #d83e3e; color: #ffffff; font-weight: bold;');\n  console.error(error);\n  console.groupEnd();\n\n  if (app.session?.user?.isAdmin()) {\n    app.alerts.show({ type: 'error' }, `${userTitle}`);\n  }\n}\n","import Model from '../Model';\n\nexport default class AccessToken extends Model {\n  token() {\n    return Model.attribute<string | undefined>('token').call(this);\n  }\n  userId() {\n    return Model.attribute<string>('userId').call(this);\n  }\n  title() {\n    return Model.attribute<string | null>('title').call(this);\n  }\n  type() {\n    return Model.attribute<string>('type').call(this);\n  }\n  createdAt() {\n    return Model.attribute<Date, string>('createdAt', Model.transformDate).call(this);\n  }\n  lastActivityAt() {\n    return Model.attribute<Date, string>('lastActivityAt', Model.transformDate).call(this);\n  }\n  lastIpAddress() {\n    return Model.attribute<string>('lastIpAddress').call(this);\n  }\n  device() {\n    return Model.attribute<string>('device').call(this);\n  }\n  isCurrent() {\n    return Model.attribute<boolean>('isCurrent').call(this);\n  }\n  isSessionToken() {\n    return Model.attribute<boolean>('isSessionToken').call(this);\n  }\n}\n","import app from '../common/app';\n\nimport ItemList from './utils/ItemList';\nimport Button from './components/Button';\nimport ModalManager from './components/ModalManager';\nimport AlertManager from './components/AlertManager';\nimport RequestErrorModal from './components/RequestErrorModal';\nimport Translator from './Translator';\nimport Store, { ApiPayload, ApiResponse, ApiResponsePlural, ApiResponseSingle, payloadIsPlural } from './Store';\nimport Session from './Session';\nimport extract from './utils/extract';\nimport extractText from './utils/extractText';\nimport Drawer from './utils/Drawer';\nimport mapRoutes from './utils/mapRoutes';\nimport RequestError, { InternalFlarumRequestOptions } from './utils/RequestError';\nimport ScrollListener from './utils/ScrollListener';\nimport liveHumanTimes from './utils/liveHumanTimes';\n// @ts-expect-error We need to explicitly use the prefix to distinguish between the extend folder.\nimport { extend } from './extend.ts';\n\nimport Forum from './models/Forum';\nimport User from './models/User';\nimport Discussion from './models/Discussion';\nimport Post from './models/Post';\nimport Group from './models/Group';\nimport Notification from './models/Notification';\nimport PageState from './states/PageState';\nimport ModalManagerState from './states/ModalManagerState';\nimport AlertManagerState from './states/AlertManagerState';\n\nimport type DefaultResolver from './resolvers/DefaultResolver';\nimport type Mithril from 'mithril';\nimport type Component from './Component';\nimport type { ComponentAttrs } from './Component';\nimport Model, { SavedModelData } from './Model';\nimport fireApplicationError from './helpers/fireApplicationError';\nimport IHistory from './IHistory';\nimport IExtender from './extenders/IExtender';\nimport AccessToken from './models/AccessToken';\n\nexport type FlarumScreens = 'phone' | 'tablet' | 'desktop' | 'desktop-hd';\n\nexport type FlarumGenericRoute = RouteItem<any, any, any>;\n\nexport interface FlarumRequestOptions<ResponseType> extends Omit<Mithril.RequestOptions<ResponseType>, 'extract'> {\n  errorHandler?: (error: RequestError) => void;\n  url: string;\n  // TODO: [Flarum 2.0] Remove deprecated option\n  /**\n   * Manipulate the response text before it is parsed into JSON.\n   *\n   * @deprecated Please use `modifyText` instead.\n   */\n  extract?: (responseText: string) => string;\n  /**\n   * Manipulate the response text before it is parsed into JSON.\n   *\n   * This overrides any `extract` method provided.\n   */\n  modifyText?: (responseText: string) => string;\n}\n\n/**\n * A valid route definition.\n */\nexport type RouteItem<\n  Attrs extends ComponentAttrs,\n  Comp extends Component<Attrs & { routeName: string }>,\n  RouteArgs extends Record<string, unknown> = {}\n> = {\n  /**\n   * The path for your route.\n   *\n   * This might be a specific URL path (e.g.,`/myPage`), or it might\n   * contain a variable used by a resolver (e.g., `/myPage/:id`).\n   *\n   * @see https://docs.flarum.org/extend/frontend-pages.html#route-resolvers-advanced\n   */\n  path: `/${string}`;\n} & (\n  | {\n      /**\n       * The component to render when this route matches.\n       */\n      component: new () => Comp;\n      /**\n       * A custom resolver class.\n       *\n       * This should be the class itself, and **not** an instance of the\n       * class.\n       */\n      resolverClass?: new (component: new () => Comp, routeName: string) => DefaultResolver<Attrs, Comp, RouteArgs>;\n    }\n  | {\n      /**\n       * An instance of a route resolver.\n       */\n      resolver: RouteResolver<Attrs, Comp, RouteArgs>;\n    }\n);\n\nexport interface RouteResolver<\n  Attrs extends ComponentAttrs,\n  Comp extends Component<Attrs & { routeName: string }>,\n  RouteArgs extends Record<string, unknown> = {}\n> {\n  /**\n   * A method which selects which component to render based on\n   * conditional logic.\n   *\n   * Returns the component class, and **not** a Vnode or JSX\n   * expression.\n   *\n   * @see https://mithril.js.org/route.html#routeresolveronmatch\n   */\n  onmatch(this: this, args: RouteArgs, requestedPath: string, route: string): { new (): Comp };\n  /**\n   * A function which renders the provided component.\n   *\n   * If not specified, the route will default to rendering the\n   * component on its own, inside of a fragment.\n   *\n   * Returns a Mithril Vnode or other children.\n   *\n   * @see https://mithril.js.org/route.html#routeresolverrender\n   */\n  render?(this: this, vnode: Mithril.Vnode<Attrs, Comp>): Mithril.Children;\n}\n\nexport interface ApplicationData {\n  apiDocument: ApiPayload | null;\n  locale: string;\n  locales: Record<string, string>;\n  resources: SavedModelData[];\n  session: { userId: number; csrfToken: string };\n  [key: string]: unknown;\n}\n\n/**\n * The `App` class provides a container for an application, as well as various\n * utilities for the rest of the app to use.\n */\nexport default class Application {\n  /**\n   * The forum model for this application.\n   */\n  forum!: Forum;\n\n  /**\n   * A map of routes, keyed by a unique route name. Each route is an object\n   * containing the following properties:\n   *\n   * - `path` The path that the route is accessed at.\n   * - `component` The Mithril component to render when this route is active.\n   *\n   * @example\n   * app.routes.discussion = { path: '/d/:id', component: DiscussionPage };\n   */\n  routes: Record<string, FlarumGenericRoute> = {};\n\n  /**\n   * An ordered list of initializers to bootstrap the application.\n   */\n  initializers: ItemList<(app: this) => void> = new ItemList();\n\n  /**\n   * The app's session.\n   *\n   * Stores info about the current user.\n   */\n  session!: Session;\n\n  /**\n   * The app's translator.\n   */\n  translator: Translator = new Translator();\n\n  /**\n   * The app's data store.\n   */\n  store: Store = new Store({\n    'access-tokens': AccessToken,\n    forums: Forum,\n    users: User,\n    discussions: Discussion,\n    posts: Post,\n    groups: Group,\n    notifications: Notification,\n  });\n\n  /**\n   * A local cache that can be used to store data at the application level, so\n   * that is persists between different routes.\n   */\n  cache: Record<string, unknown> = {};\n\n  /**\n   * Whether or not the app has been booted.\n   */\n  booted: boolean = false;\n\n  /**\n   * The page the app is currently on.\n   *\n   * This object holds information about the type of page we are currently\n   * visiting, and sometimes additional arbitrary page state that may be\n   * relevant to lower-level components.\n   */\n  current: PageState = new PageState(null);\n\n  /**\n   * The page the app was on before the current page.\n   *\n   * Once the application navigates to another page, the object previously\n   * assigned to this.current will be moved to this.previous, while this.current\n   * is re-initialized.\n   */\n  previous: PageState = new PageState(null);\n\n  /**\n   * An object that manages modal state.\n   */\n  modal: ModalManagerState = new ModalManagerState();\n\n  /**\n   * An object that manages the state of active alerts.\n   */\n  alerts: AlertManagerState = new AlertManagerState();\n\n  /**\n   * An object that manages the state of the navigation drawer.\n   */\n  drawer!: Drawer;\n\n  history: IHistory | null = null;\n  pane: any = null;\n\n  data!: ApplicationData;\n\n  refs: Record<string, string> = {\n    fontawesome: 'https://fontawesome.com/v5/search?o=r&m=free',\n  };\n\n  private _title: string = '';\n  private _titleCount: number = 0;\n\n  private set title(val: string) {\n    this._title = val;\n  }\n\n  get title() {\n    return this._title;\n  }\n\n  private set titleCount(val: number) {\n    this._titleCount = val;\n  }\n\n  get titleCount() {\n    return this._titleCount;\n  }\n\n  /**\n   * The key for an Alert that was shown as a result of an AJAX request error.\n   * If present, it will be dismissed on the next successful request.\n   */\n  private requestErrorAlert: number | null = null;\n\n  initialRoute!: string;\n\n  public load(payload: Application['data']) {\n    this.data = payload;\n    this.translator.setLocale(payload.locale);\n  }\n\n  public boot() {\n    const caughtInitializationErrors: CallableFunction[] = [];\n\n    this.initializers.toArray().forEach((initializer) => {\n      try {\n        initializer(this);\n      } catch (e) {\n        const extension = initializer.itemName.includes('/')\n          ? initializer.itemName.replace(/(\\/flarum-ext-)|(\\/flarum-)/g, '-')\n          : initializer.itemName;\n\n        caughtInitializationErrors.push(() =>\n          fireApplicationError(\n            extractText(app.translator.trans('core.lib.error.extension_initialiation_failed_message', { extension })),\n            `${extension} failed to initialize`,\n            e\n          )\n        );\n      }\n    });\n\n    this.store.pushPayload({ data: this.data.resources });\n\n    this.forum = this.store.getById('forums', '1')!;\n\n    this.session = new Session(this.store.getById<User>('users', String(this.data.session.userId)) ?? null, this.data.session.csrfToken);\n\n    this.mount();\n\n    this.initialRoute = window.location.href;\n\n    caughtInitializationErrors.forEach((handler) => handler());\n  }\n\n  public bootExtensions(extensions: Record<string, { extend?: IExtender[] }>) {\n    Object.keys(extensions).forEach((name) => {\n      const extension = extensions[name];\n\n      // If an extension doesn't define extenders, there's nothing more to do here.\n      if (!extension.extend) return;\n\n      const extenders = extension.extend.flat(Infinity);\n\n      for (const extender of extenders) {\n        extender.extend(this, { name, exports: extension });\n      }\n    });\n  }\n\n  protected mount(basePath: string = '') {\n    // An object with a callable view property is used in order to pass arguments to the component; see https://mithril.js.org/mount.html\n    m.mount(document.getElementById('modal')!, { view: () => <ModalManager state={this.modal} /> });\n    m.mount(document.getElementById('alerts')!, { view: () => <AlertManager state={this.alerts} /> });\n\n    this.drawer = new Drawer();\n\n    m.route(document.getElementById('content')!, basePath + '/', mapRoutes(this.routes, basePath));\n\n    const appEl = document.getElementById('app')!;\n    const appHeaderEl = document.querySelector('.App-header')!;\n\n    // Add a class to the body which indicates that the page has been scrolled\n    // down. When this happens, we'll add classes to the header and app body\n    // which will set the navbar's position to fixed. We don't want to always\n    // have it fixed, as that could overlap with custom headers.\n    const scrollListener = new ScrollListener((top: number) => {\n      const offset = appEl.getBoundingClientRect().top + document.body.scrollTop;\n\n      appEl.classList.toggle('affix', top >= offset);\n      appEl.classList.toggle('scrolled', top > offset);\n\n      appHeaderEl.classList.toggle('navbar-fixed-top', top >= offset);\n    });\n\n    scrollListener.start();\n    scrollListener.update();\n\n    document.body.classList.add('ontouchstart' in window ? 'touch' : 'no-touch');\n\n    liveHumanTimes();\n  }\n\n  /**\n   * Get the API response document that has been preloaded into the application.\n   */\n  preloadedApiDocument<M extends Model>(): ApiResponseSingle<M> | null;\n  preloadedApiDocument<Ms extends Model[]>(): ApiResponsePlural<Ms[number]> | null;\n  preloadedApiDocument<M extends Model | Model[]>(): ApiResponse<FlatArray<M, 1>> | null {\n    // If the URL has changed, the preloaded Api document is invalid.\n    if (this.data.apiDocument && window.location.href === this.initialRoute) {\n      const results = payloadIsPlural(this.data.apiDocument)\n        ? this.store.pushPayload<FlatArray<M, 1>[]>(this.data.apiDocument)\n        : this.store.pushPayload<FlatArray<M, 1>>(this.data.apiDocument);\n\n      this.data.apiDocument = null;\n\n      return results;\n    }\n\n    return null;\n  }\n\n  /**\n   * Determine the current screen mode, based on our media queries.\n   */\n  screen(): FlarumScreens {\n    const styles = getComputedStyle(document.documentElement);\n    return styles.getPropertyValue('--flarum-screen') as ReturnType<Application['screen']>;\n  }\n\n  /**\n   * Set the `<title>` of the page.\n   *\n   * @param title New page title\n   */\n  setTitle(title: string): void {\n    this.title = title;\n    this.updateTitle();\n  }\n\n  /**\n   * Set a number to display in the `<title>` of the page.\n   *\n   * @param count Number to display in title\n   */\n  setTitleCount(count: number): void {\n    this.titleCount = count;\n    this.updateTitle();\n  }\n\n  updateTitle(): void {\n    const count = this.titleCount ? `(${this.titleCount}) ` : '';\n    const onHomepage = m.route.get() === this.forum.attribute('basePath') + '/';\n\n    const params = {\n      pageTitle: this.title,\n      forumName: this.forum.attribute('title'),\n      // Until we add page numbers to the frontend, this is constant at 1\n      // so that the page number portion doesn't show up in the URL.\n      pageNumber: 1,\n    };\n\n    let title =\n      onHomepage || !this.title\n        ? extractText(app.translator.trans('core.lib.meta_titles.without_page_title', params))\n        : extractText(app.translator.trans('core.lib.meta_titles.with_page_title', params));\n\n    title = count + title;\n\n    // We pass the title through a DOMParser to allow HTML entities\n    // to be rendered correctly, while still preventing XSS attacks\n    // from user input by using a script-disabled environment.\n    // https://github.com/flarum/framework/issues/3514\n    // https://github.com/flarum/framework/pull/3684\n    // This is only a temporary solution for 1.x,\n    // and the actual source of the issue will be fixed in 2.x\n    // Actual source of the issue: https://github.com/flarum/framework/issues/3685\n    const parser = new DOMParser();\n    document.title = parser.parseFromString(title, 'text/html').body.innerText;\n  }\n\n  protected transformRequestOptions<ResponseType>(flarumOptions: FlarumRequestOptions<ResponseType>): InternalFlarumRequestOptions<ResponseType> {\n    const { background, deserialize, extract, modifyText, ...tmpOptions } = { ...flarumOptions };\n\n    // Unless specified otherwise, requests should run asynchronously in the\n    // background, so that they don't prevent redraws from occurring.\n    const defaultBackground = true;\n\n    // When we deserialize JSON data, if for some reason the server has provided\n    // a dud response, we don't want the application to crash. We'll show an\n    // error message to the user instead.\n\n    const defaultDeserialize = (response: string) => response as ResponseType;\n\n    // When extracting the data from the response, we can check the server\n    // response code and show an error message to the user if something's gone\n    // awry.\n    const originalExtract = modifyText || extract;\n\n    const options: InternalFlarumRequestOptions<ResponseType> = {\n      background: background ?? defaultBackground,\n      deserialize: deserialize ?? defaultDeserialize,\n      ...tmpOptions,\n    };\n\n    extend(options, 'config', (_: undefined, xhr: XMLHttpRequest) => {\n      xhr.setRequestHeader('X-CSRF-Token', this.session.csrfToken!);\n    });\n\n    // If the method is something like PATCH or DELETE, which not all servers\n    // and clients support, then we'll send it as a POST request with the\n    // intended method specified in the X-HTTP-Method-Override header.\n    if (options.method && !['GET', 'POST'].includes(options.method)) {\n      const method = options.method;\n\n      extend(options, 'config', (_: undefined, xhr: XMLHttpRequest) => {\n        xhr.setRequestHeader('X-HTTP-Method-Override', method);\n      });\n\n      options.method = 'POST';\n    }\n\n    options.extract = (xhr: XMLHttpRequest) => {\n      let responseText;\n\n      if (originalExtract) {\n        responseText = originalExtract(xhr.responseText);\n      } else {\n        responseText = xhr.responseText;\n      }\n\n      const status = xhr.status;\n\n      if (status < 200 || status > 299) {\n        throw new RequestError<ResponseType>(status, `${responseText}`, options, xhr);\n      }\n\n      if (xhr.getResponseHeader) {\n        const csrfToken = xhr.getResponseHeader('X-CSRF-Token');\n        if (csrfToken) app.session.csrfToken = csrfToken;\n      }\n\n      try {\n        if (responseText === '') {\n          return null;\n        }\n\n        return JSON.parse(responseText);\n      } catch (e) {\n        throw new RequestError<ResponseType>(500, `${responseText}`, options, xhr);\n      }\n    };\n\n    return options;\n  }\n\n  /**\n   * Make an AJAX request, handling any low-level errors that may occur.\n   *\n   * @see https://mithril.js.org/request.html\n   */\n  request<ResponseType>(originalOptions: FlarumRequestOptions<ResponseType>): Promise<ResponseType> {\n    const options = this.transformRequestOptions(originalOptions);\n\n    if (this.requestErrorAlert) this.alerts.dismiss(this.requestErrorAlert);\n\n    return m.request(options).catch((e) => this.requestErrorCatch(e, originalOptions.errorHandler));\n  }\n\n  /**\n   * By default, show an error alert, and log the error to the console.\n   */\n  protected requestErrorCatch<ResponseType>(error: RequestError, customErrorHandler: FlarumRequestOptions<ResponseType>['errorHandler']) {\n    // the details property is decoded to transform escaped characters such as '\\n'\n    const formattedErrors = error.response?.errors?.map((e) => decodeURI(e.detail ?? '')) ?? [];\n\n    let content;\n    switch (error.status) {\n      case 422:\n        content = formattedErrors\n          .map((detail) => [detail, <br />])\n          .flat()\n          .slice(0, -1);\n        break;\n\n      case 401:\n      case 403:\n        content = app.translator.trans('core.lib.error.permission_denied_message');\n        break;\n\n      case 404:\n      case 410:\n        content = app.translator.trans('core.lib.error.not_found_message');\n        break;\n\n      case 413:\n        content = app.translator.trans('core.lib.error.payload_too_large_message');\n        break;\n\n      case 429:\n        content = app.translator.trans('core.lib.error.rate_limit_exceeded_message');\n        break;\n\n      default:\n        if (this.requestWasCrossOrigin(error)) {\n          content = app.translator.trans('core.lib.error.generic_cross_origin_message');\n        } else {\n          content = app.translator.trans('core.lib.error.generic_message');\n        }\n    }\n\n    const isDebug: boolean = app.forum.attribute('debug');\n\n    error.alert = {\n      type: 'error',\n      content,\n      controls: isDebug && [\n        <Button className=\"Button Button--link\" onclick={this.showDebug.bind(this, error, formattedErrors)}>\n          {app.translator.trans('core.lib.debug_button')}\n        </Button>,\n      ],\n    };\n\n    if (customErrorHandler) {\n      customErrorHandler(error);\n    } else {\n      this.requestErrorDefaultHandler(error, isDebug, formattedErrors);\n    }\n\n    return Promise.reject(error);\n  }\n\n  /**\n   * Used to modify the error message shown on the page to help troubleshooting.\n   * While not certain, a failing cross-origin request likely indicates a missing redirect to Flarum canonical URL.\n   * Because XHR errors do not expose CORS information, we can only compare the requested URL origin to the page origin.\n   *\n   * @param error\n   * @protected\n   */\n  protected requestWasCrossOrigin(error: RequestError): boolean {\n    return new URL(error.options.url, document.baseURI).origin !== window.location.origin;\n  }\n\n  protected requestErrorDefaultHandler(e: unknown, isDebug: boolean, formattedErrors: string[]): void {\n    if (e instanceof RequestError) {\n      if (isDebug && e.xhr) {\n        const { method, url } = e.options;\n        const { status = '' } = e.xhr;\n\n        console.group(`${method} ${url} ${status}`);\n\n        if (formattedErrors.length) {\n          console.error(...formattedErrors);\n        } else {\n          console.error(e);\n        }\n\n        console.groupEnd();\n      }\n\n      if (e.alert) {\n        this.requestErrorAlert = this.alerts.show(e.alert, e.alert.content);\n      }\n    } else {\n      throw e;\n    }\n  }\n\n  private showDebug(error: RequestError, formattedError: string[]) {\n    if (this.requestErrorAlert !== null) this.alerts.dismiss(this.requestErrorAlert);\n\n    this.modal.show(RequestErrorModal, { error, formattedError });\n  }\n\n  /**\n   * Construct a URL to the route with the given name.\n   */\n  route(name: string, params: Record<string, unknown> = {}): string {\n    const route = this.routes[name];\n\n    if (!route) throw new Error(`Route '${name}' does not exist`);\n\n    const url = route.path.replace(/:([^\\/]+)/g, (m, key) => `${extract(params, key)}`);\n\n    // Remove falsy values in params to avoid having urls like '/?sort&q'\n    for (const key in params) {\n      if (params.hasOwnProperty(key) && !params[key]) delete params[key];\n    }\n\n    const queryString = m.buildQueryString(params as any);\n    const prefix = m.route.prefix === '' ? this.forum.attribute('basePath') : '';\n\n    return prefix + url + (queryString ? '?' + queryString : '');\n  }\n}\n","import app from '../../common/app';\nimport Component from '../Component';\nimport Button from './Button';\nimport LinkButton from './LinkButton';\nimport type Mithril from 'mithril';\nimport classList from '../utils/classList';\n\n/**\n * The `Navigation` component displays a set of navigation buttons. Typically\n * this is just a back button which pops the app's History. If the user is on\n * the root page and there is no history to pop, then in some instances it may\n * show a button that toggles the app's drawer.\n *\n * If the app has a pane, it will also include a 'pin' button which toggles the\n * pinned state of the pane.\n *\n * Accepts the following attrs:\n *\n * - `className` The name of a class to set on the root element.\n * - `drawer` Whether or not to show a button to toggle the app's drawer if\n *   there is no more history to pop.\n */\nexport default class Navigation extends Component {\n  view() {\n    const { history, pane } = app;\n\n    return (\n      <div\n        className={classList('Navigation ButtonGroup', this.attrs.className)}\n        onmouseenter={pane && pane.show.bind(pane)}\n        onmouseleave={pane && pane.onmouseleave.bind(pane)}\n      >\n        {history?.canGoBack() ? [this.getBackButton(), this.getPaneButton()] : this.getDrawerButton()}\n      </div>\n    );\n  }\n\n  /**\n   * Get the back button.\n   */\n  protected getBackButton(): Mithril.Children {\n    const { history } = app;\n    const previous = history?.getPrevious();\n\n    return (\n      <LinkButton\n        className=\"Button Navigation-back Button--icon\"\n        href={history?.backUrl()}\n        icon=\"fas fa-chevron-left\"\n        aria-label={previous?.title}\n        onclick={(e: MouseEvent) => {\n          if (e.shiftKey || e.ctrlKey || e.metaKey || e.which === 2) return;\n          e.preventDefault();\n          history?.back();\n        }}\n      />\n    );\n  }\n\n  /**\n   * Get the pane pinned toggle button.\n   */\n  protected getPaneButton(): Mithril.Children {\n    const { pane } = app;\n\n    if (!pane || !pane.active) return null;\n\n    return (\n      <Button\n        className={classList('Button Button--icon Navigation-pin', { active: pane.pinned })}\n        onclick={pane.togglePinned.bind(pane)}\n        icon=\"fas fa-thumbtack\"\n      />\n    );\n  }\n\n  /**\n   * Get the drawer toggle button.\n   */\n  protected getDrawerButton(): Mithril.Children {\n    if (!this.attrs.drawer) return null;\n\n    const { drawer } = app;\n    const user = app.session.user;\n\n    return (\n      <Button\n        className={classList('Button Button--icon Navigation-drawer', { new: user?.newNotificationCount() })}\n        onclick={(e: MouseEvent) => {\n          e.stopPropagation();\n          drawer.show();\n        }}\n        icon=\"fas fa-bars\"\n        aria-label={app.translator.trans('core.lib.nav.drawer_button')}\n      />\n    );\n  }\n}\n","import app from '../../forum/app';\nimport PaginatedListState from '../../common/states/PaginatedListState';\nimport Notification from '../../common/models/Notification';\n\nexport default class NotificationListState extends PaginatedListState<Notification> {\n  constructor() {\n    super({}, 1, 20);\n  }\n\n  get type(): string {\n    return 'notifications';\n  }\n\n  /**\n   * Load the next page of notification results.\n   */\n  load(): Promise<void> {\n    if (app.session.user?.newNotificationCount()) {\n      this.pages = [];\n      this.location = { page: 1 };\n    }\n\n    if (this.pages.length > 0) {\n      return Promise.resolve();\n    }\n\n    app.session.user?.pushAttributes({ newNotificationCount: 0 });\n\n    return super.loadNext();\n  }\n\n  /**\n   * Mark all of the notifications as read.\n   */\n  markAllAsRead() {\n    if (this.pages.length === 0) return;\n\n    app.session.user?.pushAttributes({ unreadNotificationCount: 0 });\n\n    this.pages.forEach((page) => {\n      page.items.forEach((notification) => notification.pushAttributes({ isRead: true }));\n    });\n\n    return app.request({\n      url: app.forum.attribute('apiUrl') + '/notifications/read',\n      method: 'POST',\n    });\n  }\n\n  /**\n   * Delete all of the notifications for this user.\n   */\n  deleteAll() {\n    if (this.pages.length === 0) return;\n\n    app.session.user?.pushAttributes({ unreadNotificationCount: 0 });\n\n    this.pages = [];\n\n    return app.request({\n      url: app.forum.attribute('apiUrl') + '/notifications',\n      method: 'DELETE',\n    });\n  }\n}\n","export default class SearchState {\n  protected cachedSearches: Set<string>;\n  protected value: string = '';\n\n  constructor(cachedSearches: string[] = []) {\n    this.cachedSearches = new Set(cachedSearches);\n  }\n\n  /**\n   * If we are displaying the full results of a search (not just a preview),\n   * this value should return the query that prompted that search.\n   *\n   * In this generic class, full page searching is not supported.\n   * This method should be implemented by subclasses that do support it.\n   *\n   * @see Search\n   */\n  getInitialSearch(): string {\n    return '';\n  }\n\n  getValue(): string {\n    return this.value;\n  }\n\n  setValue(value: string) {\n    this.value = value;\n  }\n\n  /**\n   * Clear the search value.\n   */\n  clear() {\n    this.setValue('');\n  }\n\n  /**\n   * Mark that we have already searched for this query so that we don't\n   * have to ping the endpoint again.\n   */\n  cache(query: string) {\n    this.cachedSearches.add(query);\n  }\n\n  /**\n   * Check if this query has been searched before.\n   */\n  isCached(query: string): boolean {\n    return this.cachedSearches.has(query);\n  }\n}\n","import app from '../../forum/app';\nimport setRouteWithForcedRefresh from '../../common/utils/setRouteWithForcedRefresh';\nimport SearchState from './SearchState';\n\ntype SearchParams = Record<string, string>;\n\nexport default class GlobalSearchState extends SearchState {\n  private initialValueSet = false;\n\n  constructor(cachedSearches = []) {\n    super(cachedSearches);\n  }\n\n  getValue(): string {\n    // If we are on a search results page, we should initialize the value\n    // from the current search, if one is present.\n    // We can't do this in the constructor, as this class is instantiated\n    // before pages are rendered, and we need app.current.\n    if (!this.initialValueSet && this.currPageProvidesSearch()) {\n      this.intializeValue();\n    }\n\n    return super.getValue();\n  }\n\n  protected intializeValue() {\n    this.setValue(this.getInitialSearch());\n    this.initialValueSet = true;\n  }\n\n  protected currPageProvidesSearch(): boolean {\n    return app.current.type && app.current.type.providesInitialSearch;\n  }\n\n  /**\n   * @inheritdoc\n   */\n  getInitialSearch(): string {\n    return this.currPageProvidesSearch() ? this.params().q : '';\n  }\n\n  /**\n   * Clear the search input and the current controller's active search.\n   */\n  clear() {\n    super.clear();\n\n    if (this.getInitialSearch()) {\n      this.clearInitialSearch();\n    } else {\n      m.redraw();\n    }\n  }\n\n  /**\n   * Redirect to the index page without a search filter. This is called when the\n   * 'x' is clicked in the search box in the header.\n   */\n  protected clearInitialSearch() {\n    const { q, ...params } = this.params();\n\n    setRouteWithForcedRefresh(app.route(app.current.get('routeName'), params));\n  }\n\n  /**\n   * Get URL parameters that stick between filter changes.\n   *\n   * This can be used to generate a link that clears filters.\n   */\n  stickyParams(): SearchParams {\n    return {\n      sort: m.route.param('sort'),\n      q: m.route.param('q'),\n    };\n  }\n\n  /**\n   * Get parameters to be used in the current page.\n   */\n  params(): SearchParams {\n    const params = this.stickyParams();\n\n    params.filter = m.route.param('filter');\n\n    return params;\n  }\n\n  /**\n   * Redirect to the index page using the given sort parameter.\n   */\n  changeSort(sort: string) {\n    const params = this.params();\n\n    if (sort === Object.keys(app.discussions.sortMap())[0]) {\n      delete params.sort;\n    } else {\n      params.sort = sort;\n    }\n\n    setRouteWithForcedRefresh(app.route(app.current.get('routeName'), params));\n  }\n}\n","/**\n * @see https://stackoverflow.com/a/31732310\n */\nexport default function isSafariMobile(): boolean {\n  return (\n    'ontouchstart' in window &&\n    navigator.vendor != null &&\n    navigator.vendor.includes('Apple') &&\n    navigator.userAgent != null &&\n    !navigator.userAgent.includes('CriOS') &&\n    !navigator.userAgent.includes('FxiOS')\n  );\n}\n","import app from './app';\n\nimport History from './utils/History';\nimport Pane from './utils/Pane';\nimport DiscussionPage from './components/DiscussionPage';\nimport SignUpModal from './components/SignUpModal';\nimport HeaderPrimary from './components/HeaderPrimary';\nimport HeaderSecondary from './components/HeaderSecondary';\nimport Composer from './components/Composer';\nimport DiscussionRenamedNotification from './components/DiscussionRenamedNotification';\nimport CommentPost from './components/CommentPost';\nimport DiscussionRenamedPost from './components/DiscussionRenamedPost';\nimport routes, { ForumRoutes, makeRouteHelpers } from './routes';\nimport alertEmailConfirmation from './utils/alertEmailConfirmation';\nimport Application, { ApplicationData } from '../common/Application';\nimport Navigation from '../common/components/Navigation';\nimport NotificationListState from './states/NotificationListState';\nimport GlobalSearchState from './states/GlobalSearchState';\nimport DiscussionListState from './states/DiscussionListState';\nimport ComposerState from './states/ComposerState';\nimport isSafariMobile from './utils/isSafariMobile';\n\nimport type Notification from './components/Notification';\nimport type Post from './components/Post';\nimport type Discussion from '../common/models/Discussion';\nimport type NotificationModel from '../common/models/Notification';\nimport type PostModel from '../common/models/Post';\nimport extractText from '../common/utils/extractText';\n\nexport interface ForumApplicationData extends ApplicationData {}\n\nexport default class ForumApplication extends Application {\n  /**\n   * A map of notification types to their components.\n   */\n  notificationComponents: Record<string, ComponentClass<{ notification: NotificationModel }, Notification<{ notification: NotificationModel }>>> = {\n    discussionRenamed: DiscussionRenamedNotification,\n  };\n\n  /**\n   * A map of post types to their components.\n   */\n  postComponents: Record<string, ComponentClass<{ post: PostModel }, Post<{ post: PostModel }>>> = {\n    comment: CommentPost,\n    discussionRenamed: DiscussionRenamedPost,\n  };\n\n  /**\n   * An object which controls the state of the page's side pane.\n   */\n  pane: Pane | null = null;\n\n  /**\n   * The app's history stack, which keeps track of which routes the user visits\n   * so that they can easily navigate back to the previous route.\n   */\n  history: History = new History();\n\n  /**\n   * An object which controls the state of the user's notifications.\n   */\n  notifications: NotificationListState = new NotificationListState();\n\n  /**\n   * An object which stores previously searched queries and provides convenient\n   * tools for retrieving and managing search values.\n   */\n  search: GlobalSearchState = new GlobalSearchState();\n\n  /**\n   * An object which controls the state of the composer.\n   */\n  composer: ComposerState = new ComposerState();\n\n  /**\n   * An object which controls the state of the cached discussion list, which\n   * is used in the index page and the slideout pane.\n   */\n  discussions: DiscussionListState = new DiscussionListState({});\n\n  route: typeof Application.prototype.route & ForumRoutes;\n\n  data!: ForumApplicationData;\n\n  constructor() {\n    super();\n\n    routes(this);\n\n    this.route = Object.assign((Object.getPrototypeOf(Object.getPrototypeOf(this)) as Application).route.bind(this), makeRouteHelpers(this));\n  }\n\n  /**\n   * @inheritdoc\n   */\n  mount() {\n    // Get the configured default route and update that route's path to be '/'.\n    // Push the homepage as the first route, so that the user will always be\n    // able to click on the 'back' button to go home, regardless of which page\n    // they started on.\n    const defaultRoute = this.forum.attribute('defaultRoute');\n    let defaultAction = 'index';\n\n    for (const i in this.routes) {\n      if (this.routes[i].path === defaultRoute) defaultAction = i;\n    }\n\n    this.routes[defaultAction].path = '/';\n    this.history.push(defaultAction, extractText(this.translator.trans('core.forum.header.back_to_index_tooltip')), '/');\n\n    this.pane = new Pane(document.getElementById('app'));\n\n    m.route.prefix = '';\n    super.mount(this.forum.attribute('basePath'));\n\n    // We mount navigation and header components after the page, so components\n    // like the back button can access the updated state when rendering.\n    m.mount(document.getElementById('app-navigation')!, { view: () => <Navigation className=\"App-backControl\" drawer /> });\n    m.mount(document.getElementById('header-navigation')!, Navigation);\n    m.mount(document.getElementById('header-primary')!, HeaderPrimary);\n    m.mount(document.getElementById('header-secondary')!, HeaderSecondary);\n    m.mount(document.getElementById('composer')!, { view: () => <Composer state={this.composer} /> });\n\n    alertEmailConfirmation(this);\n\n    // Route the home link back home when clicked. We do not want it to register\n    // if the user is opening it in a new tab, however.\n    document.getElementById('home-link')!.addEventListener('click', (e) => {\n      if (e.ctrlKey || e.metaKey || e.button === 1) return;\n      e.preventDefault();\n      app.history.home();\n\n      // Reload the current user so that their unread notification count is refreshed.\n      const userId = app.session.user?.id();\n      if (userId) {\n        app.store.find('users', userId);\n        m.redraw();\n      }\n    });\n\n    if (isSafariMobile()) {\n      $(() => {\n        $('.App').addClass('mobile-safari');\n      });\n    }\n  }\n\n  /**\n   * Check whether or not the user is currently viewing a discussion.\n   */\n  public viewingDiscussion(discussion: Discussion): boolean {\n    return this.current.matches(DiscussionPage, { discussion });\n  }\n\n  /**\n   * Callback for when an external authenticator (social login) action has\n   * completed.\n   *\n   * If the payload indicates that the user has been logged in, then the page\n   * will be reloaded. Otherwise, a SignUpModal will be opened, prefilled\n   * with the provided details.\n   */\n  public authenticationComplete(payload: Record<string, unknown>): void {\n    if (payload.loggedIn) {\n      window.location.reload();\n    } else {\n      this.modal.show(SignUpModal, payload);\n    }\n  }\n}\n","import Forum from './ForumApplication';\n\nconst app = new Forum();\n\n// @ts-expect-error We need to do this for backwards compatibility purposes.\nwindow.app = app;\n\nexport default app;\n","import IExtender, { IExtensionModule } from './IExtender';\nimport Application from '../Application';\nimport ActualModel from '../Model';\n\nexport default class Model implements IExtender {\n  private readonly model: { new (): ActualModel };\n  private callbacks: Array<() => void> = [];\n\n  public constructor(model: { new (): ActualModel }) {\n    this.model = model;\n  }\n\n  public attribute<T, O = unknown>(name: string, transform: ((attr: O) => T) | null = null): Model {\n    this.callbacks.push(() => {\n      this.model.prototype[name] = transform ? ActualModel.attribute<T, O>(name, transform) : ActualModel.attribute<T>(name);\n    });\n\n    return this;\n  }\n\n  public hasOne<M extends ActualModel>(name: string): Model {\n    this.callbacks.push(() => {\n      this.model.prototype[name] = ActualModel.hasOne<M>(name);\n    });\n\n    return this;\n  }\n\n  public hasMany<M extends ActualModel>(name: string): Model {\n    this.callbacks.push(() => {\n      this.model.prototype[name] = ActualModel.hasMany<M>(name);\n    });\n\n    return this;\n  }\n\n  extend(app: Application, extension: IExtensionModule): void {\n    for (const callback of this.callbacks) {\n      callback.call(this);\n    }\n  }\n}\n","import IExtender, { IExtensionModule } from './IExtender';\nimport Application from '../Application';\nimport ForumApplication from '../../forum/ForumApplication';\n\nexport default class PostTypes implements IExtender {\n  private postComponents: Record<string, any> = {};\n\n  /**\n   * Register a new post component type.\n   * Usually used for event posts.\n   *\n   * @param name The name of the post type.\n   * @param component The component class to render the post.\n   */\n  add(name: string, component: any): PostTypes {\n    this.postComponents[name] = component;\n\n    return this;\n  }\n\n  extend(app: Application, extension: IExtensionModule): void {\n    Object.assign((app as unknown as ForumApplication).postComponents, this.postComponents);\n  }\n}\n","import Application, { FlarumGenericRoute } from '../Application';\nimport IExtender, { IExtensionModule } from './IExtender';\n\ntype HelperRoute = (...args: any) => string;\n\nexport default class Routes implements IExtender {\n  private routes: Record<string, FlarumGenericRoute> = {};\n  private helpers: Record<string, HelperRoute> = {};\n\n  /**\n   * Add a mithril route to the application.\n   *\n   * @param name The name of the route.\n   * @param path The path of the route.\n   * @param component must extend `Page` component.\n   */\n  add(name: string, path: `/${string}`, component: any): Routes {\n    this.routes[name] = { path, component };\n\n    return this;\n  }\n\n  helper(name: string, callback: HelperRoute): Routes {\n    this.helpers[name] = callback;\n\n    return this;\n  }\n\n  extend(app: Application, extension: IExtensionModule) {\n    Object.assign(app.routes, this.routes);\n    Object.assign(app.route, this.helpers);\n  }\n}\n","import Application from '../Application';\nimport IExtender, { IExtensionModule } from './IExtender';\nimport Model from '../Model';\n\nexport default class Store implements IExtender {\n  private readonly models: { [type: string]: { new (): Model } } = {};\n\n  public add(type: string, model: { new (): Model }): Store {\n    this.models[type] = model;\n\n    return this;\n  }\n\n  extend(app: Application, extension: IExtensionModule): void {\n    for (const type in this.models) {\n      if (app.store.models[type]) {\n        throw new Error(`The model type \"${type}\" has already been registered with the class \"${app.store.models[type].name}\".`);\n      }\n\n      app.store.models[type] = this.models[type];\n    }\n  }\n}\n","import Model from './Model';\nimport PostTypes from './PostTypes';\nimport Routes from './Routes';\nimport Store from './Store';\n\nexport default {\n  Model,\n  PostTypes,\n  Routes,\n  Store,\n};\n","import { fireDeprecationWarning } from '../helpers/fireDebugWarning';\n\nconst deprecatedNotice = 'The `evented` util is deprecated and no longer supported.';\nconst deprecationIssueId = '2547';\n\n/**\n * The `evented` mixin provides methods allowing an object to trigger events,\n * running externally registered event handlers.\n *\n * @deprecated v1.2, to be removed in v2.0\n */\nexport default {\n  /**\n   * Arrays of registered event handlers, grouped by the event name.\n   *\n   * @type {Record<string, unknown>}\n   * @protected\n   *\n   * @deprecated\n   */\n  handlers: null,\n\n  /**\n   * Get all of the registered handlers for an event.\n   *\n   * @param {string} event The name of the event.\n   * @return {Function[]}\n   * @protected\n   *\n   * @deprecated\n   */\n  getHandlers(event) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    this.handlers = this.handlers || {};\n\n    this.handlers[event] = this.handlers[event] || [];\n\n    return this.handlers[event];\n  },\n\n  /**\n   * Trigger an event.\n   *\n   * @param {string} event The name of the event.\n   * @param {any[]} args Arguments to pass to event handlers.\n   *\n   * @deprecated\n   */\n  trigger(event, ...args) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    this.getHandlers(event).forEach((handler) => handler.apply(this, args));\n  },\n\n  /**\n   * Register an event handler.\n   *\n   * @param {string} event The name of the event.\n   * @param {Function} handler The function to handle the event.\n   *\n   * @deprecated\n   */\n  on(event, handler) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    this.getHandlers(event).push(handler);\n  },\n\n  /**\n   * Register an event handler so that it will run only once, and then\n   * unregister itself.\n   *\n   * @param {string} event The name of the event.\n   * @param {Function} handler The function to handle the event.\n   *\n   * @deprecated\n   */\n  one(event, handler) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    const wrapper = function () {\n      handler.apply(this, arguments);\n\n      this.off(event, wrapper);\n    };\n\n    this.getHandlers(event).push(wrapper);\n  },\n\n  /**\n   * Unregister an event handler.\n   *\n   * @param {string} event The name of the event.\n   * @param {Function} handler The function that handles the event.\n   *\n   * @deprecated\n   */\n  off(event, handler) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    const handlers = this.getHandlers(event);\n    const index = handlers.indexOf(handler);\n\n    if (index !== -1) {\n      handlers.splice(index, 1);\n    }\n  },\n};\n","/*\n * Original Copyright GitHub, Inc. Licensed under the MIT License.\n * See license text at https://github.com/github/markdown-toolbar-element/blob/master/LICENSE.\n */\n\nimport insertText, { SelectionRange } from './insertText';\n\ninterface StyleArgs {\n  prefix: string;\n  suffix: string;\n  blockPrefix: string;\n  blockSuffix: string;\n  multiline: boolean;\n  replaceNext: string;\n  prefixSpace: boolean;\n  scanFor: string;\n  surroundWithNewlines: boolean;\n  orderedList: boolean;\n  unorderedList: boolean;\n  trimFirst: boolean;\n}\n\nconst defaults: StyleArgs = {\n  prefix: '',\n  suffix: '',\n  blockPrefix: '',\n  blockSuffix: '',\n  multiline: false,\n  replaceNext: '',\n  prefixSpace: false,\n  scanFor: '',\n  surroundWithNewlines: false,\n  orderedList: false,\n  unorderedList: false,\n  trimFirst: false,\n};\n\nexport default function styleSelectedText(textarea: HTMLTextAreaElement, styleArgs: StyleArgs) {\n  // Next 2 lines are added\n  textarea.focus();\n  styleArgs = Object.assign({}, defaults, styleArgs);\n  // Prev 2 lines are added\n  const text = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n\n  let result;\n  if (styleArgs.orderedList || styleArgs.unorderedList) {\n    result = listStyle(textarea, styleArgs);\n  } else if (styleArgs.multiline && isMultipleLines(text)) {\n    result = multilineStyle(textarea, styleArgs);\n  } else {\n    result = blockStyle(textarea, styleArgs);\n  }\n\n  insertText(textarea, result);\n}\n\nfunction isMultipleLines(string: string): boolean {\n  return string.trim().split('\\n').length > 1;\n}\n\nfunction repeat(string: string, n: number): string {\n  return Array(n + 1).join(string);\n}\n\nfunction wordSelectionStart(text: string, i: number): number {\n  let index = i;\n  while (text[index] && text[index - 1] != null && !text[index - 1].match(/\\s/)) {\n    index--;\n  }\n  return index;\n}\n\nfunction wordSelectionEnd(text: string, i: number, multiline: boolean): number {\n  let index = i;\n  const breakpoint = multiline ? /\\n/ : /\\s/;\n  while (text[index] && !text[index].match(breakpoint)) {\n    index++;\n  }\n  return index;\n}\n\nfunction expandSelectionToLine(textarea: HTMLTextAreaElement) {\n  const lines = textarea.value.split('\\n');\n  let counter = 0;\n  for (let index = 0; index < lines.length; index++) {\n    const lineLength = lines[index].length + 1;\n    if (textarea.selectionStart >= counter && textarea.selectionStart < counter + lineLength) {\n      textarea.selectionStart = counter;\n    }\n    if (textarea.selectionEnd >= counter && textarea.selectionEnd < counter + lineLength) {\n      textarea.selectionEnd = counter + lineLength - 1;\n    }\n    counter += lineLength;\n  }\n}\n\nfunction expandSelectedText(textarea: HTMLTextAreaElement, prefixToUse: string, suffixToUse: string, multiline = false): string {\n  if (textarea.selectionStart === textarea.selectionEnd) {\n    textarea.selectionStart = wordSelectionStart(textarea.value, textarea.selectionStart);\n    textarea.selectionEnd = wordSelectionEnd(textarea.value, textarea.selectionEnd, multiline);\n  } else {\n    const expandedSelectionStart = textarea.selectionStart - prefixToUse.length;\n    const expandedSelectionEnd = textarea.selectionEnd + suffixToUse.length;\n    const beginsWithPrefix = textarea.value.slice(expandedSelectionStart, textarea.selectionStart) === prefixToUse;\n    const endsWithSuffix = textarea.value.slice(textarea.selectionEnd, expandedSelectionEnd) === suffixToUse;\n    if (beginsWithPrefix && endsWithSuffix) {\n      textarea.selectionStart = expandedSelectionStart;\n      textarea.selectionEnd = expandedSelectionEnd;\n    }\n  }\n  return textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n}\n\ninterface Newlines {\n  newlinesToAppend: string;\n  newlinesToPrepend: string;\n}\n\nfunction newlinesToSurroundSelectedText(textarea: HTMLTextAreaElement): Newlines {\n  const beforeSelection = textarea.value.slice(0, textarea.selectionStart);\n  const afterSelection = textarea.value.slice(textarea.selectionEnd);\n\n  const breaksBefore = beforeSelection.match(/\\n*$/);\n  const breaksAfter = afterSelection.match(/^\\n*/);\n  const newlinesBeforeSelection = breaksBefore ? breaksBefore[0].length : 0;\n  const newlinesAfterSelection = breaksAfter ? breaksAfter[0].length : 0;\n\n  let newlinesToAppend;\n  let newlinesToPrepend;\n\n  if (beforeSelection.match(/\\S/) && newlinesBeforeSelection < 2) {\n    newlinesToAppend = repeat('\\n', 2 - newlinesBeforeSelection);\n  }\n\n  if (afterSelection.match(/\\S/) && newlinesAfterSelection < 2) {\n    newlinesToPrepend = repeat('\\n', 2 - newlinesAfterSelection);\n  }\n\n  if (newlinesToAppend == null) {\n    newlinesToAppend = '';\n  }\n\n  if (newlinesToPrepend == null) {\n    newlinesToPrepend = '';\n  }\n\n  return { newlinesToAppend, newlinesToPrepend };\n}\n\nfunction blockStyle(textarea: HTMLTextAreaElement, arg: StyleArgs): SelectionRange {\n  let newlinesToAppend;\n  let newlinesToPrepend;\n\n  const { prefix, suffix, blockPrefix, blockSuffix, replaceNext, prefixSpace, scanFor, surroundWithNewlines } = arg;\n  const originalSelectionStart = textarea.selectionStart;\n  const originalSelectionEnd = textarea.selectionEnd;\n\n  let selectedText = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n  let prefixToUse = isMultipleLines(selectedText) && blockPrefix.length > 0 ? `${blockPrefix}\\n` : prefix;\n  // CHANGED\n  let suffixToUse = isMultipleLines(selectedText) && blockSuffix.length > 0 ? `\\n${blockSuffix}` : prefixToUse === prefix ? suffix : '';\n  // END CHANGED\n\n  if (prefixSpace) {\n    const beforeSelection = textarea.value[textarea.selectionStart - 1];\n    if (textarea.selectionStart !== 0 && beforeSelection != null && !beforeSelection.match(/\\s/)) {\n      prefixToUse = ` ${prefixToUse}`;\n    }\n  }\n  selectedText = expandSelectedText(textarea, prefixToUse, suffixToUse, arg.multiline);\n  let selectionStart = textarea.selectionStart;\n  let selectionEnd = textarea.selectionEnd;\n  const hasReplaceNext = replaceNext.length > 0 && suffixToUse.indexOf(replaceNext) > -1 && selectedText.length > 0;\n  if (surroundWithNewlines) {\n    const ref = newlinesToSurroundSelectedText(textarea);\n    newlinesToAppend = ref.newlinesToAppend;\n    newlinesToPrepend = ref.newlinesToPrepend;\n    prefixToUse = newlinesToAppend + prefix;\n    suffixToUse += newlinesToPrepend;\n  }\n\n  if (selectedText.startsWith(prefixToUse) && selectedText.endsWith(suffixToUse)) {\n    const replacementText = selectedText.slice(prefixToUse.length, selectedText.length - suffixToUse.length);\n    if (originalSelectionStart === originalSelectionEnd) {\n      let position = originalSelectionStart - prefixToUse.length;\n      position = Math.max(position, selectionStart);\n      position = Math.min(position, selectionStart + replacementText.length);\n      selectionStart = selectionEnd = position;\n    } else {\n      selectionEnd = selectionStart + replacementText.length;\n    }\n    return { text: replacementText, selectionStart, selectionEnd };\n  } else if (!hasReplaceNext) {\n    let replacementText = prefixToUse + selectedText + suffixToUse;\n    selectionStart = originalSelectionStart + prefixToUse.length;\n    selectionEnd = originalSelectionEnd + prefixToUse.length;\n    const whitespaceEdges = selectedText.match(/^\\s*|\\s*$/g);\n    if (arg.trimFirst && whitespaceEdges) {\n      const leadingWhitespace = whitespaceEdges[0] || '';\n      const trailingWhitespace = whitespaceEdges[1] || '';\n      replacementText = leadingWhitespace + prefixToUse + selectedText.trim() + suffixToUse + trailingWhitespace;\n      selectionStart += leadingWhitespace.length;\n      selectionEnd -= trailingWhitespace.length;\n    }\n    return { text: replacementText, selectionStart, selectionEnd };\n  } else if (scanFor.length > 0 && selectedText.match(scanFor)) {\n    suffixToUse = suffixToUse.replace(replaceNext, selectedText);\n    const replacementText = prefixToUse + suffixToUse;\n    selectionStart = selectionEnd = selectionStart + prefixToUse.length;\n    return { text: replacementText, selectionStart, selectionEnd };\n  } else {\n    const replacementText = prefixToUse + selectedText + suffixToUse;\n    selectionStart = selectionStart + prefixToUse.length + selectedText.length + suffixToUse.indexOf(replaceNext);\n    selectionEnd = selectionStart + replaceNext.length;\n    return { text: replacementText, selectionStart, selectionEnd };\n  }\n}\n\nfunction multilineStyle(textarea: HTMLTextAreaElement, arg: StyleArgs) {\n  const { prefix, suffix, blockPrefix, blockSuffix, surroundWithNewlines } = arg;\n  let text = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n  let selectionStart = textarea.selectionStart;\n  let selectionEnd = textarea.selectionEnd;\n  const lines = text.split('\\n');\n  // CHANGED\n  let prefixToUse = blockPrefix.length > 0 ? blockPrefix : prefix;\n  let suffixToUse = blockSuffix.length > 0 ? blockSuffix : prefixToUse == prefix ? suffix : '';\n  const undoStyle = lines.every((line) => line.startsWith(prefixToUse) && line.endsWith(suffixToUse));\n  // END CHANGED\n\n  if (undoStyle) {\n    text = lines.map((line) => line.slice(prefixToUse.length, line.length - suffixToUse.length)).join('\\n');\n    selectionEnd = selectionStart + text.length;\n  } else {\n    // CHANGED\n    text = lines.map((line) => prefixToUse + line + suffixToUse).join('\\n');\n    if (surroundWithNewlines || suffixToUse === '') {\n      // END CHANGED\n      const { newlinesToAppend, newlinesToPrepend } = newlinesToSurroundSelectedText(textarea);\n      selectionStart += newlinesToAppend.length;\n      selectionEnd = selectionStart + text.length;\n      text = newlinesToAppend + text + newlinesToPrepend;\n    }\n  }\n\n  return { text, selectionStart, selectionEnd };\n}\n\ninterface UndoResult {\n  text: string;\n  processed: boolean;\n}\nfunction undoOrderedListStyle(text: string): UndoResult {\n  const lines = text.split('\\n');\n  const orderedListRegex = /^\\d+\\.\\s+/;\n  const shouldUndoOrderedList = lines.every((line) => orderedListRegex.test(line));\n  let result = lines;\n  if (shouldUndoOrderedList) {\n    result = lines.map((line) => line.replace(orderedListRegex, ''));\n  }\n\n  return {\n    text: result.join('\\n'),\n    processed: shouldUndoOrderedList,\n  };\n}\n\nfunction undoUnorderedListStyle(text: string): UndoResult {\n  const lines = text.split('\\n');\n  const unorderedListPrefix = '- ';\n  const shouldUndoUnorderedList = lines.every((line) => line.startsWith(unorderedListPrefix));\n  let result = lines;\n  if (shouldUndoUnorderedList) {\n    result = lines.map((line) => line.slice(unorderedListPrefix.length, line.length));\n  }\n\n  return {\n    text: result.join('\\n'),\n    processed: shouldUndoUnorderedList,\n  };\n}\n\nfunction makePrefix(index: number, unorderedList: boolean): string {\n  if (unorderedList) {\n    return '- ';\n  } else {\n    return `${index + 1}. `;\n  }\n}\n\nfunction clearExistingListStyle(style: StyleArgs, selectedText: string): [UndoResult, UndoResult, string] {\n  let undoResultOpositeList: UndoResult;\n  let undoResult: UndoResult;\n  let pristineText;\n  if (style.orderedList) {\n    undoResult = undoOrderedListStyle(selectedText);\n    undoResultOpositeList = undoUnorderedListStyle(undoResult.text);\n    pristineText = undoResultOpositeList.text;\n  } else {\n    undoResult = undoUnorderedListStyle(selectedText);\n    undoResultOpositeList = undoOrderedListStyle(undoResult.text);\n    pristineText = undoResultOpositeList.text;\n  }\n  return [undoResult, undoResultOpositeList, pristineText];\n}\n\nfunction listStyle(textarea: HTMLTextAreaElement, style: StyleArgs): SelectionRange {\n  const noInitialSelection = textarea.selectionStart === textarea.selectionEnd;\n  let selectionStart = textarea.selectionStart;\n  let selectionEnd = textarea.selectionEnd;\n\n  // Select whole line\n  expandSelectionToLine(textarea);\n\n  const selectedText = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n\n  // If the user intent was to do an undo, we will stop after this.\n  // Otherwise, we will still undo to other list type to prevent list stacking\n  const [undoResult, undoResultOpositeList, pristineText] = clearExistingListStyle(style, selectedText);\n\n  const prefixedLines = pristineText.split('\\n').map((value, index) => {\n    return `${makePrefix(index, style.unorderedList)}${value}`;\n  });\n\n  const totalPrefixLength = prefixedLines.reduce((previousValue, _currentValue, currentIndex) => {\n    return previousValue + makePrefix(currentIndex, style.unorderedList).length;\n  }, 0);\n\n  const totalPrefixLengthOpositeList = prefixedLines.reduce((previousValue, _currentValue, currentIndex) => {\n    return previousValue + makePrefix(currentIndex, !style.unorderedList).length;\n  }, 0);\n\n  if (undoResult.processed) {\n    if (noInitialSelection) {\n      selectionStart = Math.max(selectionStart - makePrefix(0, style.unorderedList).length, 0);\n      selectionEnd = selectionStart;\n    } else {\n      selectionStart = textarea.selectionStart;\n      selectionEnd = textarea.selectionEnd - totalPrefixLength;\n    }\n    return { text: pristineText, selectionStart, selectionEnd };\n  }\n\n  const { newlinesToAppend, newlinesToPrepend } = newlinesToSurroundSelectedText(textarea);\n  const text = newlinesToAppend + prefixedLines.join('\\n') + newlinesToPrepend;\n\n  if (noInitialSelection) {\n    selectionStart = Math.max(selectionStart + makePrefix(0, style.unorderedList).length + newlinesToAppend.length, 0);\n    selectionEnd = selectionStart;\n  } else {\n    if (undoResultOpositeList.processed) {\n      selectionStart = Math.max(textarea.selectionStart + newlinesToAppend.length, 0);\n      selectionEnd = textarea.selectionEnd + newlinesToAppend.length + totalPrefixLength - totalPrefixLengthOpositeList;\n    } else {\n      selectionStart = Math.max(textarea.selectionStart + newlinesToAppend.length, 0);\n      selectionEnd = textarea.selectionEnd + newlinesToAppend.length + totalPrefixLength;\n    }\n  }\n\n  return { text, selectionStart, selectionEnd };\n}\n","export default function proxifyCompat(compat: Record<string, unknown>, namespace: string) {\n  // regex to replace common/ and NAMESPACE/ for core & core extensions\n  // and remove .js, .ts and .tsx extensions\n  // e.g. admin/utils/extract --> utils/extract\n  // e.g. tags/common/utils/sortTags --> tags/utils/sortTags\n  const regex = new RegExp(String.raw`(\\w+\\/)?(${namespace}|common)\\/`);\n  const fileExt = /(\\.js|\\.tsx?)$/;\n\n  return new Proxy(compat, {\n    get: (obj, prop: string) => obj[prop] || obj[prop.replace(regex, '$1').replace(fileExt, '')],\n  });\n}\n","export default function _taggedTemplateLiteralLoose(strings, raw) {\n  if (!raw) {\n    raw = strings.slice(0);\n  }\n  strings.raw = raw;\n  return strings;\n}","import Component from '../Component';\nimport icon from '../helpers/icon';\nimport withAttr from '../utils/withAttr';\nimport classList from '../utils/classList';\n\n/**\n * The `Select` component displays a <select> input, surrounded with some extra\n * elements for styling. It accepts the following attrs:\n *\n * - `options` A map of option values to labels.\n * - `onchange` A callback to run when the selected value is changed.\n * - `value` The value of the selected option.\n * - `disabled` Disabled state for the input.\n * - `wrapperAttrs` A map of attrs to be passed to the DOM element wrapping the `<select>`\n *\n * Other attributes are passed directly to the `<select>` element rendered to the DOM.\n */\nexport default class Select extends Component {\n  view() {\n    const {\n      options,\n      onchange,\n      value,\n      disabled,\n      className,\n      class: _class,\n\n      // Destructure the `wrapperAttrs` object to extract the `className` for passing to `classList()`\n      // `= {}` prevents errors when `wrapperAttrs` is undefined\n      wrapperAttrs: { className: wrapperClassName, class: wrapperClass, ...wrapperAttrs } = {},\n\n      ...domAttrs\n    } = this.attrs;\n\n    return (\n      <span className={classList('Select', wrapperClassName, wrapperClass)} {...wrapperAttrs}>\n        <select\n          className={classList('Select-input FormControl', className, _class)}\n          onchange={onchange ? withAttr('value', onchange.bind(this)) : undefined}\n          value={value}\n          disabled={disabled}\n          {...domAttrs}\n        >\n          {Object.keys(options).map((key) => (\n            <option value={key}>{options[key]}</option>\n          ))}\n        </select>\n        {icon('fas fa-sort', { className: 'Select-caret' })}\n      </span>\n    );\n  }\n}\n","import type Mithril from 'mithril';\n\nimport Component, { ComponentAttrs } from '../Component';\nimport classList from '../utils/classList';\nimport icon from '../helpers/icon';\n\nexport default class ColorPreviewInput extends Component {\n  view(vnode: Mithril.Vnode<ComponentAttrs, this>) {\n    const { className, id, ...attrs } = this.attrs;\n\n    attrs.type ||= 'text';\n\n    // If the input is a 3 digit hex code, convert it to 6 digits.\n    if (attrs.value.length === 4) {\n      attrs.value = attrs.value.replace(/#([a-f0-9])([a-f0-9])([a-f0-9])/, '#$1$1$2$2$3$3');\n    }\n\n    return (\n      <div className=\"ColorInput\">\n        <input className={classList('FormControl', className)} id={id} {...attrs} />\n\n        <span className=\"ColorInput-icon\" role=\"presentation\">\n          {icon('fas fa-exclamation-circle')}\n        </span>\n\n        <input className=\"ColorInput-preview\" {...attrs} type=\"color\" />\n      </div>\n    );\n  }\n}\n","import extractText from '../utils/extractText';\nimport Button from './Button';\nimport Tooltip from './Tooltip';\n\n/**\n * The `TextEditorButton` component displays a button suitable for the text\n * editor toolbar.\n *\n * Automatically creates tooltips using the Tooltip component and provided text.\n *\n * ## Attrs\n * - `title` - Tooltip for the button\n */\nexport default class TextEditorButton extends Button {\n  view(vnode) {\n    const originalView = super.view(vnode);\n\n    return <Tooltip text={this.attrs.tooltipText || extractText(vnode.children)}>{originalView}</Tooltip>;\n  }\n\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = attrs.className || 'Button Button--icon Button--link';\n    attrs.tooltipText = attrs.title;\n  }\n}\n","import * as extend from './extend';\nimport extenders from './extenders';\nimport Session from './Session';\nimport Store from './Store';\nimport BasicEditorDriver from './utils/BasicEditorDriver';\nimport bidi from './utils/bidi';\nimport evented from './utils/evented';\nimport EventEmitter from './utils/EventEmitter';\nimport KeyboardNavigatable from './utils/KeyboardNavigatable';\nimport liveHumanTimes from './utils/liveHumanTimes';\nimport ItemList from './utils/ItemList';\nimport mixin from './utils/mixin';\nimport humanTime from './utils/humanTime';\nimport computed from './utils/computed';\nimport insertText from './utils/insertText';\nimport styleSelectedText from './utils/styleSelectedText';\nimport Drawer from './utils/Drawer';\nimport * as EditorDriverInterface from './utils/EditorDriverInterface';\nimport anchorScroll from './utils/anchorScroll';\nimport RequestError from './utils/RequestError';\nimport abbreviateNumber from './utils/abbreviateNumber';\nimport escapeRegExp from './utils/escapeRegExp';\nimport * as string from './utils/string';\nimport * as ThrottleDebounce from './utils/throttleDebounce';\nimport Stream from './utils/Stream';\nimport SubtreeRetainer from './utils/SubtreeRetainer';\nimport setRouteWithForcedRefresh from './utils/setRouteWithForcedRefresh';\nimport extract from './utils/extract';\nimport ScrollListener from './utils/ScrollListener';\nimport stringToColor from './utils/stringToColor';\nimport subclassOf from './utils/subclassOf';\nimport patchMithril from './utils/patchMithril';\nimport proxifyCompat from './utils/proxifyCompat';\nimport classList from './utils/classList';\nimport extractText from './utils/extractText';\nimport formatNumber from './utils/formatNumber';\nimport mapRoutes from './utils/mapRoutes';\nimport withAttr from './utils/withAttr';\nimport * as FocusTrap from './utils/focusTrap';\nimport isDark from './utils/isDark';\nimport AccessToken from './models/AccessToken';\nimport Notification from './models/Notification';\nimport User from './models/User';\nimport Post from './models/Post';\nimport Discussion from './models/Discussion';\nimport Group from './models/Group';\nimport Forum from './models/Forum';\nimport Component from './Component';\nimport Translator from './Translator';\nimport AlertManager from './components/AlertManager';\nimport Page from './components/Page';\nimport Switch from './components/Switch';\nimport Badge from './components/Badge';\nimport LoadingIndicator from './components/LoadingIndicator';\nimport Placeholder from './components/Placeholder';\nimport Separator from './components/Separator';\nimport Dropdown from './components/Dropdown';\nimport SplitDropdown from './components/SplitDropdown';\nimport RequestErrorModal from './components/RequestErrorModal';\nimport FieldSet from './components/FieldSet';\nimport Select from './components/Select';\nimport Navigation from './components/Navigation';\nimport Alert from './components/Alert';\nimport Link from './components/Link';\nimport LinkButton from './components/LinkButton';\nimport Checkbox from './components/Checkbox';\nimport ColorPreviewInput from './components/ColorPreviewInput';\nimport ConfirmDocumentUnload from './components/ConfirmDocumentUnload';\nimport SelectDropdown from './components/SelectDropdown';\nimport ModalManager from './components/ModalManager';\nimport Button from './components/Button';\nimport Modal from './components/Modal';\nimport GroupBadge from './components/GroupBadge';\nimport TextEditor from './components/TextEditor';\nimport TextEditorButton from './components/TextEditorButton';\nimport EditUserModal from './components/EditUserModal';\nimport Tooltip from './components/Tooltip';\nimport Model from './Model';\nimport Application from './Application';\nimport fullTime from './helpers/fullTime';\nimport avatar from './helpers/avatar';\nimport fireApplicationError from './helpers/fireApplicationError';\nimport * as fireDebugWarning from './helpers/fireDebugWarning';\nimport icon from './helpers/icon';\nimport humanTimeHelper from './helpers/humanTime';\nimport punctuateSeries from './helpers/punctuateSeries';\nimport highlight from './helpers/highlight';\nimport username from './helpers/username';\nimport userOnline from './helpers/userOnline';\nimport listItems from './helpers/listItems';\nimport textContrastClass from './helpers/textContrastClass';\nimport Fragment from './Fragment';\nimport DefaultResolver from './resolvers/DefaultResolver';\nimport PaginatedListState from './states/PaginatedListState';\nimport isObject from './utils/isObject';\nimport AlertManagerState from './states/AlertManagerState';\nimport ModalManagerState from './states/ModalManagerState';\nimport PageState from './states/PageState';\nimport LabelValue from './components/LabelValue';\nimport IPAddress from './components/IPAddress';\n\nexport default {\n  extenders,\n  extend: extend,\n  Session: Session,\n  Store: Store,\n  'utils/BasicEditorDriver': BasicEditorDriver,\n  'utils/bidi': bidi,\n  'utils/evented': evented,\n  'utils/EventEmitter': EventEmitter,\n  'utils/KeyboardNavigatable': KeyboardNavigatable,\n  'utils/liveHumanTimes': liveHumanTimes,\n  'utils/ItemList': ItemList,\n  'utils/mixin': mixin,\n  'utils/humanTime': humanTime,\n  'utils/computed': computed,\n  'utils/insertText': insertText,\n  'utils/styleSelectedText': styleSelectedText,\n  'utils/Drawer': Drawer,\n  'utils/EditorDriverInterface': EditorDriverInterface,\n  'utils/anchorScroll': anchorScroll,\n  'utils/RequestError': RequestError,\n  'utils/abbreviateNumber': abbreviateNumber,\n  'utils/string': string,\n  'utils/SubtreeRetainer': SubtreeRetainer,\n  'utils/escapeRegExp': escapeRegExp,\n  'utils/extract': extract,\n  'utils/ScrollListener': ScrollListener,\n  'utils/stringToColor': stringToColor,\n  'utils/Stream': Stream,\n  'utils/subclassOf': subclassOf,\n  'utils/setRouteWithForcedRefresh': setRouteWithForcedRefresh,\n  'utils/patchMithril': patchMithril,\n  'utils/proxifyCompat': proxifyCompat,\n  'utils/classList': classList,\n  'utils/extractText': extractText,\n  'utils/formatNumber': formatNumber,\n  'utils/mapRoutes': mapRoutes,\n  'utils/withAttr': withAttr,\n  'utils/throttleDebounce': ThrottleDebounce,\n  'utils/isObject': isObject,\n  'utils/focusTrap': FocusTrap,\n  'utils/isDark': isDark,\n  'models/AccessToken': AccessToken,\n  'models/Notification': Notification,\n  'models/User': User,\n  'models/Post': Post,\n  'models/Discussion': Discussion,\n  'models/Group': Group,\n  'models/Forum': Forum,\n  Component: Component,\n  Fragment: Fragment,\n  Translator: Translator,\n  'components/AlertManager': AlertManager,\n  'components/Page': Page,\n  'components/Switch': Switch,\n  'components/Badge': Badge,\n  'components/LoadingIndicator': LoadingIndicator,\n  'components/Placeholder': Placeholder,\n  'components/Separator': Separator,\n  'components/Dropdown': Dropdown,\n  'components/SplitDropdown': SplitDropdown,\n  'components/RequestErrorModal': RequestErrorModal,\n  'components/FieldSet': FieldSet,\n  'components/Select': Select,\n  'components/Navigation': Navigation,\n  'components/Alert': Alert,\n  'components/Link': Link,\n  'components/LinkButton': LinkButton,\n  'components/Checkbox': Checkbox,\n  'components/ColorPreviewInput': ColorPreviewInput,\n  'components/ConfirmDocumentUnload': ConfirmDocumentUnload,\n  'components/SelectDropdown': SelectDropdown,\n  'components/ModalManager': ModalManager,\n  'components/Button': Button,\n  'components/Modal': Modal,\n  'components/GroupBadge': GroupBadge,\n  'components/TextEditor': TextEditor,\n  'components/TextEditorButton': TextEditorButton,\n  'components/Tooltip': Tooltip,\n  'components/EditUserModal': EditUserModal,\n  'components/LabelValue': LabelValue,\n  'components/IPAddress': IPAddress,\n  Model: Model,\n  Application: Application,\n  'helpers/fullTime': fullTime,\n  'helpers/avatar': avatar,\n  'helpers/fireApplicationError': fireApplicationError,\n  'helpers/fireDebugWarning': fireDebugWarning,\n  'helpers/icon': icon,\n  'helpers/humanTime': humanTimeHelper,\n  'helpers/punctuateSeries': punctuateSeries,\n  'helpers/highlight': highlight,\n  'helpers/username': username,\n  'helpers/userOnline': userOnline,\n  'helpers/listItems': listItems,\n  'helpers/textContrastClass': textContrastClass,\n  'resolvers/DefaultResolver': DefaultResolver,\n  'states/PaginatedListState': PaginatedListState,\n  'states/AlertManagerState': AlertManagerState,\n  'states/ModalManagerState': ModalManagerState,\n  'states/PageState': PageState,\n};\n","/**\n * The `mixin` utility assigns the properties of a set of 'mixin' objects to\n * the prototype of a parent object.\n *\n * @example\n * class MyClass extends mixin(ExistingClass, evented, etc) {}\n *\n * @param {object} Parent The class to extend the new class from.\n * @param {Record<string, any>[]} mixins The objects to mix in.\n * @return {object} A new class that extends Parent and contains the mixins.\n */\nexport default function mixin(Parent, ...mixins) {\n  class Mixed extends Parent {}\n\n  mixins.forEach((object) => {\n    Object.assign(Mixed.prototype, object);\n  });\n\n  return Mixed;\n}\n","import type Mithril from 'mithril';\n\n/**\n * The `Fragment` class represents a chunk of DOM that is rendered once with Mithril and then takes\n * over control of its own DOM and lifecycle.\n *\n * This is very similar to the `Component` wrapper class, but is used for more fine-grained control over\n * the rendering and display of some significant chunks of the DOM. In contrast to components, fragments\n * do not offer Mithril's lifecycle hooks.\n *\n * Use this when you want to enjoy the benefits of JSX / VDOM for initial rendering, combined with\n * small helper methods that then make updates to that DOM directly, instead of fully redrawing\n * everything through Mithril.\n *\n * This should only be used when necessary, and only with `m.render`. If you are unsure whether you need\n * this or `Component, you probably need `Component`.\n */\nexport default abstract class Fragment {\n  /**\n   * The root DOM element for the fragment.\n   */\n  protected element!: Element;\n\n  /**\n   * Returns a jQuery object for this fragment's element. If you pass in a\n   * selector string, this method will return a jQuery object, using the current\n   * element as its buffer.\n   *\n   * For example, calling `fragment.$('li')` will return a jQuery object\n   * containing all of the `li` elements inside the DOM element of this\n   * fragment.\n   *\n   * @param [selector] a jQuery-compatible selector string\n   * @returns the jQuery object for the DOM node\n   * @final\n   */\n  public $(selector?: string): JQuery {\n    const $element = $(this.element) as JQuery<HTMLElement>;\n\n    return selector ? $element.find(selector) : $element;\n  }\n\n  /**\n   * Get the renderable virtual DOM that represents the fragment's view.\n   *\n   * This should NOT be overridden by subclasses. Subclasses wishing to define\n   * their virtual DOM should override Fragment#view instead.\n   *\n   * @example\n   * const fragment = new MyFragment();\n   * m.render(document.body, fragment.render());\n   *\n   * @final\n   */\n  public render(): Mithril.Vnode<Mithril.Attributes, this> {\n    const vdom = this.view();\n\n    vdom.attrs = vdom.attrs || {};\n\n    const originalOnCreate = vdom.attrs.oncreate;\n\n    vdom.attrs.oncreate = (vnode) => {\n      this.element = vnode.dom;\n      if (originalOnCreate) originalOnCreate.apply(this, [vnode]);\n    };\n\n    return vdom;\n  }\n\n  /**\n   * Creates a view out of virtual elements.\n   */\n  abstract view(): Mithril.Vnode<Mithril.Attributes, this>;\n}\n","import app from '../../common/app';\n\n/**\n * The `punctuateSeries` helper formats a list of strings (e.g. names) to read\n * fluently in the application's locale.\n *\n * ```js\n * punctuateSeries(['Toby', 'Franz', 'Dominion']) // Toby, Franz, and Dominion\n * ```\n *\n * @param {import('mithril').Children[]} items\n * @return {import('mithril').Children}')}\n */\nexport default function punctuateSeries(items) {\n  if (items.length === 2) {\n    return app.translator.trans('core.lib.series.two_text', {\n      first: items[0],\n      second: items[1],\n    });\n  } else if (items.length >= 3) {\n    // If there are three or more items, we will join all but the first and\n    // last items with the equivalent of a comma, and then we will feed that\n    // into the translator along with the first and last item.\n    const second = items\n      .slice(1, items.length - 1)\n      .reduce((list, item) => list.concat([item, app.translator.trans('core.lib.series.glue_text')]), [])\n      .slice(0, -1);\n\n    return app.translator.trans('core.lib.series.three_text', {\n      first: items[0],\n      second,\n      third: items[items.length - 1],\n    });\n  }\n\n  return items;\n}\n","import app from '../../forum/app';\nimport Button from '../../common/components/Button';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `LogInButton` component displays a social login button which will open\n * a popup window containing the specified path.\n *\n * ### Attrs\n *\n * - `path`\n */\nexport default class LogInButton extends Button {\n  static initAttrs(attrs) {\n    attrs.className = classList(attrs.className, 'LogInButton');\n\n    attrs.onclick = function () {\n      const width = 580;\n      const height = 400;\n      const $window = $(window);\n\n      window.open(\n        app.forum.attribute('baseUrl') + attrs.path,\n        'logInPopup',\n        `width=${width},` +\n          `height=${height},` +\n          `top=${$window.height() / 2 - height / 2},` +\n          `left=${$window.width() / 2 - width / 2},` +\n          'status=no,scrollbars=yes,resizable=no'\n      );\n    };\n\n    super.initAttrs(attrs);\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport Link from '../../common/components/Link';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport highlight from '../../common/helpers/highlight';\n\n/**\n * The `PostPreview` component shows a link to a post containing the avatar and\n * username of the author, and a short excerpt of the post's content.\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class PostPreview extends Component {\n  view() {\n    const post = this.attrs.post;\n    const user = post.user();\n\n    return (\n      <Link className=\"PostPreview\" href={app.route.post(post)} onclick={this.attrs.onclick}>\n        <span className=\"PostPreview-content\">\n          {avatar(user)}\n          {username(user)} <span className=\"PostPreview-excerpt\">{this.excerpt()}</span>\n        </span>\n      </Link>\n    );\n  }\n\n  /**\n   * @returns {string|undefined|null}\n   */\n  content() {\n    return this.attrs.post.contentType() === 'comment' && this.attrs.post.contentPlain();\n  }\n\n  /**\n   * @returns {string}\n   */\n  excerpt() {\n    return this.content() ? highlight(this.content(), this.attrs.highlight, 300) : '';\n  }\n}\n","import compat from '../common/compat';\n\nimport PostControls from './utils/PostControls';\nimport KeyboardNavigatable from '../common/utils/KeyboardNavigatable';\nimport slidable from './utils/slidable';\nimport History from './utils/History';\nimport DiscussionControls from './utils/DiscussionControls';\nimport alertEmailConfirmation from './utils/alertEmailConfirmation';\nimport UserControls from './utils/UserControls';\nimport Pane from './utils/Pane';\nimport ComposerState from './states/ComposerState';\nimport DiscussionListState from './states/DiscussionListState';\nimport GlobalSearchState from './states/GlobalSearchState';\nimport NotificationListState from './states/NotificationListState';\nimport PostStreamState from './states/PostStreamState';\nimport SearchState from './states/SearchState';\nimport UserSecurityPageState from './states/UserSecurityPageState';\nimport AffixedSidebar from './components/AffixedSidebar';\nimport DiscussionPage from './components/DiscussionPage';\nimport DiscussionListPane from './components/DiscussionListPane';\nimport LogInModal from './components/LogInModal';\nimport NewAccessTokenModal from './components/NewAccessTokenModal';\nimport ComposerBody from './components/ComposerBody';\nimport ForgotPasswordModal from './components/ForgotPasswordModal';\nimport Notification from './components/Notification';\nimport LogInButton from './components/LogInButton';\nimport DiscussionsUserPage from './components/DiscussionsUserPage';\nimport Composer from './components/Composer';\nimport SessionDropdown from './components/SessionDropdown';\nimport HeaderPrimary from './components/HeaderPrimary';\nimport PostEdited from './components/PostEdited';\nimport PostStream from './components/PostStream';\nimport ChangePasswordModal from './components/ChangePasswordModal';\nimport IndexPage from './components/IndexPage';\nimport DiscussionRenamedNotification from './components/DiscussionRenamedNotification';\nimport DiscussionsSearchSource from './components/DiscussionsSearchSource';\nimport HeaderSecondary from './components/HeaderSecondary';\nimport ComposerButton from './components/ComposerButton';\nimport DiscussionList from './components/DiscussionList';\nimport ReplyPlaceholder from './components/ReplyPlaceholder';\nimport AvatarEditor from './components/AvatarEditor';\nimport Post from './components/Post';\nimport SettingsPage from './components/SettingsPage';\nimport TerminalPost from './components/TerminalPost';\nimport ChangeEmailModal from './components/ChangeEmailModal';\nimport NotificationsDropdown from './components/NotificationsDropdown';\nimport UserPage from './components/UserPage';\nimport PostUser from './components/PostUser';\nimport UserCard from './components/UserCard';\nimport UsersSearchSource from './components/UsersSearchSource';\nimport UserSecurityPage from './components/UserSecurityPage';\nimport NotificationGrid from './components/NotificationGrid';\nimport PostPreview from './components/PostPreview';\nimport EventPost from './components/EventPost';\nimport DiscussionHero from './components/DiscussionHero';\nimport PostMeta from './components/PostMeta';\nimport DiscussionRenamedPost from './components/DiscussionRenamedPost';\nimport DiscussionComposer from './components/DiscussionComposer';\nimport LogInButtons from './components/LogInButtons';\nimport NotificationList from './components/NotificationList';\nimport WelcomeHero from './components/WelcomeHero';\nimport SignUpModal from './components/SignUpModal';\nimport CommentPost from './components/CommentPost';\nimport ComposerPostPreview from './components/ComposerPostPreview';\nimport ReplyComposer from './components/ReplyComposer';\nimport NotificationsPage from './components/NotificationsPage';\nimport PostStreamScrubber from './components/PostStreamScrubber';\nimport EditPostComposer from './components/EditPostComposer';\nimport RenameDiscussionModal from './components/RenameDiscussionModal';\nimport Search from './components/Search';\nimport DiscussionListItem from './components/DiscussionListItem';\nimport LoadingPost from './components/LoadingPost';\nimport PostsUserPage from './components/PostsUserPage';\nimport DiscussionPageResolver from './resolvers/DiscussionPageResolver';\nimport BasicEditorDriver from '../common/utils/BasicEditorDriver';\nimport routes from './routes';\nimport ForumApplication from './ForumApplication';\nimport isSafariMobile from './utils/isSafariMobile';\nimport AccessTokensList from './components/AccessTokensList';\nimport DiscussionsSearchItem from './components/DiscussionsSearchItem';\n\nexport default Object.assign(compat, {\n  'utils/PostControls': PostControls,\n  // @deprecated import from 'flarum/common/utils/KeyboardNavigatable' instead\n  'utils/KeyboardNavigatable': KeyboardNavigatable,\n  'utils/slidable': slidable,\n  'utils/History': History,\n  'utils/DiscussionControls': DiscussionControls,\n  'utils/alertEmailConfirmation': alertEmailConfirmation,\n  'utils/UserControls': UserControls,\n  'utils/Pane': Pane,\n  'utils/BasicEditorDriver': BasicEditorDriver,\n  'utils/isSafariMobile': isSafariMobile,\n  'states/ComposerState': ComposerState,\n  'states/DiscussionListState': DiscussionListState,\n  'states/GlobalSearchState': GlobalSearchState,\n  'states/NotificationListState': NotificationListState,\n  'states/PostStreamState': PostStreamState,\n  'states/SearchState': SearchState,\n  'states/UserSecurityPageState': UserSecurityPageState,\n  'components/AffixedSidebar': AffixedSidebar,\n  'components/DiscussionPage': DiscussionPage,\n  'components/DiscussionListPane': DiscussionListPane,\n  'components/LogInModal': LogInModal,\n  'components/NewAccessTokenModal': NewAccessTokenModal,\n  'components/ComposerBody': ComposerBody,\n  'components/ForgotPasswordModal': ForgotPasswordModal,\n  'components/Notification': Notification,\n  'components/LogInButton': LogInButton,\n  'components/DiscussionsUserPage': DiscussionsUserPage,\n  'components/Composer': Composer,\n  'components/SessionDropdown': SessionDropdown,\n  'components/HeaderPrimary': HeaderPrimary,\n  'components/PostEdited': PostEdited,\n  'components/PostStream': PostStream,\n  'components/ChangePasswordModal': ChangePasswordModal,\n  'components/IndexPage': IndexPage,\n  'components/DiscussionRenamedNotification': DiscussionRenamedNotification,\n  'components/DiscussionsSearchSource': DiscussionsSearchSource,\n  'components/DiscussionsSearchItem': DiscussionsSearchItem,\n  'components/HeaderSecondary': HeaderSecondary,\n  'components/ComposerButton': ComposerButton,\n  'components/DiscussionList': DiscussionList,\n  'components/ReplyPlaceholder': ReplyPlaceholder,\n  'components/AvatarEditor': AvatarEditor,\n  'components/Post': Post,\n  'components/SettingsPage': SettingsPage,\n  'components/TerminalPost': TerminalPost,\n  'components/ChangeEmailModal': ChangeEmailModal,\n  'components/NotificationsDropdown': NotificationsDropdown,\n  'components/UserPage': UserPage,\n  'components/PostUser': PostUser,\n  'components/UserCard': UserCard,\n  'components/UsersSearchSource': UsersSearchSource,\n  'components/UserSecurityPage': UserSecurityPage,\n  'components/NotificationGrid': NotificationGrid,\n  'components/PostPreview': PostPreview,\n  'components/EventPost': EventPost,\n  'components/DiscussionHero': DiscussionHero,\n  'components/PostMeta': PostMeta,\n  'components/DiscussionRenamedPost': DiscussionRenamedPost,\n  'components/DiscussionComposer': DiscussionComposer,\n  'components/LogInButtons': LogInButtons,\n  'components/NotificationList': NotificationList,\n  'components/WelcomeHero': WelcomeHero,\n  'components/SignUpModal': SignUpModal,\n  'components/CommentPost': CommentPost,\n  'components/ComposerPostPreview': ComposerPostPreview,\n  'components/ReplyComposer': ReplyComposer,\n  'components/NotificationsPage': NotificationsPage,\n  'components/PostStreamScrubber': PostStreamScrubber,\n  'components/EditPostComposer': EditPostComposer,\n  'components/RenameDiscussionModal': RenameDiscussionModal,\n  'components/Search': Search,\n  'components/DiscussionListItem': DiscussionListItem,\n  'components/LoadingPost': LoadingPost,\n  'components/PostsUserPage': PostsUserPage,\n  'components/AccessTokensList': AccessTokensList,\n  'resolvers/DiscussionPageResolver': DiscussionPageResolver,\n  routes: routes,\n  ForumApplication: ForumApplication,\n});\n","// Expose punycode and ColorThief to the window browser object\nimport 'expose-loader?exposes=punycode!punycode';\nimport 'expose-loader?exposes=ColorThief!color-thief-browser';\n\nimport app from './app';\n\nexport { app };\n\n// Export compat API\nimport compatObj from './compat';\nimport proxifyCompat from '../common/utils/proxifyCompat';\n\n// @ts-ignore\ncompatObj.app = app;\n\nexport const compat = proxifyCompat(compatObj, 'forum');\n"],"names":["Array","prototype","flat","depth","reduce","call","this","acc","val","concat","isArray","$","Affix","element","options","extend","DEFAULTS","target","document","find","$target","on","proxy","checkPosition","checkPositionWithEventLoop","$element","affixed","unpin","pinnedOffset","Plugin","option","each","$this","data","VERSION","RESET","offset","window","getState","scrollHeight","height","offsetTop","offsetBottom","scrollTop","position","targetHeight","top","initializing","colliderTop","getPinnedOffset","removeClass","addClass","setTimeout","is","bottom","Math","max","body","affix","css","affixType","e","Event","trigger","isDefaultPrevented","replace","old","fn","Constructor","noConflict","$spy","jQuery","toggle","Dropdown","getParent","selector","attr","test","$parent","length","parent","clearMenus","which","remove","relatedTarget","hasClass","type","tagName","contains","isActive","documentElement","closest","createElement","insertAfter","toggleClass","keydown","preventDefault","stopPropagation","$items","index","eq","dropdown","DISALLOWED_ATTRIBUTES","uriAttrs","SAFE_URL_PATTERN","DATA_URL_PATTERN","allowedAttribute","allowedAttributeList","attrName","nodeName","toLowerCase","inArray","Boolean","nodeValue","match","regExp","filter","value","RegExp","i","l","sanitizeHtml","unsafeHtml","whiteList","sanitizeFn","implementation","createHTMLDocument","createdDocument","innerHTML","whitelistKeys","map","el","elements","len","elName","attributeList","attributes","whitelistedAttributes","j","len2","removeAttribute","parentNode","removeChild","Tooltip","enabled","timeout","hoverState","inState","init","TRANSITION_DURATION","animation","placement","template","title","delay","html","container","viewport","padding","sanitize","a","area","b","br","col","code","div","em","hr","h1","h2","h3","h4","h5","h6","img","li","ol","p","pre","s","small","span","sub","sup","strong","u","ul","getOptions","$viewport","isFunction","click","hover","focus","constructor","Error","triggers","split","eventIn","eventOut","enter","leave","_options","fixTitle","getDefaults","dataAttributes","dataAttr","hasOwnProperty","show","hide","getDelegateOptions","defaults","key","obj","self","currentTarget","tip","clearTimeout","isInStateTrue","hasContent","inDom","ownerDocument","that","$tip","tipId","getUID","setContent","autoToken","autoPlace","detach","left","display","appendTo","pos","getPosition","actualWidth","offsetWidth","actualHeight","offsetHeight","orgPlacement","viewportDim","right","width","calculatedOffset","getCalculatedOffset","applyPlacement","complete","prevHoverState","support","transition","one","emulateTransitionEnd","marginTop","parseInt","marginLeft","isNaN","setOffset","using","props","round","delta","getViewportAdjustedDelta","isVertical","arrowDelta","arrowOffsetPosition","replaceArrow","dimension","arrow","getTitle","text","callback","removeAttr","$e","isBody","elRect","getBoundingClientRect","isSvg","SVGElement","elOffset","scroll","outerDims","viewportPadding","viewportDimensions","topEdgeOffset","bottomEdgeOffset","leftEdgeOffset","rightEdgeOffset","o","prefix","random","getElementById","$arrow","enable","disable","toggleEnabled","destroy","off","removeData","tooltip","duration","called","$el","end","transEndEventNames","WebkitTransition","MozTransition","OTransition","name","undefined","style","transitionEnd","event","special","bsTransitionEnd","bindType","delegateType","handle","handleObj","handler","apply","arguments","CanvasImage","canvas","context","getContext","appendChild","drawImage","clear","clearRect","update","putImageData","getPixelCount","getImageData","removeCanvas","ColorThief","getColor","getPalette","c","d","f","g","k","m","n","push","MMCQ","quantize","palette","pv","slice","naturalOrder","sum","sort","peek","pop","size","debug","h","r1","r2","g1","g2","b1","b2","histo","vboxes","vbox","count","volume","forEach","copy","min","_volume","_count_set","_count","avg","_avg","gval","bval","color","nearest","sqrt","pow","forcebw","module","exports","r","y","M","weekdays","months","ordinal","t","String","join","v","z","utcOffset","abs","floor","date","year","month","clone","add","ceil","w","D","ms","Q","_","S","args","O","locale","$L","utc","$u","x","$x","$offset","parse","$d","Date","NaN","substring","UTC","$y","getFullYear","$M","getMonth","$D","getDate","$W","getDay","$H","getHours","$m","getMinutes","$s","getSeconds","$ms","getMilliseconds","$utils","isValid","toString","isSame","startOf","endOf","isAfter","isBefore","$g","set","unix","valueOf","getTime","toDate","$locale","weekStart","$set","daysInMonth","get","Number","subtract","format","invalidDate","meridiem","YY","YYYY","MM","MMM","monthsShort","MMMM","DD","dd","weekdaysMin","ddd","weekdaysShort","dddd","H","HH","hh","A","mm","ss","SSS","Z","getTimezoneOffset","diff","toJSON","toISOString","toUTCString","T","$i","isDayjs","en","Ls","LTS","LT","L","LL","LLL","LLLL","formats","toUpperCase","future","past","yy","fromToBase","relativeTime","thresholds","rounding","to","from","toNow","fromNow","globalThis","Function","global","keyHandler","keys","origHandler","hotkeys","filterInputAcceptingElements","textInputTypes","filterContentEditable","filterTextInputs","textAcceptingInputTypes","specialKeys","character","fromCharCode","modif","possible","specialKey","metaKey","ctrlKey","indexOf","shiftNums","version","factory","noGlobal","arr","getProto","Object","getPrototypeOf","array","class2type","hasOwn","fnToString","ObjectFunctionString","nodeType","item","isWindow","preservedScriptAttributes","src","nonce","noModule","DOMEval","node","doc","script","getAttribute","setAttribute","head","toType","isArrayLike","jquery","toArray","num","pushStack","elems","ret","merge","prevObject","elem","first","last","even","grep","_elem","odd","splice","copyIsArray","deep","isPlainObject","expando","isReady","error","msg","noop","proto","Ctor","isEmptyObject","globalEval","makeArray","results","second","invert","matches","callbackExpect","arg","guid","Symbol","iterator","_i","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","pushNative","list","booleans","whitespace","identifier","pseudos","rwhitespace","rtrim","rcomma","rcombinators","rdescend","rpseudo","ridentifier","matchExpr","rhtml","rinputs","rheader","rnative","rquickExpr","rsibling","runescape","funescape","escape","nonHex","high","rcssescape","fcssescape","ch","asCodePoint","charCodeAt","unloadHandler","inDisabledFieldset","addCombinator","disabled","dir","next","childNodes","els","seed","nid","groups","newSelector","newContext","exec","id","getElementsByTagName","getElementsByClassName","qsa","testContext","scope","toSelector","querySelectorAll","qsaError","cache","cacheLength","shift","markFunction","assert","addHandle","attrs","attrHandle","siblingCheck","cur","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createDisabledPseudo","isDisabled","createPositionalPseudo","argument","matchIndexes","namespace","namespaceURI","hasCompare","subWindow","defaultView","addEventListener","attachEvent","className","createComment","getById","getElementsByName","attrId","getAttributeNode","tag","tmp","input","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","specified","sel","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","selectors","createPseudo","relative","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","_argument","simple","forward","ofType","_context","xml","uniqueCache","outerCache","nodeIndex","start","useCache","lastChild","uniqueID","pseudo","setFilters","idx","matched","matcher","unmatched","lang","elemLang","hash","location","activeElement","hasFocus","href","tabIndex","checked","selected","selectedIndex","_matchIndexes","radio","checkbox","file","password","image","submit","reset","tokens","combinator","base","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","contexts","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","filters","parseOnly","soFar","preFilters","cached","setMatchers","elementMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","matcherFromGroupMatchers","token","compiled","_name","defaultValue","unique","isXMLDoc","escapeSelector","until","truncate","siblings","rneedsContext","needsContext","rsingleTag","winnow","qualifier","not","rootjQuery","root","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","prev","sibling","has","targets","prevAll","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","content","reverse","rnothtmlwhite","Identity","Thrower","ex","adoptValue","resolve","reject","noValue","method","promise","fail","then","Callbacks","object","flag","createOptions","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","empty","lock","fireWith","Deferred","func","tuples","state","always","deferred","pipe","fns","newDefer","tuple","returned","progress","notify","onFulfilled","onRejected","onProgress","maxDepth","mightThrow","TypeError","notifyWith","resolveWith","process","exceptionHook","stackTrace","rejectWith","getStackHook","stateString","when","singleValue","remaining","resolveContexts","resolveValues","primary","updateFunc","rerrorNames","stack","console","warn","message","readyException","readyList","completed","removeEventListener","readyWait","wait","readyState","doScroll","access","chainable","emptyGet","raw","bulk","_key","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","camelCase","string","acceptData","owner","Data","uid","defineProperty","configurable","prop","hasData","dataPriv","dataUser","rbrace","rmultiDash","JSON","getData","_data","_removeData","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","defer","pnum","source","rcssNum","cssExpand","isAttached","composed","getRootNode","isHiddenWithinTree","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","defaultDisplayMap","getDefaultDisplay","showHide","values","rcheckableType","rtagName","rscriptType","createDocumentFragment","checkClone","cloneNode","noCloneChecked","wrapMap","thead","tr","td","_default","getAll","setGlobalEval","refElements","tbody","tfoot","colgroup","caption","th","optgroup","buildFragment","scripts","selection","ignored","wrap","attached","fragment","nodes","htmlPrefilter","createTextNode","rtypenamespace","returnTrue","returnFalse","expectSync","err","safeActiveElement","types","origFn","leverageNative","notAsync","saved","isTrigger","stopImmediatePropagation","handleObjIn","eventHandle","events","handlers","namespaces","origType","elemData","create","triggered","dispatch","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","isImmediatePropagationStopped","rnamespace","postDispatch","matchedHandlers","matchedSelectors","button","addProp","hook","enumerable","originalEvent","writable","load","noBubble","beforeunload","returnValue","defaultPrevented","timeStamp","now","isSimulated","altKey","bubbles","cancelable","changedTouches","detail","eventPhase","pageX","pageY","shiftKey","view","charCode","keyCode","buttons","clientX","clientY","offsetX","offsetY","pointerId","pointerType","screenX","screenY","targetTouches","toElement","touches","blur","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","udataOld","udataCur","fixInput","domManip","collection","hasScripts","iNoClone","valueIsFunction","_evalUrl","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","append","prepend","insertBefore","before","after","replaceWith","replaceChild","prependTo","replaceAll","original","insert","rnumnonpx","rcustomProp","getStyles","opener","getComputedStyle","swap","rboxStyle","rtrimCSS","curCSS","computed","minWidth","maxWidth","isCustomProp","getPropertyValue","pixelBoxStyles","addGetHookIf","conditionFn","hookFn","computeStyleTests","cssText","divStyle","pixelPositionVal","reliableMarginLeftVal","roundPixelMeasures","pixelBoxStylesVal","boxSizingReliableVal","scrollboxSizeVal","measure","parseFloat","reliableTrDimensionsVal","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","table","trChild","trStyle","borderTopWidth","borderBottomWidth","cssPrefixes","emptyStyle","vendorProps","finalPropName","cssProps","capName","vendorPropName","rdisplayswap","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","boxModelAdjustment","box","isBorderBox","styles","computedVal","extra","getWidthOrHeight","valueIsBorderBox","offsetProp","getClientRects","Tween","easing","cssHooks","opacity","origName","setProperty","isFinite","scrollboxSizeBuggy","margin","border","suffix","expand","expanded","parts","propHooks","run","percent","eased","step","fx","scrollLeft","linear","swing","cos","PI","fxNow","inProgress","rfxtypes","rrun","schedule","hidden","requestAnimationFrame","interval","tick","createFxNow","genFx","includeWidth","createTween","Animation","tweeners","properties","stopped","prefilters","currentTime","startTime","tweens","opts","specialEasing","originalProperties","originalOptions","gotoEnd","propFilter","bind","timer","anim","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","overflow","overflowX","overflowY","prefilter","speed","opt","speeds","fadeTo","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","slow","fast","time","checkOn","optSelected","radioValue","boolHook","nType","attrHooks","bool","attrNames","getter","lowercaseName","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","tabindex","classNames","curValue","finalValue","stateVal","isValidValue","rreturn","valHooks","optionSet","focusin","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","parentWindow","simulate","triggerHandler","attaches","rquery","parseXML","parserErrorElem","DOMParser","parseFromString","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","traditional","param","valueOrFunction","encodeURIComponent","serialize","serializeArray","r20","rhash","rantiCache","rheaders","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","active","lastModified","etag","url","isLocal","protocol","processData","async","contentType","accepts","json","responseFields","converters","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","urlAnchor","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","overrideMimeType","mimeType","status","abort","statusText","finalText","crossDomain","host","ifModified","headers","beforeSend","success","send","nativeStatusText","responses","isSuccess","response","modified","ct","finalDataType","firstDataType","ajaxHandleResponses","conv2","current","conv","dataFilter","ajaxConvert","getJSON","getScript","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","visible","xhr","XMLHttpRequest","xhrSuccessStatus","xhrSupported","cors","errorCallback","open","username","xhrFields","onload","onerror","onabort","ontimeout","onreadystatechange","responseType","responseText","binary","scriptAttrs","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","keepScripts","parsed","params","animated","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","rect","win","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","defaultExtra","funcName","unbind","delegate","undelegate","fnOver","fnOut","holdReady","hold","parseJSON","isNumeric","trim","_jQuery","_$","Vnode","require","render","subscriptions","rendering","pending","sync","redraw","mount","component","Promise","buildPathname","parsePathname","compileTemplate","assign","sentinel","$window","mountRedraw","fireAsync","setPath","path","history","replaceState","route","pushState","currentPath","lastUpdate","currentResolver","SKIP","defaultRoute","routes","onremove","SyntaxError","callAsync","setImmediate","scheduled","defaultData","some","ReferenceError","resolveRoute","search","pathname","decodeURIComponent","loop","payload","matchedRoute","localComp","comp","onmatch","onbeforeupdate","oncreate","vnode","Link","onclick","oninit","onupdate","onbeforeremove","child","handleEvent","hyperscript","trust","request","parseQueryString","buildQueryString","PromisePolyfill","queryIndex","hashIndex","queryEnd","pathEnd","query","resolved","variadic","newQueryIndex","newHashIndex","newQueryEnd","newPathEnd","querystring","templateData","templateKeys","regexp","executor","resolvers","rejectors","resolveCurrent","rejectCurrent","instance","_instance","shouldAbsorb","execute","retry","executeOnce","runs","onRejection","resolveNext","rejectNext","reason","all","total","consume","race","destructure","charAt","entries","counters","entry","levels","cursor","level","nextLevel","isNumber","desc","getOwnPropertyDescriptor","hyperscriptVnode","normalizeChildren","selectorParser","selectorCache","isEmpty","compileSelector","classes","attrValue","execSelector","newAttrs","currentRedraw","$doc","nameSpace","svg","math","getNameSpace","xmlns","checkState","callHook","createNodes","vnodes","ns","createNode","initLifecycle","dom","insertNode","createText","createHTML","domSize","createFragment","createElementNS","setAttr","setAttrs","maybeSetContentEditable","normalized","setLateSelectAttrs","$$reentrantLock$$","normalize","initComponent","createComponent","possibleParents","updateNodes","removeNodes","isOldKeyed","isKeyed","oldStart","oe","ve","topSibling","oldEnd","updateNode","getNextSibling","moveNodes","lisIndices","originalNextSibling","vnodesLength","oldIndices","getKeyMap","oldIndex","il","lisTemp","makeLisIndices","commonLength","removeNode","oldTag","force","shouldNotUpdate","updateLifecycle","updateText","removeHTML","updateHTML","updateFragment","updateAttrs","updateElement","updateComponent","frag","moveChildToFrag","contenteditable","contentEditable","stateResult","attrsResult","mask","reallyRemove","isLifecycleMethod","isFormAttribute","updateEvent","setAttributeNS","updateStyle","hasPropertyKey","nsLastIndex","uppercaseRegex","capital","normalizeKey","removeProperty","EventDict","ev","prevRedraw","oncompletion","callbackCount","PromiseProxy","makeRequest","background","hasHeader","__proto__","replacedAbort","assumeJSON","FormData","extract","aborted","user","deserialize","withCredentials","config","stringify","callbackKey","Stream","lift","streams","scan","origin","stream","combine","scanMerge","changed","warnedHalt","dependentStreams","dependentFns","_changing","_state","createEnd","_parents","_unregisterChild","_map","ignoreInitial","s1","s2","childIndex","every","mappers","endStream","mapper","log","maxInt","regexPunycode","regexNonASCII","regexSeparators","errors","stringFromCharCode","RangeError","mapDomain","encoded","ucs2decode","output","counter","ucs2encode","fromCodePoint","digitToBasic","digit","adapt","numPoints","firstTime","baseMinusTMin","decode","codePoint","inputLength","bias","basic","lastIndexOf","oldi","baseMinusT","out","encode","basicLength","handledCPCount","handledCPCountPlusOne","q","qMinusT","toUnicode","toASCII","isBrowser","isFirefox","mozInnerScreenX","getCaretCoordinates","querySelector","currentStyle","isInput","whiteSpace","wordWrap","lineHeight","coordinates","offsetLeft","backgroundColor","___EXPOSE_LOADER_IMPORT___","___EXPOSE_LOADER_GLOBAL_THIS___","arr2","__esModule","_defineProperties","descriptor","protoProps","staticProps","_getPrototypeOf","setPrototypeOf","subClass","superClass","_s","_e","_arr","_n","_d","_typeof","assertThisInitialized","_regeneratorRuntime","Op","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","Context","makeInvokeMethod","tryCatch","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","NativeIteratorPrototype","Gp","defineIteratorMethods","_invoke","AsyncIterator","PromiseImpl","invoke","record","__await","unwrapped","previousPromise","callInvokeWithMethodAndArg","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","info","resultName","nextLoc","pushTryEntry","locs","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","iterable","iteratorMethod","doneResult","displayName","isGeneratorFunction","genFun","ctor","mark","awrap","iter","skipTempReset","rootRecord","rval","exception","loc","caught","hasCatch","hasFinally","finallyEntry","thrown","delegateYield","_setPrototypeOf","arrayWithHoles","iterableToArrayLimit","unsupportedIterableToArray","nonIterableRest","arrayLikeToArray","minLen","runtime","regeneratorRuntime","accidentalStrictMode","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","definition","bidi","multi","onchange","selectedOptions","oninput","ctrl","patchMithril","defaultMithril","modifiedMithril","Proxy","Reflect","app","dayjs","localizedFormat","tooltipGen","_assertThisInitialized","_inheritsLoose","_extends","setRouteWithForcedRefresh","newOptions","caller","includes","History","getCurrent","getPrevious","secondTop","canGoBack","back","home","backUrl","Pane","pinnedKey","pinned","localStorage","getItem","showing","hideTimeout","onmouseleave","togglePinned","setItem","Component","componentAttrs","initAttrs","subclassOf","B","PageState","Page","bodyClass","scrollTopOnCreate","useBrowserScrollRestoration","previous","routeName","drawer","modal","close","scrollRestoration","_createClass","isObject","Item","priority","ItemList","_items","getPriority","setPriority","otherList","keepPrimitives","createItemContentProxy","toObject","itemName","property","receiver","Separator","isListItem","isVnode","isSeparator","listItems","rawItems","customTag","items","prevItem","newItems","Tag","itemClassName","classList","DiscussionHero","discussion","badges","_objectWithoutPropertiesLoose","excluded","sourceKeys","SluggingMode","external","avatar","loading","hasTitle","avatarUrl","alt","slug","mode","ALPHANUMERIC","UTF8","getPlainContent","removeSelectors","innerText","ucfirst","substr","camelCaseToSnakeCase","str","generateRandomString","Uint8Array","crypto","getRandomValues","dec","padStart","highlight","phrase","highlighted","icon","fontClass","extractText","vdom","humanTime","translator","trans","abbreviateNumber","number","toFixed","buttonClassName","menuClassName","label","caretIcon","accessibleToggleLabel","renderItems","lazyDraw","getButton","getMenu","onshow","$menu","isRight","windowSrollTop","windowHeight","windowScrollLeft","windowWidth","onhide","getButtonContent","datetime","full","ago","humanTimeUtil","pubdate","TerminalPost","lastPost","replyCount","SubtreeRetainer","callbacks","needsRebuild","invalidate","LoadingIndicator","containerClassName","completeClassName","completeContainerClassName","role","containerAttrs","ConfirmDocumentUnload","boundHandler","fireDebugWarning","forum","attribute","fireDeprecationWarning","githubId","removedFrom","repo","Button","ariaLabel","iconName","_class","buttonAttrs","hasIcon","canInsertText","insertText","textarea","selectionStart","selectionEnd","originalSelectionStart","execCommand","endsWith","dispatchEvent","CustomEvent","setSelectionRange","BasicEditorDriver","build","placeholder","callInputListeners","inputListeners","listener","onkeyup","keyHandlers","onsubmit","moveCursorTo","getSelectionRange","getLastNChars","insertAtCursor","insertAt","insertBetween","cursorPos","replaceBeforeCursor","relCoords","childDomNode","oldText","oldVisibility","shouldRecreateTooltip","shouldChangeTooltipVisibility","tooltipVisible","showOnFocus","ignoreTitleWarning","realText","getRealText","checkDomNodeChanged","recreateTooltip","createTooltip","updateVisibility","domNode","isSameNode","TextEditor","controlItems","toolbarItems","composer","editor","buildEditor","newDisabled","buildEditorParams","submitLabel","preview","ComposerBody","confirmExit","preventClosingWhen","hasChanges","fields","originalContent","headerItems","jumpToPreview","loaded","minimizeComposerIfFullScreen","ReplyComposer","relationships","save","post","goToNumber","alert","viewButton","controls","Alert","dismissible","ondismiss","dismissControl","iconHelper","Modal","alertAttrs","missingMethods","animateShow","onready","dismissibleOptions","viaCloseButton","animateHide","pointer","isDismissible","isDismissibleViaCloseButton","viaEscKey","isDismissibleViaEscKey","viaBackdropClick","isDismissibleViaBackdropClick","ForgotPasswordModal","email","emailLabel","requestParams","errorHandler","LogInButtons","SignUpModal","footer","isProvided","field","provided","usernameLabel","passwordLabel","autocomplete","logIn","identification","LogInModal","submitData","reload","authData","remember","identificationLabel","forgotPassword","signUp","loginParams","RenameDiscussionModal","currentTitle","newTitle","section","userControls","DiscussionPage","canReply","replyAction","moderationControls","canRename","renameAction","destructiveControls","isHidden","canHide","restoreAction","canDelete","deleteAction","hideAction","goToLast","forceRefresh","pushData","hiddenAt","hiddenUser","confirm","slidable","$underneathLeft","$underneathRight","startX","startY","couldBeSliding","isSliding","animatePos","newPos","newX","newY","$underneath","side","activate","specialChars","escapeRegExp","DiscussionListItem","subtree","highlightRegExp","freshness","elementAttrs","Slidable","viewItems","DiscussionControls","controlsView","slidableUnderneathView","contentView","isUnread","markAsRead","isRead","unread","read","contentItems","authorAvatarView","badgesView","mainView","replyCountItem","createdAt","jumpTo","getJumpTo","mainItems","infoItems","mostRelevantPost","lastPostNumber","lastReadPostNumber","slidableInstance","showFirstPost","showRepliesCount","firstPost","excerpt","contentPlain","unreadCount","Placeholder","DiscussionList","getParams","isLoading","isInitialLoading","isLoadingNext","hasNext","loadNext","pageSize","isSearchResults","getPages","pg","pageNum","itemNum","hotEdge","DiscussionListPane","hasItems","enoughSpace","$list","pane","$discussion","listTop","listBottom","outerHeight","discussionTop","discussionBottom","ScrollListener","ticking","passive","LoadingPost","ComposerPostPreview","surround","updatePreview","isVisible","s9e","TextFormatter","updateInterval","setInterval","clearInterval","ReplyPlaceholder","anchorPreview","anchorToBottom","PostStream","scrollListener","onscroll","lastTime","viewingEnd","posts","postIds","postFadeIn","visibleStart","PostComponent","dt","period","postStreamElement","afterFirstPostItems","visibleEnd","endItems","pagesLoading","triggerScroll","calculatePositionTimeout","needsScroll","targetPost","scrollToNumber","animateScroll","scrollToIndex","reply","paused","updateScrubber","loadPostsIfNeeded","calculatePosition","getMarginTop","viewportHeight","viewportTop","$item","loadPrevious","indexFromViewPort","visibleTop","visiblePost","description","startNumber","endNumber","onPositionChange","headerId","scrollToItem","flashItem","$container","itemTop","itemBottom","scrollBottom","updateScrubberHeight","forceUpdateScrubber","loadPromise","itemOffset","$placeholder","formatNumber","Intl","NumberFormat","PostStreamScrubber","updateScrubberValues","fromScroll","forceHeightChange","viewing","formattedCount","unreadPercent","styleUnread","newStyle","oldStyle","goToFirst","firstPostLabel","unreadLabel","lastPostLabel","onresize","resize","dragging","mouseStart","indexStart","onmousedown","onmousemove","onmouseup","percentPerPost","$scrubber","sanitizeIndex","heights","adjustingHeight","animationPromises","part","$part","scrubber","scrollbar","deltaIndex","newIndex","intIndex","goToIndex","$scrollbar","offsetPercent","offsetIndex","minPercentVisible","percentPerVisiblePost","SplitDropdown","getFirstChild","noTrailing","debounceMode","timeoutID","cancelled","lastExec","clearExistingTimeout","wrapper","arguments_","elapsed","cancel","atBegin","throttle","anchorScroll","relativeScroll","PostStreamState","includedPosts","loadPageTimeouts","_loadNext","_loadPrevious","loadRange","noAnimation","resultPromise","loadNearNumber","loadNearIndex","page","near","loadCount","twoPagesAway","loadPage","backwards","loadIds","canEdit","newPosts","pageContent","loadingItems","sidebar","sidebarItems","hero","mainContent","positionChanged","preloadedDiscussion","bySlug","included","discussionId","rawNearParam","nearParam","HeaderPrimary","LinkButton","SessionDropdown","SelectDropdown","activeChild","defaultLabel","Model","store","exists","getIdentifier","relationship","pushAttributes","model","oldData","copyData","meta","apiEndpoint","pushPayload","rawRelationship","transform","hasOne","relationshipData","hasMany","transformDate","computedValue","compute","dependentValues","recompute","isDark","hexcolor","hexnumbers","textContrastClass","Keys","Badge","iconChild","badgeAttrs","badgeNode","Discussion","lastPostedAt","lastPostedUser","commentCount","lastReadAt","session","removePost","markedAllAsReadAt","link","NotificationList","markAllAsRead","deleteAll","discussions","notification","subject","notifications","group","NotificationComponent","$notifications","$scrollParent","inPanel","boundScrollHandler","scrollHandler","scrollParent","atBottom","clientHeight","NotificationsDropdown","newNotifications","getNewCount","getUnreadCount","menuClick","goToRoute","KeyboardNavigatable","Map","whenCallback","onUp","ArrowUp","onDown","ArrowDown","onSelect","ignoreTabPress","Tab","Enter","onTab","onCancel","Escape","onRemove","Backspace","KeyboardEvent","HTMLInputElement","bindTo","navigate","keyCallback","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","DiscussionsSearchItem","discussionTitle","mostRelevantPostContent","DiscussionsSearchSource","queryString","setQueryString","limit","include","queryMutators","UsersSearchResults","localeCompare","Search","searchState","sources","loadingSources","navigator","searchTimeout","updateMaxHeightHandler","currentSearch","getInitialSearch","sourceItems","searchLabel","shouldShowResults","getValue","shouldShowClearButton","focused","setValue","onfocus","onblur","updateMaxHeight","maxHeight","innerHeight","setIndex","getCurrentNumericIndex","selectableItems","$input","selectResult","isCached","MIN_SEARCH_LEN","selectedUrl","UsersSearchSource","$dropdown","fixedIndex","dropdownScroll","dropdownTop","dropdownBottom","HeaderSecondary","locales","cookie","ComposerButton","ComposerState","Position","HIDDEN","componentClass","preventExit","onExit","NORMAL","FULLSCREEN","minimize","MINIMIZED","fullScreen","exitFullScreen","bodyMatches","isFullScreen","composingReplyTo","minimumHeight","maximumHeight","computedHeight","Composer","prevPosition","normal","minimized","showIfMinimized","configHandle","updateHeight","animatePositionChange","initializeHeight","mousedown","heightStart","deltaPixels","changeHeight","updateBodyPadding","$flexible","headerHeight","paddingBottom","footerHeight","animateHeightChange","$composer","oldHeight","newHeight","showBackdrop","$backdrop","hideBackdrop","scrollElement","topOfViewport","defaultHeight","Notification","fromUser","unreadNotificationCount","DiscussionRenamedNotification","postNumber","EditPostComposer","editedContent","editAction","Post","PostControls","footerItems","actionItems","$actions","$controls","existing","GroupBadge","nameSingular","Group","namePlural","ADMINISTRATOR_ID","GUEST_ID","MEMBER_ID","EditUserModal","isEmailConfirmed","setPassword","userGroups","canEditCredentials","nonAdminEditingAdmin","userIsAdmin","canEditGroups","AffixedSidebar","boundOnresize","$sidebar","$header","$footer","$affixElement","UserPage","UserCard","editable","controlsButtonClassName","loadUser","lowercaseUsername","joinTime","navItems","isActor","discussionCount","showDeletionAlert","AvatarEditor","isDraggedOver","quickUpload","ondragover","enableDragover","ondragenter","ondragleave","disableDragover","ondragend","ondrop","dropUpload","openPicker","upload","dataTransfer","files","failure","avatarColor","UserControls","lastSeenAt","online","isOnline","userOnline","PostUser","cardVisible","showCard","hideCard","oncardshow","oncardhide","fullTime","IPAddress","ip","PostMeta","getPermalink","selectPermalink","metaItems","touch","permalink","ipAddress","PostEdited","editedUser","editedInfo","editedAt","CommentPost","revealContent","isEditing","bodyItems","contentHtml","refreshContent","renderFailed","isEdited","editing","toggleContent","EventPost","usernameHelper","descriptionData","descriptionKey","DiscussionRenamedPost","renamed","oldTitle","new","LOCAL_STORAGE_KEY","WelcomeHero","DiscussionComposer","titlePlaceholder","onkeydown","IndexPage","lastDiscussion","setTitle","oldHeroHeight","heroHeight","indexTop","indexBottom","discussionOffset","canStartDiscussion","newDiscussionAction","sortMap","sortOptions","sortId","providesInitialSearch","PostsUserPage","moreResults","loadLimit","loadMore","refresh","loadResults","parseResults","author","PaginatedListState","pages","initialLoading","loadingPrev","loadingNext","loadPrev","getLocation","getPrevPageNumber","getNextPageNumber","links","hasPrev","reqParams","refreshParams","newParams","paramsChanged","isLoadingPrev","getAllItems","EventEmitter","emit","globalEventEmitter","DiscussionListState","extraDiscussions","eventEmitter","deleteDiscussion","preloadedDiscussions","relevance","latest","newest","oldest","removeDiscussion","addDiscussion","DiscussionsUserPage","cb","Checkbox","withAttr","getDisplay","Switch","FieldSet","NotificationGrid","methods","notificationMethods","notificationTypes","preferences","toggleMethod","toggleType","preferenceKey","ChangePasswordModal","requestBody","ChangeEmailModal","requestAttributes","SettingsPage","discloseOnlineLoading","settingsItems","sectionItems","accountItems","notificationsItems","privacyItems","discloseOnline","savePreferences","NotificationsPage","DefaultResolver","makeKey","makeAttrs","requestedPath","DiscussionPageResolver","canonicalizeDiscussionSlug","scrollToPostNumber","LabelValue","AccessTokensList","showingTokens","tokenView","isCurrent","tokenViewItems","tokenInfoItems","tokenActionItems","device","generateTokenTitle","lastActivityAt","lastIpAddress","deleteKey","developer_token","displayKey","revokeButton","revoke","ondelete","tokenValueDisplay","obfuscatedName","fill","NewAccessTokenModal","titleInput","titleLabel","onsuccess","UserSecurityPageState","loadingTerminateSessions","loadingGlobalLogout","hasLoadedTokens","getTokens","setTokens","pushToken","removeToken","getSessionTokens","isSessionToken","getDeveloperTokens","getOtherSessionTokens","hasOtherActiveSessions","removeOtherSessionTokens","UserSecurityPage","routeUsername","loadTokens","developerTokensItems","sessionsItems","globalLogout","hideTokens","terminateAllOthersButton","terminateAllOtherSessions","resolverClass","alertEmailConfirmation","ResendButton","ContainedAlert","candidateSelectors","candidateSelector","NoElement","Element","getCandidates","includeContainer","candidates","getCandidatesIteratively","elementsToCheck","assigned","assignedElements","nestedCandidates","flatten","shadowRoot","getShadowRoot","validShadowRoot","shadowRootFilter","getTabindex","isScope","isContentEditable","sortOrderedTabbables","documentOrder","isZeroArea","isNodeMatchingSelectorFocusable","isHiddenInput","_ref","displayCheck","nodeUnderDetails","parentElement","nodeRootHost","nodeIsAttached","originalNode","rootNode","assignedSlot","isDetailsWithSummary","isDisabledFromFieldset","isNodeMatchingSelectorTabbable","isRadio","radioSet","radioScope","form","queryRadios","CSS","getCheckedRadio","isTabbableRadio","isNonTabbableRadio","isValidShadowRootTabbable","shadowHostNode","sortByOrder","regularTabbables","orderedTabbables","candidateTabindex","sortable","tabbable","isTabbable","focusableCandidateSelector","isFocusable","trapQueue","activeFocusTraps","activateTrap","trap","activeTrap","pause","trapIndex","deactivateTrap","unpause","findIndex","valueOrHandler","getActualTarget","composedPath","createFocusTrap","userOptions","returnFocusOnDeactivate","escapeDeactivates","delayInitialFocus","containers","containerGroups","tabbableGroups","nodeFocusedBeforeActivation","mostRecentlyFocusedNode","delayInitialFocusTimer","getOption","configOverrideOptions","optionName","configOptionName","findContainerIndex","tabbableNodes","getNodeForOption","optionValue","getInitialFocusNode","firstTabbableGroup","firstTabbableNode","updateTabbableNodes","tabbableOptions","focusableNodes","lastTabbableNode","nextTabbableNode","nodeIdx","tryFocus","preventScroll","isSelectableInput","getReturnFocusNode","previousActiveElement","checkPointerDown","clickOutsideDeactivates","deactivate","returnFocus","allowOutsideClick","checkFocusIn","targetContained","Document","checkKey","isEscapeEvent","isTabEvent","destinationNode","containerIndex","containerGroup","startOfGroupIndex","destinationGroupIndex","lastOfGroupIndex","checkTab","checkClick","addListeners","capture","removeListeners","activateOptions","onActivate","onPostActivate","checkCanFocusTrap","finishActivation","deactivateOptions","onDeactivate","onPostDeactivate","checkCanReturnFocus","finishDeactivation","updateContainerElements","containerElements","elementsAsArray","_createFocusTrap","hasPassiveEvents","passiveTestOptions","pluralFormatter","isIosDevice","platform","maxTouchPoints","locks","documentListenerAdded","initialClientY","previousBodyOverflowSetting","previousBodyPosition","previousBodyPaddingRight","allowTouchMove","rawEvent","clearAllBodyScrollLocks","targetElement","ontouchstart","ontouchmove","restorePositionSetting","paddingRight","ModalManager","focusTrap","lastSetFocusTrap","modalClosing","keyUpListener","modalList","handlePossibleBackdropClick","backdropShown","ontransitionend","onBackdropTransitionEnd","handleEscPress","isModalOpen","dialogKey","activeDialogElement","_toConsumableArray","_window","scrollY","scrollX","bottomBarHeight","_reserveScrollBarGap","reserveScrollBarGap","scrollBarGap","innerWidth","clientWidth","computedBodyPaddingRight","setOverflowHidden","isTargetElementTotallyScrolled","handleScroll","disableBodyScroll","activeDialogManagerElement","readyCallback","closedCallback","dismissibleState","propertyName","AlertManager","activeAlerts","getActiveAlerts","urgent","dismiss","RequestErrorModal","formattedError","accumulator","memoize","parseCases","isWhitespace","cases","currTermStart","latestTerm","inTerm","caseBody","branchEndIndex","findClosingBracket","fromIndex","char","splitFormattedArgument","block","separator","indexOfDelimiter","tail","keyCounter","OTHER","replaceNumberSign","numBraces","numberValues","keyParam","pluralTypeHandler","intValue","startsWith","keywordPossibilities","resolvedOptions","PluralRules","pluralKeyword","keyword","selectTypeHandler","replaceRichTags","dontUnescapeIndices","onTagClose","segment","currTagIsClosing","currTag","currTagStart","break","endingLocation","findClosingTag","entireTagInSegment","segmentIndex","segmentContainingClosingTag","tagContents","segmentStart","segmentEnd","processedSegment","newSegmentIndex","traverseMessageTags","unEscapeHtml","startIndex","startSegmentIndex","exit","startI","startJ","inTag","instructions","sanitizeValues","recSanitizeArr","defaultRichHandler","RichMessageFormatter","typeHandlers","richHandler","_classCallCheck","_this","cleanedValues","formatted","sym","fakeValues","fromEntries","_ref2","formattedFake","replaceFake","originalTemplateSegmentIndices","MessageFormatter","_defineProperty","blockStartIndex","blockEndIndex","_splitFormattedArgume2","typeHandler","mithrilRichHandler","Translator","translations","formatter","formatterTypeHandlers","setLocale","getLocale","addTranslations","plural","preprocessParameters","parameters","translation","rich","payloadIsPlural","Store","models","pushObject","allowUnregistered","curr","createRecord","idOrParams","getBy","records","Session","csrfToken","login","logout","Drawer","appElement","resizeHandler","isOpen","drawerAvailableMediaQuery","matchMedia","removeListener","$drawer","addListener","mapRoutes","basePath","resolver","RequestError","updateHumanTimes","liveHumanTimes","override","newMethod","Forum","stringToColor","rgb","hsvToRgb","User","isAdmin","newNotificationCount","calculateAvatarColor","Image","colorThief","crossOrigin","newPreferences","ModalManagerState","stackModal","invalidModalWarning","AlertManagerState","alertId","arg1","arg2","arg3","fireApplicationError","userTitle","consoleTitle","groupEnd","alerts","AccessToken","userId","Application","initializers","forums","users","booted","refs","fontawesome","_title","_titleCount","requestErrorAlert","initialRoute","boot","caughtInitializationErrors","initializer","extension","resources","bootExtensions","extensions","Infinity","appEl","appHeaderEl","preloadedApiDocument","apiDocument","screen","updateTitle","setTitleCount","titleCount","onHomepage","pageTitle","forumName","pageNumber","parser","transformRequestOptions","flarumOptions","modifyText","tmpOptions","originalExtract","requestErrorCatch","customErrorHandler","formattedErrors","decodeURI","requestWasCrossOrigin","isDebug","showDebug","requestErrorDefaultHandler","URL","baseURI","Navigation","onmouseenter","getBackButton","getPaneButton","getDrawerButton","NotificationListState","SearchState","cachedSearches","Set","GlobalSearchState","initialValueSet","currPageProvidesSearch","intializeValue","clearInitialSearch","stickyParams","changeSort","isSafariMobile","vendor","userAgent","ForumApplication","notificationComponents","discussionRenamed","postComponents","comment","makeRouteHelpers","defaultAction","viewingDiscussion","authenticationComplete","loggedIn","ActualModel","PostTypes","Routes","helpers","helper","deprecatedNotice","deprecationIssueId","getHandlers","blockPrefix","blockSuffix","multiline","replaceNext","prefixSpace","scanFor","surroundWithNewlines","orderedList","unorderedList","trimFirst","isMultipleLines","repeat","newlinesToSurroundSelectedText","newlinesToAppend","newlinesToPrepend","beforeSelection","afterSelection","breaksBefore","breaksAfter","newlinesBeforeSelection","newlinesAfterSelection","undoOrderedListStyle","lines","orderedListRegex","shouldUndoOrderedList","line","processed","undoUnorderedListStyle","shouldUndoUnorderedList","makePrefix","proxifyCompat","compat","strings","regex","fileExt","Select","wrapperAttrs","wrapperClassName","wrapperClass","domAttrs","ColorPreviewInput","TextEditorButton","originalView","tooltipText","extenders","evented","Parent","Mixed","mixins","styleArgs","noInitialSelection","lineLength","expandSelectionToLine","selectedText","undoResultOpositeList","undoResult","pristineText","clearExistingListStyle","prefixedLines","totalPrefixLength","previousValue","_currentValue","currentIndex","totalPrefixLengthOpositeList","listStyle","prefixToUse","suffixToUse","multilineStyle","originalSelectionEnd","wordSelectionStart","breakpoint","wordSelectionEnd","expandedSelectionStart","expandedSelectionEnd","beginsWithPrefix","endsWithSuffix","expandSelectedText","hasReplaceNext","ref","replacementText","whitespaceEdges","leadingWhitespace","trailingWhitespace","blockStyle","EditorDriverInterface","ThrottleDebounce","FocusTrap","Fragment","originalOnCreate","humanTimeHelper","third","LogInButton","PostPreview","compatObj"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"forum.js","mappings":";mCAOKA,MAAMC,UAA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,yBAA0BrkB,GAC1B,yBAA0BkjB,GAC1B,iCAAkCrb,GAClC,2BAA4B/J,GAC5B,+BAAgC4rB,GAChC,gCAAiCzd,GACjC,8BAA+B6R,GAC/B,mCAAoC3c,GACpC,oBAAqBiX,GACrB,gCAAiCzU,GACjC,yBAA0BiE,GAC1B,2BAA4B2d,GAC5B,8BAA+B4E,GAC/B,mCAAoCJ,GACpClzC,OAAQA,GACR6wD,iBAAkBA,KCnJpB+G,GAAAA,IAAgBn/C,GAET,IAAMq7C,GAASD,GAAc+D,GAAW","sources":["webpack://@flarum/core/./src/common/utils/arrayFlatPolyfill.ts","webpack://@flarum/core/../../../node_modules/bootstrap/js/affix.js","webpack://@flarum/core/../../../node_modules/bootstrap/js/dropdown.js","webpack://@flarum/core/../../../node_modules/bootstrap/js/tooltip.js","webpack://@flarum/core/../../../node_modules/bootstrap/js/transition.js","webpack://@flarum/core/../../../node_modules/color-thief-browser/dist/color-thief.min.js","webpack://@flarum/core/../../../node_modules/dayjs/dayjs.min.js","webpack://@flarum/core/../../../node_modules/dayjs/plugin/localizedFormat.js","webpack://@flarum/core/../../../node_modules/dayjs/plugin/relativeTime.js","webpack://@flarum/core/../../../node_modules/expose-loader/dist/runtime/getGlobalThis.js","webpack://@flarum/core/../../../node_modules/jquery.hotkeys/jquery.hotkeys.js","webpack://@flarum/core/../../../node_modules/jquery/dist/jquery.js","webpack://@flarum/core/../../../node_modules/mithril/api/mount-redraw.js","webpack://@flarum/core/../../../node_modules/mithril/api/router.js","webpack://@flarum/core/../../../node_modules/mithril/hyperscript.js","webpack://@flarum/core/../../../node_modules/mithril/index.js","webpack://@flarum/core/../../../node_modules/mithril/mount-redraw.js","webpack://@flarum/core/../../../node_modules/mithril/pathname/assign.js","webpack://@flarum/core/../../../node_modules/mithril/pathname/build.js","webpack://@flarum/core/../../../node_modules/mithril/pathname/compileTemplate.js","webpack://@flarum/core/../../../node_modules/mithril/pathname/parse.js","webpack://@flarum/core/../../../node_modules/mithril/promise/polyfill.js","webpack://@flarum/core/../../../node_modules/mithril/promise/promise.js","webpack://@flarum/core/../../../node_modules/mithril/querystring/build.js","webpack://@flarum/core/../../../node_modules/mithril/querystring/parse.js","webpack://@flarum/core/../../../node_modules/mithril/render.js","webpack://@flarum/core/../../../node_modules/mithril/render/fragment.js","webpack://@flarum/core/../../../node_modules/mithril/render/hyperscript.js","webpack://@flarum/core/../../../node_modules/mithril/render/hyperscriptVnode.js","webpack://@flarum/core/../../../node_modules/mithril/render/render.js","webpack://@flarum/core/../../../node_modules/mithril/render/trust.js","webpack://@flarum/core/../../../node_modules/mithril/render/vnode.js","webpack://@flarum/core/../../../node_modules/mithril/request.js","webpack://@flarum/core/../../../node_modules/mithril/request/request.js","webpack://@flarum/core/../../../node_modules/mithril/route.js","webpack://@flarum/core/../../../node_modules/mithril/stream.js","webpack://@flarum/core/../../../node_modules/mithril/stream/stream.js","webpack://@flarum/core/../../../node_modules/punycode/punycode.es6.js","webpack://@flarum/core/../../../node_modules/textarea-caret/index.js","webpack://@flarum/core/../../../node_modules/jquery/dist/jquery-exposed.js","webpack://@flarum/core/../../../node_modules/color-thief-browser/dist/color-thief.min-exposed.js","webpack://@flarum/core/../../../node_modules/dayjs/dayjs.min-exposed.js","webpack://@flarum/core/../../../node_modules/mithril/index-exposed.js","webpack://@flarum/core/../../../node_modules/punycode/punycode.es6-exposed.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/arrayWithHoles.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/classCallCheck.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/createClass.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/defineProperty.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/inherits.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/nonIterableRest.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/slicedToArray.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/typeof.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/regenerator/index.js","webpack://@flarum/core/webpack/bootstrap","webpack://@flarum/core/webpack/runtime/compat get default export","webpack://@flarum/core/webpack/runtime/define property getters","webpack://@flarum/core/webpack/runtime/global","webpack://@flarum/core/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/core/webpack/runtime/make namespace object","webpack://@flarum/core/./src/common/utils/bidi.js","webpack://@flarum/core/./src/common/utils/patchMithril.js","webpack://@flarum/core/./src/common/app.ts","webpack://@flarum/core/./src/common/index.ts","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/core/./src/common/utils/setRouteWithForcedRefresh.ts","webpack://@flarum/core/./src/forum/utils/History.ts","webpack://@flarum/core/./src/forum/utils/Pane.js","webpack://@flarum/core/./src/common/Component.ts","webpack://@flarum/core/./src/common/utils/subclassOf.js","webpack://@flarum/core/./src/common/states/PageState.js","webpack://@flarum/core/./src/common/components/Page.tsx","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://@flarum/core/./src/common/utils/isObject.ts","webpack://@flarum/core/./src/common/utils/ItemList.ts","webpack://@flarum/core/./src/common/components/Separator.js","webpack://@flarum/core/../../../node_modules/clsx/dist/clsx.m.js","webpack://@flarum/core/./src/common/utils/classList.ts","webpack://@flarum/core/./src/common/helpers/listItems.tsx","webpack://@flarum/core/./src/forum/components/DiscussionHero.js","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://@flarum/core/./src/common/utils/extract.ts","webpack://@flarum/core/./src/common/utils/string.ts","webpack://@flarum/core/./src/common/components/Link.js","webpack://@flarum/core/./src/common/helpers/avatar.tsx","webpack://@flarum/core/./src/common/helpers/highlight.tsx","webpack://@flarum/core/./src/common/helpers/icon.tsx","webpack://@flarum/core/./src/common/utils/extractText.ts","webpack://@flarum/core/./src/common/utils/humanTime.ts","webpack://@flarum/core/./src/common/utils/abbreviateNumber.ts","webpack://@flarum/core/./src/common/components/Dropdown.tsx","webpack://@flarum/core/./src/common/helpers/humanTime.tsx","webpack://@flarum/core/./src/forum/components/TerminalPost.js","webpack://@flarum/core/./src/common/utils/SubtreeRetainer.ts","webpack://@flarum/core/./src/common/components/LoadingIndicator.tsx","webpack://@flarum/core/./src/common/components/ConfirmDocumentUnload.js","webpack://@flarum/core/./src/common/helpers/fireDebugWarning.ts","webpack://@flarum/core/./src/common/components/Button.tsx","webpack://@flarum/core/./src/common/utils/insertText.ts","webpack://@flarum/core/./src/common/utils/BasicEditorDriver.ts","webpack://@flarum/core/./src/common/components/Tooltip.tsx","webpack://@flarum/core/./src/common/components/TextEditor.js","webpack://@flarum/core/./src/forum/components/ComposerBody.js","webpack://@flarum/core/./src/forum/components/ReplyComposer.js","webpack://@flarum/core/./src/common/components/Alert.tsx","webpack://@flarum/core/./src/common/components/Modal.tsx","webpack://@flarum/core/./src/common/utils/Stream.ts","webpack://@flarum/core/./src/forum/components/ForgotPasswordModal.tsx","webpack://@flarum/core/./src/forum/components/LogInButtons.js","webpack://@flarum/core/./src/forum/components/SignUpModal.tsx","webpack://@flarum/core/./src/forum/components/LogInModal.tsx","webpack://@flarum/core/./src/forum/components/RenameDiscussionModal.tsx","webpack://@flarum/core/./src/forum/utils/DiscussionControls.js","webpack://@flarum/core/./src/forum/utils/slidable.js","webpack://@flarum/core/./src/common/utils/escapeRegExp.ts","webpack://@flarum/core/./src/forum/components/DiscussionListItem.tsx","webpack://@flarum/core/./src/common/components/Placeholder.js","webpack://@flarum/core/./src/forum/components/DiscussionList.js","webpack://@flarum/core/./src/forum/components/DiscussionListPane.js","webpack://@flarum/core/./src/common/utils/ScrollListener.js","webpack://@flarum/core/./src/forum/components/LoadingPost.js","webpack://@flarum/core/./src/common/helpers/username.tsx","webpack://@flarum/core/./src/forum/components/ComposerPostPreview.js","webpack://@flarum/core/./src/forum/components/ReplyPlaceholder.js","webpack://@flarum/core/./src/forum/components/PostStream.js","webpack://@flarum/core/./src/common/utils/formatNumber.ts","webpack://@flarum/core/./src/forum/components/PostStreamScrubber.js","webpack://@flarum/core/./src/common/components/SplitDropdown.tsx","webpack://@flarum/core/../throttle.js","webpack://@flarum/core/../debounce.js","webpack://@flarum/core/./src/common/utils/anchorScroll.js","webpack://@flarum/core/./src/forum/states/PostStreamState.ts","webpack://@flarum/core/./src/forum/components/DiscussionPage.tsx","webpack://@flarum/core/./src/forum/components/HeaderPrimary.js","webpack://@flarum/core/./src/common/components/LinkButton.js","webpack://@flarum/core/./src/forum/components/SessionDropdown.tsx","webpack://@flarum/core/./src/common/components/SelectDropdown.tsx","webpack://@flarum/core/./src/common/Model.ts","webpack://@flarum/core/./src/common/utils/computed.ts","webpack://@flarum/core/./src/common/utils/isDark.ts","webpack://@flarum/core/./src/common/helpers/textContrastClass.ts","webpack://@flarum/core/./src/common/utils/KeyboardNavigatable.ts","webpack://@flarum/core/./src/common/components/Badge.tsx","webpack://@flarum/core/./src/common/models/Discussion.tsx","webpack://@flarum/core/./src/forum/components/NotificationList.js","webpack://@flarum/core/./src/forum/components/NotificationsDropdown.tsx","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@flarum/core/./src/forum/components/DiscussionsSearchItem.tsx","webpack://@flarum/core/./src/forum/components/DiscussionsSearchSource.tsx","webpack://@flarum/core/./src/forum/components/UsersSearchSource.tsx","webpack://@flarum/core/./src/forum/components/Search.tsx","webpack://@flarum/core/./src/forum/components/HeaderSecondary.js","webpack://@flarum/core/./src/forum/components/ComposerButton.js","webpack://@flarum/core/./src/forum/states/ComposerState.js","webpack://@flarum/core/./src/forum/components/Composer.js","webpack://@flarum/core/./src/forum/components/Notification.tsx","webpack://@flarum/core/./src/forum/components/DiscussionRenamedNotification.tsx","webpack://@flarum/core/./src/forum/components/EditPostComposer.js","webpack://@flarum/core/./src/forum/utils/PostControls.js","webpack://@flarum/core/./src/forum/components/Post.tsx","webpack://@flarum/core/./src/common/components/GroupBadge.tsx","webpack://@flarum/core/./src/common/models/Group.ts","webpack://@flarum/core/./src/common/components/EditUserModal.tsx","webpack://@flarum/core/./src/forum/components/AffixedSidebar.js","webpack://@flarum/core/./src/forum/components/UserPage.tsx","webpack://@flarum/core/./src/forum/utils/UserControls.js","webpack://@flarum/core/./src/forum/components/AvatarEditor.js","webpack://@flarum/core/./src/forum/components/UserCard.js","webpack://@flarum/core/./src/common/helpers/userOnline.tsx","webpack://@flarum/core/./src/forum/components/PostUser.js","webpack://@flarum/core/./src/common/helpers/fullTime.tsx","webpack://@flarum/core/./src/common/components/IPAddress.tsx","webpack://@flarum/core/./src/forum/components/PostMeta.js","webpack://@flarum/core/./src/forum/components/PostEdited.js","webpack://@flarum/core/./src/forum/components/CommentPost.js","webpack://@flarum/core/./src/forum/components/EventPost.js","webpack://@flarum/core/./src/forum/components/DiscussionRenamedPost.js","webpack://@flarum/core/./src/forum/components/WelcomeHero.tsx","webpack://@flarum/core/./src/forum/components/DiscussionComposer.js","webpack://@flarum/core/./src/forum/components/IndexPage.tsx","webpack://@flarum/core/./src/forum/components/PostsUserPage.tsx","webpack://@flarum/core/./src/common/states/PaginatedListState.ts","webpack://@flarum/core/./src/common/utils/EventEmitter.ts","webpack://@flarum/core/./src/forum/states/DiscussionListState.ts","webpack://@flarum/core/./src/forum/components/DiscussionsUserPage.tsx","webpack://@flarum/core/./src/common/utils/withAttr.ts","webpack://@flarum/core/./src/common/components/Checkbox.tsx","webpack://@flarum/core/./src/common/components/Switch.tsx","webpack://@flarum/core/./src/common/components/FieldSet.js","webpack://@flarum/core/./src/forum/components/NotificationGrid.js","webpack://@flarum/core/./src/forum/components/ChangePasswordModal.tsx","webpack://@flarum/core/./src/forum/components/ChangeEmailModal.tsx","webpack://@flarum/core/./src/forum/components/SettingsPage.tsx","webpack://@flarum/core/./src/forum/components/NotificationsPage.tsx","webpack://@flarum/core/./src/common/resolvers/DefaultResolver.ts","webpack://@flarum/core/./src/forum/resolvers/DiscussionPageResolver.ts","webpack://@flarum/core/./src/common/components/LabelValue.tsx","webpack://@flarum/core/./src/forum/components/AccessTokensList.tsx","webpack://@flarum/core/./src/forum/components/NewAccessTokenModal.tsx","webpack://@flarum/core/./src/forum/states/UserSecurityPageState.ts","webpack://@flarum/core/./src/forum/components/UserSecurityPage.tsx","webpack://@flarum/core/./src/forum/routes.ts","webpack://@flarum/core/./src/forum/utils/alertEmailConfirmation.js","webpack://@flarum/core/../src/index.js","webpack://@flarum/core/../index.js","webpack://@flarum/core/./src/common/utils/focusTrap.ts","webpack://@flarum/core/../../../node_modules/body-scroll-lock/lib/bodyScrollLock.esm.js","webpack://@flarum/core/../source/pluralTypeHandler.js","webpack://@flarum/core/./src/common/components/ModalManager.tsx","webpack://@flarum/core/./src/common/components/AlertManager.tsx","webpack://@flarum/core/./src/common/components/RequestErrorModal.tsx","webpack://@flarum/core/array-utils.js","webpack://@flarum/core/function-utils.js","webpack://@flarum/core/../source/utilities.js","webpack://@flarum/core/../source/selectTypeHandler.js","webpack://@flarum/core/../source/defaultRichHandler.js","webpack://@flarum/core/../source/RichMessageFormatter.js","webpack://@flarum/core/../source/MessageFormatter.js","webpack://@flarum/core/../source/mithrilRichHandler.js","webpack://@flarum/core/./src/common/Translator.tsx","webpack://@flarum/core/./src/common/Store.ts","webpack://@flarum/core/./src/common/Session.ts","webpack://@flarum/core/./src/common/utils/Drawer.js","webpack://@flarum/core/./src/common/utils/mapRoutes.ts","webpack://@flarum/core/./src/common/utils/RequestError.ts","webpack://@flarum/core/./src/common/utils/liveHumanTimes.ts","webpack://@flarum/core/./src/common/extend.ts","webpack://@flarum/core/./src/common/models/Forum.ts","webpack://@flarum/core/./src/common/utils/stringToColor.ts","webpack://@flarum/core/./src/common/models/User.tsx","webpack://@flarum/core/./src/common/models/Post.ts","webpack://@flarum/core/./src/common/models/Notification.ts","webpack://@flarum/core/./src/common/states/ModalManagerState.ts","webpack://@flarum/core/./src/common/states/AlertManagerState.ts","webpack://@flarum/core/./src/common/helpers/fireApplicationError.ts","webpack://@flarum/core/./src/common/models/AccessToken.ts","webpack://@flarum/core/./src/common/Application.tsx","webpack://@flarum/core/./src/common/components/Navigation.tsx","webpack://@flarum/core/./src/forum/states/NotificationListState.ts","webpack://@flarum/core/./src/forum/states/SearchState.ts","webpack://@flarum/core/./src/forum/states/GlobalSearchState.ts","webpack://@flarum/core/./src/forum/utils/isSafariMobile.ts","webpack://@flarum/core/./src/forum/ForumApplication.tsx","webpack://@flarum/core/./src/forum/app.ts","webpack://@flarum/core/./src/common/extenders/Model.ts","webpack://@flarum/core/./src/common/extenders/PostTypes.ts","webpack://@flarum/core/./src/common/extenders/Routes.ts","webpack://@flarum/core/./src/common/extenders/Store.ts","webpack://@flarum/core/./src/common/extenders/index.ts","webpack://@flarum/core/./src/common/utils/evented.js","webpack://@flarum/core/./src/common/utils/styleSelectedText.ts","webpack://@flarum/core/./src/common/utils/proxifyCompat.ts","webpack://@flarum/core/../../../node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteralLoose.js","webpack://@flarum/core/./src/common/components/Select.js","webpack://@flarum/core/./src/common/components/ColorPreviewInput.tsx","webpack://@flarum/core/./src/common/components/TextEditorButton.js","webpack://@flarum/core/./src/common/compat.ts","webpack://@flarum/core/./src/common/utils/mixin.js","webpack://@flarum/core/./src/common/Fragment.ts","webpack://@flarum/core/./src/common/helpers/punctuateSeries.js","webpack://@flarum/core/./src/forum/components/LogInButton.js","webpack://@flarum/core/./src/forum/components/PostPreview.js","webpack://@flarum/core/./src/forum/compat.ts","webpack://@flarum/core/./src/forum/index.ts"],"sourcesContent":["// Based off of the polyfill on MDN\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat#reduce_concat_isarray_recursivity\n//\n// Needed to provide support for Safari on iOS < 12\n\n// ts-ignored because we can afford to encapsulate some messy logic behind the clean typings.\n\nif (!Array.prototype['flat']) {\n  Array.prototype['flat'] = function flat<A, D extends number = 1>(this: A, depth?: D | unknown): any[] {\n    // @ts-ignore\n    return (depth ?? 1) > 0\n      ? // @ts-ignore\n        Array.prototype.reduce.call(this, (acc, val): any[] => acc.concat(Array.isArray(val) ? flat.call(val, depth - 1) : val), [])\n      : // If no depth is provided, or depth is 0, just return a copy of\n        // the array. Spread is supported in all major browsers (iOS 8+)\n        // @ts-ignore\n        [...this];\n  };\n}\n","/* ========================================================================\n * Bootstrap: affix.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#affix\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // AFFIX CLASS DEFINITION\n  // ======================\n\n  var Affix = function (element, options) {\n    this.options = $.extend({}, Affix.DEFAULTS, options)\n\n    var target = this.options.target === Affix.DEFAULTS.target ? $(this.options.target) : $(document).find(this.options.target)\n\n    this.$target = target\n      .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))\n      .on('click.bs.affix.data-api',  $.proxy(this.checkPositionWithEventLoop, this))\n\n    this.$element     = $(element)\n    this.affixed      = null\n    this.unpin        = null\n    this.pinnedOffset = null\n\n    this.checkPosition()\n  }\n\n  Affix.VERSION  = '3.4.1'\n\n  Affix.RESET    = 'affix affix-top affix-bottom'\n\n  Affix.DEFAULTS = {\n    offset: 0,\n    target: window\n  }\n\n  Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {\n    var scrollTop    = this.$target.scrollTop()\n    var position     = this.$element.offset()\n    var targetHeight = this.$target.height()\n\n    if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false\n\n    if (this.affixed == 'bottom') {\n      if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'\n      return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'\n    }\n\n    var initializing   = this.affixed == null\n    var colliderTop    = initializing ? scrollTop : position.top\n    var colliderHeight = initializing ? targetHeight : height\n\n    if (offsetTop != null && scrollTop <= offsetTop) return 'top'\n    if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'\n\n    return false\n  }\n\n  Affix.prototype.getPinnedOffset = function () {\n    if (this.pinnedOffset) return this.pinnedOffset\n    this.$element.removeClass(Affix.RESET).addClass('affix')\n    var scrollTop = this.$target.scrollTop()\n    var position  = this.$element.offset()\n    return (this.pinnedOffset = position.top - scrollTop)\n  }\n\n  Affix.prototype.checkPositionWithEventLoop = function () {\n    setTimeout($.proxy(this.checkPosition, this), 1)\n  }\n\n  Affix.prototype.checkPosition = function () {\n    if (!this.$element.is(':visible')) return\n\n    var height       = this.$element.height()\n    var offset       = this.options.offset\n    var offsetTop    = offset.top\n    var offsetBottom = offset.bottom\n    var scrollHeight = Math.max($(document).height(), $(document.body).height())\n\n    if (typeof offset != 'object')         offsetBottom = offsetTop = offset\n    if (typeof offsetTop == 'function')    offsetTop    = offset.top(this.$element)\n    if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)\n\n    var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)\n\n    if (this.affixed != affix) {\n      if (this.unpin != null) this.$element.css('top', '')\n\n      var affixType = 'affix' + (affix ? '-' + affix : '')\n      var e         = $.Event(affixType + '.bs.affix')\n\n      this.$element.trigger(e)\n\n      if (e.isDefaultPrevented()) return\n\n      this.affixed = affix\n      this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null\n\n      this.$element\n        .removeClass(Affix.RESET)\n        .addClass(affixType)\n        .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')\n    }\n\n    if (affix == 'bottom') {\n      this.$element.offset({\n        top: scrollHeight - height - offsetBottom\n      })\n    }\n  }\n\n\n  // AFFIX PLUGIN DEFINITION\n  // =======================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.affix')\n      var options = typeof option == 'object' && option\n\n      if (!data) $this.data('bs.affix', (data = new Affix(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  var old = $.fn.affix\n\n  $.fn.affix             = Plugin\n  $.fn.affix.Constructor = Affix\n\n\n  // AFFIX NO CONFLICT\n  // =================\n\n  $.fn.affix.noConflict = function () {\n    $.fn.affix = old\n    return this\n  }\n\n\n  // AFFIX DATA-API\n  // ==============\n\n  $(window).on('load', function () {\n    $('[data-spy=\"affix\"]').each(function () {\n      var $spy = $(this)\n      var data = $spy.data()\n\n      data.offset = data.offset || {}\n\n      if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom\n      if (data.offsetTop    != null) data.offset.top    = data.offsetTop\n\n      Plugin.call($spy, data)\n    })\n  })\n\n}(jQuery);\n","/* ========================================================================\n * Bootstrap: dropdown.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#dropdowns\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // DROPDOWN CLASS DEFINITION\n  // =========================\n\n  var backdrop = '.dropdown-backdrop'\n  var toggle   = '[data-toggle=\"dropdown\"]'\n  var Dropdown = function (element) {\n    $(element).on('click.bs.dropdown', this.toggle)\n  }\n\n  Dropdown.VERSION = '3.4.1'\n\n  function getParent($this) {\n    var selector = $this.attr('data-target')\n\n    if (!selector) {\n      selector = $this.attr('href')\n      selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\\s]*$)/, '') // strip for ie7\n    }\n\n    var $parent = selector !== '#' ? $(document).find(selector) : null\n\n    return $parent && $parent.length ? $parent : $this.parent()\n  }\n\n  function clearMenus(e) {\n    if (e && e.which === 3) return\n    $(backdrop).remove()\n    $(toggle).each(function () {\n      var $this         = $(this)\n      var $parent       = getParent($this)\n      var relatedTarget = { relatedTarget: this }\n\n      if (!$parent.hasClass('open')) return\n\n      if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return\n\n      $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))\n\n      if (e.isDefaultPrevented()) return\n\n      $this.attr('aria-expanded', 'false')\n      $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))\n    })\n  }\n\n  Dropdown.prototype.toggle = function (e) {\n    var $this = $(this)\n\n    if ($this.is('.disabled, :disabled')) return\n\n    var $parent  = getParent($this)\n    var isActive = $parent.hasClass('open')\n\n    clearMenus()\n\n    if (!isActive) {\n      if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {\n        // if mobile we use a backdrop because click events don't delegate\n        $(document.createElement('div'))\n          .addClass('dropdown-backdrop')\n          .insertAfter($(this))\n          .on('click', clearMenus)\n      }\n\n      var relatedTarget = { relatedTarget: this }\n      $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))\n\n      if (e.isDefaultPrevented()) return\n\n      $this\n        .trigger('focus')\n        .attr('aria-expanded', 'true')\n\n      $parent\n        .toggleClass('open')\n        .trigger($.Event('shown.bs.dropdown', relatedTarget))\n    }\n\n    return false\n  }\n\n  Dropdown.prototype.keydown = function (e) {\n    if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return\n\n    var $this = $(this)\n\n    e.preventDefault()\n    e.stopPropagation()\n\n    if ($this.is('.disabled, :disabled')) return\n\n    var $parent  = getParent($this)\n    var isActive = $parent.hasClass('open')\n\n    if (!isActive && e.which != 27 || isActive && e.which == 27) {\n      if (e.which == 27) $parent.find(toggle).trigger('focus')\n      return $this.trigger('click')\n    }\n\n    var desc = ' li:not(.disabled):visible a'\n    var $items = $parent.find('.dropdown-menu' + desc)\n\n    if (!$items.length) return\n\n    var index = $items.index(e.target)\n\n    if (e.which == 38 && index > 0)                 index--         // up\n    if (e.which == 40 && index < $items.length - 1) index++         // down\n    if (!~index)                                    index = 0\n\n    $items.eq(index).trigger('focus')\n  }\n\n\n  // DROPDOWN PLUGIN DEFINITION\n  // ==========================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this = $(this)\n      var data  = $this.data('bs.dropdown')\n\n      if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n      if (typeof option == 'string') data[option].call($this)\n    })\n  }\n\n  var old = $.fn.dropdown\n\n  $.fn.dropdown             = Plugin\n  $.fn.dropdown.Constructor = Dropdown\n\n\n  // DROPDOWN NO CONFLICT\n  // ====================\n\n  $.fn.dropdown.noConflict = function () {\n    $.fn.dropdown = old\n    return this\n  }\n\n\n  // APPLY TO STANDARD DROPDOWN ELEMENTS\n  // ===================================\n\n  $(document)\n    .on('click.bs.dropdown.data-api', clearMenus)\n    .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })\n    .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)\n    .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)\n    .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)\n\n}(jQuery);\n","/* ========================================================================\n * Bootstrap: tooltip.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#tooltip\n * Inspired by the original jQuery.tipsy by Jason Frame\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n+function ($) {\n  'use strict';\n\n  var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn']\n\n  var uriAttrs = [\n    'background',\n    'cite',\n    'href',\n    'itemtype',\n    'longdesc',\n    'poster',\n    'src',\n    'xlink:href'\n  ]\n\n  var ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i\n\n  var DefaultWhitelist = {\n    // Global attributes allowed on any supplied element below.\n    '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n    a: ['target', 'href', 'title', 'rel'],\n    area: [],\n    b: [],\n    br: [],\n    col: [],\n    code: [],\n    div: [],\n    em: [],\n    hr: [],\n    h1: [],\n    h2: [],\n    h3: [],\n    h4: [],\n    h5: [],\n    h6: [],\n    i: [],\n    img: ['src', 'alt', 'title', 'width', 'height'],\n    li: [],\n    ol: [],\n    p: [],\n    pre: [],\n    s: [],\n    small: [],\n    span: [],\n    sub: [],\n    sup: [],\n    strong: [],\n    u: [],\n    ul: []\n  }\n\n  /**\n   * A pattern that recognizes a commonly useful subset of URLs that are safe.\n   *\n   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n   */\n  var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi\n\n  /**\n   * A pattern that matches safe data URLs. Only matches image, video and audio types.\n   *\n   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n   */\n  var DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i\n\n  function allowedAttribute(attr, allowedAttributeList) {\n    var attrName = attr.nodeName.toLowerCase()\n\n    if ($.inArray(attrName, allowedAttributeList) !== -1) {\n      if ($.inArray(attrName, uriAttrs) !== -1) {\n        return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN))\n      }\n\n      return true\n    }\n\n    var regExp = $(allowedAttributeList).filter(function (index, value) {\n      return value instanceof RegExp\n    })\n\n    // Check if a regular expression validates the attribute.\n    for (var i = 0, l = regExp.length; i < l; i++) {\n      if (attrName.match(regExp[i])) {\n        return true\n      }\n    }\n\n    return false\n  }\n\n  function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {\n    if (unsafeHtml.length === 0) {\n      return unsafeHtml\n    }\n\n    if (sanitizeFn && typeof sanitizeFn === 'function') {\n      return sanitizeFn(unsafeHtml)\n    }\n\n    // IE 8 and below don't support createHTMLDocument\n    if (!document.implementation || !document.implementation.createHTMLDocument) {\n      return unsafeHtml\n    }\n\n    var createdDocument = document.implementation.createHTMLDocument('sanitization')\n    createdDocument.body.innerHTML = unsafeHtml\n\n    var whitelistKeys = $.map(whiteList, function (el, i) { return i })\n    var elements = $(createdDocument.body).find('*')\n\n    for (var i = 0, len = elements.length; i < len; i++) {\n      var el = elements[i]\n      var elName = el.nodeName.toLowerCase()\n\n      if ($.inArray(elName, whitelistKeys) === -1) {\n        el.parentNode.removeChild(el)\n\n        continue\n      }\n\n      var attributeList = $.map(el.attributes, function (el) { return el })\n      var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || [])\n\n      for (var j = 0, len2 = attributeList.length; j < len2; j++) {\n        if (!allowedAttribute(attributeList[j], whitelistedAttributes)) {\n          el.removeAttribute(attributeList[j].nodeName)\n        }\n      }\n    }\n\n    return createdDocument.body.innerHTML\n  }\n\n  // TOOLTIP PUBLIC CLASS DEFINITION\n  // ===============================\n\n  var Tooltip = function (element, options) {\n    this.type       = null\n    this.options    = null\n    this.enabled    = null\n    this.timeout    = null\n    this.hoverState = null\n    this.$element   = null\n    this.inState    = null\n\n    this.init('tooltip', element, options)\n  }\n\n  Tooltip.VERSION  = '3.4.1'\n\n  Tooltip.TRANSITION_DURATION = 150\n\n  Tooltip.DEFAULTS = {\n    animation: true,\n    placement: 'top',\n    selector: false,\n    template: '<div class=\"tooltip\" role=\"tooltip\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\"></div></div>',\n    trigger: 'hover focus',\n    title: '',\n    delay: 0,\n    html: false,\n    container: false,\n    viewport: {\n      selector: 'body',\n      padding: 0\n    },\n    sanitize : true,\n    sanitizeFn : null,\n    whiteList : DefaultWhitelist\n  }\n\n  Tooltip.prototype.init = function (type, element, options) {\n    this.enabled   = true\n    this.type      = type\n    this.$element  = $(element)\n    this.options   = this.getOptions(options)\n    this.$viewport = this.options.viewport && $(document).find($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))\n    this.inState   = { click: false, hover: false, focus: false }\n\n    if (this.$element[0] instanceof document.constructor && !this.options.selector) {\n      throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')\n    }\n\n    var triggers = this.options.trigger.split(' ')\n\n    for (var i = triggers.length; i--;) {\n      var trigger = triggers[i]\n\n      if (trigger == 'click') {\n        this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))\n      } else if (trigger != 'manual') {\n        var eventIn  = trigger == 'hover' ? 'mouseenter' : 'focusin'\n        var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'\n\n        this.$element.on(eventIn  + '.' + this.type, this.options.selector, $.proxy(this.enter, this))\n        this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))\n      }\n    }\n\n    this.options.selector ?\n      (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :\n      this.fixTitle()\n  }\n\n  Tooltip.prototype.getDefaults = function () {\n    return Tooltip.DEFAULTS\n  }\n\n  Tooltip.prototype.getOptions = function (options) {\n    var dataAttributes = this.$element.data()\n\n    for (var dataAttr in dataAttributes) {\n      if (dataAttributes.hasOwnProperty(dataAttr) && $.inArray(dataAttr, DISALLOWED_ATTRIBUTES) !== -1) {\n        delete dataAttributes[dataAttr]\n      }\n    }\n\n    options = $.extend({}, this.getDefaults(), dataAttributes, options)\n\n    if (options.delay && typeof options.delay == 'number') {\n      options.delay = {\n        show: options.delay,\n        hide: options.delay\n      }\n    }\n\n    if (options.sanitize) {\n      options.template = sanitizeHtml(options.template, options.whiteList, options.sanitizeFn)\n    }\n\n    return options\n  }\n\n  Tooltip.prototype.getDelegateOptions = function () {\n    var options  = {}\n    var defaults = this.getDefaults()\n\n    this._options && $.each(this._options, function (key, value) {\n      if (defaults[key] != value) options[key] = value\n    })\n\n    return options\n  }\n\n  Tooltip.prototype.enter = function (obj) {\n    var self = obj instanceof this.constructor ?\n      obj : $(obj.currentTarget).data('bs.' + this.type)\n\n    if (!self) {\n      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())\n      $(obj.currentTarget).data('bs.' + this.type, self)\n    }\n\n    if (obj instanceof $.Event) {\n      self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true\n    }\n\n    if (self.tip().hasClass('in') || self.hoverState == 'in') {\n      self.hoverState = 'in'\n      return\n    }\n\n    clearTimeout(self.timeout)\n\n    self.hoverState = 'in'\n\n    if (!self.options.delay || !self.options.delay.show) return self.show()\n\n    self.timeout = setTimeout(function () {\n      if (self.hoverState == 'in') self.show()\n    }, self.options.delay.show)\n  }\n\n  Tooltip.prototype.isInStateTrue = function () {\n    for (var key in this.inState) {\n      if (this.inState[key]) return true\n    }\n\n    return false\n  }\n\n  Tooltip.prototype.leave = function (obj) {\n    var self = obj instanceof this.constructor ?\n      obj : $(obj.currentTarget).data('bs.' + this.type)\n\n    if (!self) {\n      self = new this.constructor(obj.currentTarget, this.getDelegateOptions())\n      $(obj.currentTarget).data('bs.' + this.type, self)\n    }\n\n    if (obj instanceof $.Event) {\n      self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false\n    }\n\n    if (self.isInStateTrue()) return\n\n    clearTimeout(self.timeout)\n\n    self.hoverState = 'out'\n\n    if (!self.options.delay || !self.options.delay.hide) return self.hide()\n\n    self.timeout = setTimeout(function () {\n      if (self.hoverState == 'out') self.hide()\n    }, self.options.delay.hide)\n  }\n\n  Tooltip.prototype.show = function () {\n    var e = $.Event('show.bs.' + this.type)\n\n    if (this.hasContent() && this.enabled) {\n      this.$element.trigger(e)\n\n      var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])\n      if (e.isDefaultPrevented() || !inDom) return\n      var that = this\n\n      var $tip = this.tip()\n\n      var tipId = this.getUID(this.type)\n\n      this.setContent()\n      $tip.attr('id', tipId)\n      this.$element.attr('aria-describedby', tipId)\n\n      if (this.options.animation) $tip.addClass('fade')\n\n      var placement = typeof this.options.placement == 'function' ?\n        this.options.placement.call(this, $tip[0], this.$element[0]) :\n        this.options.placement\n\n      var autoToken = /\\s?auto?\\s?/i\n      var autoPlace = autoToken.test(placement)\n      if (autoPlace) placement = placement.replace(autoToken, '') || 'top'\n\n      $tip\n        .detach()\n        .css({ top: 0, left: 0, display: 'block' })\n        .addClass(placement)\n        .data('bs.' + this.type, this)\n\n      this.options.container ? $tip.appendTo($(document).find(this.options.container)) : $tip.insertAfter(this.$element)\n      this.$element.trigger('inserted.bs.' + this.type)\n\n      var pos          = this.getPosition()\n      var actualWidth  = $tip[0].offsetWidth\n      var actualHeight = $tip[0].offsetHeight\n\n      if (autoPlace) {\n        var orgPlacement = placement\n        var viewportDim = this.getPosition(this.$viewport)\n\n        placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top'    :\n                    placement == 'top'    && pos.top    - actualHeight < viewportDim.top    ? 'bottom' :\n                    placement == 'right'  && pos.right  + actualWidth  > viewportDim.width  ? 'left'   :\n                    placement == 'left'   && pos.left   - actualWidth  < viewportDim.left   ? 'right'  :\n                    placement\n\n        $tip\n          .removeClass(orgPlacement)\n          .addClass(placement)\n      }\n\n      var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)\n\n      this.applyPlacement(calculatedOffset, placement)\n\n      var complete = function () {\n        var prevHoverState = that.hoverState\n        that.$element.trigger('shown.bs.' + that.type)\n        that.hoverState = null\n\n        if (prevHoverState == 'out') that.leave(that)\n      }\n\n      $.support.transition && this.$tip.hasClass('fade') ?\n        $tip\n          .one('bsTransitionEnd', complete)\n          .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :\n        complete()\n    }\n  }\n\n  Tooltip.prototype.applyPlacement = function (offset, placement) {\n    var $tip   = this.tip()\n    var width  = $tip[0].offsetWidth\n    var height = $tip[0].offsetHeight\n\n    // manually read margins because getBoundingClientRect includes difference\n    var marginTop = parseInt($tip.css('margin-top'), 10)\n    var marginLeft = parseInt($tip.css('margin-left'), 10)\n\n    // we must check for NaN for ie 8/9\n    if (isNaN(marginTop))  marginTop  = 0\n    if (isNaN(marginLeft)) marginLeft = 0\n\n    offset.top  += marginTop\n    offset.left += marginLeft\n\n    // $.fn.offset doesn't round pixel values\n    // so we use setOffset directly with our own function B-0\n    $.offset.setOffset($tip[0], $.extend({\n      using: function (props) {\n        $tip.css({\n          top: Math.round(props.top),\n          left: Math.round(props.left)\n        })\n      }\n    }, offset), 0)\n\n    $tip.addClass('in')\n\n    // check to see if placing tip in new offset caused the tip to resize itself\n    var actualWidth  = $tip[0].offsetWidth\n    var actualHeight = $tip[0].offsetHeight\n\n    if (placement == 'top' && actualHeight != height) {\n      offset.top = offset.top + height - actualHeight\n    }\n\n    var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)\n\n    if (delta.left) offset.left += delta.left\n    else offset.top += delta.top\n\n    var isVertical          = /top|bottom/.test(placement)\n    var arrowDelta          = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight\n    var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'\n\n    $tip.offset(offset)\n    this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)\n  }\n\n  Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {\n    this.arrow()\n      .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')\n      .css(isVertical ? 'top' : 'left', '')\n  }\n\n  Tooltip.prototype.setContent = function () {\n    var $tip  = this.tip()\n    var title = this.getTitle()\n\n    if (this.options.html) {\n      if (this.options.sanitize) {\n        title = sanitizeHtml(title, this.options.whiteList, this.options.sanitizeFn)\n      }\n\n      $tip.find('.tooltip-inner').html(title)\n    } else {\n      $tip.find('.tooltip-inner').text(title)\n    }\n\n    $tip.removeClass('fade in top bottom left right')\n  }\n\n  Tooltip.prototype.hide = function (callback) {\n    var that = this\n    var $tip = $(this.$tip)\n    var e    = $.Event('hide.bs.' + this.type)\n\n    function complete() {\n      if (that.hoverState != 'in') $tip.detach()\n      if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.\n        that.$element\n          .removeAttr('aria-describedby')\n          .trigger('hidden.bs.' + that.type)\n      }\n      callback && callback()\n    }\n\n    this.$element.trigger(e)\n\n    if (e.isDefaultPrevented()) return\n\n    $tip.removeClass('in')\n\n    $.support.transition && $tip.hasClass('fade') ?\n      $tip\n        .one('bsTransitionEnd', complete)\n        .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :\n      complete()\n\n    this.hoverState = null\n\n    return this\n  }\n\n  Tooltip.prototype.fixTitle = function () {\n    var $e = this.$element\n    if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {\n      $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')\n    }\n  }\n\n  Tooltip.prototype.hasContent = function () {\n    return this.getTitle()\n  }\n\n  Tooltip.prototype.getPosition = function ($element) {\n    $element   = $element || this.$element\n\n    var el     = $element[0]\n    var isBody = el.tagName == 'BODY'\n\n    var elRect    = el.getBoundingClientRect()\n    if (elRect.width == null) {\n      // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093\n      elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })\n    }\n    var isSvg = window.SVGElement && el instanceof window.SVGElement\n    // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.\n    // See https://github.com/twbs/bootstrap/issues/20280\n    var elOffset  = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())\n    var scroll    = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }\n    var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null\n\n    return $.extend({}, elRect, scroll, outerDims, elOffset)\n  }\n\n  Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {\n    return placement == 'bottom' ? { top: pos.top + pos.height,   left: pos.left + pos.width / 2 - actualWidth / 2 } :\n           placement == 'top'    ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :\n           placement == 'left'   ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :\n        /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }\n\n  }\n\n  Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {\n    var delta = { top: 0, left: 0 }\n    if (!this.$viewport) return delta\n\n    var viewportPadding = this.options.viewport && this.options.viewport.padding || 0\n    var viewportDimensions = this.getPosition(this.$viewport)\n\n    if (/right|left/.test(placement)) {\n      var topEdgeOffset    = pos.top - viewportPadding - viewportDimensions.scroll\n      var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight\n      if (topEdgeOffset < viewportDimensions.top) { // top overflow\n        delta.top = viewportDimensions.top - topEdgeOffset\n      } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow\n        delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset\n      }\n    } else {\n      var leftEdgeOffset  = pos.left - viewportPadding\n      var rightEdgeOffset = pos.left + viewportPadding + actualWidth\n      if (leftEdgeOffset < viewportDimensions.left) { // left overflow\n        delta.left = viewportDimensions.left - leftEdgeOffset\n      } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow\n        delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset\n      }\n    }\n\n    return delta\n  }\n\n  Tooltip.prototype.getTitle = function () {\n    var title\n    var $e = this.$element\n    var o  = this.options\n\n    title = $e.attr('data-original-title')\n      || (typeof o.title == 'function' ? o.title.call($e[0]) :  o.title)\n\n    return title\n  }\n\n  Tooltip.prototype.getUID = function (prefix) {\n    do prefix += ~~(Math.random() * 1000000)\n    while (document.getElementById(prefix))\n    return prefix\n  }\n\n  Tooltip.prototype.tip = function () {\n    if (!this.$tip) {\n      this.$tip = $(this.options.template)\n      if (this.$tip.length != 1) {\n        throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')\n      }\n    }\n    return this.$tip\n  }\n\n  Tooltip.prototype.arrow = function () {\n    return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))\n  }\n\n  Tooltip.prototype.enable = function () {\n    this.enabled = true\n  }\n\n  Tooltip.prototype.disable = function () {\n    this.enabled = false\n  }\n\n  Tooltip.prototype.toggleEnabled = function () {\n    this.enabled = !this.enabled\n  }\n\n  Tooltip.prototype.toggle = function (e) {\n    var self = this\n    if (e) {\n      self = $(e.currentTarget).data('bs.' + this.type)\n      if (!self) {\n        self = new this.constructor(e.currentTarget, this.getDelegateOptions())\n        $(e.currentTarget).data('bs.' + this.type, self)\n      }\n    }\n\n    if (e) {\n      self.inState.click = !self.inState.click\n      if (self.isInStateTrue()) self.enter(self)\n      else self.leave(self)\n    } else {\n      self.tip().hasClass('in') ? self.leave(self) : self.enter(self)\n    }\n  }\n\n  Tooltip.prototype.destroy = function () {\n    var that = this\n    clearTimeout(this.timeout)\n    this.hide(function () {\n      that.$element.off('.' + that.type).removeData('bs.' + that.type)\n      if (that.$tip) {\n        that.$tip.detach()\n      }\n      that.$tip = null\n      that.$arrow = null\n      that.$viewport = null\n      that.$element = null\n    })\n  }\n\n  Tooltip.prototype.sanitizeHtml = function (unsafeHtml) {\n    return sanitizeHtml(unsafeHtml, this.options.whiteList, this.options.sanitizeFn)\n  }\n\n  // TOOLTIP PLUGIN DEFINITION\n  // =========================\n\n  function Plugin(option) {\n    return this.each(function () {\n      var $this   = $(this)\n      var data    = $this.data('bs.tooltip')\n      var options = typeof option == 'object' && option\n\n      if (!data && /destroy|hide/.test(option)) return\n      if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n      if (typeof option == 'string') data[option]()\n    })\n  }\n\n  var old = $.fn.tooltip\n\n  $.fn.tooltip             = Plugin\n  $.fn.tooltip.Constructor = Tooltip\n\n\n  // TOOLTIP NO CONFLICT\n  // ===================\n\n  $.fn.tooltip.noConflict = function () {\n    $.fn.tooltip = old\n    return this\n  }\n\n}(jQuery);\n","/* ========================================================================\n * Bootstrap: transition.js v3.4.1\n * https://getbootstrap.com/docs/3.4/javascript/#transitions\n * ========================================================================\n * Copyright 2011-2019 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n  'use strict';\n\n  // CSS TRANSITION SUPPORT (Shoutout: https://modernizr.com/)\n  // ============================================================\n\n  function transitionEnd() {\n    var el = document.createElement('bootstrap')\n\n    var transEndEventNames = {\n      WebkitTransition : 'webkitTransitionEnd',\n      MozTransition    : 'transitionend',\n      OTransition      : 'oTransitionEnd otransitionend',\n      transition       : 'transitionend'\n    }\n\n    for (var name in transEndEventNames) {\n      if (el.style[name] !== undefined) {\n        return { end: transEndEventNames[name] }\n      }\n    }\n\n    return false // explicit for ie8 (  ._.)\n  }\n\n  // https://blog.alexmaccaw.com/css-transitions\n  $.fn.emulateTransitionEnd = function (duration) {\n    var called = false\n    var $el = this\n    $(this).one('bsTransitionEnd', function () { called = true })\n    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }\n    setTimeout(callback, duration)\n    return this\n  }\n\n  $(function () {\n    $.support.transition = transitionEnd()\n\n    if (!$.support.transition) return\n\n    $.event.special.bsTransitionEnd = {\n      bindType: $.support.transition.end,\n      delegateType: $.support.transition.end,\n      handle: function (e) {\n        if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)\n      }\n    }\n  })\n\n}(jQuery);\n","/*!\r\n * Color Thief v2.0\r\n * by Lokesh Dhakar - http://www.lokeshdhakar.com\r\n *\r\n * Thanks\r\n * ------\r\n * Nick Rabinowitz - For creating quantize.js.\r\n * John Schulz - For clean up and optimization. @JFSIII\r\n * Nathan Spady - For adding drag and drop support to the demo page.\r\n *\r\n * License\r\n * -------\r\n * Copyright 2011, 2015 Lokesh Dhakar\r\n * Released under the MIT license\r\n * https://raw.githubusercontent.com/lokesh/color-thief/master/LICENSE\r\n *\r\n */\r\nvar CanvasImage=function(a){this.canvas=document.createElement(\"canvas\"),this.context=this.canvas.getContext(\"2d\"),document.body.appendChild(this.canvas),this.width=this.canvas.width=a.width,this.height=this.canvas.height=a.height,this.context.drawImage(a,0,0,this.width,this.height)};CanvasImage.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},CanvasImage.prototype.update=function(a){this.context.putImageData(a,0,0)},CanvasImage.prototype.getPixelCount=function(){return this.width*this.height},CanvasImage.prototype.getImageData=function(){return this.context.getImageData(0,0,this.width,this.height)},CanvasImage.prototype.removeCanvas=function(){this.canvas.parentNode.removeChild(this.canvas)};var ColorThief=function(){};/*!\r\n * quantize.js Copyright 2008 Nick Rabinowitz.\r\n * Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php\r\n */\r\n/*!\r\n * Block below copied from Protovis: http://mbostock.github.com/protovis/\r\n * Copyright 2010 Stanford Visualization Group\r\n * Licensed under the BSD License: http://www.opensource.org/licenses/bsd-license.php\r\n */\r\nif(ColorThief.prototype.getColor=function(a,b){var c=this.getPalette(a,5,b),d=c[0];return d},ColorThief.prototype.getPalette=function(a,b,c){\"undefined\"==typeof b&&(b=10),(\"undefined\"==typeof c||1>c)&&(c=10);for(var d,e,f,g,h,i=new CanvasImage(a),j=i.getImageData(),k=j.data,l=i.getPixelCount(),m=[],n=0;l>n;n+=c)d=4*n,e=k[d+0],f=k[d+1],g=k[d+2],h=k[d+3],h>=125&&(e>250&&f>250&&g>250||m.push([e,f,g]));var o=MMCQ.quantize(m,b),p=o?o.palette():null;return i.removeCanvas(),p},!pv)var pv={map:function(a,b){var c={};return b?a.map(function(a,d){return c.index=d,b.call(c,a)}):a.slice()},naturalOrder:function(a,b){return b>a?-1:a>b?1:0},sum:function(a,b){var c={};return a.reduce(b?function(a,d,e){return c.index=e,a+b.call(c,d)}:function(a,b){return a+b},0)},max:function(a,b){return Math.max.apply(null,b?pv.map(a,b):a)}};var MMCQ=function(){function a(a,b,c){return(a<<2*i)+(b<<i)+c}function b(a){function b(){c.sort(a),d=!0}var c=[],d=!1;return{push:function(a){c.push(a),d=!1},peek:function(a){return d||b(),void 0===a&&(a=c.length-1),c[a]},pop:function(){return d||b(),c.pop()},size:function(){return c.length},map:function(a){return c.map(a)},debug:function(){return d||b(),c}}}function c(a,b,c,d,e,f,g){var h=this;h.r1=a,h.r2=b,h.g1=c,h.g2=d,h.b1=e,h.b2=f,h.histo=g}function d(){this.vboxes=new b(function(a,b){return pv.naturalOrder(a.vbox.count()*a.vbox.volume(),b.vbox.count()*b.vbox.volume())})}function e(b){var c,d,e,f,g=1<<3*i,h=new Array(g);return b.forEach(function(b){d=b[0]>>j,e=b[1]>>j,f=b[2]>>j,c=a(d,e,f),h[c]=(h[c]||0)+1}),h}function f(a,b){var d,e,f,g=1e6,h=0,i=1e6,k=0,l=1e6,m=0;return a.forEach(function(a){d=a[0]>>j,e=a[1]>>j,f=a[2]>>j,g>d?g=d:d>h&&(h=d),i>e?i=e:e>k&&(k=e),l>f?l=f:f>m&&(m=f)}),new c(g,h,i,k,l,m,b)}function g(b,c){function d(a){var b,d,e,f,g,h=a+\"1\",j=a+\"2\",k=0;for(i=c[h];i<=c[j];i++)if(o[i]>n/2){for(e=c.copy(),f=c.copy(),b=i-c[h],d=c[j]-i,g=d>=b?Math.min(c[j]-1,~~(i+d/2)):Math.max(c[h],~~(i-1-b/2));!o[g];)g++;for(k=p[g];!k&&o[g-1];)k=p[--g];return e[j]=g,f[h]=e[j]+1,[e,f]}}if(c.count()){var e=c.r2-c.r1+1,f=c.g2-c.g1+1,g=c.b2-c.b1+1,h=pv.max([e,f,g]);if(1==c.count())return[c.copy()];var i,j,k,l,m,n=0,o=[],p=[];if(h==e)for(i=c.r1;i<=c.r2;i++){for(l=0,j=c.g1;j<=c.g2;j++)for(k=c.b1;k<=c.b2;k++)m=a(i,j,k),l+=b[m]||0;n+=l,o[i]=n}else if(h==f)for(i=c.g1;i<=c.g2;i++){for(l=0,j=c.r1;j<=c.r2;j++)for(k=c.b1;k<=c.b2;k++)m=a(j,i,k),l+=b[m]||0;n+=l,o[i]=n}else for(i=c.b1;i<=c.b2;i++){for(l=0,j=c.r1;j<=c.r2;j++)for(k=c.g1;k<=c.g2;k++)m=a(j,k,i),l+=b[m]||0;n+=l,o[i]=n}return o.forEach(function(a,b){p[b]=n-a}),d(h==e?\"r\":h==f?\"g\":\"b\")}}function h(a,c){function h(a,b){for(var c,d=1,e=0;k>e;)if(c=a.pop(),c.count()){var f=g(i,c),h=f[0],j=f[1];if(!h)return;if(a.push(h),j&&(a.push(j),d++),d>=b)return;if(e++>k)return}else a.push(c),e++}if(!a.length||2>c||c>256)return!1;var i=e(a),j=0;i.forEach(function(){j++});var m=f(a,i),n=new b(function(a,b){return pv.naturalOrder(a.count(),b.count())});n.push(m),h(n,l*c);for(var o=new b(function(a,b){return pv.naturalOrder(a.count()*a.volume(),b.count()*b.volume())});n.size();)o.push(n.pop());h(o,c-o.size());for(var p=new d;o.size();)p.push(o.pop());return p}var i=5,j=8-i,k=1e3,l=.75;return c.prototype={volume:function(a){var b=this;return(!b._volume||a)&&(b._volume=(b.r2-b.r1+1)*(b.g2-b.g1+1)*(b.b2-b.b1+1)),b._volume},count:function(b){var c=this,d=c.histo;if(!c._count_set||b){var e,f,g,h=0;for(e=c.r1;e<=c.r2;e++)for(f=c.g1;f<=c.g2;f++)for(g=c.b1;g<=c.b2;g++)index=a(e,f,g),h+=d[index]||0;c._count=h,c._count_set=!0}return c._count},copy:function(){var a=this;return new c(a.r1,a.r2,a.g1,a.g2,a.b1,a.b2,a.histo)},avg:function(b){var c=this,d=c.histo;if(!c._avg||b){var e,f,g,h,j,k=0,l=1<<8-i,m=0,n=0,o=0;for(f=c.r1;f<=c.r2;f++)for(g=c.g1;g<=c.g2;g++)for(h=c.b1;h<=c.b2;h++)j=a(f,g,h),e=d[j]||0,k+=e,m+=e*(f+.5)*l,n+=e*(g+.5)*l,o+=e*(h+.5)*l;k?c._avg=[~~(m/k),~~(n/k),~~(o/k)]:c._avg=[~~(l*(c.r1+c.r2+1)/2),~~(l*(c.g1+c.g2+1)/2),~~(l*(c.b1+c.b2+1)/2)]}return c._avg},contains:function(a){var b=this,c=a[0]>>j;return gval=a[1]>>j,bval=a[2]>>j,c>=b.r1&&c<=b.r2&&gval>=b.g1&&gval<=b.g2&&bval>=b.b1&&bval<=b.b2}},d.prototype={push:function(a){this.vboxes.push({vbox:a,color:a.avg()})},palette:function(){return this.vboxes.map(function(a){return a.color})},size:function(){return this.vboxes.size()},map:function(a){for(var b=this.vboxes,c=0;c<b.size();c++)if(b.peek(c).vbox.contains(a))return b.peek(c).color;return this.nearest(a)},nearest:function(a){for(var b,c,d,e=this.vboxes,f=0;f<e.size();f++)c=Math.sqrt(Math.pow(a[0]-e.peek(f).color[0],2)+Math.pow(a[1]-e.peek(f).color[1],2)+Math.pow(a[2]-e.peek(f).color[2],2)),(b>c||void 0===b)&&(b=c,d=e.peek(f).color);return d},forcebw:function(){var a=this.vboxes;a.sort(function(a,b){return pv.naturalOrder(pv.sum(a.color),pv.sum(b.color))});var b=a[0].color;b[0]<5&&b[1]<5&&b[2]<5&&(a[0].color=[0,0,0]);var c=a.length-1,d=a[c].color;d[0]>251&&d[1]>251&&d[2]>251&&(a[c].color=[255,255,255])}},{quantize:h}}();\r\nmodule.exports = ColorThief;\r\n","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",f=\"month\",h=\"quarter\",c=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(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,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},g=\"en\",D={};D[g]=M;var p=function(t){return t instanceof _},S=function t(e,n,r){var i;if(!e)return g;if(\"string\"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split(\"-\");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.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($);if(r){var i=r[2]-1||0,s=(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,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.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()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),l=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return O.w(n.toDate()[t].apply(n.toDate(\"s\"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v=\"set\"+(this.$u?\"UTC\":\"\");switch(h){case c:return r?l(1,0):l(31,11);case f:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+\"Hours\",0);case u:return $(v+\"Minutes\",1);case s:return $(v+\"Seconds\",2);case i:return $(v+\"Milliseconds\",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h=\"set\"+(this.$u?\"UTC\":\"\"),l=(n={},n[a]=h+\"Date\",n[d]=h+\"Date\",n[f]=h+\"Month\",n[c]=h+\"FullYear\",n[u]=h+\"Hours\",n[s]=h+\"Minutes\",n[i]=h+\"Seconds\",n[r]=h+\"Milliseconds\",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,l=this;r=Number(r);var $=O.p(h),y=function(t){var e=w(l);return O.w(e.date(e.date()+Math.round(t*r)),l)};if($===f)return this.set(f,this.$M+r);if($===c)return this.set(c,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||\"YYYY-MM-DDTHH:mm:ssZ\",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},c=function(t){return O.s(s%12||12,t,\"0\")},d=n.meridiem||function(t,e,n){var r=t<12?\"AM\":\"PM\";return n?r.toLowerCase():r},$={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,\"0\"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,\"0\"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,\"0\"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,\"0\"),s:String(this.$s),ss:O.s(this.$s,2,\"0\"),SSS:O.s(this.$ms,3,\"0\"),Z:i};return r.replace(y,(function(t,e){return e||$[t]||i.replace(\":\",\"\")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,v=this-M,g=O.m(this,M);return g=($={},$[c]=g/12,$[f]=g,$[h]=g/3,$[o]=(v-m)/6048e5,$[a]=(v-m)/864e5,$[u]=v/n,$[s]=v/e,$[i]=v/t,$)[y]||v,l?g:O.a(g)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),T=_.prototype;return w.prototype=T,[[\"$ms\",r],[\"$s\",i],[\"$m\",s],[\"$H\",u],[\"$W\",a],[\"$M\",f],[\"$y\",c],[\"$D\",d]].forEach((function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[g],w.Ls=D,w.p={},w}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_localizedFormat=t()}(this,(function(){\"use strict\";var e={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(t,o,n){var r=o.prototype,i=r.format;n.en.formats=e,r.format=function(t){void 0===t&&(t=\"YYYY-MM-DDTHH:mm:ssZ\");var o=this.$locale().formats,n=function(t,o){return t.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var i=r&&r.toUpperCase();return n||o[r]||e[r]||o[i].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,o){return t||o.slice(1)}))}))}(t,void 0===o?{}:o);return i.call(this,n)}}}));","!function(r,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(r=\"undefined\"!=typeof globalThis?globalThis:r||self).dayjs_plugin_relativeTime=e()}(this,(function(){\"use strict\";return function(r,e,t){r=r||{};var n=e.prototype,o={future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.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\"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(\"\"+p)),a=\"string\"==typeof v?v.replace(\"%d\",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return\"function\"==typeof M?M(a):M.replace(\"%s\",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)}}}));","\"use strict\";\n\n// eslint-disable-next-line func-names\nmodule.exports = function () {\n  if (typeof globalThis === \"object\") {\n    return globalThis;\n  }\n\n  var g;\n\n  try {\n    // This works if eval is allowed (see CSP)\n    // eslint-disable-next-line no-new-func\n    g = this || new Function(\"return this\")();\n  } catch (e) {\n    // This works if the window reference is available\n    if (typeof window === \"object\") {\n      return window;\n    } // This works if the self reference is available\n\n\n    if (typeof self === \"object\") {\n      return self;\n    } // This works if the global reference is available\n\n\n    if (typeof global !== \"undefined\") {\n      return global;\n    }\n  }\n\n  return g;\n}();","/*jslint browser: true*/\r\n/*jslint jquery: true*/\r\n\r\n/*\r\n * jQuery Hotkeys Plugin\r\n * Copyright 2010, John Resig\r\n * Dual licensed under the MIT or GPL Version 2 licenses.\r\n *\r\n * Based upon the plugin by Tzury Bar Yochay:\r\n * https://github.com/tzuryby/jquery.hotkeys\r\n *\r\n * Original idea by:\r\n * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/\r\n */\r\n\r\n/*\r\n * One small change is: now keys are passed by object { keys: '...' }\r\n * Might be useful, when you want to pass some other data to your handler\r\n */\r\n\r\n(function(jQuery) {\r\n\r\n  jQuery.hotkeys = {\r\n    version: \"0.2.0\",\r\n\r\n    specialKeys: {\r\n      8: \"backspace\",\r\n      9: \"tab\",\r\n      10: \"return\",\r\n      13: \"return\",\r\n      16: \"shift\",\r\n      17: \"ctrl\",\r\n      18: \"alt\",\r\n      19: \"pause\",\r\n      20: \"capslock\",\r\n      27: \"esc\",\r\n      32: \"space\",\r\n      33: \"pageup\",\r\n      34: \"pagedown\",\r\n      35: \"end\",\r\n      36: \"home\",\r\n      37: \"left\",\r\n      38: \"up\",\r\n      39: \"right\",\r\n      40: \"down\",\r\n      45: \"insert\",\r\n      46: \"del\",\r\n      59: \";\",\r\n      61: \"=\",\r\n      96: \"0\",\r\n      97: \"1\",\r\n      98: \"2\",\r\n      99: \"3\",\r\n      100: \"4\",\r\n      101: \"5\",\r\n      102: \"6\",\r\n      103: \"7\",\r\n      104: \"8\",\r\n      105: \"9\",\r\n      106: \"*\",\r\n      107: \"+\",\r\n      109: \"-\",\r\n      110: \".\",\r\n      111: \"/\",\r\n      112: \"f1\",\r\n      113: \"f2\",\r\n      114: \"f3\",\r\n      115: \"f4\",\r\n      116: \"f5\",\r\n      117: \"f6\",\r\n      118: \"f7\",\r\n      119: \"f8\",\r\n      120: \"f9\",\r\n      121: \"f10\",\r\n      122: \"f11\",\r\n      123: \"f12\",\r\n      144: \"numlock\",\r\n      145: \"scroll\",\r\n      173: \"-\",\r\n      186: \";\",\r\n      187: \"=\",\r\n      188: \",\",\r\n      189: \"-\",\r\n      190: \".\",\r\n      191: \"/\",\r\n      192: \"`\",\r\n      219: \"[\",\r\n      220: \"\\\\\",\r\n      221: \"]\",\r\n      222: \"'\"\r\n    },\r\n\r\n    shiftNums: {\r\n      \"`\": \"~\",\r\n      \"1\": \"!\",\r\n      \"2\": \"@\",\r\n      \"3\": \"#\",\r\n      \"4\": \"$\",\r\n      \"5\": \"%\",\r\n      \"6\": \"^\",\r\n      \"7\": \"&\",\r\n      \"8\": \"*\",\r\n      \"9\": \"(\",\r\n      \"0\": \")\",\r\n      \"-\": \"_\",\r\n      \"=\": \"+\",\r\n      \";\": \": \",\r\n      \"'\": \"\\\"\",\r\n      \",\": \"<\",\r\n      \".\": \">\",\r\n      \"/\": \"?\",\r\n      \"\\\\\": \"|\"\r\n    },\r\n\r\n    // excludes: button, checkbox, file, hidden, image, password, radio, reset, search, submit, url\r\n    textAcceptingInputTypes: [\r\n      \"text\", \"password\", \"number\", \"email\", \"url\", \"range\", \"date\", \"month\", \"week\", \"time\", \"datetime\",\r\n      \"datetime-local\", \"search\", \"color\", \"tel\"],\r\n\r\n    // default input types not to bind to unless bound directly\r\n    textInputTypes: /textarea|input|select/i,\r\n\r\n    options: {\r\n      filterInputAcceptingElements: true,\r\n      filterTextInputs: true,\r\n      filterContentEditable: true\r\n    }\r\n  };\r\n\r\n  function keyHandler(handleObj) {\r\n    if (typeof handleObj.data === \"string\") {\r\n      handleObj.data = {\r\n        keys: handleObj.data\r\n      };\r\n    }\r\n\r\n    // Only care when a possible input has been specified\r\n    if (!handleObj.data || !handleObj.data.keys || typeof handleObj.data.keys !== \"string\") {\r\n      return;\r\n    }\r\n\r\n    var origHandler = handleObj.handler,\r\n      keys = handleObj.data.keys.toLowerCase().split(\" \");\r\n\r\n    handleObj.handler = function(event) {\r\n      //      Don't fire in text-accepting inputs that we didn't directly bind to\r\n      if (this !== event.target &&\r\n        (jQuery.hotkeys.options.filterInputAcceptingElements &&\r\n          jQuery.hotkeys.textInputTypes.test(event.target.nodeName) ||\r\n          (jQuery.hotkeys.options.filterContentEditable && jQuery(event.target).attr('contenteditable')) ||\r\n          (jQuery.hotkeys.options.filterTextInputs &&\r\n            jQuery.inArray(event.target.type, jQuery.hotkeys.textAcceptingInputTypes) > -1))) {\r\n        return;\r\n      }\r\n\r\n      var special = event.type !== \"keypress\" && jQuery.hotkeys.specialKeys[event.which],\r\n        character = String.fromCharCode(event.which).toLowerCase(),\r\n        modif = \"\",\r\n        possible = {};\r\n\r\n      jQuery.each([\"alt\", \"ctrl\", \"shift\"], function(index, specialKey) {\r\n\r\n        if (event[specialKey + 'Key'] && special !== specialKey) {\r\n          modif += specialKey + '+';\r\n        }\r\n      });\r\n\r\n      // metaKey is triggered off ctrlKey erronously\r\n      if (event.metaKey && !event.ctrlKey && special !== \"meta\") {\r\n        modif += \"meta+\";\r\n      }\r\n\r\n      if (event.metaKey && special !== \"meta\" && modif.indexOf(\"alt+ctrl+shift+\") > -1) {\r\n        modif = modif.replace(\"alt+ctrl+shift+\", \"hyper+\");\r\n      }\r\n\r\n      if (special) {\r\n        possible[modif + special] = true;\r\n      }\r\n      else {\r\n        possible[modif + character] = true;\r\n        possible[modif + jQuery.hotkeys.shiftNums[character]] = true;\r\n\r\n        // \"$\" can be triggered as \"Shift+4\" or \"Shift+$\" or just \"$\"\r\n        if (modif === \"shift+\") {\r\n          possible[jQuery.hotkeys.shiftNums[character]] = true;\r\n        }\r\n      }\r\n\r\n      for (var i = 0, l = keys.length; i < l; i++) {\r\n        if (possible[keys[i]]) {\r\n          return origHandler.apply(this, arguments);\r\n        }\r\n      }\r\n    };\r\n  }\r\n\r\n  jQuery.each([\"keydown\", \"keyup\", \"keypress\"], function() {\r\n    jQuery.event.special[this] = {\r\n      add: keyHandler\r\n    };\r\n  });\r\n\r\n})(jQuery || this.jQuery || window.jQuery);\r\n","/*!\n * jQuery JavaScript Library v3.6.1\n * https://jquery.com/\n *\n * Includes Sizzle.js\n * https://sizzlejs.com/\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2022-08-26T17:52Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket trac-14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar flat = arr.flat ? function( array ) {\n\treturn arr.flat.call( array );\n} : function( array ) {\n\treturn arr.concat.apply( [], array );\n};\n\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n\t\t// Support: Chrome <=57, Firefox <=52\n\t\t// In some browsers, typeof returns \"function\" for HTML <object> elements\n\t\t// (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n\t\t// We don't want to classify *any* DOM node as a function.\n\t\t// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5\n\t\t// Plus for old WebKit, typeof returns \"function\" for HTML collections\n\t\t// (e.g., `typeof document.getElementsByTagName(\"div\") === \"function\"`). (gh-4756)\n\t\treturn typeof obj === \"function\" && typeof obj.nodeType !== \"number\" &&\n\t\t\ttypeof obj.item !== \"function\";\n\t};\n\n\nvar isWindow = function isWindow( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t};\n\n\nvar document = window.document;\n\n\n\n\tvar preservedScriptAttributes = {\n\t\ttype: true,\n\t\tsrc: true,\n\t\tnonce: true,\n\t\tnoModule: true\n\t};\n\n\tfunction DOMEval( code, node, doc ) {\n\t\tdoc = doc || document;\n\n\t\tvar i, val,\n\t\t\tscript = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tif ( node ) {\n\t\t\tfor ( i in preservedScriptAttributes ) {\n\n\t\t\t\t// Support: Firefox 64+, Edge 18+\n\t\t\t\t// Some browsers don't support the \"nonce\" property on scripts.\n\t\t\t\t// On the other hand, just using `getAttribute` is not enough as\n\t\t\t\t// the `nonce` attribute is reset to an empty string whenever it\n\t\t\t\t// becomes browsing-context connected.\n\t\t\t\t// See https://github.com/whatwg/html/issues/2369\n\t\t\t\t// See https://html.spec.whatwg.org/#nonce-attributes\n\t\t\t\t// The `node.getAttribute` check was added for the sake of\n\t\t\t\t// `jQuery.globalEval` so that it can fake a nonce-containing node\n\t\t\t\t// via an object.\n\t\t\t\tval = node[ i ] || node.getAttribute && node.getAttribute( i );\n\t\t\t\tif ( val ) {\n\t\t\t\t\tscript.setAttribute( i, val );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n\n\nfunction toType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\t// Support: Android <=2.3 only (functionish RegExp)\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar\n\tversion = \"3.6.1\",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teven: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn ( i + 1 ) % 2;\n\t\t} ) );\n\t},\n\n\todd: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn i % 2;\n\t\t} ) );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent Object.prototype pollution\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( name === \"__proto__\" || target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\n\t\t\t\t\tsrc = target[ name ];\n\n\t\t\t\t\t// Ensure proper type for the source value\n\t\t\t\t\tif ( copyIsArray && !Array.isArray( src ) ) {\n\t\t\t\t\t\tclone = [];\n\t\t\t\t\t} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {\n\t\t\t\t\t\tclone = {};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src;\n\t\t\t\t\t}\n\t\t\t\t\tcopyIsArray = false;\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t// Evaluates a script in a provided context; falls back to the global one\n\t// if not specified.\n\tglobalEval: function( code, options, doc ) {\n\t\tDOMEval( code, { nonce: options && options.nonce }, doc );\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn flat( ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\n\tfunction( _i, name ) {\n\t\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n\t} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = toType( obj );\n\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.3.6\n * https://sizzlejs.com/\n *\n * Copyright JS Foundation and other contributors\n * Released under the MIT license\n * https://js.foundation/\n *\n * Date: 2021-02-16\n */\n( function( window ) {\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tnonnativeSelectorCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// Instance methods\n\thasOwn = ( {} ).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpushNative = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\n\t// Use a stripped-down indexOf as it's faster than native\n\t// https://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[ i ] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|\" +\n\t\t\"ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\n\t// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram\n\tidentifier = \"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\n\t\t// \"Attribute values must be CSS identifiers [capture 5]\n\t\t// or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" +\n\t\twhitespace + \"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" +\n\t\twhitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace +\n\t\t\"*\" ),\n\trdescend = new RegExp( whitespace + \"|>\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" +\n\t\t\twhitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" +\n\t\t\twhitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace +\n\t\t\t\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" + whitespace +\n\t\t\t\"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trhtml = /HTML$/i,\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace + \"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\", \"g\" ),\n\tfunescape = function( escape, nonHex ) {\n\t\tvar high = \"0x\" + escape.slice( 1 ) - 0x10000;\n\n\t\treturn nonHex ?\n\n\t\t\t// Strip the backslash prefix from a non-hex escape sequence\n\t\t\tnonHex :\n\n\t\t\t// Replace a hexadecimal escape sequence with the encoded Unicode code point\n\t\t\t// Support: IE <=11+\n\t\t\t// For values outside the Basic Multilingual Plane (BMP), manually construct a\n\t\t\t// surrogate pair\n\t\t\thigh < 0 ?\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// CSS string/identifier serialization\n\t// https://drafts.csswg.org/cssom/#common-serializing-idioms\n\trcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,\n\tfcssescape = function( ch, asCodePoint ) {\n\t\tif ( asCodePoint ) {\n\n\t\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\t\tif ( ch === \"\\0\" ) {\n\t\t\t\treturn \"\\uFFFD\";\n\t\t\t}\n\n\t\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\t\treturn ch.slice( 0, -1 ) + \"\\\\\" +\n\t\t\t\tch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t\t}\n\n\t\t// Other potentially-special ASCII characters get backslash-escaped\n\t\treturn \"\\\\\" + ch;\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tinDisabledFieldset = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && elem.nodeName.toLowerCase() === \"fieldset\";\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t( arr = slice.call( preferredDoc.childNodes ) ),\n\t\tpreferredDoc.childNodes\n\t);\n\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\t// eslint-disable-next-line no-unused-expressions\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpushNative.apply( target, slice.call( els ) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( ( target[ j++ ] = els[ i++ ] ) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\t\tsetDocument( context );\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( ( m = match[ 1 ] ) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( ( elem = context.getElementById( m ) ) ) {\n\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && ( elem = newContext.getElementById( m ) ) &&\n\t\t\t\t\t\t\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[ 2 ] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( ( m = match[ 3 ] ) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( support.qsa &&\n\t\t\t\t!nonnativeSelectorCache[ selector + \" \" ] &&\n\t\t\t\t( !rbuggyQSA || !rbuggyQSA.test( selector ) ) &&\n\n\t\t\t\t// Support: IE 8 only\n\t\t\t\t// Exclude object elements\n\t\t\t\t( nodeType !== 1 || context.nodeName.toLowerCase() !== \"object\" ) ) {\n\n\t\t\t\tnewSelector = selector;\n\t\t\t\tnewContext = context;\n\n\t\t\t\t// qSA considers elements outside a scoping root when evaluating child or\n\t\t\t\t// descendant combinators, which is not what we want.\n\t\t\t\t// In such cases, we work around the behavior by prefixing every selector in the\n\t\t\t\t// list with an ID selector referencing the scope context.\n\t\t\t\t// The technique has to be used as well when a leading combinator is used\n\t\t\t\t// as such selectors are not recognized by querySelectorAll.\n\t\t\t\t// Thanks to Andrew Dupont for this technique.\n\t\t\t\tif ( nodeType === 1 &&\n\t\t\t\t\t( rdescend.test( selector ) || rcombinators.test( selector ) ) ) {\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\n\t\t\t\t\t// We can use :scope instead of the ID hack if the browser\n\t\t\t\t\t// supports it & if we're not changing the context.\n\t\t\t\t\tif ( newContext !== context || !support.scope ) {\n\n\t\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\t\tif ( ( nid = context.getAttribute( \"id\" ) ) ) {\n\t\t\t\t\t\t\tnid = nid.replace( rcssescape, fcssescape );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontext.setAttribute( \"id\", ( nid = expando ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[ i ] = ( nid ? \"#\" + nid : \":scope\" ) + \" \" +\n\t\t\t\t\t\t\ttoSelector( groups[ i ] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\tnonnativeSelectorCache( selector, true );\n\t\t\t\t} finally {\n\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn ( cache[ key + \" \" ] = value );\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement( \"fieldset\" );\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch ( e ) {\n\t\treturn false;\n\t} finally {\n\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\n\t\t// release memory in IE\n\t\tel = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split( \"|\" ),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[ i ] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\ta.sourceIndex - b.sourceIndex;\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( ( cur = cur.nextSibling ) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn ( name === \"input\" || name === \"button\" ) && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t//   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\t/* jshint -W018 */\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\tinDisabledFieldset( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction( function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction( function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ ( j = matchIndexes[ i ] ) ] ) {\n\t\t\t\t\tseed[ j ] = !( matches[ j ] = seed[ j ] );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\tvar namespace = elem && elem.namespaceURI,\n\t\tdocElem = elem && ( elem.ownerDocument || elem ).documentElement;\n\n\t// Support: IE <=8\n\t// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes\n\t// https://bugs.jquery.com/ticket/4833\n\treturn !rhtml.test( namespace || docElem && docElem.nodeName || \"HTML\" );\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( preferredDoc != document &&\n\t\t( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 11, Edge\n\t\tif ( subWindow.addEventListener ) {\n\t\t\tsubWindow.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( subWindow.attachEvent ) {\n\t\t\tsubWindow.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t// Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only,\n\t// Safari 4 - 5 only, Opera <=11.6 - 12.x only\n\t// IE/Edge & older browsers don't support the :scope pseudo-class.\n\t// Support: Safari 6.0 only\n\t// Safari 6.0 supports :scope but it's an alias of :root there.\n\tsupport.scope = assert( function( el ) {\n\t\tdocElem.appendChild( el ).appendChild( document.createElement( \"div\" ) );\n\t\treturn typeof el.querySelectorAll !== \"undefined\" &&\n\t\t\t!el.querySelectorAll( \":scope fieldset div\" ).length;\n\t} );\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert( function( el ) {\n\t\tel.className = \"i\";\n\t\treturn !el.getAttribute( \"className\" );\n\t} );\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert( function( el ) {\n\t\tel.appendChild( document.createComment( \"\" ) );\n\t\treturn !el.getElementsByTagName( \"*\" ).length;\n\t} );\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert( function( el ) {\n\t\tdocElem.appendChild( el ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t} );\n\n\t// ID filter and find\n\tif ( support.getById ) {\n\t\tExpr.filter[ \"ID\" ] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute( \"id\" ) === attrId;\n\t\t\t};\n\t\t};\n\t\tExpr.find[ \"ID\" ] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\n\t\tExpr.filter[ \"ID\" ] =  function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode( \"id\" );\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find[ \"ID\" ] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( ( elem = elems[ i++ ] ) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[ \"TAG\" ] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[ \"CLASS\" ] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See https://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) {\n\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert( function( el ) {\n\n\t\t\tvar input;\n\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// https://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( el ).innerHTML = \"<a id='\" + expando + \"'></a>\" +\n\t\t\t\t\"<select id='\" + expando + \"-\\r\\\\' msallowcapture=''>\" +\n\t\t\t\t\"<option selected=''></option></select>\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( el.querySelectorAll( \"[msallowcapture^='']\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !el.querySelectorAll( \"[selected]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"~=\" );\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 15 - 18+\n\t\t\t// IE 11/Edge don't find elements on a `[name='']` query in some cases.\n\t\t\t// Adding a temporary attribute to the document before the selection works\n\t\t\t// around the issue.\n\t\t\t// Interestingly, IE 10 & older don't seem to have the issue.\n\t\t\tinput = document.createElement( \"input\" );\n\t\t\tinput.setAttribute( \"name\", \"\" );\n\t\t\tel.appendChild( input );\n\t\t\tif ( !el.querySelectorAll( \"[name='']\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*name\" + whitespace + \"*=\" +\n\t\t\t\t\twhitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !el.querySelectorAll( \":checked\" ).length ) {\n\t\t\t\trbuggyQSA.push( \":checked\" );\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push( \".#.+[+~]\" );\n\t\t\t}\n\n\t\t\t// Support: Firefox <=3.6 - 5 only\n\t\t\t// Old Firefox doesn't throw on a badly-escaped identifier.\n\t\t\tel.querySelectorAll( \"\\\\\\f\" );\n\t\t\trbuggyQSA.push( \"[\\\\r\\\\n\\\\f]\" );\n\t\t} );\n\n\t\tassert( function( el ) {\n\t\t\tel.innerHTML = \"<a href='' disabled='disabled'></a>\" +\n\t\t\t\t\"<select disabled='disabled'><option/></select>\";\n\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement( \"input\" );\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( el.querySelectorAll( \"[name=d]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( el.querySelectorAll( \":enabled\" ).length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: IE9-11+\n\t\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t\tdocElem.appendChild( el ).disabled = true;\n\t\t\tif ( el.querySelectorAll( \":disabled\" ).length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: Opera 10 - 11 only\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tel.querySelectorAll( \"*,:x\" );\n\t\t\trbuggyQSA.push( \",.*:\" );\n\t\t} );\n\t}\n\n\tif ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector ) ) ) ) {\n\n\t\tassert( function( el ) {\n\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( el, \"*\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( el, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t} );\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( \"|\" ) );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( \"|\" ) );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t) );\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( ( b = b.parentNode ) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = hasCompare ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t// two documents; shallow comparisons work.\n\t\t// eslint-disable-next-line eqeqeq\n\t\tcompare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( a == document || a.ownerDocument == preferredDoc &&\n\t\t\t\tcontains( preferredDoc, a ) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\tif ( b == document || b.ownerDocument == preferredDoc &&\n\t\t\t\tcontains( preferredDoc, b ) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\tif ( !aup || !bup ) {\n\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t/* eslint-disable eqeqeq */\n\t\t\treturn a == document ? -1 :\n\t\t\t\tb == document ? 1 :\n\t\t\t\t/* eslint-enable eqeqeq */\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( ( cur = cur.parentNode ) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( ( cur = cur.parentNode ) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[ i ] === bp[ i ] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[ i ], bp[ i ] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t// two documents; shallow comparisons work.\n\t\t\t/* eslint-disable eqeqeq */\n\t\t\tap[ i ] == preferredDoc ? -1 :\n\t\t\tbp[ i ] == preferredDoc ? 1 :\n\t\t\t/* eslint-enable eqeqeq */\n\t\t\t0;\n\t};\n\n\treturn document;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\tsetDocument( elem );\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t!nonnativeSelectorCache[ expr + \" \" ] &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\n\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t// fragment in IE 9\n\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch ( e ) {\n\t\t\tnonnativeSelectorCache( expr, true );\n\t\t}\n\t}\n\n\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( context.ownerDocument || context ) != document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\n\t// Set document vars if needed\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( ( elem.ownerDocument || elem ) != document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val !== undefined ?\n\t\tval :\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t( val = elem.getAttributeNode( name ) ) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull;\n};\n\nSizzle.escape = function( sel ) {\n\treturn ( sel + \"\" ).replace( rcssescape, fcssescape );\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\n\t\t// If no nodeType, this is expected to be an array\n\t\twhile ( ( node = elem[ i++ ] ) ) {\n\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[ 1 ] = match[ 1 ].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[ 3 ] = ( match[ 3 ] || match[ 4 ] ||\n\t\t\t\tmatch[ 5 ] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[ 2 ] === \"~=\" ) {\n\t\t\t\tmatch[ 3 ] = \" \" + match[ 3 ] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[ 1 ] = match[ 1 ].toLowerCase();\n\n\t\t\tif ( match[ 1 ].slice( 0, 3 ) === \"nth\" ) {\n\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[ 3 ] ) {\n\t\t\t\t\tSizzle.error( match[ 0 ] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[ 4 ] = +( match[ 4 ] ?\n\t\t\t\t\tmatch[ 5 ] + ( match[ 6 ] || 1 ) :\n\t\t\t\t\t2 * ( match[ 3 ] === \"even\" || match[ 3 ] === \"odd\" ) );\n\t\t\t\tmatch[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === \"odd\" );\n\n\t\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[ 3 ] ) {\n\t\t\t\tSizzle.error( match[ 0 ] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[ 6 ] && match[ 2 ];\n\n\t\t\tif ( matchExpr[ \"CHILD\" ].test( match[ 0 ] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[ 3 ] ) {\n\t\t\t\tmatch[ 2 ] = match[ 4 ] || match[ 5 ] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t( excess = tokenize( unquoted, true ) ) &&\n\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t( excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length ) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[ 0 ] = match[ 0 ].slice( 0, excess );\n\t\t\t\tmatch[ 2 ] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() {\n\t\t\t\t\treturn true;\n\t\t\t\t} :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t( pattern = new RegExp( \"(^|\" + whitespace +\n\t\t\t\t\t\")\" + className + \"(\" + whitespace + \"|$)\" ) ) && classCache(\n\t\t\t\t\t\tclassName, function( elem ) {\n\t\t\t\t\t\t\treturn pattern.test(\n\t\t\t\t\t\t\t\ttypeof elem.className === \"string\" && elem.className ||\n\t\t\t\t\t\t\t\ttypeof elem.getAttribute !== \"undefined\" &&\n\t\t\t\t\t\t\t\t\telem.getAttribute( \"class\" ) ||\n\t\t\t\t\t\t\t\t\"\"\n\t\t\t\t\t\t\t);\n\t\t\t\t} );\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\t/* eslint-disable max-len */\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t\t/* eslint-enable max-len */\n\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": function( type, what, _argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tvar cache, uniqueCache, outerCache, node, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType,\n\t\t\t\t\t\tdiff = false;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( ( node = node[ dir ] ) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) {\n\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\n\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\tnode = parent;\n\t\t\t\t\t\t\touterCache = node[ expando ] || ( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\tdiff = nodeIndex && cache[ 2 ];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t\tif ( useCache ) {\n\n\t\t\t\t\t\t\t\t// ...in a gzip-friendly way\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\touterCache = node[ expando ] || ( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\t\tcache = uniqueCache[ type ] || [];\n\t\t\t\t\t\t\t\tnodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];\n\t\t\t\t\t\t\t\tdiff = nodeIndex;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// xml :nth-child(...)\n\t\t\t\t\t\t\t// or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t\tif ( diff === false ) {\n\n\t\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\t\twhile ( ( node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t\t( diff = nodeIndex = 0 ) || start.pop() ) ) {\n\n\t\t\t\t\t\t\t\t\tif ( ( ofType ?\n\t\t\t\t\t\t\t\t\t\tnode.nodeName.toLowerCase() === name :\n\t\t\t\t\t\t\t\t\t\tnode.nodeType === 1 ) &&\n\t\t\t\t\t\t\t\t\t\t++diff ) {\n\n\t\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t\touterCache = node[ expando ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( node[ expando ] = {} );\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache = outerCache[ node.uniqueID ] ||\n\t\t\t\t\t\t\t\t\t\t\t\t( outerCache[ node.uniqueID ] = {} );\n\n\t\t\t\t\t\t\t\t\t\t\tuniqueCache[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t\"PSEUDO\": function( pseudo, argument ) {\n\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction( function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf( seed, matched[ i ] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[ i ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} ) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\n\t\t// Potentially complex pseudos\n\t\t\"not\": markFunction( function( selector ) {\n\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction( function( seed, matches, _context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\t\t\t\t\tseed[ i ] = !( matches[ i ] = elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} ) :\n\t\t\t\tfunction( elem, _context, xml ) {\n\t\t\t\t\tinput[ 0 ] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\n\t\t\t\t\t// Don't keep the element (issue #299)\n\t\t\t\t\tinput[ 0 ] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t} ),\n\n\t\t\"has\": markFunction( function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t} ),\n\n\t\t\"contains\": markFunction( function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t} ),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test( lang || \"\" ) ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( ( elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute( \"xml:lang\" ) || elem.getAttribute( \"lang\" ) ) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( ( elem = elem.parentNode ) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t} ),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement &&\n\t\t\t\t( !document.hasFocus || document.hasFocus() ) &&\n\t\t\t\t!!( elem.type || elem.href || ~elem.tabIndex );\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": createDisabledPseudo( false ),\n\t\t\"disabled\": createDisabledPseudo( true ),\n\n\t\t\"checked\": function( elem ) {\n\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn ( nodeName === \"input\" && !!elem.checked ) ||\n\t\t\t\t( nodeName === \"option\" && !!elem.selected );\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t//   but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[ \"empty\" ]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\n\t\t\t\t// Support: IE<8\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\n\t\t\t\t( ( attr = elem.getAttribute( \"type\" ) ) == null ||\n\t\t\t\t\tattr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo( function() {\n\t\t\treturn [ 0 ];\n\t\t} ),\n\n\t\t\"last\": createPositionalPseudo( function( _matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t} ),\n\n\t\t\"eq\": createPositionalPseudo( function( _matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t} ),\n\n\t\t\"even\": createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\t\"odd\": createPositionalPseudo( function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\t\"lt\": createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ?\n\t\t\t\targument + length :\n\t\t\t\targument > length ?\n\t\t\t\t\tlength :\n\t\t\t\t\targument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} ),\n\n\t\t\"gt\": createPositionalPseudo( function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t} )\n\t}\n};\n\nExpr.pseudos[ \"nth\" ] = Expr.pseudos[ \"eq\" ];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || ( match = rcomma.exec( soFar ) ) ) {\n\t\t\tif ( match ) {\n\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[ 0 ].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( ( tokens = [] ) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( ( match = rcombinators.exec( soFar ) ) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push( {\n\t\t\t\tvalue: matched,\n\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[ 0 ].replace( rtrim, \" \" )\n\t\t\t} );\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] ||\n\t\t\t\t( match = preFilters[ type ]( match ) ) ) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push( {\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t} );\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n};\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[ i ].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tskip = combinator.next,\n\t\tkey = skip || dir,\n\t\tcheckNonElements = base && key === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, uniqueCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( ( elem = elem[ dir ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || ( elem[ expando ] = {} );\n\n\t\t\t\t\t\t// Support: IE <9 only\n\t\t\t\t\t\t// Defend against cloned attroperties (jQuery gh-1709)\n\t\t\t\t\t\tuniqueCache = outerCache[ elem.uniqueID ] ||\n\t\t\t\t\t\t\t( outerCache[ elem.uniqueID ] = {} );\n\n\t\t\t\t\t\tif ( skip && skip === elem.nodeName.toLowerCase() ) {\n\t\t\t\t\t\t\telem = elem[ dir ] || elem;\n\t\t\t\t\t\t} else if ( ( oldCache = uniqueCache[ key ] ) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn ( newCache[ 2 ] = oldCache[ 2 ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\tuniqueCache[ key ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[ i ]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[ 0 ];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[ i ], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( elem = unmatched[ i ] ) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction( function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts(\n\t\t\t\tselector || \"*\",\n\t\t\t\tcontext.nodeType ? [ context ] : context,\n\t\t\t\t[]\n\t\t\t),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( ( elem = temp[ i ] ) ) {\n\t\t\t\t\tmatcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) ) {\n\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( ( matcherIn[ i ] = elem ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, ( matcherOut = [] ), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( ( elem = matcherOut[ i ] ) &&\n\t\t\t\t\t\t( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) {\n\n\t\t\t\t\t\tseed[ temp ] = !( results[ temp ] = elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t} );\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[ 0 ].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[ \" \" ],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\tvar ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t( checkContext = context ).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\n\t\t\t// Avoid hanging onto element (issue #299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) {\n\t\t\tmatchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[ j ].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\n\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\ttokens\n\t\t\t\t\t\t.slice( 0, i - 1 )\n\t\t\t\t\t\t.concat( { value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" } )\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find[ \"TAG\" ]( \"*\", outermost ),\n\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\n\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\toutermostContext = context == document || context || outermost;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Support: IE<9, Safari\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching elements by id\n\t\t\tfor ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\n\t\t\t\t\t// Support: IE 11+, Edge 17 - 18+\n\t\t\t\t\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t\t\t\t\t// two documents; shallow comparisons work.\n\t\t\t\t\t// eslint-disable-next-line eqeqeq\n\t\t\t\t\tif ( !context && elem.ownerDocument != document ) {\n\t\t\t\t\t\tsetDocument( elem );\n\t\t\t\t\t\txml = !documentIsHTML;\n\t\t\t\t\t}\n\t\t\t\t\twhile ( ( matcher = elementMatchers[ j++ ] ) ) {\n\t\t\t\t\t\tif ( matcher( elem, context || document, xml ) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( ( elem = !matcher && elem ) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// `i` is now the count of elements visited above, and adding it to `matchedCount`\n\t\t\t// makes the latter nonnegative.\n\t\t\tmatchedCount += i;\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\t// NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`\n\t\t\t// equals `i`), unless we didn't visit _any_ elements in the above loop because we have\n\t\t\t// no element matchers and no seed.\n\t\t\t// Incrementing an initially-string \"0\" `i` allows `i` to remain a string only in that\n\t\t\t// case, which will result in a \"00\" `matchedCount` that differs from `i` but is also\n\t\t\t// numerically zero.\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( ( matcher = setMatchers[ j++ ] ) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !( unmatched[ i ] || setMatched[ i ] ) ) {\n\t\t\t\t\t\t\t\tsetMatched[ i ] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[ i ] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache(\n\t\t\tselector,\n\t\t\tmatcherFromGroupMatchers( elementMatchers, setMatchers )\n\t\t);\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n};\n\n/**\n * A low-level selection function that works with Sizzle's compiled\n *  selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n *  selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nselect = Sizzle.select = function( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( ( selector = compiled.selector || selector ) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is only one selector in the list and no seed\n\t// (the latter of which guarantees us context)\n\tif ( match.length === 1 ) {\n\n\t\t// Reduce context if the leading compound selector is an ID\n\t\ttokens = match[ 0 ] = match[ 0 ].slice( 0 );\n\t\tif ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === \"ID\" &&\n\t\t\tcontext.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) {\n\n\t\t\tcontext = ( Expr.find[ \"ID\" ]( token.matches[ 0 ]\n\t\t\t\t.replace( runescape, funescape ), context ) || [] )[ 0 ];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr[ \"needsContext\" ].test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[ i ];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ ( type = token.type ) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( ( find = Expr.find[ type ] ) ) {\n\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( ( seed = find(\n\t\t\t\t\ttoken.matches[ 0 ].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext\n\t\t\t\t) ) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\t!context || rsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n};\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split( \"\" ).sort( sortOrder ).join( \"\" ) === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert( function( el ) {\n\n\t// Should return 1, but returns 4 (following)\n\treturn el.compareDocumentPosition( document.createElement( \"fieldset\" ) ) & 1;\n} );\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert( function( el ) {\n\tel.innerHTML = \"<a href='#'></a>\";\n\treturn el.firstChild.getAttribute( \"href\" ) === \"#\";\n} ) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t} );\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert( function( el ) {\n\tel.innerHTML = \"<input/>\";\n\tel.firstChild.setAttribute( \"value\", \"\" );\n\treturn el.firstChild.getAttribute( \"value\" ) === \"\";\n} ) ) {\n\taddHandle( \"value\", function( elem, _name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t} );\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert( function( el ) {\n\treturn el.getAttribute( \"disabled\" ) == null;\n} ) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\n\t\t\t\t( val = elem.getAttributeNode( name ) ) && val.specified ?\n\t\t\t\t\tval.value :\n\t\t\t\t\tnull;\n\t\t}\n\t} );\n}\n\nreturn Sizzle;\n\n} )( window );\n\n\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\n\n// Deprecated\njQuery.expr[ \":\" ] = jQuery.expr.pseudos;\njQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\njQuery.escapeSelector = Sizzle.escape;\n\n\n\n\nvar dir = function( elem, dir, until ) {\n\tvar matched = [],\n\t\ttruncate = until !== undefined;\n\n\twhile ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {\n\t\tif ( elem.nodeType === 1 ) {\n\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmatched.push( elem );\n\t\t}\n\t}\n\treturn matched;\n};\n\n\nvar siblings = function( n, elem ) {\n\tvar matched = [];\n\n\tfor ( ; n; n = n.nextSibling ) {\n\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\tmatched.push( n );\n\t\t}\n\t}\n\n\treturn matched;\n};\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\n\n\nfunction nodeName( elem, name ) {\n\n\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\n}\nvar rsingleTag = ( /^<([a-z][^\\/\\0>:\\x20\\t\\r\\n\\f]*)[\\x20\\t\\r\\n\\f]*\\/?>(?:<\\/\\1>|)$/i );\n\n\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\t}\n\n\t// Single element\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\t}\n\n\t// Arraylike of elements (jQuery, arguments, Array)\n\tif ( typeof qualifier !== \"string\" ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not;\n\t\t} );\n\t}\n\n\t// Filtered directly for both simple and complex selectors\n\treturn jQuery.filter( qualifier, elements, not );\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\tif ( elems.length === 1 && elem.nodeType === 1 ) {\n\t\treturn jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [];\n\t}\n\n\treturn jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\treturn elem.nodeType === 1;\n\t} ) );\n};\n\njQuery.fn.extend( {\n\tfind: function( selector ) {\n\t\tvar i, ret,\n\t\t\tlen = this.length,\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter( function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} ) );\n\t\t}\n\n\t\tret = this.pushStack( [] );\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\treturn len > 1 ? jQuery.uniqueSort( ret ) : ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], false ) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow( this, selector || [], true ) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n} );\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521)\n\t// Strict HTML recognition (trac-11290: must start with <)\n\t// Shortcut simple #id case for speed\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]+))$/,\n\n\tinit = jQuery.fn.init = function( selector, context, root ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Method init() accepts an alternate rootjQuery\n\t\t// so migrate can support jQuery.sub (gh-2101)\n\t\troot = root || rootjQuery;\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[ 0 ] === \"<\" &&\n\t\t\t\tselector[ selector.length - 1 ] === \">\" &&\n\t\t\t\tselector.length >= 3 ) {\n\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && ( match[ 1 ] || !context ) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[ 1 ] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[ 0 ] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[ 1 ],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[ 2 ] );\n\n\t\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis[ 0 ] = elem;\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || root ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis[ 0 ] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( isFunction( selector ) ) {\n\t\t\treturn root.ready !== undefined ?\n\t\t\t\troot.ready( selector ) :\n\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.fn.extend( {\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter( function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[ i ] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\ttargets = typeof selectors !== \"string\" && jQuery( selectors );\n\n\t\t// Positional selectors never match, since there's no _selection_ context\n\t\tif ( !rneedsContext.test( selectors ) ) {\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tfor ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {\n\n\t\t\t\t\t// Always skip document fragments\n\t\t\t\t\tif ( cur.nodeType < 11 && ( targets ?\n\t\t\t\t\t\ttargets.index( cur ) > -1 :\n\n\t\t\t\t\t\t// Don't pass non-elements to Sizzle\n\t\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\t\tjQuery.find.matchesSelector( cur, selectors ) ) ) {\n\n\t\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.uniqueSort(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t}\n} );\n\nfunction sibling( cur, dir ) {\n\twhile ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each( {\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, _i, until ) {\n\t\treturn dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn siblings( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn siblings( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\tif ( elem.contentDocument != null &&\n\n\t\t\t// Support: IE 11+\n\t\t\t// <object> elements with no `data` attribute has an object\n\t\t\t// `contentDocument` with a `null` prototype.\n\t\t\tgetProto( elem.contentDocument ) ) {\n\n\t\t\treturn elem.contentDocument;\n\t\t}\n\n\t\t// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only\n\t\t// Treat the template element as a regular one in browsers that\n\t\t// don't support it.\n\t\tif ( nodeName( elem, \"template\" ) ) {\n\t\t\telem = elem.content || elem;\n\t\t}\n\n\t\treturn jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.uniqueSort( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n} );\nvar rnothtmlwhite = ( /[^\\x20\\t\\r\\n\\f]+/g );\n\n\n\n// Convert String-formatted options into Object-formatted ones\nfunction createOptions( options ) {\n\tvar object = {};\n\tjQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t} );\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\tcreateOptions( options ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Flag to know if list is currently firing\n\t\tfiring,\n\n\t\t// Last fire value for non-forgettable lists\n\t\tmemory,\n\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\n\t\t// Flag to prevent firing\n\t\tlocked,\n\n\t\t// Actual callback list\n\t\tlist = [],\n\n\t\t// Queue of execution data for repeatable lists\n\t\tqueue = [],\n\n\t\t// Index of currently firing callback (modified by add/remove as needed)\n\t\tfiringIndex = -1,\n\n\t\t// Fire callbacks\n\t\tfire = function() {\n\n\t\t\t// Enforce single-firing\n\t\t\tlocked = locked || options.once;\n\n\t\t\t// Execute callbacks for all pending executions,\n\t\t\t// respecting firingIndex overrides and runtime changes\n\t\t\tfired = firing = true;\n\t\t\tfor ( ; queue.length; firingIndex = -1 ) {\n\t\t\t\tmemory = queue.shift();\n\t\t\t\twhile ( ++firingIndex < list.length ) {\n\n\t\t\t\t\t// Run callback and check for early termination\n\t\t\t\t\tif ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&\n\t\t\t\t\t\toptions.stopOnFalse ) {\n\n\t\t\t\t\t\t// Jump to end and forget the data so .add doesn't re-fire\n\t\t\t\t\t\tfiringIndex = list.length;\n\t\t\t\t\t\tmemory = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Forget the data if we're done with it\n\t\t\tif ( !options.memory ) {\n\t\t\t\tmemory = false;\n\t\t\t}\n\n\t\t\tfiring = false;\n\n\t\t\t// Clean up if we're done firing for good\n\t\t\tif ( locked ) {\n\n\t\t\t\t// Keep an empty list if we have data for future add calls\n\t\t\t\tif ( memory ) {\n\t\t\t\t\tlist = [];\n\n\t\t\t\t// Otherwise, this object is spent\n\t\t\t\t} else {\n\t\t\t\t\tlist = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t// Actual Callbacks object\n\t\tself = {\n\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\n\t\t\t\t\t// If we have memory from a past run, we should fire after adding\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfiringIndex = list.length - 1;\n\t\t\t\t\t\tqueue.push( memory );\n\t\t\t\t\t}\n\n\t\t\t\t\t( function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tif ( isFunction( arg ) ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && toType( arg ) !== \"string\" ) {\n\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} );\n\t\t\t\t\t} )( arguments );\n\n\t\t\t\t\tif ( memory && !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\tvar index;\n\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\tlist.splice( index, 1 );\n\n\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ?\n\t\t\t\t\tjQuery.inArray( fn, list ) > -1 :\n\t\t\t\t\tlist.length > 0;\n\t\t\t},\n\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Disable .fire and .add\n\t\t\t// Abort any current/pending executions\n\t\t\t// Clear all callbacks and values\n\t\t\tdisable: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tlist = memory = \"\";\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\n\t\t\t// Disable .fire\n\t\t\t// Also disable .add unless we have memory (since it would have no effect)\n\t\t\t// Abort any pending executions\n\t\t\tlock: function() {\n\t\t\t\tlocked = queue = [];\n\t\t\t\tif ( !memory && !firing ) {\n\t\t\t\t\tlist = memory = \"\";\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\tlocked: function() {\n\t\t\t\treturn !!locked;\n\t\t\t},\n\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( !locked ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tqueue.push( args );\n\t\t\t\t\tif ( !firing ) {\n\t\t\t\t\t\tfire();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\nfunction Identity( v ) {\n\treturn v;\n}\nfunction Thrower( ex ) {\n\tthrow ex;\n}\n\nfunction adoptValue( value, resolve, reject, noValue ) {\n\tvar method;\n\n\ttry {\n\n\t\t// Check for promise aspect first to privilege synchronous behavior\n\t\tif ( value && isFunction( ( method = value.promise ) ) ) {\n\t\t\tmethod.call( value ).done( resolve ).fail( reject );\n\n\t\t// Other thenables\n\t\t} else if ( value && isFunction( ( method = value.then ) ) ) {\n\t\t\tmethod.call( value, resolve, reject );\n\n\t\t// Other non-thenables\n\t\t} else {\n\n\t\t\t// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:\n\t\t\t// * false: [ value ].slice( 0 ) => resolve( value )\n\t\t\t// * true: [ value ].slice( 1 ) => resolve()\n\t\t\tresolve.apply( undefined, [ value ].slice( noValue ) );\n\t\t}\n\n\t// For Promises/A+, convert exceptions into rejections\n\t// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in\n\t// Deferred#then to conditionally suppress rejection.\n\t} catch ( value ) {\n\n\t\t// Support: Android 4.0 only\n\t\t// Strict mode functions invoked without .call/.apply get global-object context\n\t\treject.apply( undefined, [ value ] );\n\t}\n}\n\njQuery.extend( {\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\n\t\t\t\t// action, add listener, callbacks,\n\t\t\t\t// ... .then handlers, argument index, [final state]\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks( \"memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"memory\" ), 2 ],\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 0, \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks( \"once memory\" ),\n\t\t\t\t\tjQuery.Callbacks( \"once memory\" ), 1, \"rejected\" ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\t\"catch\": function( fn ) {\n\t\t\t\t\treturn promise.then( null, fn );\n\t\t\t\t},\n\n\t\t\t\t// Keep pipe for back-compat\n\t\t\t\tpipe: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( _i, tuple ) {\n\n\t\t\t\t\t\t\t// Map tuples (progress, done, fail) to arguments (done, fail, progress)\n\t\t\t\t\t\t\tvar fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ];\n\n\t\t\t\t\t\t\t// deferred.progress(function() { bind to newDefer or newDefer.notify })\n\t\t\t\t\t\t\t// deferred.done(function() { bind to newDefer or newDefer.resolve })\n\t\t\t\t\t\t\t// deferred.fail(function() { bind to newDefer or newDefer.reject })\n\t\t\t\t\t\t\tdeferred[ tuple[ 1 ] ]( function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify )\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ](\n\t\t\t\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\t\t\tfn ? [ returned ] : arguments\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\t\t\t\tthen: function( onFulfilled, onRejected, onProgress ) {\n\t\t\t\t\tvar maxDepth = 0;\n\t\t\t\t\tfunction resolve( depth, deferred, handler, special ) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\tvar that = this,\n\t\t\t\t\t\t\t\targs = arguments,\n\t\t\t\t\t\t\t\tmightThrow = function() {\n\t\t\t\t\t\t\t\t\tvar returned, then;\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.3\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-59\n\t\t\t\t\t\t\t\t\t// Ignore double-resolution attempts\n\t\t\t\t\t\t\t\t\tif ( depth < maxDepth ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturned = handler.apply( that, args );\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.1\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-48\n\t\t\t\t\t\t\t\t\tif ( returned === deferred.promise() ) {\n\t\t\t\t\t\t\t\t\t\tthrow new TypeError( \"Thenable self-resolution\" );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Support: Promises/A+ sections 2.3.3.1, 3.5\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-54\n\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-75\n\t\t\t\t\t\t\t\t\t// Retrieve `then` only once\n\t\t\t\t\t\t\t\t\tthen = returned &&\n\n\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.4\n\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-64\n\t\t\t\t\t\t\t\t\t\t// Only check objects and functions for thenability\n\t\t\t\t\t\t\t\t\t\t( typeof returned === \"object\" ||\n\t\t\t\t\t\t\t\t\t\t\ttypeof returned === \"function\" ) &&\n\t\t\t\t\t\t\t\t\t\treturned.then;\n\n\t\t\t\t\t\t\t\t\t// Handle a returned thenable\n\t\t\t\t\t\t\t\t\tif ( isFunction( then ) ) {\n\n\t\t\t\t\t\t\t\t\t\t// Special processors (notify) just wait for resolution\n\t\t\t\t\t\t\t\t\t\tif ( special ) {\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special )\n\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\t\t\t// Normal processors (resolve) also hook into progress\n\t\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t\t// ...and disregard older resolution values\n\t\t\t\t\t\t\t\t\t\t\tmaxDepth++;\n\n\t\t\t\t\t\t\t\t\t\t\tthen.call(\n\t\t\t\t\t\t\t\t\t\t\t\treturned,\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Thrower, special ),\n\t\t\t\t\t\t\t\t\t\t\t\tresolve( maxDepth, deferred, Identity,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdeferred.notifyWith )\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// Handle all other returned values\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\tif ( handler !== Identity ) {\n\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\targs = [ returned ];\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Process the value(s)\n\t\t\t\t\t\t\t\t\t\t// Default process is resolve\n\t\t\t\t\t\t\t\t\t\t( special || deferred.resolveWith )( that, args );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\t\t// Only normal processors (resolve) catch and reject exceptions\n\t\t\t\t\t\t\t\tprocess = special ?\n\t\t\t\t\t\t\t\t\tmightThrow :\n\t\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tmightThrow();\n\t\t\t\t\t\t\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t\t\t\t\t\t\tif ( jQuery.Deferred.exceptionHook ) {\n\t\t\t\t\t\t\t\t\t\t\t\tjQuery.Deferred.exceptionHook( e,\n\t\t\t\t\t\t\t\t\t\t\t\t\tprocess.stackTrace );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.4.1\n\t\t\t\t\t\t\t\t\t\t\t// https://promisesaplus.com/#point-61\n\t\t\t\t\t\t\t\t\t\t\t// Ignore post-resolution exceptions\n\t\t\t\t\t\t\t\t\t\t\tif ( depth + 1 >= maxDepth ) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t// Only substitute handlers pass on context\n\t\t\t\t\t\t\t\t\t\t\t\t// and multiple values (non-spec behavior)\n\t\t\t\t\t\t\t\t\t\t\t\tif ( handler !== Thrower ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tthat = undefined;\n\t\t\t\t\t\t\t\t\t\t\t\t\targs = [ e ];\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\tdeferred.rejectWith( that, args );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t};\n\n\t\t\t\t\t\t\t// Support: Promises/A+ section 2.3.3.3.1\n\t\t\t\t\t\t\t// https://promisesaplus.com/#point-57\n\t\t\t\t\t\t\t// Re-resolve promises immediately to dodge false rejection from\n\t\t\t\t\t\t\t// subsequent errors\n\t\t\t\t\t\t\tif ( depth ) {\n\t\t\t\t\t\t\t\tprocess();\n\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t// Call an optional hook to record the stack, in case of exception\n\t\t\t\t\t\t\t\t// since it's otherwise lost when execution goes async\n\t\t\t\t\t\t\t\tif ( jQuery.Deferred.getStackHook ) {\n\t\t\t\t\t\t\t\t\tprocess.stackTrace = jQuery.Deferred.getStackHook();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\twindow.setTimeout( process );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn jQuery.Deferred( function( newDefer ) {\n\n\t\t\t\t\t\t// progress_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 0 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onProgress ) ?\n\t\t\t\t\t\t\t\t\tonProgress :\n\t\t\t\t\t\t\t\t\tIdentity,\n\t\t\t\t\t\t\t\tnewDefer.notifyWith\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// fulfilled_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 1 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onFulfilled ) ?\n\t\t\t\t\t\t\t\t\tonFulfilled :\n\t\t\t\t\t\t\t\t\tIdentity\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// rejected_handlers.add( ... )\n\t\t\t\t\t\ttuples[ 2 ][ 3 ].add(\n\t\t\t\t\t\t\tresolve(\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tnewDefer,\n\t\t\t\t\t\t\t\tisFunction( onRejected ) ?\n\t\t\t\t\t\t\t\t\tonRejected :\n\t\t\t\t\t\t\t\t\tThrower\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t} ).promise();\n\t\t\t\t},\n\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 5 ];\n\n\t\t\t// promise.progress = list.add\n\t\t\t// promise.done = list.add\n\t\t\t// promise.fail = list.add\n\t\t\tpromise[ tuple[ 1 ] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(\n\t\t\t\t\tfunction() {\n\n\t\t\t\t\t\t// state = \"resolved\" (i.e., fulfilled)\n\t\t\t\t\t\t// state = \"rejected\"\n\t\t\t\t\t\tstate = stateString;\n\t\t\t\t\t},\n\n\t\t\t\t\t// rejected_callbacks.disable\n\t\t\t\t\t// fulfilled_callbacks.disable\n\t\t\t\t\ttuples[ 3 - i ][ 2 ].disable,\n\n\t\t\t\t\t// rejected_handlers.disable\n\t\t\t\t\t// fulfilled_handlers.disable\n\t\t\t\t\ttuples[ 3 - i ][ 3 ].disable,\n\n\t\t\t\t\t// progress_callbacks.lock\n\t\t\t\t\ttuples[ 0 ][ 2 ].lock,\n\n\t\t\t\t\t// progress_handlers.lock\n\t\t\t\t\ttuples[ 0 ][ 3 ].lock\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// progress_handlers.fire\n\t\t\t// fulfilled_handlers.fire\n\t\t\t// rejected_handlers.fire\n\t\t\tlist.add( tuple[ 3 ].fire );\n\n\t\t\t// deferred.notify = function() { deferred.notifyWith(...) }\n\t\t\t// deferred.resolve = function() { deferred.resolveWith(...) }\n\t\t\t// deferred.reject = function() { deferred.rejectWith(...) }\n\t\t\tdeferred[ tuple[ 0 ] ] = function() {\n\t\t\t\tdeferred[ tuple[ 0 ] + \"With\" ]( this === deferred ? undefined : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\t// deferred.notifyWith = list.fireWith\n\t\t\t// deferred.resolveWith = list.fireWith\n\t\t\t// deferred.rejectWith = list.fireWith\n\t\t\tdeferred[ tuple[ 0 ] + \"With\" ] = list.fireWith;\n\t\t} );\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( singleValue ) {\n\t\tvar\n\n\t\t\t// count of uncompleted subordinates\n\t\t\tremaining = arguments.length,\n\n\t\t\t// count of unprocessed arguments\n\t\t\ti = remaining,\n\n\t\t\t// subordinate fulfillment data\n\t\t\tresolveContexts = Array( i ),\n\t\t\tresolveValues = slice.call( arguments ),\n\n\t\t\t// the primary Deferred\n\t\t\tprimary = jQuery.Deferred(),\n\n\t\t\t// subordinate callback factory\n\t\t\tupdateFunc = function( i ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tresolveContexts[ i ] = this;\n\t\t\t\t\tresolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( !( --remaining ) ) {\n\t\t\t\t\t\tprimary.resolveWith( resolveContexts, resolveValues );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t};\n\n\t\t// Single- and empty arguments are adopted like Promise.resolve\n\t\tif ( remaining <= 1 ) {\n\t\t\tadoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,\n\t\t\t\t!remaining );\n\n\t\t\t// Use .then() to unwrap secondary thenables (cf. gh-3000)\n\t\t\tif ( primary.state() === \"pending\" ||\n\t\t\t\tisFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {\n\n\t\t\t\treturn primary.then();\n\t\t\t}\n\t\t}\n\n\t\t// Multiple arguments are aggregated like Promise.all array elements\n\t\twhile ( i-- ) {\n\t\t\tadoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );\n\t\t}\n\n\t\treturn primary.promise();\n\t}\n} );\n\n\n// These usually indicate a programmer mistake during development,\n// warn about them ASAP rather than swallowing them by default.\nvar rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;\n\njQuery.Deferred.exceptionHook = function( error, stack ) {\n\n\t// Support: IE 8 - 9 only\n\t// Console exists when dev tools are open, which can happen at any time\n\tif ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) {\n\t\twindow.console.warn( \"jQuery.Deferred exception: \" + error.message, error.stack, stack );\n\t}\n};\n\n\n\n\njQuery.readyException = function( error ) {\n\twindow.setTimeout( function() {\n\t\tthrow error;\n\t} );\n};\n\n\n\n\n// The deferred used on DOM ready\nvar readyList = jQuery.Deferred();\n\njQuery.fn.ready = function( fn ) {\n\n\treadyList\n\t\t.then( fn )\n\n\t\t// Wrap jQuery.readyException in a function so that the lookup\n\t\t// happens at the time of error handling instead of callback\n\t\t// registration.\n\t\t.catch( function( error ) {\n\t\t\tjQuery.readyException( error );\n\t\t} );\n\n\treturn this;\n};\n\njQuery.extend( {\n\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See trac-6781\n\treadyWait: 1,\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\t}\n} );\n\njQuery.ready.then = readyList.then;\n\n// The ready event handler and self cleanup method\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed );\n\twindow.removeEventListener( \"load\", completed );\n\tjQuery.ready();\n}\n\n// Catch cases where $(document).ready() is called\n// after the browser event has already occurred.\n// Support: IE <=9 - 10 only\n// Older IE sometimes signals \"interactive\" too soon\nif ( document.readyState === \"complete\" ||\n\t( document.readyState !== \"loading\" && !document.documentElement.doScroll ) ) {\n\n\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\twindow.setTimeout( jQuery.ready );\n\n} else {\n\n\t// Use the handy event callback\n\tdocument.addEventListener( \"DOMContentLoaded\", completed );\n\n\t// A fallback to window.onload, that will always work\n\twindow.addEventListener( \"load\", completed );\n}\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( toType( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\taccess( elems, fn, i, key[ i ], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, _key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn(\n\t\t\t\t\telems[ i ], key, raw ?\n\t\t\t\t\t\tvalue :\n\t\t\t\t\t\tvalue.call( elems[ i ], i, fn( elems[ i ], key ) )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( chainable ) {\n\t\treturn elems;\n\t}\n\n\t// Gets\n\tif ( bulk ) {\n\t\treturn fn.call( elems );\n\t}\n\n\treturn len ? fn( elems[ 0 ], key ) : emptyGet;\n};\n\n\n// Matches dashed string for camelizing\nvar rmsPrefix = /^-ms-/,\n\trdashAlpha = /-([a-z])/g;\n\n// Used by camelCase as callback to replace()\nfunction fcamelCase( _all, letter ) {\n\treturn letter.toUpperCase();\n}\n\n// Convert dashed to camelCase; used by the css and data modules\n// Support: IE <=9 - 11, Edge 12 - 15\n// Microsoft forgot to hump their vendor prefix (trac-9572)\nfunction camelCase( string ) {\n\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n}\nvar acceptData = function( owner ) {\n\n\t// Accepts only:\n\t//  - Node\n\t//    - Node.ELEMENT_NODE\n\t//    - Node.DOCUMENT_NODE\n\t//  - Object\n\t//    - Any\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\n\n\nfunction Data() {\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\n\nData.prototype = {\n\n\tcache: function( owner ) {\n\n\t\t// Check if the owner object already has a cache\n\t\tvar value = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !value ) {\n\t\t\tvalue = {};\n\n\t\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t\t// but we should not, see trac-8335.\n\t\t\t// Always return an empty object.\n\t\t\tif ( acceptData( owner ) ) {\n\n\t\t\t\t// If it is a node unlikely to be stringify-ed or looped over\n\t\t\t\t// use plain assignment\n\t\t\t\tif ( owner.nodeType ) {\n\t\t\t\t\towner[ this.expando ] = value;\n\n\t\t\t\t// Otherwise secure it in a non-enumerable property\n\t\t\t\t// configurable must be true to allow the property to be\n\t\t\t\t// deleted when data is removed\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty( owner, this.expando, {\n\t\t\t\t\t\tvalue: value,\n\t\t\t\t\t\tconfigurable: true\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\tcache = this.cache( owner );\n\n\t\t// Handle: [ owner, key, value ] args\n\t\t// Always use camelCase key (gh-2257)\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ camelCase( data ) ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\n\t\t\t// Copy the properties one-by-one to the cache object\n\t\t\tfor ( prop in data ) {\n\t\t\t\tcache[ camelCase( prop ) ] = data[ prop ];\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\treturn key === undefined ?\n\t\t\tthis.cache( owner ) :\n\n\t\t\t// Always use camelCase key (gh-2257)\n\t\t\towner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ];\n\t},\n\taccess: function( owner, key, value ) {\n\n\t\t// In cases where either:\n\t\t//\n\t\t//   1. No key was specified\n\t\t//   2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t//   1. The entire cache object\n\t\t//   2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t( ( key && typeof key === \"string\" ) && value === undefined ) ) {\n\n\t\t\treturn this.get( owner, key );\n\t\t}\n\n\t\t// When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t//   1. An object of properties\n\t\t//   2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i,\n\t\t\tcache = owner[ this.expando ];\n\n\t\tif ( cache === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key !== undefined ) {\n\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( Array.isArray( key ) ) {\n\n\t\t\t\t// If key is an array of keys...\n\t\t\t\t// We always set camelCase keys, so remove that.\n\t\t\t\tkey = key.map( camelCase );\n\t\t\t} else {\n\t\t\t\tkey = camelCase( key );\n\n\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\tkey = key in cache ?\n\t\t\t\t\t[ key ] :\n\t\t\t\t\t( key.match( rnothtmlwhite ) || [] );\n\t\t\t}\n\n\t\t\ti = key.length;\n\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ key[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if there's no more data\n\t\tif ( key === undefined || jQuery.isEmptyObject( cache ) ) {\n\n\t\t\t// Support: Chrome <=35 - 45\n\t\t\t// Webkit & Blink performance suffers when deleting properties\n\t\t\t// from DOM nodes, so set to undefined instead\n\t\t\t// https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)\n\t\t\tif ( owner.nodeType ) {\n\t\t\t\towner[ this.expando ] = undefined;\n\t\t\t} else {\n\t\t\t\tdelete owner[ this.expando ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\tvar cache = owner[ this.expando ];\n\t\treturn cache !== undefined && !jQuery.isEmptyObject( cache );\n\t}\n};\nvar dataPriv = new Data();\n\nvar dataUser = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /[A-Z]/g;\n\nfunction getData( data ) {\n\tif ( data === \"true\" ) {\n\t\treturn true;\n\t}\n\n\tif ( data === \"false\" ) {\n\t\treturn false;\n\t}\n\n\tif ( data === \"null\" ) {\n\t\treturn null;\n\t}\n\n\t// Only convert to a number if it doesn't change the string\n\tif ( data === +data + \"\" ) {\n\t\treturn +data;\n\t}\n\n\tif ( rbrace.test( data ) ) {\n\t\treturn JSON.parse( data );\n\t}\n\n\treturn data;\n}\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$&\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = getData( data );\n\t\t\t} catch ( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdataUser.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend( {\n\thasData: function( elem ) {\n\t\treturn dataUser.hasData( elem ) || dataPriv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn dataUser.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdataUser.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to dataPriv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn dataPriv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdataPriv.remove( elem, name );\n\t}\n} );\n\njQuery.fn.extend( {\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = dataUser.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !dataPriv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE 11 only\n\t\t\t\t\t\t// The attrs elements can be null (trac-14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = camelCase( name.slice( 5 ) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdataPriv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tdataUser.set( this, key );\n\t\t\t} );\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data;\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// The key will always be camelCased in Data\n\t\t\t\tdata = dataUser.get( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tthis.each( function() {\n\n\t\t\t\t// We always store the camelCased key\n\t\t\t\tdataUser.set( this, key, value );\n\t\t\t} );\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each( function() {\n\t\t\tdataUser.remove( this, key );\n\t\t} );\n\t}\n} );\n\n\njQuery.extend( {\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = dataPriv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || Array.isArray( data ) ) {\n\t\t\t\t\tqueue = dataPriv.access( elem, type, jQuery.makeArray( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn dataPriv.get( elem, key ) || dataPriv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks( \"once memory\" ).add( function() {\n\t\t\t\tdataPriv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t} )\n\t\t} );\n\t}\n} );\n\njQuery.fn.extend( {\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[ 0 ], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each( function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[ 0 ] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t} );\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t} );\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = dataPriv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n} );\nvar pnum = ( /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/ ).source;\n\nvar rcssNum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" );\n\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar documentElement = document.documentElement;\n\n\n\n\tvar isAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem );\n\t\t},\n\t\tcomposed = { composed: true };\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only\n\t// Check attachment across shadow DOM boundaries when possible (gh-3504)\n\t// Support: iOS 10.0-10.2 only\n\t// Early iOS 10 versions support `attachShadow` but not `getRootNode`,\n\t// leading to errors. We need to check for `getRootNode`.\n\tif ( documentElement.getRootNode ) {\n\t\tisAttached = function( elem ) {\n\t\t\treturn jQuery.contains( elem.ownerDocument, elem ) ||\n\t\t\t\telem.getRootNode( composed ) === elem.ownerDocument;\n\t\t};\n\t}\nvar isHiddenWithinTree = function( elem, el ) {\n\n\t\t// isHiddenWithinTree might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\n\t\t// Inline style trumps all\n\t\treturn elem.style.display === \"none\" ||\n\t\t\telem.style.display === \"\" &&\n\n\t\t\t// Otherwise, check computed style\n\t\t\t// Support: Firefox <=43 - 45\n\t\t\t// Disconnected elements can have computed display: none, so first confirm that elem is\n\t\t\t// in the document.\n\t\t\tisAttached( elem ) &&\n\n\t\t\tjQuery.css( elem, \"display\" ) === \"none\";\n\t};\n\n\n\nfunction adjustCSS( elem, prop, valueParts, tween ) {\n\tvar adjusted, scale,\n\t\tmaxIterations = 20,\n\t\tcurrentValue = tween ?\n\t\t\tfunction() {\n\t\t\t\treturn tween.cur();\n\t\t\t} :\n\t\t\tfunction() {\n\t\t\t\treturn jQuery.css( elem, prop, \"\" );\n\t\t\t},\n\t\tinitial = currentValue(),\n\t\tunit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t// Starting value computation is required for potential unit mismatches\n\t\tinitialInUnit = elem.nodeType &&\n\t\t\t( jQuery.cssNumber[ prop ] || unit !== \"px\" && +initial ) &&\n\t\t\trcssNum.exec( jQuery.css( elem, prop ) );\n\n\tif ( initialInUnit && initialInUnit[ 3 ] !== unit ) {\n\n\t\t// Support: Firefox <=54\n\t\t// Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)\n\t\tinitial = initial / 2;\n\n\t\t// Trust units reported by jQuery.css\n\t\tunit = unit || initialInUnit[ 3 ];\n\n\t\t// Iteratively approximate from a nonzero starting point\n\t\tinitialInUnit = +initial || 1;\n\n\t\twhile ( maxIterations-- ) {\n\n\t\t\t// Evaluate and update our best guess (doubling guesses that zero out).\n\t\t\t// Finish if the scale equals or crosses 1 (making the old*new product non-positive).\n\t\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\t\t\tif ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) {\n\t\t\t\tmaxIterations = 0;\n\t\t\t}\n\t\t\tinitialInUnit = initialInUnit / scale;\n\n\t\t}\n\n\t\tinitialInUnit = initialInUnit * 2;\n\t\tjQuery.style( elem, prop, initialInUnit + unit );\n\n\t\t// Make sure we update the tween properties later on\n\t\tvalueParts = valueParts || [];\n\t}\n\n\tif ( valueParts ) {\n\t\tinitialInUnit = +initialInUnit || +initial || 0;\n\n\t\t// Apply relative offset (+=/-=) if specified\n\t\tadjusted = valueParts[ 1 ] ?\n\t\t\tinitialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :\n\t\t\t+valueParts[ 2 ];\n\t\tif ( tween ) {\n\t\t\ttween.unit = unit;\n\t\t\ttween.start = initialInUnit;\n\t\t\ttween.end = adjusted;\n\t\t}\n\t}\n\treturn adjusted;\n}\n\n\nvar defaultDisplayMap = {};\n\nfunction getDefaultDisplay( elem ) {\n\tvar temp,\n\t\tdoc = elem.ownerDocument,\n\t\tnodeName = elem.nodeName,\n\t\tdisplay = defaultDisplayMap[ nodeName ];\n\n\tif ( display ) {\n\t\treturn display;\n\t}\n\n\ttemp = doc.body.appendChild( doc.createElement( nodeName ) );\n\tdisplay = jQuery.css( temp, \"display\" );\n\n\ttemp.parentNode.removeChild( temp );\n\n\tif ( display === \"none\" ) {\n\t\tdisplay = \"block\";\n\t}\n\tdefaultDisplayMap[ nodeName ] = display;\n\n\treturn display;\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\t// Determine new display value for elements that need to change\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\n\t\t\t// Since we force visibility upon cascade-hidden elements, an immediate (and slow)\n\t\t\t// check is required in this first loop unless we have a nonempty display value (either\n\t\t\t// inline or about-to-be-restored)\n\t\t\tif ( display === \"none\" ) {\n\t\t\t\tvalues[ index ] = dataPriv.get( elem, \"display\" ) || null;\n\t\t\t\tif ( !values[ index ] ) {\n\t\t\t\t\telem.style.display = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( elem.style.display === \"\" && isHiddenWithinTree( elem ) ) {\n\t\t\t\tvalues[ index ] = getDefaultDisplay( elem );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( display !== \"none\" ) {\n\t\t\t\tvalues[ index ] = \"none\";\n\n\t\t\t\t// Remember what we're overwriting\n\t\t\t\tdataPriv.set( elem, \"display\", display );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of the elements in a second loop to avoid constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\tif ( values[ index ] != null ) {\n\t\t\telements[ index ].style.display = values[ index ];\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.fn.extend( {\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tif ( isHiddenWithinTree( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t} );\n\t}\n} );\nvar rcheckableType = ( /^(?:checkbox|radio)$/i );\n\nvar rtagName = ( /<([a-z][^\\/\\0>\\x20\\t\\r\\n\\f]*)/i );\n\nvar rscriptType = ( /^$|^module$|\\/(?:java|ecma)script/i );\n\n\n\n( function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Android 4.0 - 4.3 only\n\t// Check state lost if the name is set (trac-11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (trac-14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Android <=4.1 only\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE <=11 only\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n\n\t// Support: IE <=9 only\n\t// IE <=9 replaces <option> tags with their contents when inserted outside of\n\t// the select element.\n\tdiv.innerHTML = \"<option></option>\";\n\tsupport.option = !!div.lastChild;\n} )();\n\n\n// We have to close these tags to support XHTML (trac-13200)\nvar wrapMap = {\n\n\t// XHTML parsers do not magically insert elements in the\n\t// same way that tag soup parsers do. So we cannot shorten\n\t// this by omitting <tbody> or other required elements.\n\tthead: [ 1, \"<table>\", \"</table>\" ],\n\tcol: [ 2, \"<table><colgroup>\", \"</colgroup></table>\" ],\n\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t_default: [ 0, \"\", \"\" ]\n};\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// Support: IE <=9 only\nif ( !support.option ) {\n\twrapMap.optgroup = wrapMap.option = [ 1, \"<select multiple='multiple'>\", \"</select>\" ];\n}\n\n\nfunction getAll( context, tag ) {\n\n\t// Support: IE <=9 - 11 only\n\t// Use typeof to avoid zero-argument method invocation on host objects (trac-15151)\n\tvar ret;\n\n\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\tret = context.getElementsByTagName( tag || \"*\" );\n\n\t} else if ( typeof context.querySelectorAll !== \"undefined\" ) {\n\t\tret = context.querySelectorAll( tag || \"*\" );\n\n\t} else {\n\t\tret = [];\n\t}\n\n\tif ( tag === undefined || tag && nodeName( context, tag ) ) {\n\t\treturn jQuery.merge( [ context ], ret );\n\t}\n\n\treturn ret;\n}\n\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdataPriv.set(\n\t\t\telems[ i ],\n\t\t\t\"globalEval\",\n\t\t\t!refElements || dataPriv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\n\nvar rhtml = /<|&#?\\w+;/;\n\nfunction buildFragment( elems, context, scripts, selection, ignored ) {\n\tvar elem, tmp, tag, wrap, attached, j,\n\t\tfragment = context.createDocumentFragment(),\n\t\tnodes = [],\n\t\ti = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\telem = elems[ i ];\n\n\t\tif ( elem || elem === 0 ) {\n\n\t\t\t// Add nodes directly\n\t\t\tif ( toType( elem ) === \"object\" ) {\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t// Convert non-html into a text node\n\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t// Convert html into DOM nodes\n\t\t\t} else {\n\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement( \"div\" ) );\n\n\t\t\t\t// Deserialize a standard representation\n\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\ttmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];\n\n\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\tj = wrap[ 0 ];\n\t\t\t\twhile ( j-- ) {\n\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t}\n\n\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t// Remember the top-level container\n\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t// Ensure the created nodes are orphaned (trac-12392)\n\t\t\t\ttmp.textContent = \"\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove wrapper from fragment\n\tfragment.textContent = \"\";\n\n\ti = 0;\n\twhile ( ( elem = nodes[ i++ ] ) ) {\n\n\t\t// Skip elements already in the context collection (trac-4087)\n\t\tif ( selection && jQuery.inArray( elem, selection ) > -1 ) {\n\t\t\tif ( ignored ) {\n\t\t\t\tignored.push( elem );\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tattached = isAttached( elem );\n\n\t\t// Append to fragment\n\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t// Preserve script evaluation history\n\t\tif ( attached ) {\n\t\t\tsetGlobalEval( tmp );\n\t\t}\n\n\t\t// Capture executables\n\t\tif ( scripts ) {\n\t\t\tj = 0;\n\t\t\twhile ( ( elem = tmp[ j++ ] ) ) {\n\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\tscripts.push( elem );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn fragment;\n}\n\n\nvar rtypenamespace = /^([^.]*)(?:\\.(.+)|)/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\n// Support: IE <=9 - 11+\n// focus() and blur() are asynchronous, except when they are no-op.\n// So expect focus to be synchronous when the element is already active,\n// and blur to be synchronous when the element is not already active.\n// (focus and blur are always synchronous in other supported browsers,\n// this just defines when we can count on it).\nfunction expectSync( elem, type ) {\n\treturn ( elem === safeActiveElement() ) === ( type === \"focus\" );\n}\n\n// Support: IE <=9 only\n// Accessing document.activeElement can throw unexpectedly\n// https://bugs.jquery.com/ticket/13393\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\nfunction on( elem, types, selector, data, fn, one ) {\n\tvar origFn, type;\n\n\t// Types can be a map of types/handlers\n\tif ( typeof types === \"object\" ) {\n\n\t\t// ( types-Object, selector, data )\n\t\tif ( typeof selector !== \"string\" ) {\n\n\t\t\t// ( types-Object, data )\n\t\t\tdata = data || selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tfor ( type in types ) {\n\t\t\ton( elem, type, selector, data, types[ type ], one );\n\t\t}\n\t\treturn elem;\n\t}\n\n\tif ( data == null && fn == null ) {\n\n\t\t// ( types, fn )\n\t\tfn = selector;\n\t\tdata = selector = undefined;\n\t} else if ( fn == null ) {\n\t\tif ( typeof selector === \"string\" ) {\n\n\t\t\t// ( types, selector, fn )\n\t\t\tfn = data;\n\t\t\tdata = undefined;\n\t\t} else {\n\n\t\t\t// ( types, data, fn )\n\t\t\tfn = data;\n\t\t\tdata = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t}\n\tif ( fn === false ) {\n\t\tfn = returnFalse;\n\t} else if ( !fn ) {\n\t\treturn elem;\n\t}\n\n\tif ( one === 1 ) {\n\t\torigFn = fn;\n\t\tfn = function( event ) {\n\n\t\t\t// Can use an empty set, since event contains the info\n\t\t\tjQuery().off( event );\n\t\t\treturn origFn.apply( this, arguments );\n\t\t};\n\n\t\t// Use same guid so caller can remove using origFn\n\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t}\n\treturn elem.each( function() {\n\t\tjQuery.event.add( this, types, fn, data, selector );\n\t} );\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.get( elem );\n\n\t\t// Only attach events to objects that accept data\n\t\tif ( !acceptData( elem ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Ensure that invalid selectors throw exceptions at attach time\n\t\t// Evaluate against documentElement in case elem is a non-element node (e.g., document)\n\t\tif ( selector ) {\n\t\t\tjQuery.find.matchesSelector( documentElement, selector );\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !( events = elemData.events ) ) {\n\t\t\tevents = elemData.events = Object.create( null );\n\t\t}\n\t\tif ( !( eventHandle = elemData.handle ) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== \"undefined\" && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend( {\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join( \".\" )\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !( handlers = events[ type ] ) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup ||\n\t\t\t\t\tspecial.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = dataPriv.hasData( elem ) && dataPriv.get( elem );\n\n\t\tif ( !elemData || !( events = elemData.events ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnothtmlwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[ t ] ) || [];\n\t\t\ttype = origType = tmp[ 1 ];\n\t\t\tnamespaces = ( tmp[ 2 ] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[ 2 ] &&\n\t\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector ||\n\t\t\t\t\t\tselector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown ||\n\t\t\t\t\tspecial.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove data and the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdataPriv.remove( elem, \"handle events\" );\n\t\t}\n\t},\n\n\tdispatch: function( nativeEvent ) {\n\n\t\tvar i, j, ret, matched, handleObj, handlerQueue,\n\t\t\targs = new Array( arguments.length ),\n\n\t\t\t// Make a writable jQuery.Event from the native event object\n\t\t\tevent = jQuery.event.fix( nativeEvent ),\n\n\t\t\thandlers = (\n\t\t\t\tdataPriv.get( this, \"events\" ) || Object.create( null )\n\t\t\t)[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[ 0 ] = event;\n\n\t\tfor ( i = 1; i < arguments.length; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( ( handleObj = matched.handlers[ j++ ] ) &&\n\t\t\t\t!event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// If the event is namespaced, then each handler is only invoked if it is\n\t\t\t\t// specially universal or its namespaces are a superset of the event's.\n\t\t\t\tif ( !event.rnamespace || handleObj.namespace === false ||\n\t\t\t\t\tevent.rnamespace.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||\n\t\t\t\t\t\thandleObj.handler ).apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( ( event.result = ret ) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, handleObj, sel, matchedHandlers, matchedSelectors,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\tif ( delegateCount &&\n\n\t\t\t// Support: IE <=9\n\t\t\t// Black-hole SVG <use> instance trees (trac-13180)\n\t\t\tcur.nodeType &&\n\n\t\t\t// Support: Firefox <=42\n\t\t\t// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)\n\t\t\t// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click\n\t\t\t// Support: IE 11 only\n\t\t\t// ...but not arrow key \"clicks\" of radio inputs, which can have `button` -1 (gh-2343)\n\t\t\t!( event.type === \"click\" && event.button >= 1 ) ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't check non-elements (trac-13208)\n\t\t\t\t// Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)\n\t\t\t\tif ( cur.nodeType === 1 && !( event.type === \"click\" && cur.disabled === true ) ) {\n\t\t\t\t\tmatchedHandlers = [];\n\t\t\t\t\tmatchedSelectors = {};\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (trac-13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatchedSelectors[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) > -1 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matchedSelectors[ sel ] ) {\n\t\t\t\t\t\t\tmatchedHandlers.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matchedHandlers.length ) {\n\t\t\t\t\t\thandlerQueue.push( { elem: cur, handlers: matchedHandlers } );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tcur = this;\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } );\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\taddProp: function( name, hook ) {\n\t\tObject.defineProperty( jQuery.Event.prototype, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget: isFunction( hook ) ?\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn hook( this.originalEvent );\n\t\t\t\t\t}\n\t\t\t\t} :\n\t\t\t\tfunction() {\n\t\t\t\t\tif ( this.originalEvent ) {\n\t\t\t\t\t\treturn this.originalEvent[ name ];\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\tset: function( value ) {\n\t\t\t\tObject.defineProperty( this, name, {\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tvalue: value\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t},\n\n\tfix: function( originalEvent ) {\n\t\treturn originalEvent[ jQuery.expando ] ?\n\t\t\toriginalEvent :\n\t\t\tnew jQuery.Event( originalEvent );\n\t},\n\n\tspecial: {\n\t\tload: {\n\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tclick: {\n\n\t\t\t// Utilize native event to ensure correct state for checkable inputs\n\t\t\tsetup: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Claim the first handler\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\t// dataPriv.set( el, \"click\", ... )\n\t\t\t\t\tleverageNative( el, \"click\", returnTrue );\n\t\t\t\t}\n\n\t\t\t\t// Return false to allow normal processing in the caller\n\t\t\t\treturn false;\n\t\t\t},\n\t\t\ttrigger: function( data ) {\n\n\t\t\t\t// For mutual compressibility with _default, replace `this` access with a local var.\n\t\t\t\t// `|| data` is dead code meant only to preserve the variable through minification.\n\t\t\t\tvar el = this || data;\n\n\t\t\t\t// Force setup before triggering a click\n\t\t\t\tif ( rcheckableType.test( el.type ) &&\n\t\t\t\t\tel.click && nodeName( el, \"input\" ) ) {\n\n\t\t\t\t\tleverageNative( el, \"click\" );\n\t\t\t\t}\n\n\t\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\t\treturn true;\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, suppress native .click() on links\n\t\t\t// Also prevent it if we're currently inside a leveraged native-event stack\n\t\t\t_default: function( event ) {\n\t\t\t\tvar target = event.target;\n\t\t\t\treturn rcheckableType.test( target.type ) &&\n\t\t\t\t\ttarget.click && nodeName( target, \"input\" ) &&\n\t\t\t\t\tdataPriv.get( target, \"click\" ) ||\n\t\t\t\t\tnodeName( target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Ensure the presence of an event listener that handles manually-triggered\n// synthetic events by interrupting progress until reinvoked in response to\n// *native* events that it fires directly, ensuring that state changes have\n// already occurred before other listeners are invoked.\nfunction leverageNative( el, type, expectSync ) {\n\n\t// Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add\n\tif ( !expectSync ) {\n\t\tif ( dataPriv.get( el, type ) === undefined ) {\n\t\t\tjQuery.event.add( el, type, returnTrue );\n\t\t}\n\t\treturn;\n\t}\n\n\t// Register the controller as a special universal handler for all event namespaces\n\tdataPriv.set( el, type, false );\n\tjQuery.event.add( el, type, {\n\t\tnamespace: false,\n\t\thandler: function( event ) {\n\t\t\tvar notAsync, result,\n\t\t\t\tsaved = dataPriv.get( this, type );\n\n\t\t\tif ( ( event.isTrigger & 1 ) && this[ type ] ) {\n\n\t\t\t\t// Interrupt processing of the outer synthetic .trigger()ed event\n\t\t\t\t// Saved data should be false in such cases, but might be a leftover capture object\n\t\t\t\t// from an async native handler (gh-4350)\n\t\t\t\tif ( !saved.length ) {\n\n\t\t\t\t\t// Store arguments for use when handling the inner native event\n\t\t\t\t\t// There will always be at least one argument (an event object), so this array\n\t\t\t\t\t// will not be confused with a leftover capture object.\n\t\t\t\t\tsaved = slice.call( arguments );\n\t\t\t\t\tdataPriv.set( this, type, saved );\n\n\t\t\t\t\t// Trigger the native event and capture its result\n\t\t\t\t\t// Support: IE <=9 - 11+\n\t\t\t\t\t// focus() and blur() are asynchronous\n\t\t\t\t\tnotAsync = expectSync( this, type );\n\t\t\t\t\tthis[ type ]();\n\t\t\t\t\tresult = dataPriv.get( this, type );\n\t\t\t\t\tif ( saved !== result || notAsync ) {\n\t\t\t\t\t\tdataPriv.set( this, type, false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult = {};\n\t\t\t\t\t}\n\t\t\t\t\tif ( saved !== result ) {\n\n\t\t\t\t\t\t// Cancel the outer synthetic event\n\t\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t// Support: Chrome 86+\n\t\t\t\t\t\t// In Chrome, if an element having a focusout handler is blurred by\n\t\t\t\t\t\t// clicking outside of it, it invokes the handler synchronously. If\n\t\t\t\t\t\t// that handler calls `.remove()` on the element, the data is cleared,\n\t\t\t\t\t\t// leaving `result` undefined. We need to guard against this.\n\t\t\t\t\t\treturn result && result.value;\n\t\t\t\t\t}\n\n\t\t\t\t// If this is an inner synthetic event for an event with a bubbling surrogate\n\t\t\t\t// (focus or blur), assume that the surrogate already propagated from triggering the\n\t\t\t\t// native event and prevent that from happening again here.\n\t\t\t\t// This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the\n\t\t\t\t// bubbling surrogate propagates *after* the non-bubbling base), but that seems\n\t\t\t\t// less bad than duplication.\n\t\t\t\t} else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t}\n\n\t\t\t// If this is a native event triggered above, everything is now in order\n\t\t\t// Fire an inner synthetic event with the original arguments\n\t\t\t} else if ( saved.length ) {\n\n\t\t\t\t// ...and capture the result\n\t\t\t\tdataPriv.set( this, type, {\n\t\t\t\t\tvalue: jQuery.event.trigger(\n\n\t\t\t\t\t\t// Support: IE <=9 - 11+\n\t\t\t\t\t\t// Extend with the prototype to reset the above stopImmediatePropagation()\n\t\t\t\t\t\tjQuery.extend( saved[ 0 ], jQuery.Event.prototype ),\n\t\t\t\t\t\tsaved.slice( 1 ),\n\t\t\t\t\t\tthis\n\t\t\t\t\t)\n\t\t\t\t} );\n\n\t\t\t\t// Abort handling of the native event\n\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t}\n\t\t}\n\t} );\n}\n\njQuery.removeEvent = function( elem, type, handle ) {\n\n\t// This \"if\" is needed for plain objects\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\n\t// Allow instantiation without the 'new' keyword\n\tif ( !( this instanceof jQuery.Event ) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\n\t\t\t\t// Support: Android <=2.3 only\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t\t// Create target properties\n\t\t// Support: Safari <=6 - 7 only\n\t\t// Target should not be a text node (trac-504, trac-13143)\n\t\tthis.target = ( src.target && src.target.nodeType === 3 ) ?\n\t\t\tsrc.target.parentNode :\n\t\t\tsrc.target;\n\n\t\tthis.currentTarget = src.currentTarget;\n\t\tthis.relatedTarget = src.relatedTarget;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || Date.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tconstructor: jQuery.Event,\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\tisSimulated: false,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && !this.isSimulated ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Includes all common event props including KeyEvent and MouseEvent specific props\njQuery.each( {\n\taltKey: true,\n\tbubbles: true,\n\tcancelable: true,\n\tchangedTouches: true,\n\tctrlKey: true,\n\tdetail: true,\n\teventPhase: true,\n\tmetaKey: true,\n\tpageX: true,\n\tpageY: true,\n\tshiftKey: true,\n\tview: true,\n\t\"char\": true,\n\tcode: true,\n\tcharCode: true,\n\tkey: true,\n\tkeyCode: true,\n\tbutton: true,\n\tbuttons: true,\n\tclientX: true,\n\tclientY: true,\n\toffsetX: true,\n\toffsetY: true,\n\tpointerId: true,\n\tpointerType: true,\n\tscreenX: true,\n\tscreenY: true,\n\ttargetTouches: true,\n\ttoElement: true,\n\ttouches: true,\n\twhich: true\n}, jQuery.event.addProp );\n\njQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( type, delegateType ) {\n\tjQuery.event.special[ type ] = {\n\n\t\t// Utilize native event if possible so blur/focus sequence is correct\n\t\tsetup: function() {\n\n\t\t\t// Claim the first handler\n\t\t\t// dataPriv.set( this, \"focus\", ... )\n\t\t\t// dataPriv.set( this, \"blur\", ... )\n\t\t\tleverageNative( this, type, expectSync );\n\n\t\t\t// Return false to allow normal processing in the caller\n\t\t\treturn false;\n\t\t},\n\t\ttrigger: function() {\n\n\t\t\t// Force setup before trigger\n\t\t\tleverageNative( this, type );\n\n\t\t\t// Return non-false to allow normal event-path propagation\n\t\t\treturn true;\n\t\t},\n\n\t\t// Suppress native focus or blur if we're currently inside\n\t\t// a leveraged native-event stack\n\t\t_default: function( event ) {\n\t\t\treturn dataPriv.get( event.target, type );\n\t\t},\n\n\t\tdelegateType: delegateType\n\t};\n} );\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// so that event delegation works in jQuery.\n// Do the same for pointerenter/pointerleave and pointerover/pointerout\n//\n// Support: Safari 7 only\n// Safari sends mouseenter too often; see:\n// https://bugs.chromium.org/p/chromium/issues/detail?id=470258\n// for the description of the bug (it existed in older Chrome versions as well).\njQuery.each( {\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mouseenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n} );\n\njQuery.fn.extend( {\n\n\ton: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn );\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn on( this, types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\n\t\t\t// ( event )  dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ?\n\t\t\t\t\thandleObj.origType + \".\" + handleObj.namespace :\n\t\t\t\t\thandleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t} );\n\t}\n} );\n\n\nvar\n\n\t// Support: IE <=10 - 11, Edge 12 - 13 only\n\t// In IE/Edge using regex groups here causes severe slowdowns.\n\t// See https://connect.microsoft.com/IE/feedback/details/1736512/\n\trnoInnerhtml = /<script|<style|<link/i,\n\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\n\trcleanScript = /^\\s*<!\\[CDATA\\[|\\]\\]>\\s*$/g;\n\n// Prefer a tbody over its parent table for containing new rows\nfunction manipulationTarget( elem, content ) {\n\tif ( nodeName( elem, \"table\" ) &&\n\t\tnodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ) {\n\n\t\treturn jQuery( elem ).children( \"tbody\" )[ 0 ] || elem;\n\t}\n\n\treturn elem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = ( elem.getAttribute( \"type\" ) !== null ) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tif ( ( elem.type || \"\" ).slice( 0, 5 ) === \"true/\" ) {\n\t\telem.type = elem.type.slice( 5 );\n\t} else {\n\t\telem.removeAttribute( \"type\" );\n\t}\n\n\treturn elem;\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( dataPriv.hasData( src ) ) {\n\t\tpdataOld = dataPriv.get( src );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdataPriv.remove( dest, \"handle events\" );\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( dataUser.hasData( src ) ) {\n\t\tudataOld = dataUser.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdataUser.set( dest, udataCur );\n\t}\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\nfunction domManip( collection, args, callback, ignored ) {\n\n\t// Flatten any nested arrays\n\targs = flat( args );\n\n\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\ti = 0,\n\t\tl = collection.length,\n\t\tiNoClone = l - 1,\n\t\tvalue = args[ 0 ],\n\t\tvalueIsFunction = isFunction( value );\n\n\t// We can't cloneNode fragments that contain checked, in WebKit\n\tif ( valueIsFunction ||\n\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\treturn collection.each( function( index ) {\n\t\t\tvar self = collection.eq( index );\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t}\n\t\t\tdomManip( self, args, callback, ignored );\n\t\t} );\n\t}\n\n\tif ( l ) {\n\t\tfragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );\n\t\tfirst = fragment.firstChild;\n\n\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\tfragment = first;\n\t\t}\n\n\t\t// Require either new content or an interest in ignored elements to invoke the callback\n\t\tif ( first || ignored ) {\n\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\thasScripts = scripts.length;\n\n\t\t\t// Use the original fragment for the last item\n\t\t\t// instead of the first because it can end up\n\t\t\t// being emptied incorrectly in certain situations (trac-8070).\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tnode = fragment;\n\n\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\tif ( hasScripts ) {\n\n\t\t\t\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcallback.call( collection[ i ], node, i );\n\t\t\t}\n\n\t\t\tif ( hasScripts ) {\n\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t// Reenable scripts\n\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t!dataPriv.access( node, \"globalEval\" ) &&\n\t\t\t\t\t\tjQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\tif ( node.src && ( node.type || \"\" ).toLowerCase()  !== \"module\" ) {\n\n\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\tif ( jQuery._evalUrl && !node.noModule ) {\n\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src, {\n\t\t\t\t\t\t\t\t\tnonce: node.nonce || node.getAttribute( \"nonce\" )\n\t\t\t\t\t\t\t\t}, doc );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Unwrap a CDATA section containing script contents. This shouldn't be\n\t\t\t\t\t\t\t// needed as in XML documents they're already not visible when\n\t\t\t\t\t\t\t// inspecting element contents and in HTML documents they have no\n\t\t\t\t\t\t\t// meaning but we're preserving that logic for backwards compatibility.\n\t\t\t\t\t\t\t// This will be removed completely in 4.0. See gh-4904.\n\t\t\t\t\t\t\tDOMEval( node.textContent.replace( rcleanScript, \"\" ), node, doc );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn collection;\n}\n\nfunction remove( elem, selector, keepData ) {\n\tvar node,\n\t\tnodes = selector ? jQuery.filter( selector, elem ) : elem,\n\t\ti = 0;\n\n\tfor ( ; ( node = nodes[ i ] ) != null; i++ ) {\n\t\tif ( !keepData && node.nodeType === 1 ) {\n\t\t\tjQuery.cleanData( getAll( node ) );\n\t\t}\n\n\t\tif ( node.parentNode ) {\n\t\t\tif ( keepData && isAttached( node ) ) {\n\t\t\t\tsetGlobalEval( getAll( node, \"script\" ) );\n\t\t\t}\n\t\t\tnode.parentNode.removeChild( node );\n\t\t}\n\t}\n\n\treturn elem;\n}\n\njQuery.extend( {\n\thtmlPrefilter: function( html ) {\n\t\treturn html;\n\t},\n\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = isAttached( elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {\n\t\t\tif ( acceptData( elem ) ) {\n\t\t\t\tif ( ( data = elem[ dataPriv.expando ] ) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataPriv.expando ] = undefined;\n\t\t\t\t}\n\t\t\t\tif ( elem[ dataUser.expando ] ) {\n\n\t\t\t\t\t// Support: Chrome <=35 - 45+\n\t\t\t\t\t// Assign undefined instead of using delete, see Data#remove\n\t\t\t\t\telem[ dataUser.expando ] = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n} );\n\njQuery.fn.extend( {\n\tdetach: function( selector ) {\n\t\treturn remove( this, selector, true );\n\t},\n\n\tremove: function( selector ) {\n\t\treturn remove( this, selector );\n\t},\n\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each( function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t} );\n\t},\n\n\tprepend: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t} );\n\t},\n\n\tbefore: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t} );\n\t},\n\n\tafter: function() {\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t} );\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; ( elem = this[ i ] ) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map( function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t} );\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = jQuery.htmlPrefilter( value );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar ignored = [];\n\n\t\t// Make the changes, replacing each non-ignored context element with the new content\n\t\treturn domManip( this, arguments, function( elem ) {\n\t\t\tvar parent = this.parentNode;\n\n\t\t\tif ( jQuery.inArray( this, ignored ) < 0 ) {\n\t\t\t\tjQuery.cleanData( getAll( this ) );\n\t\t\t\tif ( parent ) {\n\t\t\t\t\tparent.replaceChild( elem, this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Force callback invocation\n\t\t}, ignored );\n\t}\n} );\n\njQuery.each( {\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t\t\t// .get() because push.apply(_, arraylike) throws on ancient WebKit\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n} );\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar rcustomProp = /^--/;\n\n\nvar getStyles = function( elem ) {\n\n\t\t// Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tvar view = elem.ownerDocument.defaultView;\n\n\t\tif ( !view || !view.opener ) {\n\t\t\tview = window;\n\t\t}\n\n\t\treturn view.getComputedStyle( elem );\n\t};\n\nvar swap = function( elem, options, callback ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.call( elem );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar rboxStyle = new RegExp( cssExpand.join( \"|\" ), \"i\" );\n\nvar whitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\";\n\n\nvar rtrimCSS = new RegExp(\n\t\"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\",\n\t\"g\"\n);\n\n\n\n\n( function() {\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computeStyleTests() {\n\n\t\t// This is a singleton, we need to execute it only once\n\t\tif ( !div ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcontainer.style.cssText = \"position:absolute;left:-11111px;width:60px;\" +\n\t\t\t\"margin-top:1px;padding:0;border:0\";\n\t\tdiv.style.cssText =\n\t\t\t\"position:relative;display:block;box-sizing:border-box;overflow:scroll;\" +\n\t\t\t\"margin:auto;border:1px;padding:1px;\" +\n\t\t\t\"width:60%;top:1%\";\n\t\tdocumentElement.appendChild( container ).appendChild( div );\n\n\t\tvar divStyle = window.getComputedStyle( div );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\n\t\t// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44\n\t\treliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12;\n\n\t\t// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3\n\t\t// Some styles come back with percentage values, even though they shouldn't\n\t\tdiv.style.right = \"60%\";\n\t\tpixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36;\n\n\t\t// Support: IE 9 - 11 only\n\t\t// Detect misreporting of content dimensions for box-sizing:border-box elements\n\t\tboxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36;\n\n\t\t// Support: IE 9 only\n\t\t// Detect overflow:scroll screwiness (gh-3699)\n\t\t// Support: Chrome <=64\n\t\t// Don't get tricked when zoom affects offsetWidth (gh-4029)\n\t\tdiv.style.position = \"absolute\";\n\t\tscrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12;\n\n\t\tdocumentElement.removeChild( container );\n\n\t\t// Nullify the div so it wouldn't be stored in the memory and\n\t\t// it will also be a sign that checks already performed\n\t\tdiv = null;\n\t}\n\n\tfunction roundPixelMeasures( measure ) {\n\t\treturn Math.round( parseFloat( measure ) );\n\t}\n\n\tvar pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal,\n\t\treliableTrDimensionsVal, reliableMarginLeftVal,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\t// Finish early in limited (non-browser) environments\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE <=9 - 11 only\n\t// Style of cloned element affects source element cloned (trac-8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tjQuery.extend( support, {\n\t\tboxSizingReliable: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn boxSizingReliableVal;\n\t\t},\n\t\tpixelBoxStyles: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelBoxStylesVal;\n\t\t},\n\t\tpixelPosition: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn pixelPositionVal;\n\t\t},\n\t\treliableMarginLeft: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn reliableMarginLeftVal;\n\t\t},\n\t\tscrollboxSize: function() {\n\t\t\tcomputeStyleTests();\n\t\t\treturn scrollboxSizeVal;\n\t\t},\n\n\t\t// Support: IE 9 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Behavior in IE 9 is more subtle than in newer versions & it passes\n\t\t// some versions of this test; make sure not to make it pass there!\n\t\t//\n\t\t// Support: Firefox 70+\n\t\t// Only Firefox includes border widths\n\t\t// in computed dimensions. (gh-4529)\n\t\treliableTrDimensions: function() {\n\t\t\tvar table, tr, trChild, trStyle;\n\t\t\tif ( reliableTrDimensionsVal == null ) {\n\t\t\t\ttable = document.createElement( \"table\" );\n\t\t\t\ttr = document.createElement( \"tr\" );\n\t\t\t\ttrChild = document.createElement( \"div\" );\n\n\t\t\t\ttable.style.cssText = \"position:absolute;left:-11111px;border-collapse:separate\";\n\t\t\t\ttr.style.cssText = \"border:1px solid\";\n\n\t\t\t\t// Support: Chrome 86+\n\t\t\t\t// Height set through cssText does not get applied.\n\t\t\t\t// Computed height then comes back as 0.\n\t\t\t\ttr.style.height = \"1px\";\n\t\t\t\ttrChild.style.height = \"9px\";\n\n\t\t\t\t// Support: Android 8 Chrome 86+\n\t\t\t\t// In our bodyBackground.html iframe,\n\t\t\t\t// display for all div elements is set to \"inline\",\n\t\t\t\t// which causes a problem only in Android 8 Chrome 86.\n\t\t\t\t// Ensuring the div is display: block\n\t\t\t\t// gets around this issue.\n\t\t\t\ttrChild.style.display = \"block\";\n\n\t\t\t\tdocumentElement\n\t\t\t\t\t.appendChild( table )\n\t\t\t\t\t.appendChild( tr )\n\t\t\t\t\t.appendChild( trChild );\n\n\t\t\t\ttrStyle = window.getComputedStyle( tr );\n\t\t\t\treliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderTopWidth, 10 ) +\n\t\t\t\t\tparseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;\n\n\t\t\t\tdocumentElement.removeChild( table );\n\t\t\t}\n\t\t\treturn reliableTrDimensionsVal;\n\t\t}\n\t} );\n} )();\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\t\tisCustomProp = rcustomProp.test( name ),\n\n\t\t// Support: Firefox 51+\n\t\t// Retrieving style before computed somehow\n\t\t// fixes an issue with getting wrong values\n\t\t// on detached elements\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\n\t// getPropertyValue is needed for:\n\t//   .css('filter') (IE 9 only, trac-12537)\n\t//   .css('--customProperty) (gh-3144)\n\tif ( computed ) {\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\n\t\t// trim whitespace for custom property (issue gh-4926)\n\t\tif ( isCustomProp ) {\n\n\t\t\t// rtrim treats U+000D CARRIAGE RETURN and U+000C FORM FEED\n\t\t\t// as whitespace while CSS does not, but this is not a problem\n\t\t\t// because CSS preprocessing replaces them with U+000A LINE FEED\n\t\t\t// (which *is* CSS whitespace)\n\t\t\t// https://www.w3.org/TR/css-syntax-3/#input-preprocessing\n\t\t\tret = ret.replace( rtrimCSS, \"$1\" );\n\t\t}\n\n\t\tif ( ret === \"\" && !isAttached( elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// Android Browser returns percentage for some values,\n\t\t// but width seems to be reliably pixels.\n\t\t// This is against the CSSOM draft spec:\n\t\t// https://drafts.csswg.org/cssom/#resolved-values\n\t\tif ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\n\t\t// Support: IE <=9 - 11 only\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn ( this.get = hookFn ).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\nvar cssPrefixes = [ \"Webkit\", \"Moz\", \"ms\" ],\n\temptyStyle = document.createElement( \"div\" ).style,\n\tvendorProps = {};\n\n// Return a vendor-prefixed property or undefined\nfunction vendorPropName( name ) {\n\n\t// Check for vendor prefixed names\n\tvar capName = name[ 0 ].toUpperCase() + name.slice( 1 ),\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in emptyStyle ) {\n\t\t\treturn name;\n\t\t}\n\t}\n}\n\n// Return a potentially-mapped jQuery.cssProps or vendor prefixed property\nfunction finalPropName( name ) {\n\tvar final = jQuery.cssProps[ name ] || vendorProps[ name ];\n\n\tif ( final ) {\n\t\treturn final;\n\t}\n\tif ( name in emptyStyle ) {\n\t\treturn name;\n\t}\n\treturn vendorProps[ name ] = vendorPropName( name ) || name;\n}\n\n\nvar\n\n\t// Swappable if display is none or starts with table\n\t// except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t};\n\nfunction setPositiveNumber( _elem, value, subtract ) {\n\n\t// Any relative (+/-) values have already been\n\t// normalized at this point\n\tvar matches = rcssNum.exec( value );\n\treturn matches ?\n\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) {\n\tvar i = dimension === \"width\" ? 1 : 0,\n\t\textra = 0,\n\t\tdelta = 0;\n\n\t// Adjustment may not be necessary\n\tif ( box === ( isBorderBox ? \"border\" : \"content\" ) ) {\n\t\treturn 0;\n\t}\n\n\tfor ( ; i < 4; i += 2 ) {\n\n\t\t// Both box models exclude margin\n\t\tif ( box === \"margin\" ) {\n\t\t\tdelta += jQuery.css( elem, box + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\t// If we get here with a content-box, we're seeking \"padding\" or \"border\" or \"margin\"\n\t\tif ( !isBorderBox ) {\n\n\t\t\t// Add padding\n\t\t\tdelta += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// For \"border\" or \"margin\", add border\n\t\t\tif ( box !== \"padding\" ) {\n\t\t\t\tdelta += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\n\t\t\t// But still keep track of it otherwise\n\t\t\t} else {\n\t\t\t\textra += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\n\t\t// If we get here with a border-box (content + padding + border), we're seeking \"content\" or\n\t\t// \"padding\" or \"margin\"\n\t\t} else {\n\n\t\t\t// For \"content\", subtract padding\n\t\t\tif ( box === \"content\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// For \"content\" or \"padding\", subtract border\n\t\t\tif ( box !== \"margin\" ) {\n\t\t\t\tdelta -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Account for positive content-box scroll gutter when requested by providing computedVal\n\tif ( !isBorderBox && computedVal >= 0 ) {\n\n\t\t// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border\n\t\t// Assuming integer scroll gutter, subtract the rest and round down\n\t\tdelta += Math.max( 0, Math.ceil(\n\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\tcomputedVal -\n\t\t\tdelta -\n\t\t\textra -\n\t\t\t0.5\n\n\t\t// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter\n\t\t// Use an explicit zero to avoid NaN (gh-3964)\n\t\t) ) || 0;\n\t}\n\n\treturn delta;\n}\n\nfunction getWidthOrHeight( elem, dimension, extra ) {\n\n\t// Start with computed style\n\tvar styles = getStyles( elem ),\n\n\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).\n\t\t// Fake content-box until we know it's needed to know the true value.\n\t\tboxSizingNeeded = !support.boxSizingReliable() || extra,\n\t\tisBorderBox = boxSizingNeeded &&\n\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\tvalueIsBorderBox = isBorderBox,\n\n\t\tval = curCSS( elem, dimension, styles ),\n\t\toffsetProp = \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 );\n\n\t// Support: Firefox <=54\n\t// Return a confounding non-pixel value or feign ignorance, as appropriate.\n\tif ( rnumnonpx.test( val ) ) {\n\t\tif ( !extra ) {\n\t\t\treturn val;\n\t\t}\n\t\tval = \"auto\";\n\t}\n\n\n\t// Support: IE 9 - 11 only\n\t// Use offsetWidth/offsetHeight for when box sizing is unreliable.\n\t// In those cases, the computed value can be trusted to be border-box.\n\tif ( ( !support.boxSizingReliable() && isBorderBox ||\n\n\t\t// Support: IE 10 - 11+, Edge 15 - 18+\n\t\t// IE/Edge misreport `getComputedStyle` of table rows with width/height\n\t\t// set in CSS while `offset*` properties report correct values.\n\t\t// Interestingly, in some cases IE 9 doesn't suffer from this issue.\n\t\t!support.reliableTrDimensions() && nodeName( elem, \"tr\" ) ||\n\n\t\t// Fall back to offsetWidth/offsetHeight when value is \"auto\"\n\t\t// This happens for inline elements with no explicit setting (gh-3571)\n\t\tval === \"auto\" ||\n\n\t\t// Support: Android <=4.1 - 4.3 only\n\t\t// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)\n\t\t!parseFloat( val ) && jQuery.css( elem, \"display\", false, styles ) === \"inline\" ) &&\n\n\t\t// Make sure the element is visible & connected\n\t\telem.getClientRects().length ) {\n\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t\t// Where available, offsetWidth/offsetHeight approximate border box dimensions.\n\t\t// Where not available (e.g., SVG), assume unreliable box-sizing and interpret the\n\t\t// retrieved value as a content box dimension.\n\t\tvalueIsBorderBox = offsetProp in elem;\n\t\tif ( valueIsBorderBox ) {\n\t\t\tval = elem[ offsetProp ];\n\t\t}\n\t}\n\n\t// Normalize \"\" and auto\n\tval = parseFloat( val ) || 0;\n\n\t// Adjust for the element's box model\n\treturn ( val +\n\t\tboxModelAdjustment(\n\t\t\telem,\n\t\t\tdimension,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles,\n\n\t\t\t// Provide the current computed size to request scroll gutter calculation (gh-3589)\n\t\t\tval\n\t\t)\n\t) + \"px\";\n}\n\njQuery.extend( {\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\t\"animationIterationCount\": true,\n\t\t\"columnCount\": true,\n\t\t\"fillOpacity\": true,\n\t\t\"flexGrow\": true,\n\t\t\"flexShrink\": true,\n\t\t\"fontWeight\": true,\n\t\t\"gridArea\": true,\n\t\t\"gridColumn\": true,\n\t\t\"gridColumnEnd\": true,\n\t\t\"gridColumnStart\": true,\n\t\t\"gridRow\": true,\n\t\t\"gridRowEnd\": true,\n\t\t\"gridRowStart\": true,\n\t\t\"lineHeight\": true,\n\t\t\"opacity\": true,\n\t\t\"order\": true,\n\t\t\"orphans\": true,\n\t\t\"widows\": true,\n\t\t\"zIndex\": true,\n\t\t\"zoom\": true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name ),\n\t\t\tstyle = elem.style;\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to query the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (trac-7345)\n\t\t\tif ( type === \"string\" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {\n\t\t\t\tvalue = adjustCSS( elem, name, ret );\n\n\t\t\t\t// Fixes bug trac-9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (trac-7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number was passed in, add the unit (except for certain CSS properties)\n\t\t\t// The isCustomProp check can be removed in jQuery 4.0 when we only auto-append\n\t\t\t// \"px\" to a few hardcoded values.\n\t\t\tif ( type === \"number\" && !isCustomProp ) {\n\t\t\t\tvalue += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? \"\" : \"px\" );\n\t\t\t}\n\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !( \"set\" in hooks ) ||\n\t\t\t\t( value = hooks.set( elem, value, extra ) ) !== undefined ) {\n\n\t\t\t\tif ( isCustomProp ) {\n\t\t\t\t\tstyle.setProperty( name, value );\n\t\t\t\t} else {\n\t\t\t\t\tstyle[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks &&\n\t\t\t\t( ret = hooks.get( elem, false, extra ) ) !== undefined ) {\n\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = camelCase( name ),\n\t\t\tisCustomProp = rcustomProp.test( name );\n\n\t\t// Make sure that we're working with the right name. We don't\n\t\t// want to modify the value if it is a CSS custom property\n\t\t// since they are user-defined.\n\t\tif ( !isCustomProp ) {\n\t\t\tname = finalPropName( origName );\n\t\t}\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || isFinite( num ) ? num || 0 : val;\n\t\t}\n\n\t\treturn val;\n\t}\n} );\n\njQuery.each( [ \"height\", \"width\" ], function( _i, dimension ) {\n\tjQuery.cssHooks[ dimension ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) &&\n\n\t\t\t\t\t// Support: Safari 8+\n\t\t\t\t\t// Table columns in Safari have non-zero offsetWidth & zero\n\t\t\t\t\t// getBoundingClientRect().width unless display is changed.\n\t\t\t\t\t// Support: IE <=11 only\n\t\t\t\t\t// Running getBoundingClientRect on a disconnected node\n\t\t\t\t\t// in IE throws an error.\n\t\t\t\t\t( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?\n\t\t\t\t\tswap( elem, cssShow, function() {\n\t\t\t\t\t\treturn getWidthOrHeight( elem, dimension, extra );\n\t\t\t\t\t} ) :\n\t\t\t\t\tgetWidthOrHeight( elem, dimension, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar matches,\n\t\t\t\tstyles = getStyles( elem ),\n\n\t\t\t\t// Only read styles.position if the test has a chance to fail\n\t\t\t\t// to avoid forcing a reflow.\n\t\t\t\tscrollboxSizeBuggy = !support.scrollboxSize() &&\n\t\t\t\t\tstyles.position === \"absolute\",\n\n\t\t\t\t// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)\n\t\t\t\tboxSizingNeeded = scrollboxSizeBuggy || extra,\n\t\t\t\tisBorderBox = boxSizingNeeded &&\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\tsubtract = extra ?\n\t\t\t\t\tboxModelAdjustment(\n\t\t\t\t\t\telem,\n\t\t\t\t\t\tdimension,\n\t\t\t\t\t\textra,\n\t\t\t\t\t\tisBorderBox,\n\t\t\t\t\t\tstyles\n\t\t\t\t\t) :\n\t\t\t\t\t0;\n\n\t\t\t// Account for unreliable border-box dimensions by comparing offset* to computed and\n\t\t\t// faking a content-box to get border and padding (gh-3699)\n\t\t\tif ( isBorderBox && scrollboxSizeBuggy ) {\n\t\t\t\tsubtract -= Math.ceil(\n\t\t\t\t\telem[ \"offset\" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -\n\t\t\t\t\tparseFloat( styles[ dimension ] ) -\n\t\t\t\t\tboxModelAdjustment( elem, dimension, \"border\", false, styles ) -\n\t\t\t\t\t0.5\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Convert to pixels if value adjustment is needed\n\t\t\tif ( subtract && ( matches = rcssNum.exec( value ) ) &&\n\t\t\t\t( matches[ 3 ] || \"px\" ) !== \"px\" ) {\n\n\t\t\t\telem.style[ dimension ] = value;\n\t\t\t\tvalue = jQuery.css( elem, dimension );\n\t\t\t}\n\n\t\t\treturn setPositiveNumber( elem, value, subtract );\n\t\t}\n\t};\n} );\n\njQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn ( parseFloat( curCSS( elem, \"marginLeft\" ) ) ||\n\t\t\t\telem.getBoundingClientRect().left -\n\t\t\t\t\tswap( elem, { marginLeft: 0 }, function() {\n\t\t\t\t\t\treturn elem.getBoundingClientRect().left;\n\t\t\t\t\t} )\n\t\t\t) + \"px\";\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each( {\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split( \" \" ) : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( prefix !== \"margin\" ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n} );\n\njQuery.fn.extend( {\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( Array.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t}\n} );\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || jQuery.easing._default;\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\t// Use a property on the element directly when it is not a DOM element,\n\t\t\t// or when there is no matching style property that exists.\n\t\t\tif ( tween.elem.nodeType !== 1 ||\n\t\t\t\ttween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.nodeType === 1 && (\n\t\t\t\tjQuery.cssHooks[ tween.prop ] ||\n\t\t\t\t\ttween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE <=9 only\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t},\n\t_default: \"swing\"\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, inProgress,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trrun = /queueHooks$/;\n\nfunction schedule() {\n\tif ( inProgress ) {\n\t\tif ( document.hidden === false && window.requestAnimationFrame ) {\n\t\t\twindow.requestAnimationFrame( schedule );\n\t\t} else {\n\t\t\twindow.setTimeout( schedule, jQuery.fx.interval );\n\t\t}\n\n\t\tjQuery.fx.tick();\n\t}\n}\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\twindow.setTimeout( function() {\n\t\tfxNow = undefined;\n\t} );\n\treturn ( fxNow = Date.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\tvar prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,\n\t\tisBox = \"width\" in props || \"height\" in props,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHiddenWithinTree( elem ),\n\t\tdataShow = dataPriv.get( elem, \"fxshow\" );\n\n\t// Queue-skipping animations hijack the fx hooks\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always( function() {\n\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always( function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Detect show/hide animations\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.test( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// Pretend to be hidden if this is a \"show\" and\n\t\t\t\t// there is still data from a stopped show/hide\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\n\t\t\t\t// Ignore all other no-op show/hide data\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\t\t}\n\t}\n\n\t// Bail out if this is a no-op like .hide().hide()\n\tpropTween = !jQuery.isEmptyObject( props );\n\tif ( !propTween && jQuery.isEmptyObject( orig ) ) {\n\t\treturn;\n\t}\n\n\t// Restrict \"overflow\" and \"display\" styles during box animations\n\tif ( isBox && elem.nodeType === 1 ) {\n\n\t\t// Support: IE <=9 - 11, Edge 12 - 15\n\t\t// Record all 3 overflow attributes because IE does not infer the shorthand\n\t\t// from identically-valued overflowX and overflowY and Edge just mirrors\n\t\t// the overflowX value there.\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Identify a display type, preferring old show/hide data over the CSS cascade\n\t\trestoreDisplay = dataShow && dataShow.display;\n\t\tif ( restoreDisplay == null ) {\n\t\t\trestoreDisplay = dataPriv.get( elem, \"display\" );\n\t\t}\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\tif ( display === \"none\" ) {\n\t\t\tif ( restoreDisplay ) {\n\t\t\t\tdisplay = restoreDisplay;\n\t\t\t} else {\n\n\t\t\t\t// Get nonempty value(s) by temporarily forcing visibility\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t\trestoreDisplay = elem.style.display || restoreDisplay;\n\t\t\t\tdisplay = jQuery.css( elem, \"display\" );\n\t\t\t\tshowHide( [ elem ] );\n\t\t\t}\n\t\t}\n\n\t\t// Animate inline elements as inline-block\n\t\tif ( display === \"inline\" || display === \"inline-block\" && restoreDisplay != null ) {\n\t\t\tif ( jQuery.css( elem, \"float\" ) === \"none\" ) {\n\n\t\t\t\t// Restore the original display value at the end of pure show/hide animations\n\t\t\t\tif ( !propTween ) {\n\t\t\t\t\tanim.done( function() {\n\t\t\t\t\t\tstyle.display = restoreDisplay;\n\t\t\t\t\t} );\n\t\t\t\t\tif ( restoreDisplay == null ) {\n\t\t\t\t\t\tdisplay = style.display;\n\t\t\t\t\t\trestoreDisplay = display === \"none\" ? \"\" : display;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstyle.display = \"inline-block\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always( function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t} );\n\t}\n\n\t// Implement show/hide animations\n\tpropTween = false;\n\tfor ( prop in orig ) {\n\n\t\t// General show/hide setup for this element animation\n\t\tif ( !propTween ) {\n\t\t\tif ( dataShow ) {\n\t\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\t\thidden = dataShow.hidden;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdataShow = dataPriv.access( elem, \"fxshow\", { display: restoreDisplay } );\n\t\t\t}\n\n\t\t\t// Store hidden/visible for toggle so `.stop().toggle()` \"reverses\"\n\t\t\tif ( toggle ) {\n\t\t\t\tdataShow.hidden = !hidden;\n\t\t\t}\n\n\t\t\t// Show elements before animating them\n\t\t\tif ( hidden ) {\n\t\t\t\tshowHide( [ elem ], true );\n\t\t\t}\n\n\t\t\t/* eslint-disable no-loop-func */\n\n\t\t\tanim.done( function() {\n\n\t\t\t\t/* eslint-enable no-loop-func */\n\n\t\t\t\t// The final step of a \"hide\" animation is actually hiding the element\n\t\t\t\tif ( !hidden ) {\n\t\t\t\t\tshowHide( [ elem ] );\n\t\t\t\t}\n\t\t\t\tdataPriv.remove( elem, \"fxshow\" );\n\t\t\t\tfor ( prop in orig ) {\n\t\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\t// Per-property setup\n\t\tpropTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\t\tif ( !( prop in dataShow ) ) {\n\t\t\tdataShow[ prop ] = propTween.start;\n\t\t\tif ( hidden ) {\n\t\t\t\tpropTween.end = propTween.start;\n\t\t\t\tpropTween.start = 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( Array.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = Animation.prefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t} ),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\n\t\t\t\t// Support: Android 2.3 only\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ] );\n\n\t\t\t// If there's more to do, yield\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t}\n\n\t\t\t// If this was an empty animation, synthesize a final progress notification\n\t\t\tif ( !length ) {\n\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t}\n\n\t\t\t// Resolve the animation and report its conclusion\n\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\treturn false;\n\t\t},\n\t\tanimation = deferred.promise( {\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, {\n\t\t\t\tspecialEasing: {},\n\t\t\t\teasing: jQuery.easing._default\n\t\t\t}, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.notifyWith( elem, [ animation, 1, 0 ] );\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t} ),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length; index++ ) {\n\t\tresult = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\tif ( isFunction( result.stop ) ) {\n\t\t\t\tjQuery._queueHooks( animation.elem, animation.opts.queue ).stop =\n\t\t\t\t\tresult.stop.bind( result );\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\t// Attach callbacks from options\n\tanimation\n\t\t.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t} )\n\t);\n\n\treturn animation;\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweeners: {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value );\n\t\t\tadjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );\n\t\t\treturn tween;\n\t\t} ]\n\t},\n\n\ttweener: function( props, callback ) {\n\t\tif ( isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.match( rnothtmlwhite );\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\tAnimation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];\n\t\t\tAnimation.tweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilters: [ defaultPrefilter ],\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tAnimation.prefilters.unshift( callback );\n\t\t} else {\n\t\t\tAnimation.prefilters.push( callback );\n\t\t}\n\t}\n} );\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tisFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !isFunction( easing ) && easing\n\t};\n\n\t// Go to the end state if fx are off\n\tif ( jQuery.fx.off ) {\n\t\topt.duration = 0;\n\n\t} else {\n\t\tif ( typeof opt.duration !== \"number\" ) {\n\t\t\tif ( opt.duration in jQuery.fx.speeds ) {\n\t\t\t\topt.duration = jQuery.fx.speeds[ opt.duration ];\n\n\t\t\t} else {\n\t\t\t\topt.duration = jQuery.fx.speeds._default;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend( {\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHiddenWithinTree ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate( { opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || dataPriv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\n\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = dataPriv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this &&\n\t\t\t\t\t( type == null || timers[ index ].queue === type ) ) {\n\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t} );\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tvar index,\n\t\t\t\tdata = dataPriv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t} );\n\t}\n} );\n\njQuery.each( [ \"toggle\", \"show\", \"hide\" ], function( _i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n} );\n\n// Generate shortcuts for custom animations\njQuery.each( {\n\tslideDown: genFx( \"show\" ),\n\tslideUp: genFx( \"hide\" ),\n\tslideToggle: genFx( \"toggle\" ),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n} );\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = Date.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\n\t\t// Run the timer and safely remove it when done (allowing for external removal)\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tjQuery.fx.start();\n};\n\njQuery.fx.interval = 13;\njQuery.fx.start = function() {\n\tif ( inProgress ) {\n\t\treturn;\n\t}\n\n\tinProgress = true;\n\tschedule();\n};\n\njQuery.fx.stop = function() {\n\tinProgress = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = window.setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\twindow.clearTimeout( timeout );\n\t\t};\n\t} );\n};\n\n\n( function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: Android <=4.3 only\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE <=11 only\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: IE <=11 only\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n} )();\n\n\nvar boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend( {\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tattr: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set attributes on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === \"undefined\" ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// Attribute hooks are determined by the lowercase version\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\thooks = jQuery.attrHooks[ name.toLowerCase() ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\treturn value;\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = jQuery.find.attr( elem, name );\n\n\t\t// Non-existent attributes return null, we normalize to undefined\n\t\treturn ret == null ? undefined : ret;\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tnodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name,\n\t\t\ti = 0,\n\n\t\t\t// Attribute names can contain non-HTML whitespace characters\n\t\t\t// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n\t\t\tattrNames = value && value.match( rnothtmlwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( ( name = attrNames[ i++ ] ) ) {\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\n\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( _i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle,\n\t\t\tlowercaseName = name.toLowerCase();\n\n\t\tif ( !isXML ) {\n\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ lowercaseName ];\n\t\t\tattrHandle[ lowercaseName ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tlowercaseName :\n\t\t\t\tnull;\n\t\t\tattrHandle[ lowercaseName ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n} );\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i,\n\trclickable = /^(?:a|area)$/i;\n\njQuery.fn.extend( {\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each( function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\tif ( hooks && \"set\" in hooks &&\n\t\t\t\t( ret = hooks.set( elem, value, name ) ) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\treturn ( elem[ name ] = value );\n\t\t}\n\n\t\tif ( hooks && \"get\" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {\n\t\t\treturn ret;\n\t\t}\n\n\t\treturn elem[ name ];\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\t// Support: IE <=9 - 11 only\n\t\t\t\t// elem.tabIndex doesn't always return the\n\t\t\t\t// correct value when it hasn't been explicitly set\n\t\t\t\t// Use proper attribute retrieval (trac-12072)\n\t\t\t\tvar tabindex = jQuery.find.attr( elem, \"tabindex\" );\n\n\t\t\t\tif ( tabindex ) {\n\t\t\t\t\treturn parseInt( tabindex, 10 );\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\trfocusable.test( elem.nodeName ) ||\n\t\t\t\t\trclickable.test( elem.nodeName ) &&\n\t\t\t\t\telem.href\n\t\t\t\t) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t},\n\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t}\n} );\n\n// Support: IE <=11 only\n// Accessing the selectedIndex property\n// forces the browser to respect setting selected\n// on the option\n// The getter ensures a default option is selected\n// when in an optgroup\n// eslint rule \"no-unused-expressions\" is disabled for this code\n// since it considers such accessions noop\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\tset: function( elem ) {\n\n\t\t\t/* eslint no-unused-expressions: \"off\" */\n\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent ) {\n\t\t\t\tparent.selectedIndex;\n\n\t\t\t\tif ( parent.parentNode ) {\n\t\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\njQuery.each( [\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n} );\n\n\n\n\n\t// Strip and collapse whitespace according to HTML spec\n\t// https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace\n\tfunction stripAndCollapse( value ) {\n\t\tvar tokens = value.match( rnothtmlwhite ) || [];\n\t\treturn tokens.join( \" \" );\n\t}\n\n\nfunction getClass( elem ) {\n\treturn elem.getAttribute && elem.getAttribute( \"class\" ) || \"\";\n}\n\nfunction classesToArray( value ) {\n\tif ( Array.isArray( value ) ) {\n\t\treturn value;\n\t}\n\tif ( typeof value === \"string\" ) {\n\t\treturn value.match( rnothtmlwhite ) || [];\n\t}\n\treturn [];\n}\n\njQuery.fn.extend( {\n\taddClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + className + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += className + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classNames, cur, curValue, className, i, finalValue;\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );\n\t\t\t} );\n\t\t}\n\n\t\tif ( !arguments.length ) {\n\t\t\treturn this.attr( \"class\", \"\" );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\tif ( classNames.length ) {\n\t\t\treturn this.each( function() {\n\t\t\t\tcurValue = getClass( this );\n\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = this.nodeType === 1 && ( \" \" + stripAndCollapse( curValue ) + \" \" );\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + className + \" \" ) > -1 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + className + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = stripAndCollapse( cur );\n\t\t\t\t\tif ( curValue !== finalValue ) {\n\t\t\t\t\t\tthis.setAttribute( \"class\", finalValue );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar classNames, className, i, self,\n\t\t\ttype = typeof value,\n\t\t\tisValidValue = type === \"string\" || Array.isArray( value );\n\n\t\tif ( isFunction( value ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).toggleClass(\n\t\t\t\t\tvalue.call( this, i, getClass( this ), stateVal ),\n\t\t\t\t\tstateVal\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\n\t\tif ( typeof stateVal === \"boolean\" && isValidValue ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tclassNames = classesToArray( value );\n\n\t\treturn this.each( function() {\n\t\t\tif ( isValidValue ) {\n\n\t\t\t\t// Toggle individual class names\n\t\t\t\tself = jQuery( this );\n\n\t\t\t\tfor ( i = 0; i < classNames.length; i++ ) {\n\t\t\t\t\tclassName = classNames[ i ];\n\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( value === undefined || type === \"boolean\" ) {\n\t\t\t\tclassName = getClass( this );\n\t\t\t\tif ( className ) {\n\n\t\t\t\t\t// Store className if set\n\t\t\t\t\tdataPriv.set( this, \"__className__\", className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tif ( this.setAttribute ) {\n\t\t\t\t\tthis.setAttribute( \"class\",\n\t\t\t\t\t\tclassName || value === false ?\n\t\t\t\t\t\t\t\"\" :\n\t\t\t\t\t\t\tdataPriv.get( this, \"__className__\" ) || \"\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className, elem,\n\t\t\ti = 0;\n\n\t\tclassName = \" \" + selector + \" \";\n\t\twhile ( ( elem = this[ i++ ] ) ) {\n\t\t\tif ( elem.nodeType === 1 &&\n\t\t\t\t( \" \" + stripAndCollapse( getClass( elem ) ) + \" \" ).indexOf( className ) > -1 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n} );\n\n\n\n\nvar rreturn = /\\r/g;\n\njQuery.fn.extend( {\n\tval: function( value ) {\n\t\tvar hooks, ret, valueIsFunction,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] ||\n\t\t\t\t\tjQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks &&\n\t\t\t\t\t\"get\" in hooks &&\n\t\t\t\t\t( ret = hooks.get( elem, \"value\" ) ) !== undefined\n\t\t\t\t) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\t// Handle most common string cases\n\t\t\t\tif ( typeof ret === \"string\" ) {\n\t\t\t\t\treturn ret.replace( rreturn, \"\" );\n\t\t\t\t}\n\n\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\treturn ret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tvalueIsFunction = isFunction( value );\n\n\t\treturn this.each( function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( valueIsFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( Array.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !( \"set\" in hooks ) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t} );\n\t}\n} );\n\njQuery.extend( {\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\n\t\t\t\t\t// Support: IE <=10 - 11 only\n\t\t\t\t\t// option.text throws exceptions (trac-14686, trac-14858)\n\t\t\t\t\t// Strip and collapse whitespace\n\t\t\t\t\t// https://html.spec.whatwg.org/#strip-and-collapse-whitespace\n\t\t\t\t\tstripAndCollapse( jQuery.text( elem ) );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option, i,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\",\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length;\n\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\ti = max;\n\n\t\t\t\t} else {\n\t\t\t\t\ti = one ? index : 0;\n\t\t\t\t}\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t// IE8-9 doesn't update selected after form reset (trac-2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t!option.disabled &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled ||\n\t\t\t\t\t\t\t\t!nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t/* eslint-disable no-cond-assign */\n\n\t\t\t\t\tif ( option.selected =\n\t\t\t\t\t\tjQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1\n\t\t\t\t\t) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* eslint-enable no-cond-assign */\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n} );\n\n// Radios and checkboxes getter/setter\njQuery.each( [ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( Array.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute( \"value\" ) === null ? \"on\" : elem.value;\n\t\t};\n\t}\n} );\n\n\n\n\n// Return jQuery for attributes-only inclusion\n\n\nsupport.focusin = \"onfocusin\" in window;\n\n\nvar rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\tstopPropagationCallback = function( e ) {\n\t\te.stopPropagation();\n\t};\n\njQuery.extend( jQuery.event, {\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special, lastElement,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split( \".\" ) : [];\n\n\t\tcur = lastElement = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf( \".\" ) > -1 ) {\n\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split( \".\" );\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf( \":\" ) < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join( \".\" );\n\t\tevent.rnamespace = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join( \"\\\\.(?:.*\\\\.|)\" ) + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (trac-9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === ( elem.ownerDocument || document ) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {\n\t\t\tlastElement = cur;\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( dataPriv.get( cur, \"events\" ) || Object.create( null ) )[ event.type ] &&\n\t\t\t\tdataPriv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( ( !special._default ||\n\t\t\t\tspecial._default.apply( eventPath.pop(), data ) === false ) &&\n\t\t\t\tacceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (trac-6170)\n\t\t\t\tif ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.addEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\telem[ type ]();\n\n\t\t\t\t\tif ( event.isPropagationStopped() ) {\n\t\t\t\t\t\tlastElement.removeEventListener( type, stopPropagationCallback );\n\t\t\t\t\t}\n\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\t// Piggyback on a donor event to simulate a different one\n\t// Used only for `focus(in | out)` events\n\tsimulate: function( type, elem, event ) {\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true\n\t\t\t}\n\t\t);\n\n\t\tjQuery.event.trigger( e, null, elem );\n\t}\n\n} );\n\njQuery.fn.extend( {\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t} );\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[ 0 ];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n} );\n\n\n// Support: Firefox <=44\n// Firefox doesn't have focus(in | out) events\n// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787\n//\n// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1\n// focus(in | out) events fire after focus & blur events,\n// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order\n// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857\nif ( !support.focusin ) {\n\tjQuery.each( { focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler on the document while someone wants focusin/focusout\n\t\tvar handler = function( event ) {\n\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );\n\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\n\t\t\t\t// Handle: regular nodes (via `this.ownerDocument`), window\n\t\t\t\t// (via `this.document`) & document (via `this`).\n\t\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix );\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t\tdataPriv.access( doc, fix, ( attaches || 0 ) + 1 );\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tvar doc = this.ownerDocument || this.document || this,\n\t\t\t\t\tattaches = dataPriv.access( doc, fix ) - 1;\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.removeEventListener( orig, handler, true );\n\t\t\t\t\tdataPriv.remove( doc, fix );\n\n\t\t\t\t} else {\n\t\t\t\t\tdataPriv.access( doc, fix, attaches );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t} );\n}\nvar location = window.location;\n\nvar nonce = { guid: Date.now() };\n\nvar rquery = ( /\\?/ );\n\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml, parserErrorElem;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE 9 - 11 only\n\t// IE throws on parseFromString with invalid input.\n\ttry {\n\t\txml = ( new window.DOMParser() ).parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {}\n\n\tparserErrorElem = xml && xml.getElementsByTagName( \"parsererror\" )[ 0 ];\n\tif ( !xml || parserErrorElem ) {\n\t\tjQuery.error( \"Invalid XML: \" + (\n\t\t\tparserErrorElem ?\n\t\t\t\tjQuery.map( parserErrorElem.childNodes, function( el ) {\n\t\t\t\t\treturn el.textContent;\n\t\t\t\t} ).join( \"\\n\" ) :\n\t\t\t\tdata\n\t\t) );\n\t}\n\treturn xml;\n};\n\n\nvar\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( Array.isArray( obj ) ) {\n\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams(\n\t\t\t\t\tprefix + \"[\" + ( typeof v === \"object\" && v != null ? i : \"\" ) + \"]\",\n\t\t\t\t\tv,\n\t\t\t\t\ttraditional,\n\t\t\t\t\tadd\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t} else if ( !traditional && toType( obj ) === \"object\" ) {\n\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, valueOrFunction ) {\n\n\t\t\t// If value is a function, invoke it and use its return value\n\t\t\tvar value = isFunction( valueOrFunction ) ?\n\t\t\t\tvalueOrFunction() :\n\t\t\t\tvalueOrFunction;\n\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" +\n\t\t\t\tencodeURIComponent( value == null ? \"\" : value );\n\t\t};\n\n\tif ( a == null ) {\n\t\treturn \"\";\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t} );\n\n\t} else {\n\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" );\n};\n\njQuery.fn.extend( {\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map( function() {\n\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t} ).filter( function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t} ).map( function( _i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\tif ( val == null ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif ( Array.isArray( val ) ) {\n\t\t\t\treturn jQuery.map( val, function( val ) {\n\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t} ).get();\n\t}\n} );\n\n\nvar\n\tr20 = /%20/g,\n\trhash = /#.*$/,\n\trantiCache = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\n\t// trac-7653, trac-8125, trac-8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t *    - BEFORE asking for a transport\n\t *    - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Anchor tag for parsing the document origin\n\toriginAnchor = document.createElement( \"a\" );\n\noriginAnchor.href = location.href;\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];\n\n\t\tif ( isFunction( func ) ) {\n\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( ( dataType = dataTypes[ i++ ] ) ) {\n\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[ 0 ] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t( structure[ dataType ] = structure[ dataType ] || [] ).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" &&\n\t\t\t\t!seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t} );\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes trac-9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader( \"Content-Type\" );\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[ 0 ] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s.throws ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tstate: \"parsererror\",\n\t\t\t\t\t\t\t\terror: conv ? e : \"No conversion from \" + prev + \" to \" + current\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend( {\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: location.href,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( location.protocol ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /\\bxml\\b/,\n\t\t\thtml: /\\bhtml/,\n\t\t\tjson: /\\bjson\\b/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": JSON.parse,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\n\t\t\t// Url cleanup var\n\t\t\turlAnchor,\n\n\t\t\t// Request state (becomes false upon send and true upon completion)\n\t\t\tcompleted,\n\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\n\t\t\t// Loop variable\n\t\t\ti,\n\n\t\t\t// uncached part of the url\n\t\t\tuncached,\n\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context &&\n\t\t\t\t( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\tjQuery.event,\n\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks( \"once memory\" ),\n\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( completed ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( ( match = rheaders.exec( responseHeadersString ) ) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[ 1 ].toLowerCase() + \" \" ] =\n\t\t\t\t\t\t\t\t\t( responseHeaders[ match[ 1 ].toLowerCase() + \" \" ] || [] )\n\t\t\t\t\t\t\t\t\t\t.concat( match[ 2 ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() + \" \" ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match.join( \", \" );\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn completed ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\tname = requestHeadersNames[ name.toLowerCase() ] =\n\t\t\t\t\t\t\trequestHeadersNames[ name.toLowerCase() ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( completed == null ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( completed ) {\n\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t// Lazy-add the new callbacks in a way that preserves old ones\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR );\n\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (trac-10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || location.href ) + \"\" )\n\t\t\t.replace( rprotocol, location.protocol + \"//\" );\n\n\t\t// Alias method option to type as per ticket trac-12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = ( s.dataType || \"*\" ).toLowerCase().match( rnothtmlwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when the origin doesn't match the current origin.\n\t\tif ( s.crossDomain == null ) {\n\t\t\turlAnchor = document.createElement( \"a\" );\n\n\t\t\t// Support: IE <=8 - 11, Edge 12 - 15\n\t\t\t// IE throws exception on accessing the href property if url is malformed,\n\t\t\t// e.g. http://example.com:80x/\n\t\t\ttry {\n\t\t\t\turlAnchor.href = s.url;\n\n\t\t\t\t// Support: IE <=8 - 11 only\n\t\t\t\t// Anchor's host property isn't correctly set when s.url is relative\n\t\t\t\turlAnchor.href = urlAnchor.href;\n\t\t\t\ts.crossDomain = originAnchor.protocol + \"//\" + originAnchor.host !==\n\t\t\t\t\turlAnchor.protocol + \"//\" + urlAnchor.host;\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// If there is an error parsing the URL, assume it is crossDomain,\n\t\t\t\t// it can be rejected by the transport if it is invalid\n\t\t\t\ts.crossDomain = true;\n\t\t\t}\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( completed ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger( \"ajaxStart\" );\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\t// Remove hash to simplify url manipulation\n\t\tcacheURL = s.url.replace( rhash, \"\" );\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// Remember the hash so we can put it back\n\t\t\tuncached = s.url.slice( cacheURL.length );\n\n\t\t\t// If data is available and should be processed, append data to url\n\t\t\tif ( s.data && ( s.processData || typeof s.data === \"string\" ) ) {\n\t\t\t\tcacheURL += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data;\n\n\t\t\t\t// trac-9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add or update anti-cache param if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\tcacheURL = cacheURL.replace( rantiCache, \"$1\" );\n\t\t\t\tuncached = ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ( nonce.guid++ ) +\n\t\t\t\t\tuncached;\n\t\t\t}\n\n\t\t\t// Put hash and anti-cache on the URL that will be requested (gh-1732)\n\t\t\ts.url = cacheURL + uncached;\n\n\t\t// Change '%20' to '+' if this is encoded form body content (gh-2658)\n\t\t} else if ( s.data && s.processData &&\n\t\t\t( s.contentType || \"\" ).indexOf( \"application/x-www-form-urlencoded\" ) === 0 ) {\n\t\t\ts.data = s.data.replace( r20, \"+\" );\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[ 0 ] ] +\n\t\t\t\t\t( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend &&\n\t\t\t( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {\n\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tcompleteDeferred.add( s.complete );\n\t\tjqXHR.done( s.success );\n\t\tjqXHR.fail( s.error );\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\n\t\t\t// If request was aborted inside ajaxSend, stop there\n\t\t\tif ( completed ) {\n\t\t\t\treturn jqXHR;\n\t\t\t}\n\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = window.setTimeout( function() {\n\t\t\t\t\tjqXHR.abort( \"timeout\" );\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tcompleted = false;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\n\t\t\t\t// Rethrow post-completion exceptions\n\t\t\t\tif ( completed ) {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\n\t\t\t\t// Propagate others as results\n\t\t\t\tdone( -1, e );\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Ignore repeat invocations\n\t\t\tif ( completed ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tcompleted = true;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\twindow.clearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Use a noop converter for missing script but not if jsonp\n\t\t\tif ( !isSuccess &&\n\t\t\t\tjQuery.inArray( \"script\", s.dataTypes ) > -1 &&\n\t\t\t\tjQuery.inArray( \"json\", s.dataTypes ) < 0 ) {\n\t\t\t\ts.converters[ \"text script\" ] = function() {};\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"Last-Modified\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader( \"etag\" );\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger( \"ajaxStop\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n} );\n\njQuery.each( [ \"get\", \"post\" ], function( _i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\t// The url can be an options object (which then must have .url)\n\t\treturn jQuery.ajax( jQuery.extend( {\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t}, jQuery.isPlainObject( url ) && url ) );\n\t};\n} );\n\njQuery.ajaxPrefilter( function( s ) {\n\tvar i;\n\tfor ( i in s.headers ) {\n\t\tif ( i.toLowerCase() === \"content-type\" ) {\n\t\t\ts.contentType = s.headers[ i ] || \"\";\n\t\t}\n\t}\n} );\n\n\njQuery._evalUrl = function( url, options, doc ) {\n\treturn jQuery.ajax( {\n\t\turl: url,\n\n\t\t// Make this explicit, since user can override this through ajaxSetup (trac-11264)\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tcache: true,\n\t\tasync: false,\n\t\tglobal: false,\n\n\t\t// Only evaluate the response if it is successful (gh-4126)\n\t\t// dataFilter is not invoked for failure responses, so using it instead\n\t\t// of the default converter is kludgy but it works.\n\t\tconverters: {\n\t\t\t\"text script\": function() {}\n\t\t},\n\t\tdataFilter: function( response ) {\n\t\t\tjQuery.globalEval( response, options, doc );\n\t\t}\n\t} );\n};\n\n\njQuery.fn.extend( {\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( this[ 0 ] ) {\n\t\t\tif ( isFunction( html ) ) {\n\t\t\t\thtml = html.call( this[ 0 ] );\n\t\t\t}\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map( function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t} ).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( isFunction( html ) ) {\n\t\t\treturn this.each( function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call( this, i ) );\n\t\t\t} );\n\t\t}\n\n\t\treturn this.each( function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t} );\n\t},\n\n\twrap: function( html ) {\n\t\tvar htmlIsFunction = isFunction( html );\n\n\t\treturn this.each( function( i ) {\n\t\t\tjQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html );\n\t\t} );\n\t},\n\n\tunwrap: function( selector ) {\n\t\tthis.parent( selector ).not( \"body\" ).each( function() {\n\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t} );\n\t\treturn this;\n\t}\n} );\n\n\njQuery.expr.pseudos.hidden = function( elem ) {\n\treturn !jQuery.expr.pseudos.visible( elem );\n};\njQuery.expr.pseudos.visible = function( elem ) {\n\treturn !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );\n};\n\n\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new window.XMLHttpRequest();\n\t} catch ( e ) {}\n};\n\nvar xhrSuccessStatus = {\n\n\t\t// File protocol always yields status code 0, assume 200\n\t\t0: 200,\n\n\t\t// Support: IE <=9 only\n\t\t// trac-1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport( function( options ) {\n\tvar callback, errorCallback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr();\n\n\t\t\t\txhr.open(\n\t\t\t\t\toptions.type,\n\t\t\t\t\toptions.url,\n\t\t\t\t\toptions.async,\n\t\t\t\t\toptions.username,\n\t\t\t\t\toptions.password\n\t\t\t\t);\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[ \"X-Requested-With\" ] ) {\n\t\t\t\t\theaders[ \"X-Requested-With\" ] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tcallback = errorCallback = xhr.onload =\n\t\t\t\t\t\t\t\txhr.onerror = xhr.onabort = xhr.ontimeout =\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\n\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t// On a manual native abort, IE9 throws\n\t\t\t\t\t\t\t\t// errors on any property access that is not readyState\n\t\t\t\t\t\t\t\tif ( typeof xhr.status !== \"number\" ) {\n\t\t\t\t\t\t\t\t\tcomplete( 0, \"error\" );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcomplete(\n\n\t\t\t\t\t\t\t\t\t\t// File: protocol always yields status 0; see trac-8605, trac-14207\n\t\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\n\t\t\t\t\t\t\t\t\t// Support: IE <=9 only\n\t\t\t\t\t\t\t\t\t// IE9 has no XHR2 but throws on binary (trac-11426)\n\t\t\t\t\t\t\t\t\t// For XHR2 non-text, let the caller handle it (gh-2498)\n\t\t\t\t\t\t\t\t\t( xhr.responseType || \"text\" ) !== \"text\"  ||\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText !== \"string\" ?\n\t\t\t\t\t\t\t\t\t\t{ binary: xhr.response } :\n\t\t\t\t\t\t\t\t\t\t{ text: xhr.responseText },\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\terrorCallback = xhr.onerror = xhr.ontimeout = callback( \"error\" );\n\n\t\t\t\t// Support: IE 9 only\n\t\t\t\t// Use onreadystatechange to replace onabort\n\t\t\t\t// to handle uncaught aborts\n\t\t\t\tif ( xhr.onabort !== undefined ) {\n\t\t\t\t\txhr.onabort = errorCallback;\n\t\t\t\t} else {\n\t\t\t\t\txhr.onreadystatechange = function() {\n\n\t\t\t\t\t\t// Check readyState before timeout as it changes\n\t\t\t\t\t\tif ( xhr.readyState === 4 ) {\n\n\t\t\t\t\t\t\t// Allow onerror to be called first,\n\t\t\t\t\t\t\t// but that will not handle a native abort\n\t\t\t\t\t\t\t// Also, save errorCallback to a variable\n\t\t\t\t\t\t\t// as xhr.onerror cannot be accessed\n\t\t\t\t\t\t\twindow.setTimeout( function() {\n\t\t\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\t\t\terrorCallback();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = callback( \"abort\" );\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\n\t\t\t\t\t// trac-14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\n// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)\njQuery.ajaxPrefilter( function( s ) {\n\tif ( s.crossDomain ) {\n\t\ts.contents.script = false;\n\t}\n} );\n\n// Install script dataType\njQuery.ajaxSetup( {\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, \" +\n\t\t\t\"application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /\\b(?:java|ecma)script\\b/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n} );\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n} );\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\n\t// This transport only deals with cross domain or forced-by-attrs requests\n\tif ( s.crossDomain || s.scriptAttrs ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery( \"<script>\" )\n\t\t\t\t\t.attr( s.scriptAttrs || {} )\n\t\t\t\t\t.prop( { charset: s.scriptCharset, src: s.url } )\n\t\t\t\t\t.on( \"load error\", callback = function( evt ) {\n\t\t\t\t\t\tscript.remove();\n\t\t\t\t\t\tcallback = null;\n\t\t\t\t\t\tif ( evt ) {\n\t\t\t\t\t\t\tcomplete( evt.type === \"error\" ? 404 : 200, evt.type );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\n\t\t\t\tdocument.head.appendChild( script[ 0 ] );\n\t\t\t},\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n} );\n\n\n\n\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup( {\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce.guid++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n} );\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" &&\n\t\t\t\t( s.contentType || \"\" )\n\t\t\t\t\t.indexOf( \"application/x-www-form-urlencoded\" ) === 0 &&\n\t\t\t\trjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[ \"script json\" ] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// Force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always( function() {\n\n\t\t\t// If previous value didn't exist - remove it\n\t\t\tif ( overwritten === undefined ) {\n\t\t\t\tjQuery( window ).removeProp( callbackName );\n\n\t\t\t// Otherwise restore preexisting value\n\t\t\t} else {\n\t\t\t\twindow[ callbackName ] = overwritten;\n\t\t\t}\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\n\t\t\t\t// Make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// Save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t} );\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n} );\n\n\n\n\n// Support: Safari 8 only\n// In Safari 8 documents created via document.implementation.createHTMLDocument\n// collapse sibling forms: the second one becomes a child of the first one.\n// Because of that, this security measure has to be disabled in Safari 8.\n// https://bugs.webkit.org/show_bug.cgi?id=137337\nsupport.createHTMLDocument = ( function() {\n\tvar body = document.implementation.createHTMLDocument( \"\" ).body;\n\tbody.innerHTML = \"<form></form><form></form>\";\n\treturn body.childNodes.length === 2;\n} )();\n\n\n// Argument \"data\" should be string of html\n// context (optional): If specified, the fragment will be created in this context,\n// defaults to document\n// keepScripts (optional): If true, will include scripts passed in the html string\njQuery.parseHTML = function( data, context, keepScripts ) {\n\tif ( typeof data !== \"string\" ) {\n\t\treturn [];\n\t}\n\tif ( typeof context === \"boolean\" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\n\tvar base, parsed, scripts;\n\n\tif ( !context ) {\n\n\t\t// Stop scripts or inline event handlers from being executed immediately\n\t\t// by using document.implementation\n\t\tif ( support.createHTMLDocument ) {\n\t\t\tcontext = document.implementation.createHTMLDocument( \"\" );\n\n\t\t\t// Set the base href for the created document\n\t\t\t// so any parsed elements with URLs\n\t\t\t// are based on the document's URL (gh-2965)\n\t\t\tbase = context.createElement( \"base\" );\n\t\t\tbase.href = document.location.href;\n\t\t\tcontext.head.appendChild( base );\n\t\t} else {\n\t\t\tcontext = document;\n\t\t}\n\t}\n\n\tparsed = rsingleTag.exec( data );\n\tscripts = !keepScripts && [];\n\n\t// Single tag\n\tif ( parsed ) {\n\t\treturn [ context.createElement( parsed[ 1 ] ) ];\n\t}\n\n\tparsed = buildFragment( [ data ], context, scripts );\n\n\tif ( scripts && scripts.length ) {\n\t\tjQuery( scripts ).remove();\n\t}\n\n\treturn jQuery.merge( [], parsed.childNodes );\n};\n\n\n/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf( \" \" );\n\n\tif ( off > -1 ) {\n\t\tselector = stripAndCollapse( url.slice( off ) );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax( {\n\t\t\turl: url,\n\n\t\t\t// If \"type\" variable is undefined, then \"GET\" method will be used.\n\t\t\t// Make value of this field explicit since\n\t\t\t// user can override it through ajaxSetup method\n\t\t\ttype: type || \"GET\",\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t} ).done( function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery( \"<div>\" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t// If the request succeeds, this function gets \"data\", \"status\", \"jqXHR\"\n\t\t// but they are ignored because response was set above.\n\t\t// If it fails, this function gets \"jqXHR\", \"status\", \"error\"\n\t\t} ).always( callback && function( jqXHR, status ) {\n\t\t\tself.each( function() {\n\t\t\t\tcallback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t\t} );\n\t\t} );\n\t}\n\n\treturn this;\n};\n\n\n\n\njQuery.expr.pseudos.animated = function( elem ) {\n\treturn jQuery.grep( jQuery.timers, function( fn ) {\n\t\treturn elem === fn.elem;\n\t} ).length;\n};\n\n\n\n\njQuery.offset = {\n\tsetOffset: function( elem, options, i ) {\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\n\t\t\tposition = jQuery.css( elem, \"position\" ),\n\t\t\tcurElem = jQuery( elem ),\n\t\t\tprops = {};\n\n\t\t// Set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tcurOffset = curElem.offset();\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\n\t\t\t( curCSSTop + curCSSLeft ).indexOf( \"auto\" ) > -1;\n\n\t\t// Need to be able to calculate position if either\n\t\t// top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( isFunction( options ) ) {\n\n\t\t\t// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)\n\t\t\toptions = options.call( elem, i, jQuery.extend( {}, curOffset ) );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\njQuery.fn.extend( {\n\n\t// offset() relates an element's border box to the document origin\n\toffset: function( options ) {\n\n\t\t// Preserve chaining for setter\n\t\tif ( arguments.length ) {\n\t\t\treturn options === undefined ?\n\t\t\t\tthis :\n\t\t\t\tthis.each( function( i ) {\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t\t} );\n\t\t}\n\n\t\tvar rect, win,\n\t\t\telem = this[ 0 ];\n\n\t\tif ( !elem ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Return zeros for disconnected and hidden (display: none) elements (gh-2310)\n\t\t// Support: IE <=11 only\n\t\t// Running getBoundingClientRect on a\n\t\t// disconnected node in IE throws an error\n\t\tif ( !elem.getClientRects().length ) {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t\t// Get document-relative position by adding viewport scroll to viewport-relative gBCR\n\t\trect = elem.getBoundingClientRect();\n\t\twin = elem.ownerDocument.defaultView;\n\t\treturn {\n\t\t\ttop: rect.top + win.pageYOffset,\n\t\t\tleft: rect.left + win.pageXOffset\n\t\t};\n\t},\n\n\t// position() relates an element's margin box to its offset parent's padding box\n\t// This corresponds to the behavior of CSS absolute positioning\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset, doc,\n\t\t\telem = this[ 0 ],\n\t\t\tparentOffset = { top: 0, left: 0 };\n\n\t\t// position:fixed elements are offset from the viewport, which itself always has zero offset\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\n\t\t\t// Assume position:fixed implies availability of getBoundingClientRect\n\t\t\toffset = elem.getBoundingClientRect();\n\n\t\t} else {\n\t\t\toffset = this.offset();\n\n\t\t\t// Account for the *real* offset parent, which can be the document or its root element\n\t\t\t// when a statically positioned element is identified\n\t\t\tdoc = elem.ownerDocument;\n\t\t\toffsetParent = elem.offsetParent || doc.documentElement;\n\t\t\twhile ( offsetParent &&\n\t\t\t\t( offsetParent === doc.body || offsetParent === doc.documentElement ) &&\n\t\t\t\tjQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\n\t\t\t\toffsetParent = offsetParent.parentNode;\n\t\t\t}\n\t\t\tif ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) {\n\n\t\t\t\t// Incorporate borders into its offset, since they are outside its content origin\n\t\t\t\tparentOffset = jQuery( offsetParent ).offset();\n\t\t\t\tparentOffset.top += jQuery.css( offsetParent, \"borderTopWidth\", true );\n\t\t\t\tparentOffset.left += jQuery.css( offsetParent, \"borderLeftWidth\", true );\n\t\t\t}\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\treturn {\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\n\t\t};\n\t},\n\n\t// This method will return documentElement in the following cases:\n\t// 1) For the element inside the iframe without offsetParent, this method will return\n\t//    documentElement of the parent window\n\t// 2) For the hidden or detached element\n\t// 3) For body or html element, i.e. in case of the html node - it will return itself\n\t//\n\t// but those exceptions were never presented as a real life use-cases\n\t// and might be considered as more preferable results.\n\t//\n\t// This logic, however, is not guaranteed and can change at any point in the future\n\toffsetParent: function() {\n\t\treturn this.map( function() {\n\t\t\tvar offsetParent = this.offsetParent;\n\n\t\t\twhile ( offsetParent && jQuery.css( offsetParent, \"position\" ) === \"static\" ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\n\t\t\treturn offsetParent || documentElement;\n\t\t} );\n\t}\n} );\n\n// Create scrollLeft and scrollTop methods\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\n\tvar top = \"pageYOffset\" === prop;\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn access( this, function( elem, method, val ) {\n\n\t\t\t// Coalesce documents and windows\n\t\t\tvar win;\n\t\t\tif ( isWindow( elem ) ) {\n\t\t\t\twin = elem;\n\t\t\t} else if ( elem.nodeType === 9 ) {\n\t\t\t\twin = elem.defaultView;\n\t\t\t}\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? win[ prop ] : elem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : win.pageXOffset,\n\t\t\t\t\ttop ? val : win.pageYOffset\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length );\n\t};\n} );\n\n// Support: Safari <=7 - 9.1, Chrome <=37 - 49\n// Add the top/left cssHooks using jQuery.fn.position\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347\n// getComputedStyle returns percent when specified for top/left/bottom/right;\n// rather than make the css module depend on the offset module, just check for it here\njQuery.each( [ \"top\", \"left\" ], function( _i, prop ) {\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\n\t\tfunction( elem, computed ) {\n\t\t\tif ( computed ) {\n\t\t\t\tcomputed = curCSS( elem, prop );\n\n\t\t\t\t// If curCSS returns percentage, fallback to offset\n\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\tcomputed;\n\t\t\t}\n\t\t}\n\t);\n} );\n\n\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( {\n\t\tpadding: \"inner\" + name,\n\t\tcontent: type,\n\t\t\"\": \"outer\" + name\n\t}, function( defaultExtra, funcName ) {\n\n\t\t// Margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( isWindow( elem ) ) {\n\n\t\t\t\t\t// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)\n\t\t\t\t\treturn funcName.indexOf( \"outer\" ) === 0 ?\n\t\t\t\t\t\telem[ \"inner\" + name ] :\n\t\t\t\t\t\telem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\n\t\t\t\t\t// whichever is greatest\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable );\n\t\t};\n\t} );\n} );\n\n\njQuery.each( [\n\t\"ajaxStart\",\n\t\"ajaxStop\",\n\t\"ajaxComplete\",\n\t\"ajaxError\",\n\t\"ajaxSuccess\",\n\t\"ajaxSend\"\n], function( _i, type ) {\n\tjQuery.fn[ type ] = function( fn ) {\n\t\treturn this.on( type, fn );\n\t};\n} );\n\n\n\n\njQuery.fn.extend( {\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ?\n\t\t\tthis.off( selector, \"**\" ) :\n\t\t\tthis.off( types, selector || \"**\", fn );\n\t},\n\n\thover: function( fnOver, fnOut ) {\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\n\t}\n} );\n\njQuery.each(\n\t( \"blur focus focusin focusout resize scroll click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup contextmenu\" ).split( \" \" ),\n\tfunction( _i, name ) {\n\n\t\t// Handle event binding\n\t\tjQuery.fn[ name ] = function( data, fn ) {\n\t\t\treturn arguments.length > 0 ?\n\t\t\t\tthis.on( name, null, data, fn ) :\n\t\t\t\tthis.trigger( name );\n\t\t};\n\t}\n);\n\n\n\n\n// Support: Android <=4.0 only\n// Make sure we trim BOM and NBSP\n// Require that the \"whitespace run\" starts from a non-whitespace\n// to avoid O(N^2) behavior when the engine would try matching \"\\s+$\" at each space position.\nvar rtrim = /^[\\s\\uFEFF\\xA0]+|([^\\s\\uFEFF\\xA0])[\\s\\uFEFF\\xA0]+$/g;\n\n// Bind a function to a context, optionally partially applying any\n// arguments.\n// jQuery.proxy is deprecated to promote standards (specifically Function#bind)\n// However, it is not slated for removal any time soon\njQuery.proxy = function( fn, context ) {\n\tvar tmp, args, proxy;\n\n\tif ( typeof context === \"string\" ) {\n\t\ttmp = fn[ context ];\n\t\tcontext = fn;\n\t\tfn = tmp;\n\t}\n\n\t// Quick check to determine if target is callable, in the spec\n\t// this throws a TypeError, but we will just return undefined.\n\tif ( !isFunction( fn ) ) {\n\t\treturn undefined;\n\t}\n\n\t// Simulated bind\n\targs = slice.call( arguments, 2 );\n\tproxy = function() {\n\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t};\n\n\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\treturn proxy;\n};\n\njQuery.holdReady = function( hold ) {\n\tif ( hold ) {\n\t\tjQuery.readyWait++;\n\t} else {\n\t\tjQuery.ready( true );\n\t}\n};\njQuery.isArray = Array.isArray;\njQuery.parseJSON = JSON.parse;\njQuery.nodeName = nodeName;\njQuery.isFunction = isFunction;\njQuery.isWindow = isWindow;\njQuery.camelCase = camelCase;\njQuery.type = toType;\n\njQuery.now = Date.now;\n\njQuery.isNumeric = function( obj ) {\n\n\t// As of jQuery 3.0, isNumeric is limited to\n\t// strings and numbers (primitives or objects)\n\t// that can be coerced to finite numbers (gh-2662)\n\tvar type = jQuery.type( obj );\n\treturn ( type === \"number\" || type === \"string\" ) &&\n\n\t\t// parseFloat NaNs numeric-cast false positives (\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t!isNaN( obj - parseFloat( obj ) );\n};\n\njQuery.trim = function( text ) {\n\treturn text == null ?\n\t\t\"\" :\n\t\t( text + \"\" ).replace( rtrim, \"$1\" );\n};\n\n\n\n// Register as a named AMD module, since jQuery can be concatenated with other\n// files that may use define, but not via a proper concatenation script that\n// understands anonymous AMD modules. A named AMD is safest and most robust\n// way to register. Lowercase jquery is used because AMD module names are\n// derived from file names, and jQuery is normally delivered in a lowercase\n// file name. Do this after creating the global so that if an AMD module wants\n// to call noConflict to hide this version of jQuery, it will work.\n\n// Note that for maximum portability, libraries that are not jQuery should\n// declare themselves as anonymous modules, and avoid setting a global if an\n// AMD loader is present. jQuery is a special case. For more information, see\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\n\nif ( typeof define === \"function\" && define.amd ) {\n\tdefine( \"jquery\", [], function() {\n\t\treturn jQuery;\n\t} );\n}\n\n\n\n\nvar\n\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$;\n\njQuery.noConflict = function( deep ) {\n\tif ( window.$ === jQuery ) {\n\t\twindow.$ = _$;\n\t}\n\n\tif ( deep && window.jQuery === jQuery ) {\n\t\twindow.jQuery = _jQuery;\n\t}\n\n\treturn jQuery;\n};\n\n// Expose jQuery and $ identifiers, even in AMD\n// (trac-7102#comment:10, https://github.com/jquery/jquery/pull/557)\n// and CommonJS for browser emulators (trac-13566)\nif ( typeof noGlobal === \"undefined\" ) {\n\twindow.jQuery = window.$ = jQuery;\n}\n\n\n\n\nreturn jQuery;\n} );\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function(render, schedule, console) {\n\tvar subscriptions = []\n\tvar rendering = false\n\tvar pending = false\n\n\tfunction sync() {\n\t\tif (rendering) throw new Error(\"Nested m.redraw.sync() call\")\n\t\trendering = true\n\t\tfor (var i = 0; i < subscriptions.length; i += 2) {\n\t\t\ttry { render(subscriptions[i], Vnode(subscriptions[i + 1]), redraw) }\n\t\t\tcatch (e) { console.error(e) }\n\t\t}\n\t\trendering = false\n\t}\n\n\tfunction redraw() {\n\t\tif (!pending) {\n\t\t\tpending = true\n\t\t\tschedule(function() {\n\t\t\t\tpending = false\n\t\t\t\tsync()\n\t\t\t})\n\t\t}\n\t}\n\n\tredraw.sync = sync\n\n\tfunction mount(root, component) {\n\t\tif (component != null && component.view == null && typeof component !== \"function\") {\n\t\t\tthrow new TypeError(\"m.mount(element, component) expects a component, not a vnode\")\n\t\t}\n\n\t\tvar index = subscriptions.indexOf(root)\n\t\tif (index >= 0) {\n\t\t\tsubscriptions.splice(index, 2)\n\t\t\trender(root, [], redraw)\n\t\t}\n\n\t\tif (component != null) {\n\t\t\tsubscriptions.push(root, component)\n\t\t\trender(root, Vnode(component), redraw)\n\t\t}\n\t}\n\n\treturn {mount: mount, redraw: redraw}\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar m = require(\"../render/hyperscript\")\nvar Promise = require(\"../promise/promise\")\n\nvar buildPathname = require(\"../pathname/build\")\nvar parsePathname = require(\"../pathname/parse\")\nvar compileTemplate = require(\"../pathname/compileTemplate\")\nvar assign = require(\"../pathname/assign\")\n\nvar sentinel = {}\n\nmodule.exports = function($window, mountRedraw) {\n\tvar fireAsync\n\n\tfunction setPath(path, data, options) {\n\t\tpath = buildPathname(path, data)\n\t\tif (fireAsync != null) {\n\t\t\tfireAsync()\n\t\t\tvar state = options ? options.state : null\n\t\t\tvar title = options ? options.title : null\n\t\t\tif (options && options.replace) $window.history.replaceState(state, title, route.prefix + path)\n\t\t\telse $window.history.pushState(state, title, route.prefix + path)\n\t\t}\n\t\telse {\n\t\t\t$window.location.href = route.prefix + path\n\t\t}\n\t}\n\n\tvar currentResolver = sentinel, component, attrs, currentPath, lastUpdate\n\n\tvar SKIP = route.SKIP = {}\n\n\tfunction route(root, defaultRoute, routes) {\n\t\tif (root == null) throw new Error(\"Ensure the DOM element that was passed to `m.route` is not undefined\")\n\t\t// 0 = start\n\t\t// 1 = init\n\t\t// 2 = ready\n\t\tvar state = 0\n\n\t\tvar compiled = Object.keys(routes).map(function(route) {\n\t\t\tif (route[0] !== \"/\") throw new SyntaxError(\"Routes must start with a `/`\")\n\t\t\tif ((/:([^\\/\\.-]+)(\\.{3})?:/).test(route)) {\n\t\t\t\tthrow new SyntaxError(\"Route parameter names must be separated with either `/`, `.`, or `-`\")\n\t\t\t}\n\t\t\treturn {\n\t\t\t\troute: route,\n\t\t\t\tcomponent: routes[route],\n\t\t\t\tcheck: compileTemplate(route),\n\t\t\t}\n\t\t})\n\t\tvar callAsync = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\t\tvar p = Promise.resolve()\n\t\tvar scheduled = false\n\t\tvar onremove\n\n\t\tfireAsync = null\n\n\t\tif (defaultRoute != null) {\n\t\t\tvar defaultData = parsePathname(defaultRoute)\n\n\t\t\tif (!compiled.some(function (i) { return i.check(defaultData) })) {\n\t\t\t\tthrow new ReferenceError(\"Default route doesn't match any known routes\")\n\t\t\t}\n\t\t}\n\n\t\tfunction resolveRoute() {\n\t\t\tscheduled = false\n\t\t\t// Consider the pathname holistically. The prefix might even be invalid,\n\t\t\t// but that's not our problem.\n\t\t\tvar prefix = $window.location.hash\n\t\t\tif (route.prefix[0] !== \"#\") {\n\t\t\t\tprefix = $window.location.search + prefix\n\t\t\t\tif (route.prefix[0] !== \"?\") {\n\t\t\t\t\tprefix = $window.location.pathname + prefix\n\t\t\t\t\tif (prefix[0] !== \"/\") prefix = \"/\" + prefix\n\t\t\t\t}\n\t\t\t}\n\t\t\t// This seemingly useless `.concat()` speeds up the tests quite a bit,\n\t\t\t// since the representation is consistently a relatively poorly\n\t\t\t// optimized cons string.\n\t\t\tvar path = prefix.concat()\n\t\t\t\t.replace(/(?:%[a-f89][a-f0-9])+/gim, decodeURIComponent)\n\t\t\t\t.slice(route.prefix.length)\n\t\t\tvar data = parsePathname(path)\n\n\t\t\tassign(data.params, $window.history.state)\n\n\t\t\tfunction fail() {\n\t\t\t\tif (path === defaultRoute) throw new Error(\"Could not resolve default route \" + defaultRoute)\n\t\t\t\tsetPath(defaultRoute, null, {replace: true})\n\t\t\t}\n\n\t\t\tloop(0)\n\t\t\tfunction loop(i) {\n\t\t\t\t// 0 = init\n\t\t\t\t// 1 = scheduled\n\t\t\t\t// 2 = done\n\t\t\t\tfor (; i < compiled.length; i++) {\n\t\t\t\t\tif (compiled[i].check(data)) {\n\t\t\t\t\t\tvar payload = compiled[i].component\n\t\t\t\t\t\tvar matchedRoute = compiled[i].route\n\t\t\t\t\t\tvar localComp = payload\n\t\t\t\t\t\tvar update = lastUpdate = function(comp) {\n\t\t\t\t\t\t\tif (update !== lastUpdate) return\n\t\t\t\t\t\t\tif (comp === SKIP) return loop(i + 1)\n\t\t\t\t\t\t\tcomponent = comp != null && (typeof comp.view === \"function\" || typeof comp === \"function\")? comp : \"div\"\n\t\t\t\t\t\t\tattrs = data.params, currentPath = path, lastUpdate = null\n\t\t\t\t\t\t\tcurrentResolver = payload.render ? payload : null\n\t\t\t\t\t\t\tif (state === 2) mountRedraw.redraw()\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tstate = 2\n\t\t\t\t\t\t\t\tmountRedraw.redraw.sync()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// There's no understating how much I *wish* I could\n\t\t\t\t\t\t// use `async`/`await` here...\n\t\t\t\t\t\tif (payload.view || typeof payload === \"function\") {\n\t\t\t\t\t\t\tpayload = {}\n\t\t\t\t\t\t\tupdate(localComp)\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (payload.onmatch) {\n\t\t\t\t\t\t\tp.then(function () {\n\t\t\t\t\t\t\t\treturn payload.onmatch(data.params, path, matchedRoute)\n\t\t\t\t\t\t\t}).then(update, fail)\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse update(\"div\")\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfail()\n\t\t\t}\n\t\t}\n\n\t\t// Set it unconditionally so `m.route.set` and `m.route.Link` both work,\n\t\t// even if neither `pushState` nor `hashchange` are supported. It's\n\t\t// cleared if `hashchange` is used, since that makes it automatically\n\t\t// async.\n\t\tfireAsync = function() {\n\t\t\tif (!scheduled) {\n\t\t\t\tscheduled = true\n\t\t\t\tcallAsync(resolveRoute)\n\t\t\t}\n\t\t}\n\n\t\tif (typeof $window.history.pushState === \"function\") {\n\t\t\tonremove = function() {\n\t\t\t\t$window.removeEventListener(\"popstate\", fireAsync, false)\n\t\t\t}\n\t\t\t$window.addEventListener(\"popstate\", fireAsync, false)\n\t\t} else if (route.prefix[0] === \"#\") {\n\t\t\tfireAsync = null\n\t\t\tonremove = function() {\n\t\t\t\t$window.removeEventListener(\"hashchange\", resolveRoute, false)\n\t\t\t}\n\t\t\t$window.addEventListener(\"hashchange\", resolveRoute, false)\n\t\t}\n\n\t\treturn mountRedraw.mount(root, {\n\t\t\tonbeforeupdate: function() {\n\t\t\t\tstate = state ? 2 : 1\n\t\t\t\treturn !(!state || sentinel === currentResolver)\n\t\t\t},\n\t\t\toncreate: resolveRoute,\n\t\t\tonremove: onremove,\n\t\t\tview: function() {\n\t\t\t\tif (!state || sentinel === currentResolver) return\n\t\t\t\t// Wrap in a fragment to preserve existing key semantics\n\t\t\t\tvar vnode = [Vnode(component, attrs.key, attrs)]\n\t\t\t\tif (currentResolver) vnode = currentResolver.render(vnode[0])\n\t\t\t\treturn vnode\n\t\t\t},\n\t\t})\n\t}\n\troute.set = function(path, data, options) {\n\t\tif (lastUpdate != null) {\n\t\t\toptions = options || {}\n\t\t\toptions.replace = true\n\t\t}\n\t\tlastUpdate = null\n\t\tsetPath(path, data, options)\n\t}\n\troute.get = function() {return currentPath}\n\troute.prefix = \"#!\"\n\troute.Link = {\n\t\tview: function(vnode) {\n\t\t\tvar options = vnode.attrs.options\n\t\t\t// Remove these so they don't get overwritten\n\t\t\tvar attrs = {}, onclick, href\n\t\t\tassign(attrs, vnode.attrs)\n\t\t\t// The first two are internal, but the rest are magic attributes\n\t\t\t// that need censored to not screw up rendering.\n\t\t\tattrs.selector = attrs.options = attrs.key = attrs.oninit =\n\t\t\tattrs.oncreate = attrs.onbeforeupdate = attrs.onupdate =\n\t\t\tattrs.onbeforeremove = attrs.onremove = null\n\n\t\t\t// Do this now so we can get the most current `href` and `disabled`.\n\t\t\t// Those attributes may also be specified in the selector, and we\n\t\t\t// should honor that.\n\t\t\tvar child = m(vnode.attrs.selector || \"a\", attrs, vnode.children)\n\n\t\t\t// Let's provide a *right* way to disable a route link, rather than\n\t\t\t// letting people screw up accessibility on accident.\n\t\t\t//\n\t\t\t// The attribute is coerced so users don't get surprised over\n\t\t\t// `disabled: 0` resulting in a button that's somehow routable\n\t\t\t// despite being visibly disabled.\n\t\t\tif (child.attrs.disabled = Boolean(child.attrs.disabled)) {\n\t\t\t\tchild.attrs.href = null\n\t\t\t\tchild.attrs[\"aria-disabled\"] = \"true\"\n\t\t\t\t// If you *really* do want to do this on a disabled link, use\n\t\t\t\t// an `oncreate` hook to add it.\n\t\t\t\tchild.attrs.onclick = null\n\t\t\t} else {\n\t\t\t\tonclick = child.attrs.onclick\n\t\t\t\thref = child.attrs.href\n\t\t\t\tchild.attrs.href = route.prefix + href\n\t\t\t\tchild.attrs.onclick = function(e) {\n\t\t\t\t\tvar result\n\t\t\t\t\tif (typeof onclick === \"function\") {\n\t\t\t\t\t\tresult = onclick.call(e.currentTarget, e)\n\t\t\t\t\t} else if (onclick == null || typeof onclick !== \"object\") {\n\t\t\t\t\t\t// do nothing\n\t\t\t\t\t} else if (typeof onclick.handleEvent === \"function\") {\n\t\t\t\t\t\tonclick.handleEvent(e)\n\t\t\t\t\t}\n\n\t\t\t\t\t// Adapted from React Router's implementation:\n\t\t\t\t\t// https://github.com/ReactTraining/react-router/blob/520a0acd48ae1b066eb0b07d6d4d1790a1d02482/packages/react-router-dom/modules/Link.js\n\t\t\t\t\t//\n\t\t\t\t\t// Try to be flexible and intuitive in how we handle links.\n\t\t\t\t\t// Fun fact: links aren't as obvious to get right as you\n\t\t\t\t\t// would expect. There's a lot more valid ways to click a\n\t\t\t\t\t// link than this, and one might want to not simply click a\n\t\t\t\t\t// link, but right click or command-click it to copy the\n\t\t\t\t\t// link target, etc. Nope, this isn't just for blind people.\n\t\t\t\t\tif (\n\t\t\t\t\t\t// Skip if `onclick` prevented default\n\t\t\t\t\t\tresult !== false && !e.defaultPrevented &&\n\t\t\t\t\t\t// Ignore everything but left clicks\n\t\t\t\t\t\t(e.button === 0 || e.which === 0 || e.which === 1) &&\n\t\t\t\t\t\t// Let the browser handle `target=_blank`, etc.\n\t\t\t\t\t\t(!e.currentTarget.target || e.currentTarget.target === \"_self\") &&\n\t\t\t\t\t\t// No modifier keys\n\t\t\t\t\t\t!e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey\n\t\t\t\t\t) {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\te.redraw = false\n\t\t\t\t\t\troute.set(href, null, options)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn child\n\t\t},\n\t}\n\troute.param = function(key) {\n\t\treturn attrs && key != null ? attrs[key] : attrs\n\t}\n\n\treturn route\n}\n","\"use strict\"\n\nvar hyperscript = require(\"./render/hyperscript\")\n\nhyperscript.trust = require(\"./render/trust\")\nhyperscript.fragment = require(\"./render/fragment\")\n\nmodule.exports = hyperscript\n","\"use strict\"\n\nvar hyperscript = require(\"./hyperscript\")\nvar request = require(\"./request\")\nvar mountRedraw = require(\"./mount-redraw\")\n\nvar m = function m() { return hyperscript.apply(this, arguments) }\nm.m = hyperscript\nm.trust = hyperscript.trust\nm.fragment = hyperscript.fragment\nm.mount = mountRedraw.mount\nm.route = require(\"./route\")\nm.render = require(\"./render\")\nm.redraw = mountRedraw.redraw\nm.request = request.request\nm.jsonp = request.jsonp\nm.parseQueryString = require(\"./querystring/parse\")\nm.buildQueryString = require(\"./querystring/build\")\nm.parsePathname = require(\"./pathname/parse\")\nm.buildPathname = require(\"./pathname/build\")\nm.vnode = require(\"./render/vnode\")\nm.PromisePolyfill = require(\"./promise/polyfill\")\n\nmodule.exports = m\n","\"use strict\"\n\nvar render = require(\"./render\")\n\nmodule.exports = require(\"./api/mount-redraw\")(render, requestAnimationFrame, console)\n","\"use strict\"\n\nmodule.exports = Object.assign || function(target, source) {\n\tif(source) Object.keys(source).forEach(function(key) { target[key] = source[key] })\n}\n","\"use strict\"\n\nvar buildQueryString = require(\"../querystring/build\")\nvar assign = require(\"./assign\")\n\n// Returns `path` from `template` + `params`\nmodule.exports = function(template, params) {\n\tif ((/:([^\\/\\.-]+)(\\.{3})?:/).test(template)) {\n\t\tthrow new SyntaxError(\"Template parameter names *must* be separated\")\n\t}\n\tif (params == null) return template\n\tvar queryIndex = template.indexOf(\"?\")\n\tvar hashIndex = template.indexOf(\"#\")\n\tvar queryEnd = hashIndex < 0 ? template.length : hashIndex\n\tvar pathEnd = queryIndex < 0 ? queryEnd : queryIndex\n\tvar path = template.slice(0, pathEnd)\n\tvar query = {}\n\n\tassign(query, params)\n\n\tvar resolved = path.replace(/:([^\\/\\.-]+)(\\.{3})?/g, function(m, key, variadic) {\n\t\tdelete query[key]\n\t\t// If no such parameter exists, don't interpolate it.\n\t\tif (params[key] == null) return m\n\t\t// Escape normal parameters, but not variadic ones.\n\t\treturn variadic ? params[key] : encodeURIComponent(String(params[key]))\n\t})\n\n\t// In case the template substitution adds new query/hash parameters.\n\tvar newQueryIndex = resolved.indexOf(\"?\")\n\tvar newHashIndex = resolved.indexOf(\"#\")\n\tvar newQueryEnd = newHashIndex < 0 ? resolved.length : newHashIndex\n\tvar newPathEnd = newQueryIndex < 0 ? newQueryEnd : newQueryIndex\n\tvar result = resolved.slice(0, newPathEnd)\n\n\tif (queryIndex >= 0) result += template.slice(queryIndex, queryEnd)\n\tif (newQueryIndex >= 0) result += (queryIndex < 0 ? \"?\" : \"&\") + resolved.slice(newQueryIndex, newQueryEnd)\n\tvar querystring = buildQueryString(query)\n\tif (querystring) result += (queryIndex < 0 && newQueryIndex < 0 ? \"?\" : \"&\") + querystring\n\tif (hashIndex >= 0) result += template.slice(hashIndex)\n\tif (newHashIndex >= 0) result += (hashIndex < 0 ? \"\" : \"&\") + resolved.slice(newHashIndex)\n\treturn result\n}\n","\"use strict\"\n\nvar parsePathname = require(\"./parse\")\n\n// Compiles a template into a function that takes a resolved path (without query\n// strings) and returns an object containing the template parameters with their\n// parsed values. This expects the input of the compiled template to be the\n// output of `parsePathname`. Note that it does *not* remove query parameters\n// specified in the template.\nmodule.exports = function(template) {\n\tvar templateData = parsePathname(template)\n\tvar templateKeys = Object.keys(templateData.params)\n\tvar keys = []\n\tvar regexp = new RegExp(\"^\" + templateData.path.replace(\n\t\t// I escape literal text so people can use things like `:file.:ext` or\n\t\t// `:lang-:locale` in routes. This is all merged into one pass so I\n\t\t// don't also accidentally escape `-` and make it harder to detect it to\n\t\t// ban it from template parameters.\n\t\t/:([^\\/.-]+)(\\.{3}|\\.(?!\\.)|-)?|[\\\\^$*+.()|\\[\\]{}]/g,\n\t\tfunction(m, key, extra) {\n\t\t\tif (key == null) return \"\\\\\" + m\n\t\t\tkeys.push({k: key, r: extra === \"...\"})\n\t\t\tif (extra === \"...\") return \"(.*)\"\n\t\t\tif (extra === \".\") return \"([^/]+)\\\\.\"\n\t\t\treturn \"([^/]+)\" + (extra || \"\")\n\t\t}\n\t) + \"$\")\n\treturn function(data) {\n\t\t// First, check the params. Usually, there isn't any, and it's just\n\t\t// checking a static set.\n\t\tfor (var i = 0; i < templateKeys.length; i++) {\n\t\t\tif (templateData.params[templateKeys[i]] !== data.params[templateKeys[i]]) return false\n\t\t}\n\t\t// If no interpolations exist, let's skip all the ceremony\n\t\tif (!keys.length) return regexp.test(data.path)\n\t\tvar values = regexp.exec(data.path)\n\t\tif (values == null) return false\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tdata.params[keys[i].k] = keys[i].r ? values[i + 1] : decodeURIComponent(values[i + 1])\n\t\t}\n\t\treturn true\n\t}\n}\n","\"use strict\"\n\nvar parseQueryString = require(\"../querystring/parse\")\n\n// Returns `{path, params}` from `url`\nmodule.exports = function(url) {\n\tvar queryIndex = url.indexOf(\"?\")\n\tvar hashIndex = url.indexOf(\"#\")\n\tvar queryEnd = hashIndex < 0 ? url.length : hashIndex\n\tvar pathEnd = queryIndex < 0 ? queryEnd : queryIndex\n\tvar path = url.slice(0, pathEnd).replace(/\\/{2,}/g, \"/\")\n\n\tif (!path) path = \"/\"\n\telse {\n\t\tif (path[0] !== \"/\") path = \"/\" + path\n\t\tif (path.length > 1 && path[path.length - 1] === \"/\") path = path.slice(0, -1)\n\t}\n\treturn {\n\t\tpath: path,\n\t\tparams: queryIndex < 0\n\t\t\t? {}\n\t\t\t: parseQueryString(url.slice(queryIndex + 1, queryEnd)),\n\t}\n}\n","\"use strict\"\n/** @constructor */\nvar PromisePolyfill = function(executor) {\n\tif (!(this instanceof PromisePolyfill)) throw new Error(\"Promise must be called with `new`\")\n\tif (typeof executor !== \"function\") throw new TypeError(\"executor must be a function\")\n\n\tvar self = this, resolvers = [], rejectors = [], resolveCurrent = handler(resolvers, true), rejectCurrent = handler(rejectors, false)\n\tvar instance = self._instance = {resolvers: resolvers, rejectors: rejectors}\n\tvar callAsync = typeof setImmediate === \"function\" ? setImmediate : setTimeout\n\tfunction handler(list, shouldAbsorb) {\n\t\treturn function execute(value) {\n\t\t\tvar then\n\t\t\ttry {\n\t\t\t\tif (shouldAbsorb && value != null && (typeof value === \"object\" || typeof value === \"function\") && typeof (then = value.then) === \"function\") {\n\t\t\t\t\tif (value === self) throw new TypeError(\"Promise can't be resolved w/ itself\")\n\t\t\t\t\texecuteOnce(then.bind(value))\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcallAsync(function() {\n\t\t\t\t\t\tif (!shouldAbsorb && list.length === 0) console.error(\"Possible unhandled promise rejection:\", value)\n\t\t\t\t\t\tfor (var i = 0; i < list.length; i++) list[i](value)\n\t\t\t\t\t\tresolvers.length = 0, rejectors.length = 0\n\t\t\t\t\t\tinstance.state = shouldAbsorb\n\t\t\t\t\t\tinstance.retry = function() {execute(value)}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\trejectCurrent(e)\n\t\t\t}\n\t\t}\n\t}\n\tfunction executeOnce(then) {\n\t\tvar runs = 0\n\t\tfunction run(fn) {\n\t\t\treturn function(value) {\n\t\t\t\tif (runs++ > 0) return\n\t\t\t\tfn(value)\n\t\t\t}\n\t\t}\n\t\tvar onerror = run(rejectCurrent)\n\t\ttry {then(run(resolveCurrent), onerror)} catch (e) {onerror(e)}\n\t}\n\n\texecuteOnce(executor)\n}\nPromisePolyfill.prototype.then = function(onFulfilled, onRejection) {\n\tvar self = this, instance = self._instance\n\tfunction handle(callback, list, next, state) {\n\t\tlist.push(function(value) {\n\t\t\tif (typeof callback !== \"function\") next(value)\n\t\t\telse try {resolveNext(callback(value))} catch (e) {if (rejectNext) rejectNext(e)}\n\t\t})\n\t\tif (typeof instance.retry === \"function\" && state === instance.state) instance.retry()\n\t}\n\tvar resolveNext, rejectNext\n\tvar promise = new PromisePolyfill(function(resolve, reject) {resolveNext = resolve, rejectNext = reject})\n\thandle(onFulfilled, instance.resolvers, resolveNext, true), handle(onRejection, instance.rejectors, rejectNext, false)\n\treturn promise\n}\nPromisePolyfill.prototype.catch = function(onRejection) {\n\treturn this.then(null, onRejection)\n}\nPromisePolyfill.prototype.finally = function(callback) {\n\treturn this.then(\n\t\tfunction(value) {\n\t\t\treturn PromisePolyfill.resolve(callback()).then(function() {\n\t\t\t\treturn value\n\t\t\t})\n\t\t},\n\t\tfunction(reason) {\n\t\t\treturn PromisePolyfill.resolve(callback()).then(function() {\n\t\t\t\treturn PromisePolyfill.reject(reason);\n\t\t\t})\n\t\t}\n\t)\n}\nPromisePolyfill.resolve = function(value) {\n\tif (value instanceof PromisePolyfill) return value\n\treturn new PromisePolyfill(function(resolve) {resolve(value)})\n}\nPromisePolyfill.reject = function(value) {\n\treturn new PromisePolyfill(function(resolve, reject) {reject(value)})\n}\nPromisePolyfill.all = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tvar total = list.length, count = 0, values = []\n\t\tif (list.length === 0) resolve([])\n\t\telse for (var i = 0; i < list.length; i++) {\n\t\t\t(function(i) {\n\t\t\t\tfunction consume(value) {\n\t\t\t\t\tcount++\n\t\t\t\t\tvalues[i] = value\n\t\t\t\t\tif (count === total) resolve(values)\n\t\t\t\t}\n\t\t\t\tif (list[i] != null && (typeof list[i] === \"object\" || typeof list[i] === \"function\") && typeof list[i].then === \"function\") {\n\t\t\t\t\tlist[i].then(consume, reject)\n\t\t\t\t}\n\t\t\t\telse consume(list[i])\n\t\t\t})(i)\n\t\t}\n\t})\n}\nPromisePolyfill.race = function(list) {\n\treturn new PromisePolyfill(function(resolve, reject) {\n\t\tfor (var i = 0; i < list.length; i++) {\n\t\t\tlist[i].then(resolve, reject)\n\t\t}\n\t})\n}\n\nmodule.exports = PromisePolyfill\n","\"use strict\"\n\nvar PromisePolyfill = require(\"./polyfill\")\n\nif (typeof window !== \"undefined\") {\n\tif (typeof window.Promise === \"undefined\") {\n\t\twindow.Promise = PromisePolyfill\n\t} else if (!window.Promise.prototype.finally) {\n\t\twindow.Promise.prototype.finally = PromisePolyfill.prototype.finally\n\t}\n\tmodule.exports = window.Promise\n} else if (typeof global !== \"undefined\") {\n\tif (typeof global.Promise === \"undefined\") {\n\t\tglobal.Promise = PromisePolyfill\n\t} else if (!global.Promise.prototype.finally) {\n\t\tglobal.Promise.prototype.finally = PromisePolyfill.prototype.finally\n\t}\n\tmodule.exports = global.Promise\n} else {\n\tmodule.exports = PromisePolyfill\n}\n","\"use strict\"\n\nmodule.exports = function(object) {\n\tif (Object.prototype.toString.call(object) !== \"[object Object]\") return \"\"\n\n\tvar args = []\n\tfor (var key in object) {\n\t\tdestructure(key, object[key])\n\t}\n\n\treturn args.join(\"&\")\n\n\tfunction destructure(key, value) {\n\t\tif (Array.isArray(value)) {\n\t\t\tfor (var i = 0; i < value.length; i++) {\n\t\t\t\tdestructure(key + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse if (Object.prototype.toString.call(value) === \"[object Object]\") {\n\t\t\tfor (var i in value) {\n\t\t\t\tdestructure(key + \"[\" + i + \"]\", value[i])\n\t\t\t}\n\t\t}\n\t\telse args.push(encodeURIComponent(key) + (value != null && value !== \"\" ? \"=\" + encodeURIComponent(value) : \"\"))\n\t}\n}\n","\"use strict\"\n\nmodule.exports = function(string) {\n\tif (string === \"\" || string == null) return {}\n\tif (string.charAt(0) === \"?\") string = string.slice(1)\n\n\tvar entries = string.split(\"&\"), counters = {}, data = {}\n\tfor (var i = 0; i < entries.length; i++) {\n\t\tvar entry = entries[i].split(\"=\")\n\t\tvar key = decodeURIComponent(entry[0])\n\t\tvar value = entry.length === 2 ? decodeURIComponent(entry[1]) : \"\"\n\n\t\tif (value === \"true\") value = true\n\t\telse if (value === \"false\") value = false\n\n\t\tvar levels = key.split(/\\]\\[?|\\[/)\n\t\tvar cursor = data\n\t\tif (key.indexOf(\"[\") > -1) levels.pop()\n\t\tfor (var j = 0; j < levels.length; j++) {\n\t\t\tvar level = levels[j], nextLevel = levels[j + 1]\n\t\t\tvar isNumber = nextLevel == \"\" || !isNaN(parseInt(nextLevel, 10))\n\t\t\tif (level === \"\") {\n\t\t\t\tvar key = levels.slice(0, j).join()\n\t\t\t\tif (counters[key] == null) {\n\t\t\t\t\tcounters[key] = Array.isArray(cursor) ? cursor.length : 0\n\t\t\t\t}\n\t\t\t\tlevel = counters[key]++\n\t\t\t}\n\t\t\t// Disallow direct prototype pollution\n\t\t\telse if (level === \"__proto__\") break\n\t\t\tif (j === levels.length - 1) cursor[level] = value\n\t\t\telse {\n\t\t\t\t// Read own properties exclusively to disallow indirect\n\t\t\t\t// prototype pollution\n\t\t\t\tvar desc = Object.getOwnPropertyDescriptor(cursor, level)\n\t\t\t\tif (desc != null) desc = desc.value\n\t\t\t\tif (desc == null) cursor[level] = desc = isNumber ? [] : {}\n\t\t\t\tcursor = desc\n\t\t\t}\n\t\t}\n\t}\n\treturn data\n}\n","\"use strict\"\n\nmodule.exports = require(\"./render/render\")(window)\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar hyperscriptVnode = require(\"./hyperscriptVnode\")\n\nmodule.exports = function() {\n\tvar vnode = hyperscriptVnode.apply(0, arguments)\n\n\tvnode.tag = \"[\"\n\tvnode.children = Vnode.normalizeChildren(vnode.children)\n\treturn vnode\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\nvar hyperscriptVnode = require(\"./hyperscriptVnode\")\n\nvar selectorParser = /(?:(^|#|\\.)([^#\\.\\[\\]]+))|(\\[(.+?)(?:\\s*=\\s*(\"|'|)((?:\\\\[\"'\\]]|.)*?)\\5)?\\])/g\nvar selectorCache = {}\nvar hasOwn = {}.hasOwnProperty\n\nfunction isEmpty(object) {\n\tfor (var key in object) if (hasOwn.call(object, key)) return false\n\treturn true\n}\n\nfunction compileSelector(selector) {\n\tvar match, tag = \"div\", classes = [], attrs = {}\n\twhile (match = selectorParser.exec(selector)) {\n\t\tvar type = match[1], value = match[2]\n\t\tif (type === \"\" && value !== \"\") tag = value\n\t\telse if (type === \"#\") attrs.id = value\n\t\telse if (type === \".\") classes.push(value)\n\t\telse if (match[3][0] === \"[\") {\n\t\t\tvar attrValue = match[6]\n\t\t\tif (attrValue) attrValue = attrValue.replace(/\\\\([\"'])/g, \"$1\").replace(/\\\\\\\\/g, \"\\\\\")\n\t\t\tif (match[4] === \"class\") classes.push(attrValue)\n\t\t\telse attrs[match[4]] = attrValue === \"\" ? attrValue : attrValue || true\n\t\t}\n\t}\n\tif (classes.length > 0) attrs.className = classes.join(\" \")\n\treturn selectorCache[selector] = {tag: tag, attrs: attrs}\n}\n\nfunction execSelector(state, vnode) {\n\tvar attrs = vnode.attrs\n\tvar children = Vnode.normalizeChildren(vnode.children)\n\tvar hasClass = hasOwn.call(attrs, \"class\")\n\tvar className = hasClass ? attrs.class : attrs.className\n\n\tvnode.tag = state.tag\n\tvnode.attrs = null\n\tvnode.children = undefined\n\n\tif (!isEmpty(state.attrs) && !isEmpty(attrs)) {\n\t\tvar newAttrs = {}\n\n\t\tfor (var key in attrs) {\n\t\t\tif (hasOwn.call(attrs, key)) newAttrs[key] = attrs[key]\n\t\t}\n\n\t\tattrs = newAttrs\n\t}\n\n\tfor (var key in state.attrs) {\n\t\tif (hasOwn.call(state.attrs, key) && key !== \"className\" && !hasOwn.call(attrs, key)){\n\t\t\tattrs[key] = state.attrs[key]\n\t\t}\n\t}\n\tif (className != null || state.attrs.className != null) attrs.className =\n\t\tclassName != null\n\t\t\t? state.attrs.className != null\n\t\t\t\t? String(state.attrs.className) + \" \" + String(className)\n\t\t\t\t: className\n\t\t\t: state.attrs.className != null\n\t\t\t\t? state.attrs.className\n\t\t\t\t: null\n\n\tif (hasClass) attrs.class = null\n\n\tfor (var key in attrs) {\n\t\tif (hasOwn.call(attrs, key) && key !== \"key\") {\n\t\t\tvnode.attrs = attrs\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif (Array.isArray(children) && children.length === 1 && children[0] != null && children[0].tag === \"#\") {\n\t\tvnode.text = children[0].children\n\t} else {\n\t\tvnode.children = children\n\t}\n\n\treturn vnode\n}\n\nfunction hyperscript(selector) {\n\tif (selector == null || typeof selector !== \"string\" && typeof selector !== \"function\" && typeof selector.view !== \"function\") {\n\t\tthrow Error(\"The selector must be either a string or a component.\");\n\t}\n\n\tvar vnode = hyperscriptVnode.apply(1, arguments)\n\n\tif (typeof selector === \"string\") {\n\t\tvnode.children = Vnode.normalizeChildren(vnode.children)\n\t\tif (selector !== \"[\") return execSelector(selectorCache[selector] || compileSelector(selector), vnode)\n\t}\n\n\tvnode.tag = selector\n\treturn vnode\n}\n\nmodule.exports = hyperscript\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\n// Call via `hyperscriptVnode.apply(startOffset, arguments)`\n//\n// The reason I do it this way, forwarding the arguments and passing the start\n// offset in `this`, is so I don't have to create a temporary array in a\n// performance-critical path.\n//\n// In native ES6, I'd instead add a final `...args` parameter to the\n// `hyperscript` and `fragment` factories and define this as\n// `hyperscriptVnode(...args)`, since modern engines do optimize that away. But\n// ES5 (what Mithril requires thanks to IE support) doesn't give me that luxury,\n// and engines aren't nearly intelligent enough to do either of these:\n//\n// 1. Elide the allocation for `[].slice.call(arguments, 1)` when it's passed to\n//    another function only to be indexed.\n// 2. Elide an `arguments` allocation when it's passed to any function other\n//    than `Function.prototype.apply` or `Reflect.apply`.\n//\n// In ES6, it'd probably look closer to this (I'd need to profile it, though):\n// module.exports = function(attrs, ...children) {\n//     if (attrs == null || typeof attrs === \"object\" && attrs.tag == null && !Array.isArray(attrs)) {\n//         if (children.length === 1 && Array.isArray(children[0])) children = children[0]\n//     } else {\n//         children = children.length === 0 && Array.isArray(attrs) ? attrs : [attrs, ...children]\n//         attrs = undefined\n//     }\n//\n//     if (attrs == null) attrs = {}\n//     return Vnode(\"\", attrs.key, attrs, children)\n// }\nmodule.exports = function() {\n\tvar attrs = arguments[this], start = this + 1, children\n\n\tif (attrs == null) {\n\t\tattrs = {}\n\t} else if (typeof attrs !== \"object\" || attrs.tag != null || Array.isArray(attrs)) {\n\t\tattrs = {}\n\t\tstart = this\n\t}\n\n\tif (arguments.length === start + 1) {\n\t\tchildren = arguments[start]\n\t\tif (!Array.isArray(children)) children = [children]\n\t} else {\n\t\tchildren = []\n\t\twhile (start < arguments.length) children.push(arguments[start++])\n\t}\n\n\treturn Vnode(\"\", attrs.key, attrs, children)\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function($window) {\n\tvar $doc = $window && $window.document\n\tvar currentRedraw\n\n\tvar nameSpace = {\n\t\tsvg: \"http://www.w3.org/2000/svg\",\n\t\tmath: \"http://www.w3.org/1998/Math/MathML\"\n\t}\n\n\tfunction getNameSpace(vnode) {\n\t\treturn vnode.attrs && vnode.attrs.xmlns || nameSpace[vnode.tag]\n\t}\n\n\t//sanity check to discourage people from doing `vnode.state = ...`\n\tfunction checkState(vnode, original) {\n\t\tif (vnode.state !== original) throw new Error(\"`vnode.state` must not be modified\")\n\t}\n\n\t//Note: the hook is passed as the `this` argument to allow proxying the\n\t//arguments without requiring a full array allocation to do so. It also\n\t//takes advantage of the fact the current `vnode` is the first argument in\n\t//all lifecycle methods.\n\tfunction callHook(vnode) {\n\t\tvar original = vnode.state\n\t\ttry {\n\t\t\treturn this.apply(original, arguments)\n\t\t} finally {\n\t\t\tcheckState(vnode, original)\n\t\t}\n\t}\n\n\t// IE11 (at least) throws an UnspecifiedError when accessing document.activeElement when\n\t// inside an iframe. Catch and swallow this error, and heavy-handidly return null.\n\tfunction activeElement() {\n\t\ttry {\n\t\t\treturn $doc.activeElement\n\t\t} catch (e) {\n\t\t\treturn null\n\t\t}\n\t}\n\t//create\n\tfunction createNodes(parent, vnodes, start, end, hooks, nextSibling, ns) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) {\n\t\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t}\n\tfunction createNode(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tif (typeof tag === \"string\") {\n\t\t\tvnode.state = {}\n\t\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\t\tswitch (tag) {\n\t\t\t\tcase \"#\": createText(parent, vnode, nextSibling); break\n\t\t\t\tcase \"<\": createHTML(parent, vnode, ns, nextSibling); break\n\t\t\t\tcase \"[\": createFragment(parent, vnode, hooks, ns, nextSibling); break\n\t\t\t\tdefault: createElement(parent, vnode, hooks, ns, nextSibling)\n\t\t\t}\n\t\t}\n\t\telse createComponent(parent, vnode, hooks, ns, nextSibling)\n\t}\n\tfunction createText(parent, vnode, nextSibling) {\n\t\tvnode.dom = $doc.createTextNode(vnode.children)\n\t\tinsertNode(parent, vnode.dom, nextSibling)\n\t}\n\tvar possibleParents = {caption: \"table\", thead: \"table\", tbody: \"table\", tfoot: \"table\", tr: \"tbody\", th: \"tr\", td: \"tr\", colgroup: \"table\", col: \"colgroup\"}\n\tfunction createHTML(parent, vnode, ns, nextSibling) {\n\t\tvar match = vnode.children.match(/^\\s*?<(\\w+)/im) || []\n\t\t// not using the proper parent makes the child element(s) vanish.\n\t\t//     var div = document.createElement(\"div\")\n\t\t//     div.innerHTML = \"<td>i</td><td>j</td>\"\n\t\t//     console.log(div.innerHTML)\n\t\t// --> \"ij\", no <td> in sight.\n\t\tvar temp = $doc.createElement(possibleParents[match[1]] || \"div\")\n\t\tif (ns === \"http://www.w3.org/2000/svg\") {\n\t\t\ttemp.innerHTML = \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\">\" + vnode.children + \"</svg>\"\n\t\t\ttemp = temp.firstChild\n\t\t} else {\n\t\t\ttemp.innerHTML = vnode.children\n\t\t}\n\t\tvnode.dom = temp.firstChild\n\t\tvnode.domSize = temp.childNodes.length\n\t\t// Capture nodes to remove, so we don't confuse them.\n\t\tvnode.instance = []\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tvar child\n\t\twhile (child = temp.firstChild) {\n\t\t\tvnode.instance.push(child)\n\t\t\tfragment.appendChild(child)\n\t\t}\n\t\tinsertNode(parent, fragment, nextSibling)\n\t}\n\tfunction createFragment(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar fragment = $doc.createDocumentFragment()\n\t\tif (vnode.children != null) {\n\t\t\tvar children = vnode.children\n\t\t\tcreateNodes(fragment, children, 0, children.length, hooks, null, ns)\n\t\t}\n\t\tvnode.dom = fragment.firstChild\n\t\tvnode.domSize = fragment.childNodes.length\n\t\tinsertNode(parent, fragment, nextSibling)\n\t}\n\tfunction createElement(parent, vnode, hooks, ns, nextSibling) {\n\t\tvar tag = vnode.tag\n\t\tvar attrs = vnode.attrs\n\t\tvar is = attrs && attrs.is\n\n\t\tns = getNameSpace(vnode) || ns\n\n\t\tvar element = ns ?\n\t\t\tis ? $doc.createElementNS(ns, tag, {is: is}) : $doc.createElementNS(ns, tag) :\n\t\t\tis ? $doc.createElement(tag, {is: is}) : $doc.createElement(tag)\n\t\tvnode.dom = element\n\n\t\tif (attrs != null) {\n\t\t\tsetAttrs(vnode, attrs, ns)\n\t\t}\n\n\t\tinsertNode(parent, element, nextSibling)\n\n\t\tif (!maybeSetContentEditable(vnode)) {\n\t\t\tif (vnode.text != null) {\n\t\t\t\tif (vnode.text !== \"\") element.textContent = vnode.text\n\t\t\t\telse vnode.children = [Vnode(\"#\", undefined, undefined, vnode.text, undefined, undefined)]\n\t\t\t}\n\t\t\tif (vnode.children != null) {\n\t\t\t\tvar children = vnode.children\n\t\t\t\tcreateNodes(element, children, 0, children.length, hooks, null, ns)\n\t\t\t\tif (vnode.tag === \"select\" && attrs != null) setLateSelectAttrs(vnode, attrs)\n\t\t\t}\n\t\t}\n\t}\n\tfunction initComponent(vnode, hooks) {\n\t\tvar sentinel\n\t\tif (typeof vnode.tag.view === \"function\") {\n\t\t\tvnode.state = Object.create(vnode.tag)\n\t\t\tsentinel = vnode.state.view\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t} else {\n\t\t\tvnode.state = void 0\n\t\t\tsentinel = vnode.tag\n\t\t\tif (sentinel.$$reentrantLock$$ != null) return\n\t\t\tsentinel.$$reentrantLock$$ = true\n\t\t\tvnode.state = (vnode.tag.prototype != null && typeof vnode.tag.prototype.view === \"function\") ? new vnode.tag(vnode) : vnode.tag(vnode)\n\t\t}\n\t\tinitLifecycle(vnode.state, vnode, hooks)\n\t\tif (vnode.attrs != null) initLifecycle(vnode.attrs, vnode, hooks)\n\t\tvnode.instance = Vnode.normalize(callHook.call(vnode.state.view, vnode))\n\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\tsentinel.$$reentrantLock$$ = null\n\t}\n\tfunction createComponent(parent, vnode, hooks, ns, nextSibling) {\n\t\tinitComponent(vnode, hooks)\n\t\tif (vnode.instance != null) {\n\t\t\tcreateNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.dom != null ? vnode.instance.domSize : 0\n\t\t}\n\t\telse {\n\t\t\tvnode.domSize = 0\n\t\t}\n\t}\n\n\t//update\n\t/**\n\t * @param {Element|Fragment} parent - the parent element\n\t * @param {Vnode[] | null} old - the list of vnodes of the last `render()` call for\n\t *                               this part of the tree\n\t * @param {Vnode[] | null} vnodes - as above, but for the current `render()` call.\n\t * @param {Function[]} hooks - an accumulator of post-render hooks (oncreate/onupdate)\n\t * @param {Element | null} nextSibling - the next DOM node if we're dealing with a\n\t *                                       fragment that is not the last item in its\n\t *                                       parent\n\t * @param {'svg' | 'math' | String | null} ns) - the current XML namespace, if any\n\t * @returns void\n\t */\n\t// This function diffs and patches lists of vnodes, both keyed and unkeyed.\n\t//\n\t// We will:\n\t//\n\t// 1. describe its general structure\n\t// 2. focus on the diff algorithm optimizations\n\t// 3. discuss DOM node operations.\n\n\t// ## Overview:\n\t//\n\t// The updateNodes() function:\n\t// - deals with trivial cases\n\t// - determines whether the lists are keyed or unkeyed based on the first non-null node\n\t//   of each list.\n\t// - diffs them and patches the DOM if needed (that's the brunt of the code)\n\t// - manages the leftovers: after diffing, are there:\n\t//   - old nodes left to remove?\n\t// \t - new nodes to insert?\n\t// \t deal with them!\n\t//\n\t// The lists are only iterated over once, with an exception for the nodes in `old` that\n\t// are visited in the fourth part of the diff and in the `removeNodes` loop.\n\n\t// ## Diffing\n\t//\n\t// Reading https://github.com/localvoid/ivi/blob/ddc09d06abaef45248e6133f7040d00d3c6be853/packages/ivi/src/vdom/implementation.ts#L617-L837\n\t// may be good for context on longest increasing subsequence-based logic for moving nodes.\n\t//\n\t// In order to diff keyed lists, one has to\n\t//\n\t// 1) match nodes in both lists, per key, and update them accordingly\n\t// 2) create the nodes present in the new list, but absent in the old one\n\t// 3) remove the nodes present in the old list, but absent in the new one\n\t// 4) figure out what nodes in 1) to move in order to minimize the DOM operations.\n\t//\n\t// To achieve 1) one can create a dictionary of keys => index (for the old list), then iterate\n\t// over the new list and for each new vnode, find the corresponding vnode in the old list using\n\t// the map.\n\t// 2) is achieved in the same step: if a new node has no corresponding entry in the map, it is new\n\t// and must be created.\n\t// For the removals, we actually remove the nodes that have been updated from the old list.\n\t// The nodes that remain in that list after 1) and 2) have been performed can be safely removed.\n\t// The fourth step is a bit more complex and relies on the longest increasing subsequence (LIS)\n\t// algorithm.\n\t//\n\t// the longest increasing subsequence is the list of nodes that can remain in place. Imagine going\n\t// from `1,2,3,4,5` to `4,5,1,2,3` where the numbers are not necessarily the keys, but the indices\n\t// corresponding to the keyed nodes in the old list (keyed nodes `e,d,c,b,a` => `b,a,e,d,c` would\n\t//  match the above lists, for example).\n\t//\n\t// In there are two increasing subsequences: `4,5` and `1,2,3`, the latter being the longest. We\n\t// can update those nodes without moving them, and only call `insertNode` on `4` and `5`.\n\t//\n\t// @localvoid adapted the algo to also support node deletions and insertions (the `lis` is actually\n\t// the longest increasing subsequence *of old nodes still present in the new list*).\n\t//\n\t// It is a general algorithm that is fireproof in all circumstances, but it requires the allocation\n\t// and the construction of a `key => oldIndex` map, and three arrays (one with `newIndex => oldIndex`,\n\t// the `LIS` and a temporary one to create the LIS).\n\t//\n\t// So we cheat where we can: if the tails of the lists are identical, they are guaranteed to be part of\n\t// the LIS and can be updated without moving them.\n\t//\n\t// If two nodes are swapped, they are guaranteed not to be part of the LIS, and must be moved (with\n\t// the exception of the last node if the list is fully reversed).\n\t//\n\t// ## Finding the next sibling.\n\t//\n\t// `updateNode()` and `createNode()` expect a nextSibling parameter to perform DOM operations.\n\t// When the list is being traversed top-down, at any index, the DOM nodes up to the previous\n\t// vnode reflect the content of the new list, whereas the rest of the DOM nodes reflect the old\n\t// list. The next sibling must be looked for in the old list using `getNextSibling(... oldStart + 1 ...)`.\n\t//\n\t// In the other scenarios (swaps, upwards traversal, map-based diff),\n\t// the new vnodes list is traversed upwards. The DOM nodes at the bottom of the list reflect the\n\t// bottom part of the new vnodes list, and we can use the `v.dom`  value of the previous node\n\t// as the next sibling (cached in the `nextSibling` variable).\n\n\n\t// ## DOM node moves\n\t//\n\t// In most scenarios `updateNode()` and `createNode()` perform the DOM operations. However,\n\t// this is not the case if the node moved (second and fourth part of the diff algo). We move\n\t// the old DOM nodes before updateNode runs because it enables us to use the cached `nextSibling`\n\t// variable rather than fetching it using `getNextSibling()`.\n\t//\n\t// The fourth part of the diff currently inserts nodes unconditionally, leading to issues\n\t// like #1791 and #1999. We need to be smarter about those situations where adjascent old\n\t// nodes remain together in the new list in a way that isn't covered by parts one and\n\t// three of the diff algo.\n\n\tfunction updateNodes(parent, old, vnodes, hooks, nextSibling, ns) {\n\t\tif (old === vnodes || old == null && vnodes == null) return\n\t\telse if (old == null || old.length === 0) createNodes(parent, vnodes, 0, vnodes.length, hooks, nextSibling, ns)\n\t\telse if (vnodes == null || vnodes.length === 0) removeNodes(parent, old, 0, old.length)\n\t\telse {\n\t\t\tvar isOldKeyed = old[0] != null && old[0].key != null\n\t\t\tvar isKeyed = vnodes[0] != null && vnodes[0].key != null\n\t\t\tvar start = 0, oldStart = 0\n\t\t\tif (!isOldKeyed) while (oldStart < old.length && old[oldStart] == null) oldStart++\n\t\t\tif (!isKeyed) while (start < vnodes.length && vnodes[start] == null) start++\n\t\t\tif (isKeyed === null && isOldKeyed == null) return // both lists are full of nulls\n\t\t\tif (isOldKeyed !== isKeyed) {\n\t\t\t\tremoveNodes(parent, old, oldStart, old.length)\n\t\t\t\tcreateNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns)\n\t\t\t} else if (!isKeyed) {\n\t\t\t\t// Don't index past the end of either list (causes deopts).\n\t\t\t\tvar commonLength = old.length < vnodes.length ? old.length : vnodes.length\n\t\t\t\t// Rewind if necessary to the first non-null index on either side.\n\t\t\t\t// We could alternatively either explicitly create or remove nodes when `start !== oldStart`\n\t\t\t\t// but that would be optimizing for sparse lists which are more rare than dense ones.\n\t\t\t\tstart = start < oldStart ? start : oldStart\n\t\t\t\tfor (; start < commonLength; start++) {\n\t\t\t\t\to = old[start]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t\tif (o === v || o == null && v == null) continue\n\t\t\t\t\telse if (o == null) createNode(parent, v, hooks, ns, getNextSibling(old, start + 1, nextSibling))\n\t\t\t\t\telse if (v == null) removeNode(parent, o)\n\t\t\t\t\telse updateNode(parent, o, v, hooks, getNextSibling(old, start + 1, nextSibling), ns)\n\t\t\t\t}\n\t\t\t\tif (old.length > commonLength) removeNodes(parent, old, start, old.length)\n\t\t\t\tif (vnodes.length > commonLength) createNodes(parent, vnodes, start, vnodes.length, hooks, nextSibling, ns)\n\t\t\t} else {\n\t\t\t\t// keyed diff\n\t\t\t\tvar oldEnd = old.length - 1, end = vnodes.length - 1, map, o, v, oe, ve, topSibling\n\n\t\t\t\t// bottom-up\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t\tif (oe.key !== ve.key) break\n\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldEnd--, end--\n\t\t\t\t}\n\t\t\t\t// top-down\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\to = old[oldStart]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t\tif (o.key !== v.key) break\n\t\t\t\t\toldStart++, start++\n\t\t\t\t\tif (o !== v) updateNode(parent, o, v, hooks, getNextSibling(old, oldStart, nextSibling), ns)\n\t\t\t\t}\n\t\t\t\t// swaps and list reversals\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\tif (start === end) break\n\t\t\t\t\tif (o.key !== ve.key || oe.key !== v.key) break\n\t\t\t\t\ttopSibling = getNextSibling(old, oldStart, nextSibling)\n\t\t\t\t\tmoveNodes(parent, oe, topSibling)\n\t\t\t\t\tif (oe !== v) updateNode(parent, oe, v, hooks, topSibling, ns)\n\t\t\t\t\tif (++start <= --end) moveNodes(parent, o, nextSibling)\n\t\t\t\t\tif (o !== ve) updateNode(parent, o, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldStart++; oldEnd--\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t\to = old[oldStart]\n\t\t\t\t\tv = vnodes[start]\n\t\t\t\t}\n\t\t\t\t// bottom up once again\n\t\t\t\twhile (oldEnd >= oldStart && end >= start) {\n\t\t\t\t\tif (oe.key !== ve.key) break\n\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\toldEnd--, end--\n\t\t\t\t\toe = old[oldEnd]\n\t\t\t\t\tve = vnodes[end]\n\t\t\t\t}\n\t\t\t\tif (start > end) removeNodes(parent, old, oldStart, oldEnd + 1)\n\t\t\t\telse if (oldStart > oldEnd) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)\n\t\t\t\telse {\n\t\t\t\t\t// inspired by ivi https://github.com/ivijs/ivi/ by Boris Kaul\n\t\t\t\t\tvar originalNextSibling = nextSibling, vnodesLength = end - start + 1, oldIndices = new Array(vnodesLength), li=0, i=0, pos = 2147483647, matched = 0, map, lisIndices\n\t\t\t\t\tfor (i = 0; i < vnodesLength; i++) oldIndices[i] = -1\n\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\tif (map == null) map = getKeyMap(old, oldStart, oldEnd + 1)\n\t\t\t\t\t\tve = vnodes[i]\n\t\t\t\t\t\tvar oldIndex = map[ve.key]\n\t\t\t\t\t\tif (oldIndex != null) {\n\t\t\t\t\t\t\tpos = (oldIndex < pos) ? oldIndex : -1 // becomes -1 if nodes were re-ordered\n\t\t\t\t\t\t\toldIndices[i-start] = oldIndex\n\t\t\t\t\t\t\toe = old[oldIndex]\n\t\t\t\t\t\t\told[oldIndex] = null\n\t\t\t\t\t\t\tif (oe !== ve) updateNode(parent, oe, ve, hooks, nextSibling, ns)\n\t\t\t\t\t\t\tif (ve.dom != null) nextSibling = ve.dom\n\t\t\t\t\t\t\tmatched++\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tnextSibling = originalNextSibling\n\t\t\t\t\tif (matched !== oldEnd - oldStart + 1) removeNodes(parent, old, oldStart, oldEnd + 1)\n\t\t\t\t\tif (matched === 0) createNodes(parent, vnodes, start, end + 1, hooks, nextSibling, ns)\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (pos === -1) {\n\t\t\t\t\t\t\t// the indices of the indices of the items that are part of the\n\t\t\t\t\t\t\t// longest increasing subsequence in the oldIndices list\n\t\t\t\t\t\t\tlisIndices = makeLisIndices(oldIndices)\n\t\t\t\t\t\t\tli = lisIndices.length - 1\n\t\t\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\t\t\tv = vnodes[i]\n\t\t\t\t\t\t\t\tif (oldIndices[i-start] === -1) createNode(parent, v, hooks, ns, nextSibling)\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tif (lisIndices[li] === i - start) li--\n\t\t\t\t\t\t\t\t\telse moveNodes(parent, v, nextSibling)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (v.dom != null) nextSibling = vnodes[i].dom\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfor (i = end; i >= start; i--) {\n\t\t\t\t\t\t\t\tv = vnodes[i]\n\t\t\t\t\t\t\t\tif (oldIndices[i-start] === -1) createNode(parent, v, hooks, ns, nextSibling)\n\t\t\t\t\t\t\t\tif (v.dom != null) nextSibling = vnodes[i].dom\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction updateNode(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tvar oldTag = old.tag, tag = vnode.tag\n\t\tif (oldTag === tag) {\n\t\t\tvnode.state = old.state\n\t\t\tvnode.events = old.events\n\t\t\tif (shouldNotUpdate(vnode, old)) return\n\t\t\tif (typeof oldTag === \"string\") {\n\t\t\t\tif (vnode.attrs != null) {\n\t\t\t\t\tupdateLifecycle(vnode.attrs, vnode, hooks)\n\t\t\t\t}\n\t\t\t\tswitch (oldTag) {\n\t\t\t\t\tcase \"#\": updateText(old, vnode); break\n\t\t\t\t\tcase \"<\": updateHTML(parent, old, vnode, ns, nextSibling); break\n\t\t\t\t\tcase \"[\": updateFragment(parent, old, vnode, hooks, nextSibling, ns); break\n\t\t\t\t\tdefault: updateElement(old, vnode, hooks, ns)\n\t\t\t\t}\n\t\t\t}\n\t\t\telse updateComponent(parent, old, vnode, hooks, nextSibling, ns)\n\t\t}\n\t\telse {\n\t\t\tremoveNode(parent, old)\n\t\t\tcreateNode(parent, vnode, hooks, ns, nextSibling)\n\t\t}\n\t}\n\tfunction updateText(old, vnode) {\n\t\tif (old.children.toString() !== vnode.children.toString()) {\n\t\t\told.dom.nodeValue = vnode.children\n\t\t}\n\t\tvnode.dom = old.dom\n\t}\n\tfunction updateHTML(parent, old, vnode, ns, nextSibling) {\n\t\tif (old.children !== vnode.children) {\n\t\t\tremoveHTML(parent, old)\n\t\t\tcreateHTML(parent, vnode, ns, nextSibling)\n\t\t}\n\t\telse {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t\tvnode.instance = old.instance\n\t\t}\n\t}\n\tfunction updateFragment(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tupdateNodes(parent, old.children, vnode.children, hooks, nextSibling, ns)\n\t\tvar domSize = 0, children = vnode.children\n\t\tvnode.dom = null\n\t\tif (children != null) {\n\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\tvar child = children[i]\n\t\t\t\tif (child != null && child.dom != null) {\n\t\t\t\t\tif (vnode.dom == null) vnode.dom = child.dom\n\t\t\t\t\tdomSize += child.domSize || 1\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (domSize !== 1) vnode.domSize = domSize\n\t\t}\n\t}\n\tfunction updateElement(old, vnode, hooks, ns) {\n\t\tvar element = vnode.dom = old.dom\n\t\tns = getNameSpace(vnode) || ns\n\n\t\tif (vnode.tag === \"textarea\") {\n\t\t\tif (vnode.attrs == null) vnode.attrs = {}\n\t\t\tif (vnode.text != null) {\n\t\t\t\tvnode.attrs.value = vnode.text //FIXME handle multiple children\n\t\t\t\tvnode.text = undefined\n\t\t\t}\n\t\t}\n\t\tupdateAttrs(vnode, old.attrs, vnode.attrs, ns)\n\t\tif (!maybeSetContentEditable(vnode)) {\n\t\t\tif (old.text != null && vnode.text != null && vnode.text !== \"\") {\n\t\t\t\tif (old.text.toString() !== vnode.text.toString()) old.dom.firstChild.nodeValue = vnode.text\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (old.text != null) old.children = [Vnode(\"#\", undefined, undefined, old.text, undefined, old.dom.firstChild)]\n\t\t\t\tif (vnode.text != null) vnode.children = [Vnode(\"#\", undefined, undefined, vnode.text, undefined, undefined)]\n\t\t\t\tupdateNodes(element, old.children, vnode.children, hooks, null, ns)\n\t\t\t}\n\t\t}\n\t}\n\tfunction updateComponent(parent, old, vnode, hooks, nextSibling, ns) {\n\t\tvnode.instance = Vnode.normalize(callHook.call(vnode.state.view, vnode))\n\t\tif (vnode.instance === vnode) throw Error(\"A view cannot return the vnode it received as argument\")\n\t\tupdateLifecycle(vnode.state, vnode, hooks)\n\t\tif (vnode.attrs != null) updateLifecycle(vnode.attrs, vnode, hooks)\n\t\tif (vnode.instance != null) {\n\t\t\tif (old.instance == null) createNode(parent, vnode.instance, hooks, ns, nextSibling)\n\t\t\telse updateNode(parent, old.instance, vnode.instance, hooks, nextSibling, ns)\n\t\t\tvnode.dom = vnode.instance.dom\n\t\t\tvnode.domSize = vnode.instance.domSize\n\t\t}\n\t\telse if (old.instance != null) {\n\t\t\tremoveNode(parent, old.instance)\n\t\t\tvnode.dom = undefined\n\t\t\tvnode.domSize = 0\n\t\t}\n\t\telse {\n\t\t\tvnode.dom = old.dom\n\t\t\tvnode.domSize = old.domSize\n\t\t}\n\t}\n\tfunction getKeyMap(vnodes, start, end) {\n\t\tvar map = Object.create(null)\n\t\tfor (; start < end; start++) {\n\t\t\tvar vnode = vnodes[start]\n\t\t\tif (vnode != null) {\n\t\t\t\tvar key = vnode.key\n\t\t\t\tif (key != null) map[key] = start\n\t\t\t}\n\t\t}\n\t\treturn map\n\t}\n\t// Lifted from ivi https://github.com/ivijs/ivi/\n\t// takes a list of unique numbers (-1 is special and can\n\t// occur multiple times) and returns an array with the indices\n\t// of the items that are part of the longest increasing\n\t// subsequece\n\tvar lisTemp = []\n\tfunction makeLisIndices(a) {\n\t\tvar result = [0]\n\t\tvar u = 0, v = 0, i = 0\n\t\tvar il = lisTemp.length = a.length\n\t\tfor (var i = 0; i < il; i++) lisTemp[i] = a[i]\n\t\tfor (var i = 0; i < il; ++i) {\n\t\t\tif (a[i] === -1) continue\n\t\t\tvar j = result[result.length - 1]\n\t\t\tif (a[j] < a[i]) {\n\t\t\t\tlisTemp[i] = j\n\t\t\t\tresult.push(i)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tu = 0\n\t\t\tv = result.length - 1\n\t\t\twhile (u < v) {\n\t\t\t\t// Fast integer average without overflow.\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tvar c = (u >>> 1) + (v >>> 1) + (u & v & 1)\n\t\t\t\tif (a[result[c]] < a[i]) {\n\t\t\t\t\tu = c + 1\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tv = c\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (a[i] < a[result[u]]) {\n\t\t\t\tif (u > 0) lisTemp[i] = result[u - 1]\n\t\t\t\tresult[u] = i\n\t\t\t}\n\t\t}\n\t\tu = result.length\n\t\tv = result[u - 1]\n\t\twhile (u-- > 0) {\n\t\t\tresult[u] = v\n\t\t\tv = lisTemp[v]\n\t\t}\n\t\tlisTemp.length = 0\n\t\treturn result\n\t}\n\n\tfunction getNextSibling(vnodes, i, nextSibling) {\n\t\tfor (; i < vnodes.length; i++) {\n\t\t\tif (vnodes[i] != null && vnodes[i].dom != null) return vnodes[i].dom\n\t\t}\n\t\treturn nextSibling\n\t}\n\n\t// This covers a really specific edge case:\n\t// - Parent node is keyed and contains child\n\t// - Child is removed, returns unresolved promise in `onbeforeremove`\n\t// - Parent node is moved in keyed diff\n\t// - Remaining children still need moved appropriately\n\t//\n\t// Ideally, I'd track removed nodes as well, but that introduces a lot more\n\t// complexity and I'm not exactly interested in doing that.\n\tfunction moveNodes(parent, vnode, nextSibling) {\n\t\tvar frag = $doc.createDocumentFragment()\n\t\tmoveChildToFrag(parent, frag, vnode)\n\t\tinsertNode(parent, frag, nextSibling)\n\t}\n\tfunction moveChildToFrag(parent, frag, vnode) {\n\t\t// Dodge the recursion overhead in a few of the most common cases.\n\t\twhile (vnode.dom != null && vnode.dom.parentNode === parent) {\n\t\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\t\tvnode = vnode.instance\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else if (vnode.tag === \"<\") {\n\t\t\t\tfor (var i = 0; i < vnode.instance.length; i++) {\n\t\t\t\t\tfrag.appendChild(vnode.instance[i])\n\t\t\t\t}\n\t\t\t} else if (vnode.tag !== \"[\") {\n\t\t\t\t// Don't recurse for text nodes *or* elements, just fragments\n\t\t\t\tfrag.appendChild(vnode.dom)\n\t\t\t} else if (vnode.children.length === 1) {\n\t\t\t\tvnode = vnode.children[0]\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else {\n\t\t\t\tfor (var i = 0; i < vnode.children.length; i++) {\n\t\t\t\t\tvar child = vnode.children[i]\n\t\t\t\t\tif (child != null) moveChildToFrag(parent, frag, child)\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\n\tfunction insertNode(parent, dom, nextSibling) {\n\t\tif (nextSibling != null) parent.insertBefore(dom, nextSibling)\n\t\telse parent.appendChild(dom)\n\t}\n\n\tfunction maybeSetContentEditable(vnode) {\n\t\tif (vnode.attrs == null || (\n\t\t\tvnode.attrs.contenteditable == null && // attribute\n\t\t\tvnode.attrs.contentEditable == null // property\n\t\t)) return false\n\t\tvar children = vnode.children\n\t\tif (children != null && children.length === 1 && children[0].tag === \"<\") {\n\t\t\tvar content = children[0].children\n\t\t\tif (vnode.dom.innerHTML !== content) vnode.dom.innerHTML = content\n\t\t}\n\t\telse if (vnode.text != null || children != null && children.length !== 0) throw new Error(\"Child node of a contenteditable must be trusted\")\n\t\treturn true\n\t}\n\n\t//remove\n\tfunction removeNodes(parent, vnodes, start, end) {\n\t\tfor (var i = start; i < end; i++) {\n\t\t\tvar vnode = vnodes[i]\n\t\t\tif (vnode != null) removeNode(parent, vnode)\n\t\t}\n\t}\n\tfunction removeNode(parent, vnode) {\n\t\tvar mask = 0\n\t\tvar original = vnode.state\n\t\tvar stateResult, attrsResult\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onbeforeremove === \"function\") {\n\t\t\tvar result = callHook.call(vnode.state.onbeforeremove, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\tmask = 1\n\t\t\t\tstateResult = result\n\t\t\t}\n\t\t}\n\t\tif (vnode.attrs && typeof vnode.attrs.onbeforeremove === \"function\") {\n\t\t\tvar result = callHook.call(vnode.attrs.onbeforeremove, vnode)\n\t\t\tif (result != null && typeof result.then === \"function\") {\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tmask |= 2\n\t\t\t\tattrsResult = result\n\t\t\t}\n\t\t}\n\t\tcheckState(vnode, original)\n\n\t\t// If we can, try to fast-path it and avoid all the overhead of awaiting\n\t\tif (!mask) {\n\t\t\tonremove(vnode)\n\t\t\tremoveChild(parent, vnode)\n\t\t} else {\n\t\t\tif (stateResult != null) {\n\t\t\t\tvar next = function () {\n\t\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\t\tif (mask & 1) { mask &= 2; if (!mask) reallyRemove() }\n\t\t\t\t}\n\t\t\t\tstateResult.then(next, next)\n\t\t\t}\n\t\t\tif (attrsResult != null) {\n\t\t\t\tvar next = function () {\n\t\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\t\tif (mask & 2) { mask &= 1; if (!mask) reallyRemove() }\n\t\t\t\t}\n\t\t\t\tattrsResult.then(next, next)\n\t\t\t}\n\t\t}\n\n\t\tfunction reallyRemove() {\n\t\t\tcheckState(vnode, original)\n\t\t\tonremove(vnode)\n\t\t\tremoveChild(parent, vnode)\n\t\t}\n\t}\n\tfunction removeHTML(parent, vnode) {\n\t\tfor (var i = 0; i < vnode.instance.length; i++) {\n\t\t\tparent.removeChild(vnode.instance[i])\n\t\t}\n\t}\n\tfunction removeChild(parent, vnode) {\n\t\t// Dodge the recursion overhead in a few of the most common cases.\n\t\twhile (vnode.dom != null && vnode.dom.parentNode === parent) {\n\t\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\t\tvnode = vnode.instance\n\t\t\t\tif (vnode != null) continue\n\t\t\t} else if (vnode.tag === \"<\") {\n\t\t\t\tremoveHTML(parent, vnode)\n\t\t\t} else {\n\t\t\t\tif (vnode.tag !== \"[\") {\n\t\t\t\t\tparent.removeChild(vnode.dom)\n\t\t\t\t\tif (!Array.isArray(vnode.children)) break\n\t\t\t\t}\n\t\t\t\tif (vnode.children.length === 1) {\n\t\t\t\t\tvnode = vnode.children[0]\n\t\t\t\t\tif (vnode != null) continue\n\t\t\t\t} else {\n\t\t\t\t\tfor (var i = 0; i < vnode.children.length; i++) {\n\t\t\t\t\t\tvar child = vnode.children[i]\n\t\t\t\t\t\tif (child != null) removeChild(parent, child)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\t}\n\t}\n\tfunction onremove(vnode) {\n\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onremove === \"function\") callHook.call(vnode.state.onremove, vnode)\n\t\tif (vnode.attrs && typeof vnode.attrs.onremove === \"function\") callHook.call(vnode.attrs.onremove, vnode)\n\t\tif (typeof vnode.tag !== \"string\") {\n\t\t\tif (vnode.instance != null) onremove(vnode.instance)\n\t\t} else {\n\t\t\tvar children = vnode.children\n\t\t\tif (Array.isArray(children)) {\n\t\t\t\tfor (var i = 0; i < children.length; i++) {\n\t\t\t\t\tvar child = children[i]\n\t\t\t\t\tif (child != null) onremove(child)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t//attrs\n\tfunction setAttrs(vnode, attrs, ns) {\n\t\tfor (var key in attrs) {\n\t\t\tsetAttr(vnode, key, null, attrs[key], ns)\n\t\t}\n\t}\n\tfunction setAttr(vnode, key, old, value, ns) {\n\t\tif (key === \"key\" || key === \"is\" || value == null || isLifecycleMethod(key) || (old === value && !isFormAttribute(vnode, key)) && typeof value !== \"object\") return\n\t\tif (key[0] === \"o\" && key[1] === \"n\") return updateEvent(vnode, key, value)\n\t\tif (key.slice(0, 6) === \"xlink:\") vnode.dom.setAttributeNS(\"http://www.w3.org/1999/xlink\", key.slice(6), value)\n\t\telse if (key === \"style\") updateStyle(vnode.dom, old, value)\n\t\telse if (hasPropertyKey(vnode, key, ns)) {\n\t\t\tif (key === \"value\") {\n\t\t\t\t// Only do the coercion if we're actually going to check the value.\n\t\t\t\t/* eslint-disable no-implicit-coercion */\n\t\t\t\t//setting input[value] to same value by typing on focused element moves cursor to end in Chrome\n\t\t\t\tif ((vnode.tag === \"input\" || vnode.tag === \"textarea\") && vnode.dom.value === \"\" + value && vnode.dom === activeElement()) return\n\t\t\t\t//setting select[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\t\tif (vnode.tag === \"select\" && old !== null && vnode.dom.value === \"\" + value) return\n\t\t\t\t//setting option[value] to same value while having select open blinks select dropdown in Chrome\n\t\t\t\tif (vnode.tag === \"option\" && old !== null && vnode.dom.value === \"\" + value) return\n\t\t\t\t/* eslint-enable no-implicit-coercion */\n\t\t\t}\n\t\t\t// If you assign an input type that is not supported by IE 11 with an assignment expression, an error will occur.\n\t\t\tif (vnode.tag === \"input\" && key === \"type\") vnode.dom.setAttribute(key, value)\n\t\t\telse vnode.dom[key] = value\n\t\t} else {\n\t\t\tif (typeof value === \"boolean\") {\n\t\t\t\tif (value) vnode.dom.setAttribute(key, \"\")\n\t\t\t\telse vnode.dom.removeAttribute(key)\n\t\t\t}\n\t\t\telse vnode.dom.setAttribute(key === \"className\" ? \"class\" : key, value)\n\t\t}\n\t}\n\tfunction removeAttr(vnode, key, old, ns) {\n\t\tif (key === \"key\" || key === \"is\" || old == null || isLifecycleMethod(key)) return\n\t\tif (key[0] === \"o\" && key[1] === \"n\" && !isLifecycleMethod(key)) updateEvent(vnode, key, undefined)\n\t\telse if (key === \"style\") updateStyle(vnode.dom, old, null)\n\t\telse if (\n\t\t\thasPropertyKey(vnode, key, ns)\n\t\t\t&& key !== \"className\"\n\t\t\t&& !(key === \"value\" && (\n\t\t\t\tvnode.tag === \"option\"\n\t\t\t\t|| vnode.tag === \"select\" && vnode.dom.selectedIndex === -1 && vnode.dom === activeElement()\n\t\t\t))\n\t\t\t&& !(vnode.tag === \"input\" && key === \"type\")\n\t\t) {\n\t\t\tvnode.dom[key] = null\n\t\t} else {\n\t\t\tvar nsLastIndex = key.indexOf(\":\")\n\t\t\tif (nsLastIndex !== -1) key = key.slice(nsLastIndex + 1)\n\t\t\tif (old !== false) vnode.dom.removeAttribute(key === \"className\" ? \"class\" : key)\n\t\t}\n\t}\n\tfunction setLateSelectAttrs(vnode, attrs) {\n\t\tif (\"value\" in attrs) {\n\t\t\tif(attrs.value === null) {\n\t\t\t\tif (vnode.dom.selectedIndex !== -1) vnode.dom.value = null\n\t\t\t} else {\n\t\t\t\tvar normalized = \"\" + attrs.value // eslint-disable-line no-implicit-coercion\n\t\t\t\tif (vnode.dom.value !== normalized || vnode.dom.selectedIndex === -1) {\n\t\t\t\t\tvnode.dom.value = normalized\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (\"selectedIndex\" in attrs) setAttr(vnode, \"selectedIndex\", null, attrs.selectedIndex, undefined)\n\t}\n\tfunction updateAttrs(vnode, old, attrs, ns) {\n\t\tif (attrs != null) {\n\t\t\tfor (var key in attrs) {\n\t\t\t\tsetAttr(vnode, key, old && old[key], attrs[key], ns)\n\t\t\t}\n\t\t}\n\t\tvar val\n\t\tif (old != null) {\n\t\t\tfor (var key in old) {\n\t\t\t\tif (((val = old[key]) != null) && (attrs == null || attrs[key] == null)) {\n\t\t\t\t\tremoveAttr(vnode, key, val, ns)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction isFormAttribute(vnode, attr) {\n\t\treturn attr === \"value\" || attr === \"checked\" || attr === \"selectedIndex\" || attr === \"selected\" && vnode.dom === activeElement() || vnode.tag === \"option\" && vnode.dom.parentNode === $doc.activeElement\n\t}\n\tfunction isLifecycleMethod(attr) {\n\t\treturn attr === \"oninit\" || attr === \"oncreate\" || attr === \"onupdate\" || attr === \"onremove\" || attr === \"onbeforeremove\" || attr === \"onbeforeupdate\"\n\t}\n\tfunction hasPropertyKey(vnode, key, ns) {\n\t\t// Filter out namespaced keys\n\t\treturn ns === undefined && (\n\t\t\t// If it's a custom element, just keep it.\n\t\t\tvnode.tag.indexOf(\"-\") > -1 || vnode.attrs != null && vnode.attrs.is ||\n\t\t\t// If it's a normal element, let's try to avoid a few browser bugs.\n\t\t\tkey !== \"href\" && key !== \"list\" && key !== \"form\" && key !== \"width\" && key !== \"height\"// && key !== \"type\"\n\t\t\t// Defer the property check until *after* we check everything.\n\t\t) && key in vnode.dom\n\t}\n\n\t//style\n\tvar uppercaseRegex = /[A-Z]/g\n\tfunction toLowerCase(capital) { return \"-\" + capital.toLowerCase() }\n\tfunction normalizeKey(key) {\n\t\treturn key[0] === \"-\" && key[1] === \"-\" ? key :\n\t\t\tkey === \"cssFloat\" ? \"float\" :\n\t\t\t\tkey.replace(uppercaseRegex, toLowerCase)\n\t}\n\tfunction updateStyle(element, old, style) {\n\t\tif (old === style) {\n\t\t\t// Styles are equivalent, do nothing.\n\t\t} else if (style == null) {\n\t\t\t// New style is missing, just clear it.\n\t\t\telement.style.cssText = \"\"\n\t\t} else if (typeof style !== \"object\") {\n\t\t\t// New style is a string, let engine deal with patching.\n\t\t\telement.style.cssText = style\n\t\t} else if (old == null || typeof old !== \"object\") {\n\t\t\t// `old` is missing or a string, `style` is an object.\n\t\t\telement.style.cssText = \"\"\n\t\t\t// Add new style properties\n\t\t\tfor (var key in style) {\n\t\t\t\tvar value = style[key]\n\t\t\t\tif (value != null) element.style.setProperty(normalizeKey(key), String(value))\n\t\t\t}\n\t\t} else {\n\t\t\t// Both old & new are (different) objects.\n\t\t\t// Update style properties that have changed\n\t\t\tfor (var key in style) {\n\t\t\t\tvar value = style[key]\n\t\t\t\tif (value != null && (value = String(value)) !== String(old[key])) {\n\t\t\t\t\telement.style.setProperty(normalizeKey(key), value)\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Remove style properties that no longer exist\n\t\t\tfor (var key in old) {\n\t\t\t\tif (old[key] != null && style[key] == null) {\n\t\t\t\t\telement.style.removeProperty(normalizeKey(key))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Here's an explanation of how this works:\n\t// 1. The event names are always (by design) prefixed by `on`.\n\t// 2. The EventListener interface accepts either a function or an object\n\t//    with a `handleEvent` method.\n\t// 3. The object does not inherit from `Object.prototype`, to avoid\n\t//    any potential interference with that (e.g. setters).\n\t// 4. The event name is remapped to the handler before calling it.\n\t// 5. In function-based event handlers, `ev.target === this`. We replicate\n\t//    that below.\n\t// 6. In function-based event handlers, `return false` prevents the default\n\t//    action and stops event propagation. We replicate that below.\n\tfunction EventDict() {\n\t\t// Save this, so the current redraw is correctly tracked.\n\t\tthis._ = currentRedraw\n\t}\n\tEventDict.prototype = Object.create(null)\n\tEventDict.prototype.handleEvent = function (ev) {\n\t\tvar handler = this[\"on\" + ev.type]\n\t\tvar result\n\t\tif (typeof handler === \"function\") result = handler.call(ev.currentTarget, ev)\n\t\telse if (typeof handler.handleEvent === \"function\") handler.handleEvent(ev)\n\t\tif (this._ && ev.redraw !== false) (0, this._)()\n\t\tif (result === false) {\n\t\t\tev.preventDefault()\n\t\t\tev.stopPropagation()\n\t\t}\n\t}\n\n\t//event\n\tfunction updateEvent(vnode, key, value) {\n\t\tif (vnode.events != null) {\n\t\t\tif (vnode.events[key] === value) return\n\t\t\tif (value != null && (typeof value === \"function\" || typeof value === \"object\")) {\n\t\t\t\tif (vnode.events[key] == null) vnode.dom.addEventListener(key.slice(2), vnode.events, false)\n\t\t\t\tvnode.events[key] = value\n\t\t\t} else {\n\t\t\t\tif (vnode.events[key] != null) vnode.dom.removeEventListener(key.slice(2), vnode.events, false)\n\t\t\t\tvnode.events[key] = undefined\n\t\t\t}\n\t\t} else if (value != null && (typeof value === \"function\" || typeof value === \"object\")) {\n\t\t\tvnode.events = new EventDict()\n\t\t\tvnode.dom.addEventListener(key.slice(2), vnode.events, false)\n\t\t\tvnode.events[key] = value\n\t\t}\n\t}\n\n\t//lifecycle\n\tfunction initLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.oninit === \"function\") callHook.call(source.oninit, vnode)\n\t\tif (typeof source.oncreate === \"function\") hooks.push(callHook.bind(source.oncreate, vnode))\n\t}\n\tfunction updateLifecycle(source, vnode, hooks) {\n\t\tif (typeof source.onupdate === \"function\") hooks.push(callHook.bind(source.onupdate, vnode))\n\t}\n\tfunction shouldNotUpdate(vnode, old) {\n\t\tdo {\n\t\t\tif (vnode.attrs != null && typeof vnode.attrs.onbeforeupdate === \"function\") {\n\t\t\t\tvar force = callHook.call(vnode.attrs.onbeforeupdate, vnode, old)\n\t\t\t\tif (force !== undefined && !force) break\n\t\t\t}\n\t\t\tif (typeof vnode.tag !== \"string\" && typeof vnode.state.onbeforeupdate === \"function\") {\n\t\t\t\tvar force = callHook.call(vnode.state.onbeforeupdate, vnode, old)\n\t\t\t\tif (force !== undefined && !force) break\n\t\t\t}\n\t\t\treturn false\n\t\t} while (false); // eslint-disable-line no-constant-condition\n\t\tvnode.dom = old.dom\n\t\tvnode.domSize = old.domSize\n\t\tvnode.instance = old.instance\n\t\t// One would think having the actual latest attributes would be ideal,\n\t\t// but it doesn't let us properly diff based on our current internal\n\t\t// representation. We have to save not only the old DOM info, but also\n\t\t// the attributes used to create it, as we diff *that*, not against the\n\t\t// DOM directly (with a few exceptions in `setAttr`). And, of course, we\n\t\t// need to save the children and text as they are conceptually not\n\t\t// unlike special \"attributes\" internally.\n\t\tvnode.attrs = old.attrs\n\t\tvnode.children = old.children\n\t\tvnode.text = old.text\n\t\treturn true\n\t}\n\n\treturn function(dom, vnodes, redraw) {\n\t\tif (!dom) throw new TypeError(\"Ensure the DOM element being passed to m.route/m.mount/m.render is not undefined.\")\n\t\tvar hooks = []\n\t\tvar active = activeElement()\n\t\tvar namespace = dom.namespaceURI\n\n\t\t// First time rendering into a node clears it out\n\t\tif (dom.vnodes == null) dom.textContent = \"\"\n\n\t\tvnodes = Vnode.normalizeChildren(Array.isArray(vnodes) ? vnodes : [vnodes])\n\t\tvar prevRedraw = currentRedraw\n\t\ttry {\n\t\t\tcurrentRedraw = typeof redraw === \"function\" ? redraw : undefined\n\t\t\tupdateNodes(dom, dom.vnodes, vnodes, hooks, null, namespace === \"http://www.w3.org/1999/xhtml\" ? undefined : namespace)\n\t\t} finally {\n\t\t\tcurrentRedraw = prevRedraw\n\t\t}\n\t\tdom.vnodes = vnodes\n\t\t// `document.activeElement` can return null: https://html.spec.whatwg.org/multipage/interaction.html#dom-document-activeelement\n\t\tif (active != null && activeElement() !== active && typeof active.focus === \"function\") active.focus()\n\t\tfor (var i = 0; i < hooks.length; i++) hooks[i]()\n\t}\n}\n","\"use strict\"\n\nvar Vnode = require(\"../render/vnode\")\n\nmodule.exports = function(html) {\n\tif (html == null) html = \"\"\n\treturn Vnode(\"<\", undefined, undefined, html, undefined, undefined)\n}\n","\"use strict\"\n\nfunction Vnode(tag, key, attrs, children, text, dom) {\n\treturn {tag: tag, key: key, attrs: attrs, children: children, text: text, dom: dom, domSize: undefined, state: undefined, events: undefined, instance: undefined}\n}\nVnode.normalize = function(node) {\n\tif (Array.isArray(node)) return Vnode(\"[\", undefined, undefined, Vnode.normalizeChildren(node), undefined, undefined)\n\tif (node == null || typeof node === \"boolean\") return null\n\tif (typeof node === \"object\") return node\n\treturn Vnode(\"#\", undefined, undefined, String(node), undefined, undefined)\n}\nVnode.normalizeChildren = function(input) {\n\tvar children = []\n\tif (input.length) {\n\t\tvar isKeyed = input[0] != null && input[0].key != null\n\t\t// Note: this is a *very* perf-sensitive check.\n\t\t// Fun fact: merging the loop like this is somehow faster than splitting\n\t\t// it, noticeably so.\n\t\tfor (var i = 1; i < input.length; i++) {\n\t\t\tif ((input[i] != null && input[i].key != null) !== isKeyed) {\n\t\t\t\tthrow new TypeError(\"Vnodes must either always have keys or never have keys!\")\n\t\t\t}\n\t\t}\n\t\tfor (var i = 0; i < input.length; i++) {\n\t\t\tchildren[i] = Vnode.normalize(input[i])\n\t\t}\n\t}\n\treturn children\n}\n\nmodule.exports = Vnode\n","\"use strict\"\n\nvar PromisePolyfill = require(\"./promise/promise\")\nvar mountRedraw = require(\"./mount-redraw\")\n\nmodule.exports = require(\"./request/request\")(window, PromisePolyfill, mountRedraw.redraw)\n","\"use strict\"\n\nvar buildPathname = require(\"../pathname/build\")\n\nmodule.exports = function($window, Promise, oncompletion) {\n\tvar callbackCount = 0\n\n\tfunction PromiseProxy(executor) {\n\t\treturn new Promise(executor)\n\t}\n\n\t// In case the global Promise is some userland library's where they rely on\n\t// `foo instanceof this.constructor`, `this.constructor.resolve(value)`, or\n\t// similar. Let's *not* break them.\n\tPromiseProxy.prototype = Promise.prototype\n\tPromiseProxy.__proto__ = Promise // eslint-disable-line no-proto\n\n\tfunction makeRequest(factory) {\n\t\treturn function(url, args) {\n\t\t\tif (typeof url !== \"string\") { args = url; url = url.url }\n\t\t\telse if (args == null) args = {}\n\t\t\tvar promise = new Promise(function(resolve, reject) {\n\t\t\t\tfactory(buildPathname(url, args.params), args, function (data) {\n\t\t\t\t\tif (typeof args.type === \"function\") {\n\t\t\t\t\t\tif (Array.isArray(data)) {\n\t\t\t\t\t\t\tfor (var i = 0; i < data.length; i++) {\n\t\t\t\t\t\t\t\tdata[i] = new args.type(data[i])\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse data = new args.type(data)\n\t\t\t\t\t}\n\t\t\t\t\tresolve(data)\n\t\t\t\t}, reject)\n\t\t\t})\n\t\t\tif (args.background === true) return promise\n\t\t\tvar count = 0\n\t\t\tfunction complete() {\n\t\t\t\tif (--count === 0 && typeof oncompletion === \"function\") oncompletion()\n\t\t\t}\n\n\t\t\treturn wrap(promise)\n\n\t\t\tfunction wrap(promise) {\n\t\t\t\tvar then = promise.then\n\t\t\t\t// Set the constructor, so engines know to not await or resolve\n\t\t\t\t// this as a native promise. At the time of writing, this is\n\t\t\t\t// only necessary for V8, but their behavior is the correct\n\t\t\t\t// behavior per spec. See this spec issue for more details:\n\t\t\t\t// https://github.com/tc39/ecma262/issues/1577. Also, see the\n\t\t\t\t// corresponding comment in `request/tests/test-request.js` for\n\t\t\t\t// a bit more background on the issue at hand.\n\t\t\t\tpromise.constructor = PromiseProxy\n\t\t\t\tpromise.then = function() {\n\t\t\t\t\tcount++\n\t\t\t\t\tvar next = then.apply(promise, arguments)\n\t\t\t\t\tnext.then(complete, function(e) {\n\t\t\t\t\t\tcomplete()\n\t\t\t\t\t\tif (count === 0) throw e\n\t\t\t\t\t})\n\t\t\t\t\treturn wrap(next)\n\t\t\t\t}\n\t\t\t\treturn promise\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction hasHeader(args, name) {\n\t\tfor (var key in args.headers) {\n\t\t\tif ({}.hasOwnProperty.call(args.headers, key) && name.test(key)) return true\n\t\t}\n\t\treturn false\n\t}\n\n\treturn {\n\t\trequest: makeRequest(function(url, args, resolve, reject) {\n\t\t\tvar method = args.method != null ? args.method.toUpperCase() : \"GET\"\n\t\t\tvar body = args.body\n\t\t\tvar assumeJSON = (args.serialize == null || args.serialize === JSON.serialize) && !(body instanceof $window.FormData)\n\t\t\tvar responseType = args.responseType || (typeof args.extract === \"function\" ? \"\" : \"json\")\n\n\t\t\tvar xhr = new $window.XMLHttpRequest(), aborted = false\n\t\t\tvar original = xhr, replacedAbort\n\t\t\tvar abort = xhr.abort\n\n\t\t\txhr.abort = function() {\n\t\t\t\taborted = true\n\t\t\t\tabort.call(this)\n\t\t\t}\n\n\t\t\txhr.open(method, url, args.async !== false, typeof args.user === \"string\" ? args.user : undefined, typeof args.password === \"string\" ? args.password : undefined)\n\n\t\t\tif (assumeJSON && body != null && !hasHeader(args, /^content-type$/i)) {\n\t\t\t\txhr.setRequestHeader(\"Content-Type\", \"application/json; charset=utf-8\")\n\t\t\t}\n\t\t\tif (typeof args.deserialize !== \"function\" && !hasHeader(args, /^accept$/i)) {\n\t\t\t\txhr.setRequestHeader(\"Accept\", \"application/json, text/*\")\n\t\t\t}\n\t\t\tif (args.withCredentials) xhr.withCredentials = args.withCredentials\n\t\t\tif (args.timeout) xhr.timeout = args.timeout\n\t\t\txhr.responseType = responseType\n\n\t\t\tfor (var key in args.headers) {\n\t\t\t\tif ({}.hasOwnProperty.call(args.headers, key)) {\n\t\t\t\t\txhr.setRequestHeader(key, args.headers[key])\n\t\t\t\t}\n\t\t\t}\n\n\t\t\txhr.onreadystatechange = function(ev) {\n\t\t\t\t// Don't throw errors on xhr.abort().\n\t\t\t\tif (aborted) return\n\n\t\t\t\tif (ev.target.readyState === 4) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tvar success = (ev.target.status >= 200 && ev.target.status < 300) || ev.target.status === 304 || (/^file:\\/\\//i).test(url)\n\t\t\t\t\t\t// When the response type isn't \"\" or \"text\",\n\t\t\t\t\t\t// `xhr.responseText` is the wrong thing to use.\n\t\t\t\t\t\t// Browsers do the right thing and throw here, and we\n\t\t\t\t\t\t// should honor that and do the right thing by\n\t\t\t\t\t\t// preferring `xhr.response` where possible/practical.\n\t\t\t\t\t\tvar response = ev.target.response, message\n\n\t\t\t\t\t\tif (responseType === \"json\") {\n\t\t\t\t\t\t\t// For IE and Edge, which don't implement\n\t\t\t\t\t\t\t// `responseType: \"json\"`.\n\t\t\t\t\t\t\tif (!ev.target.responseType && typeof args.extract !== \"function\") response = JSON.parse(ev.target.responseText)\n\t\t\t\t\t\t} else if (!responseType || responseType === \"text\") {\n\t\t\t\t\t\t\t// Only use this default if it's text. If a parsed\n\t\t\t\t\t\t\t// document is needed on old IE and friends (all\n\t\t\t\t\t\t\t// unsupported), the user should use a custom\n\t\t\t\t\t\t\t// `config` instead. They're already using this at\n\t\t\t\t\t\t\t// their own risk.\n\t\t\t\t\t\t\tif (response == null) response = ev.target.responseText\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (typeof args.extract === \"function\") {\n\t\t\t\t\t\t\tresponse = args.extract(ev.target, args)\n\t\t\t\t\t\t\tsuccess = true\n\t\t\t\t\t\t} else if (typeof args.deserialize === \"function\") {\n\t\t\t\t\t\t\tresponse = args.deserialize(response)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (success) resolve(response)\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttry { message = ev.target.responseText }\n\t\t\t\t\t\t\tcatch (e) { message = response }\n\t\t\t\t\t\t\tvar error = new Error(message)\n\t\t\t\t\t\t\terror.code = ev.target.status\n\t\t\t\t\t\t\terror.response = response\n\t\t\t\t\t\t\treject(error)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\treject(e)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (typeof args.config === \"function\") {\n\t\t\t\txhr = args.config(xhr, args, url) || xhr\n\n\t\t\t\t// Propagate the `abort` to any replacement XHR as well.\n\t\t\t\tif (xhr !== original) {\n\t\t\t\t\treplacedAbort = xhr.abort\n\t\t\t\t\txhr.abort = function() {\n\t\t\t\t\t\taborted = true\n\t\t\t\t\t\treplacedAbort.call(this)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (body == null) xhr.send()\n\t\t\telse if (typeof args.serialize === \"function\") xhr.send(args.serialize(body))\n\t\t\telse if (body instanceof $window.FormData) xhr.send(body)\n\t\t\telse xhr.send(JSON.stringify(body))\n\t\t}),\n\t\tjsonp: makeRequest(function(url, args, resolve, reject) {\n\t\t\tvar callbackName = args.callbackName || \"_mithril_\" + Math.round(Math.random() * 1e16) + \"_\" + callbackCount++\n\t\t\tvar script = $window.document.createElement(\"script\")\n\t\t\t$window[callbackName] = function(data) {\n\t\t\t\tdelete $window[callbackName]\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\tresolve(data)\n\t\t\t}\n\t\t\tscript.onerror = function() {\n\t\t\t\tdelete $window[callbackName]\n\t\t\t\tscript.parentNode.removeChild(script)\n\t\t\t\treject(new Error(\"JSONP request failed\"))\n\t\t\t}\n\t\t\tscript.src = url + (url.indexOf(\"?\") < 0 ? \"?\" : \"&\") +\n\t\t\t\tencodeURIComponent(args.callbackKey || \"callback\") + \"=\" +\n\t\t\t\tencodeURIComponent(callbackName)\n\t\t\t$window.document.documentElement.appendChild(script)\n\t\t}),\n\t}\n}\n","\"use strict\"\n\nvar mountRedraw = require(\"./mount-redraw\")\n\nmodule.exports = require(\"./api/router\")(window, mountRedraw)\n","\"use strict\"\n\nmodule.exports = require(\"./stream/stream\")\n","/* eslint-disable */\n;(function() {\n\"use strict\"\n/* eslint-enable */\nStream.SKIP = {}\nStream.lift = lift\nStream.scan = scan\nStream.merge = merge\nStream.combine = combine\nStream.scanMerge = scanMerge\nStream[\"fantasy-land/of\"] = Stream\n\nvar warnedHalt = false\nObject.defineProperty(Stream, \"HALT\", {\n\tget: function() {\n\t\twarnedHalt || console.log(\"HALT is deprecated and has been renamed to SKIP\");\n\t\twarnedHalt = true\n\t\treturn Stream.SKIP\n\t}\n})\n\nfunction Stream(value) {\n\tvar dependentStreams = []\n\tvar dependentFns = []\n\n\tfunction stream(v) {\n\t\tif (arguments.length && v !== Stream.SKIP) {\n\t\t\tvalue = v\n\t\t\tif (open(stream)) {\n\t\t\t\tstream._changing()\n\t\t\t\tstream._state = \"active\"\n\t\t\t\tdependentStreams.forEach(function(s, i) { s(dependentFns[i](value)) })\n\t\t\t}\n\t\t}\n\n\t\treturn value\n\t}\n\n\tstream.constructor = Stream\n\tstream._state = arguments.length && value !== Stream.SKIP ? \"active\" : \"pending\"\n\tstream._parents = []\n\n\tstream._changing = function() {\n\t\tif (open(stream)) stream._state = \"changing\"\n\t\tdependentStreams.forEach(function(s) {\n\t\t\ts._changing()\n\t\t})\n\t}\n\n\tstream._map = function(fn, ignoreInitial) {\n\t\tvar target = ignoreInitial ? Stream() : Stream(fn(value))\n\t\ttarget._parents.push(stream)\n\t\tdependentStreams.push(target)\n\t\tdependentFns.push(fn)\n\t\treturn target\n\t}\n\n\tstream.map = function(fn) {\n\t\treturn stream._map(fn, stream._state !== \"active\")\n\t}\n\n\tvar end\n\tfunction createEnd() {\n\t\tend = Stream()\n\t\tend.map(function(value) {\n\t\t\tif (value === true) {\n\t\t\t\tstream._parents.forEach(function (p) {p._unregisterChild(stream)})\n\t\t\t\tstream._state = \"ended\"\n\t\t\t\tstream._parents.length = dependentStreams.length = dependentFns.length = 0\n\t\t\t}\n\t\t\treturn value\n\t\t})\n\t\treturn end\n\t}\n\n\tstream.toJSON = function() { return value != null && typeof value.toJSON === \"function\" ? value.toJSON() : value }\n\n\tstream[\"fantasy-land/map\"] = stream.map\n\tstream[\"fantasy-land/ap\"] = function(x) { return combine(function(s1, s2) { return s1()(s2()) }, [x, stream]) }\n\n\tstream._unregisterChild = function(child) {\n\t\tvar childIndex = dependentStreams.indexOf(child)\n\t\tif (childIndex !== -1) {\n\t\t\tdependentStreams.splice(childIndex, 1)\n\t\t\tdependentFns.splice(childIndex, 1)\n\t\t}\n\t}\n\n\tObject.defineProperty(stream, \"end\", {\n\t\tget: function() { return end || createEnd() }\n\t})\n\n\treturn stream\n}\n\nfunction combine(fn, streams) {\n\tvar ready = streams.every(function(s) {\n\t\tif (s.constructor !== Stream)\n\t\t\tthrow new Error(\"Ensure that each item passed to stream.combine/stream.merge/lift is a stream\")\n\t\treturn s._state === \"active\"\n\t})\n\tvar stream = ready\n\t\t? Stream(fn.apply(null, streams.concat([streams])))\n\t\t: Stream()\n\n\tvar changed = []\n\n\tvar mappers = streams.map(function(s) {\n\t\treturn s._map(function(value) {\n\t\t\tchanged.push(s)\n\t\t\tif (ready || streams.every(function(s) { return s._state !== \"pending\" })) {\n\t\t\t\tready = true\n\t\t\t\tstream(fn.apply(null, streams.concat([changed])))\n\t\t\t\tchanged = []\n\t\t\t}\n\t\t\treturn value\n\t\t}, true)\n\t})\n\n\tvar endStream = stream.end.map(function(value) {\n\t\tif (value === true) {\n\t\t\tmappers.forEach(function(mapper) { mapper.end(true) })\n\t\t\tendStream.end(true)\n\t\t}\n\t\treturn undefined\n\t})\n\n\treturn stream\n}\n\nfunction merge(streams) {\n\treturn combine(function() { return streams.map(function(s) { return s() }) }, streams)\n}\n\nfunction scan(fn, acc, origin) {\n\tvar stream = origin.map(function(v) {\n\t\tvar next = fn(acc, v)\n\t\tif (next !== Stream.SKIP) acc = next\n\t\treturn next\n\t})\n\tstream(acc)\n\treturn stream\n}\n\nfunction scanMerge(tuples, seed) {\n\tvar streams = tuples.map(function(tuple) { return tuple[0] })\n\n\tvar stream = combine(function() {\n\t\tvar changed = arguments[arguments.length - 1]\n\t\tstreams.forEach(function(stream, i) {\n\t\t\tif (changed.indexOf(stream) > -1)\n\t\t\t\tseed = tuples[i][1](seed, stream())\n\t\t})\n\n\t\treturn seed\n\t}, streams)\n\n\tstream(seed)\n\n\treturn stream\n}\n\nfunction lift() {\n\tvar fn = arguments[0]\n\tvar streams = Array.prototype.slice.call(arguments, 1)\n\treturn merge(streams).map(function(streams) {\n\t\treturn fn.apply(undefined, streams)\n\t})\n}\n\nfunction open(s) {\n\treturn s._state === \"pending\" || s._state === \"active\" || s._state === \"changing\"\n}\n\nif (typeof module !== \"undefined\") module[\"exports\"] = Stream\nelse if (typeof window.m === \"function\" && !(\"stream\" in window.m)) window.m.stream = Stream\nelse window.m = {stream : Stream}\n\n}());\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7E]/; // non-ASCII chars\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, fn) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = fn(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {Array} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(string, fn) {\n\tconst parts = string.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tstring = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tstring = string.replace(regexSeparators, '\\x2E');\n\tconst labels = string.split('.');\n\tconst encoded = map(labels, fn).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = array => String.fromCodePoint(...array);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint - 0x30 < 0x0A) {\n\t\treturn codePoint - 0x16;\n\t}\n\tif (codePoint - 0x41 < 0x1A) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint - 0x61 < 0x1A) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t//  0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tlet oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tlet inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tlet basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue == n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.1.0',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode };\nexport default punycode;\n","/* jshint browser: true */\n\n(function () {\n\n// We'll copy the properties below into the mirror div.\n// Note that some browsers, such as Firefox, do not concatenate properties\n// into their shorthand (e.g. padding-top, padding-bottom etc. -> padding),\n// so we have to list every single property explicitly.\nvar properties = [\n  'direction',  // RTL support\n  'boxSizing',\n  'width',  // on Chrome and IE, exclude the scrollbar, so the mirror div wraps exactly as the textarea does\n  'height',\n  'overflowX',\n  'overflowY',  // copy the scrollbar for IE\n\n  'borderTopWidth',\n  'borderRightWidth',\n  'borderBottomWidth',\n  'borderLeftWidth',\n  'borderStyle',\n\n  'paddingTop',\n  'paddingRight',\n  'paddingBottom',\n  'paddingLeft',\n\n  // https://developer.mozilla.org/en-US/docs/Web/CSS/font\n  'fontStyle',\n  'fontVariant',\n  'fontWeight',\n  'fontStretch',\n  'fontSize',\n  'fontSizeAdjust',\n  'lineHeight',\n  'fontFamily',\n\n  'textAlign',\n  'textTransform',\n  'textIndent',\n  'textDecoration',  // might not make a difference, but better be safe\n\n  'letterSpacing',\n  'wordSpacing',\n\n  'tabSize',\n  'MozTabSize'\n\n];\n\nvar isBrowser = (typeof window !== 'undefined');\nvar isFirefox = (isBrowser && window.mozInnerScreenX != null);\n\nfunction getCaretCoordinates(element, position, options) {\n  if (!isBrowser) {\n    throw new Error('textarea-caret-position#getCaretCoordinates should only be called in a browser');\n  }\n\n  var debug = options && options.debug || false;\n  if (debug) {\n    var el = document.querySelector('#input-textarea-caret-position-mirror-div');\n    if (el) el.parentNode.removeChild(el);\n  }\n\n  // The mirror div will replicate the textarea's style\n  var div = document.createElement('div');\n  div.id = 'input-textarea-caret-position-mirror-div';\n  document.body.appendChild(div);\n\n  var style = div.style;\n  var computed = window.getComputedStyle ? window.getComputedStyle(element) : element.currentStyle;  // currentStyle for IE < 9\n  var isInput = element.nodeName === 'INPUT';\n\n  // Default textarea styles\n  style.whiteSpace = 'pre-wrap';\n  if (!isInput)\n    style.wordWrap = 'break-word';  // only for textarea-s\n\n  // Position off-screen\n  style.position = 'absolute';  // required to return coordinates properly\n  if (!debug)\n    style.visibility = 'hidden';  // not 'display: none' because we want rendering\n\n  // Transfer the element's properties to the div\n  properties.forEach(function (prop) {\n    if (isInput && prop === 'lineHeight') {\n      // Special case for <input>s because text is rendered centered and line height may be != height\n      style.lineHeight = computed.height;\n    } else {\n      style[prop] = computed[prop];\n    }\n  });\n\n  if (isFirefox) {\n    // Firefox lies about the overflow property for textareas: https://bugzilla.mozilla.org/show_bug.cgi?id=984275\n    if (element.scrollHeight > parseInt(computed.height))\n      style.overflowY = 'scroll';\n  } else {\n    style.overflow = 'hidden';  // for Chrome to not render a scrollbar; IE keeps overflowY = 'scroll'\n  }\n\n  div.textContent = element.value.substring(0, position);\n  // The second special handling for input type=\"text\" vs textarea:\n  // spaces need to be replaced with non-breaking spaces - http://stackoverflow.com/a/13402035/1269037\n  if (isInput)\n    div.textContent = div.textContent.replace(/\\s/g, '\\u00a0');\n\n  var span = document.createElement('span');\n  // Wrapping must be replicated *exactly*, including when a long word gets\n  // onto the next line, with whitespace at the end of the line before (#7).\n  // The  *only* reliable way to do that is to copy the *entire* rest of the\n  // textarea's content into the <span> created at the caret position.\n  // For inputs, just '.' would be enough, but no need to bother.\n  span.textContent = element.value.substring(position) || '.';  // || because a completely empty faux span doesn't render at all\n  div.appendChild(span);\n\n  var coordinates = {\n    top: span.offsetTop + parseInt(computed['borderTopWidth']),\n    left: span.offsetLeft + parseInt(computed['borderLeftWidth']),\n    height: parseInt(computed['lineHeight'])\n  };\n\n  if (debug) {\n    span.style.backgroundColor = '#aaa';\n  } else {\n    document.body.removeChild(div);\n  }\n\n  return coordinates;\n}\n\nif (typeof module != 'undefined' && typeof module.exports != 'undefined') {\n  module.exports = getCaretCoordinates;\n} else if(isBrowser) {\n  window.getCaretCoordinates = getCaretCoordinates;\n}\n\n}());\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../../babel-loader/lib/index.js??ruleSet[1].rules[0]!./jquery.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"$\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"$\"] = ___EXPOSE_LOADER_IMPORT___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"jQuery\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"jQuery\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../../babel-loader/lib/index.js??ruleSet[1].rules[0]!./color-thief.min.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"ColorThief\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"ColorThief\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../babel-loader/lib/index.js??ruleSet[1].rules[0]!./dayjs.min.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"dayjs\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"dayjs\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../babel-loader/lib/index.js??ruleSet[1].rules[0]!./index.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"m\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"m\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","var ___EXPOSE_LOADER_IMPORT___ = require(\"-!../babel-loader/lib/index.js??ruleSet[1].rules[0]!./punycode.es6.js\");\nvar ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = require(\"../expose-loader/dist/runtime/getGlobalThis.js\");\nvar ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;\nif (typeof ___EXPOSE_LOADER_GLOBAL_THIS___[\"punycode\"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___[\"punycode\"] = ___EXPOSE_LOADER_IMPORT___;\nmodule.exports = ___EXPOSE_LOADER_IMPORT___;\n","function _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n  for (var i = 0, arr2 = new Array(len); i < len; i++) {\n    arr2[i] = arr[i];\n  }\n  return arr2;\n}\nmodule.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _arrayWithHoles(arr) {\n  if (Array.isArray(arr)) return arr;\n}\nmodule.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n  return self;\n}\nmodule.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _classCallCheck(instance, Constructor) {\n  if (!(instance instanceof Constructor)) {\n    throw new TypeError(\"Cannot call a class as a function\");\n  }\n}\nmodule.exports = _classCallCheck, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _defineProperties(target, props) {\n  for (var i = 0; i < props.length; i++) {\n    var descriptor = props[i];\n    descriptor.enumerable = descriptor.enumerable || false;\n    descriptor.configurable = true;\n    if (\"value\" in descriptor) descriptor.writable = true;\n    Object.defineProperty(target, descriptor.key, descriptor);\n  }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  Object.defineProperty(Constructor, \"prototype\", {\n    writable: false\n  });\n  return Constructor;\n}\nmodule.exports = _createClass, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n  return obj;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _getPrototypeOf(o) {\n  module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n    return o.__proto__ || Object.getPrototypeOf(o);\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  return _getPrototypeOf(o);\n}\nmodule.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var setPrototypeOf = require(\"./setPrototypeOf.js\");\nfunction _inherits(subClass, superClass) {\n  if (typeof superClass !== \"function\" && superClass !== null) {\n    throw new TypeError(\"Super expression must either be null or a function\");\n  }\n  subClass.prototype = Object.create(superClass && superClass.prototype, {\n    constructor: {\n      value: subClass,\n      writable: true,\n      configurable: true\n    }\n  });\n  Object.defineProperty(subClass, \"prototype\", {\n    writable: false\n  });\n  if (superClass) setPrototypeOf(subClass, superClass);\n}\nmodule.exports = _inherits, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _iterableToArrayLimit(arr, i) {\n  var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n  if (_i == null) return;\n  var _arr = [];\n  var _n = true;\n  var _d = false;\n  var _s, _e;\n  try {\n    for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n      _arr.push(_s.value);\n      if (i && _arr.length === i) break;\n    }\n  } catch (err) {\n    _d = true;\n    _e = err;\n  } finally {\n    try {\n      if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n    } finally {\n      if (_d) throw _e;\n    }\n  }\n  return _arr;\n}\nmodule.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _nonIterableRest() {\n  throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nmodule.exports = _nonIterableRest, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar assertThisInitialized = require(\"./assertThisInitialized.js\");\nfunction _possibleConstructorReturn(self, call) {\n  if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n    return call;\n  } else if (call !== void 0) {\n    throw new TypeError(\"Derived constructors may only return object or undefined\");\n  }\n  return assertThisInitialized(self);\n}\nmodule.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n  \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n  module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n    return exports;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  var exports = {},\n    Op = Object.prototype,\n    hasOwn = Op.hasOwnProperty,\n    defineProperty = Object.defineProperty || function (obj, key, desc) {\n      obj[key] = desc.value;\n    },\n    $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n    iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n    asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n    toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n  function define(obj, key, value) {\n    return Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: !0,\n      configurable: !0,\n      writable: !0\n    }), obj[key];\n  }\n  try {\n    define({}, \"\");\n  } catch (err) {\n    define = function define(obj, key, value) {\n      return obj[key] = value;\n    };\n  }\n  function wrap(innerFn, outerFn, self, tryLocsList) {\n    var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n      generator = Object.create(protoGenerator.prototype),\n      context = new Context(tryLocsList || []);\n    return defineProperty(generator, \"_invoke\", {\n      value: makeInvokeMethod(innerFn, self, context)\n    }), generator;\n  }\n  function tryCatch(fn, obj, arg) {\n    try {\n      return {\n        type: \"normal\",\n        arg: fn.call(obj, arg)\n      };\n    } catch (err) {\n      return {\n        type: \"throw\",\n        arg: err\n      };\n    }\n  }\n  exports.wrap = wrap;\n  var ContinueSentinel = {};\n  function Generator() {}\n  function GeneratorFunction() {}\n  function GeneratorFunctionPrototype() {}\n  var IteratorPrototype = {};\n  define(IteratorPrototype, iteratorSymbol, function () {\n    return this;\n  });\n  var getProto = Object.getPrototypeOf,\n    NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n  NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n  var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n  function defineIteratorMethods(prototype) {\n    [\"next\", \"throw\", \"return\"].forEach(function (method) {\n      define(prototype, method, function (arg) {\n        return this._invoke(method, arg);\n      });\n    });\n  }\n  function AsyncIterator(generator, PromiseImpl) {\n    function invoke(method, arg, resolve, reject) {\n      var record = tryCatch(generator[method], generator, arg);\n      if (\"throw\" !== record.type) {\n        var result = record.arg,\n          value = result.value;\n        return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n          invoke(\"next\", value, resolve, reject);\n        }, function (err) {\n          invoke(\"throw\", err, resolve, reject);\n        }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n          result.value = unwrapped, resolve(result);\n        }, function (error) {\n          return invoke(\"throw\", error, resolve, reject);\n        });\n      }\n      reject(record.arg);\n    }\n    var previousPromise;\n    defineProperty(this, \"_invoke\", {\n      value: function value(method, arg) {\n        function callInvokeWithMethodAndArg() {\n          return new PromiseImpl(function (resolve, reject) {\n            invoke(method, arg, resolve, reject);\n          });\n        }\n        return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n      }\n    });\n  }\n  function makeInvokeMethod(innerFn, self, context) {\n    var state = \"suspendedStart\";\n    return function (method, arg) {\n      if (\"executing\" === state) throw new Error(\"Generator is already running\");\n      if (\"completed\" === state) {\n        if (\"throw\" === method) throw arg;\n        return doneResult();\n      }\n      for (context.method = method, context.arg = arg;;) {\n        var delegate = context.delegate;\n        if (delegate) {\n          var delegateResult = maybeInvokeDelegate(delegate, context);\n          if (delegateResult) {\n            if (delegateResult === ContinueSentinel) continue;\n            return delegateResult;\n          }\n        }\n        if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n          if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n          context.dispatchException(context.arg);\n        } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n        state = \"executing\";\n        var record = tryCatch(innerFn, self, context);\n        if (\"normal\" === record.type) {\n          if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n          return {\n            value: record.arg,\n            done: context.done\n          };\n        }\n        \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n      }\n    };\n  }\n  function maybeInvokeDelegate(delegate, context) {\n    var method = delegate.iterator[context.method];\n    if (undefined === method) {\n      if (context.delegate = null, \"throw\" === context.method) {\n        if (delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method)) return ContinueSentinel;\n        context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a 'throw' method\");\n      }\n      return ContinueSentinel;\n    }\n    var record = tryCatch(method, delegate.iterator, context.arg);\n    if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n    var info = record.arg;\n    return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n  }\n  function pushTryEntry(locs) {\n    var entry = {\n      tryLoc: locs[0]\n    };\n    1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n  }\n  function resetTryEntry(entry) {\n    var record = entry.completion || {};\n    record.type = \"normal\", delete record.arg, entry.completion = record;\n  }\n  function Context(tryLocsList) {\n    this.tryEntries = [{\n      tryLoc: \"root\"\n    }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n  }\n  function values(iterable) {\n    if (iterable) {\n      var iteratorMethod = iterable[iteratorSymbol];\n      if (iteratorMethod) return iteratorMethod.call(iterable);\n      if (\"function\" == typeof iterable.next) return iterable;\n      if (!isNaN(iterable.length)) {\n        var i = -1,\n          next = function next() {\n            for (; ++i < iterable.length;) {\n              if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n            }\n            return next.value = undefined, next.done = !0, next;\n          };\n        return next.next = next;\n      }\n    }\n    return {\n      next: doneResult\n    };\n  }\n  function doneResult() {\n    return {\n      value: undefined,\n      done: !0\n    };\n  }\n  return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n    value: GeneratorFunctionPrototype,\n    configurable: !0\n  }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n    value: GeneratorFunction,\n    configurable: !0\n  }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n    var ctor = \"function\" == typeof genFun && genFun.constructor;\n    return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n  }, exports.mark = function (genFun) {\n    return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n  }, exports.awrap = function (arg) {\n    return {\n      __await: arg\n    };\n  }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n    return this;\n  }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n    void 0 === PromiseImpl && (PromiseImpl = Promise);\n    var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n    return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n      return result.done ? result.value : iter.next();\n    });\n  }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n    return this;\n  }), define(Gp, \"toString\", function () {\n    return \"[object Generator]\";\n  }), exports.keys = function (val) {\n    var object = Object(val),\n      keys = [];\n    for (var key in object) {\n      keys.push(key);\n    }\n    return keys.reverse(), function next() {\n      for (; keys.length;) {\n        var key = keys.pop();\n        if (key in object) return next.value = key, next.done = !1, next;\n      }\n      return next.done = !0, next;\n    };\n  }, exports.values = values, Context.prototype = {\n    constructor: Context,\n    reset: function reset(skipTempReset) {\n      if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {\n        \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n      }\n    },\n    stop: function stop() {\n      this.done = !0;\n      var rootRecord = this.tryEntries[0].completion;\n      if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n      return this.rval;\n    },\n    dispatchException: function dispatchException(exception) {\n      if (this.done) throw exception;\n      var context = this;\n      function handle(loc, caught) {\n        return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n      }\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i],\n          record = entry.completion;\n        if (\"root\" === entry.tryLoc) return handle(\"end\");\n        if (entry.tryLoc <= this.prev) {\n          var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n            hasFinally = hasOwn.call(entry, \"finallyLoc\");\n          if (hasCatch && hasFinally) {\n            if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n            if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n          } else if (hasCatch) {\n            if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n          } else {\n            if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n            if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n          }\n        }\n      }\n    },\n    abrupt: function abrupt(type, arg) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n          var finallyEntry = entry;\n          break;\n        }\n      }\n      finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n      var record = finallyEntry ? finallyEntry.completion : {};\n      return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n    },\n    complete: function complete(record, afterLoc) {\n      if (\"throw\" === record.type) throw record.arg;\n      return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n    },\n    finish: function finish(finallyLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n      }\n    },\n    \"catch\": function _catch(tryLoc) {\n      for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n        var entry = this.tryEntries[i];\n        if (entry.tryLoc === tryLoc) {\n          var record = entry.completion;\n          if (\"throw\" === record.type) {\n            var thrown = record.arg;\n            resetTryEntry(entry);\n          }\n          return thrown;\n        }\n      }\n      throw new Error(\"illegal catch attempt\");\n    },\n    delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n      return this.delegate = {\n        iterator: values(iterable),\n        resultName: resultName,\n        nextLoc: nextLoc\n      }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n    }\n  }, exports;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _setPrototypeOf(o, p) {\n  module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n  return _setPrototypeOf(o, p);\n}\nmodule.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayWithHoles = require(\"./arrayWithHoles.js\");\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\nvar nonIterableRest = require(\"./nonIterableRest.js\");\nfunction _slicedToArray(arr, i) {\n  return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\nmodule.exports = _slicedToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n  \"@babel/helpers - typeof\";\n\n  return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n    return typeof obj;\n  } : function (obj) {\n    return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\nfunction _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\nmodule.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n  regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n  if (typeof globalThis === \"object\") {\n    globalThis.regeneratorRuntime = runtime;\n  } else {\n    Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n  }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","function bidi(node, prop) {\n  var type = node.tag === 'select' ? (node.attrs.multi ? 'multi' : 'select') : node.attrs.type;\n\n  // Setup: bind listeners\n  if (type === 'multi') {\n    node.attrs.onchange = function () {\n      prop(\n        [].slice.call(this.selectedOptions, function (x) {\n          return x.value;\n        })\n      );\n    };\n  } else if (type === 'select') {\n    node.attrs.onchange = function (e) {\n      prop(this.selectedOptions[0].value);\n    };\n  } else if (type === 'checkbox') {\n    node.attrs.onchange = function (e) {\n      prop(this.checked);\n    };\n  } else {\n    node.attrs.onchange = node.attrs.oninput = function (e) {\n      prop(this.value);\n    };\n  }\n\n  if (node.tag === 'select') {\n    node.children.forEach(function (option) {\n      if (option.attrs.value === prop() || option.children[0] === prop()) {\n        option.attrs.selected = true;\n      }\n    });\n  } else if (type === 'checkbox') {\n    node.attrs.checked = prop();\n  } else if (type === 'radio') {\n    node.attrs.checked = prop() === node.attrs.value;\n  } else {\n    node.attrs.value = prop();\n  }\n\n  node.attrs.bidi = null;\n\n  return node;\n}\n\nbidi.view = function (ctrl, node, prop) {\n  return bidi(node, node.attrs.bidi);\n};\n\nexport default bidi;\n","import bidi from './bidi';\n\nexport default function patchMithril(global) {\n  const defaultMithril = global.m;\n\n  const modifiedMithril = function (comp, ...args) {\n    const node = defaultMithril.apply(this, arguments);\n\n    if (!node.attrs) node.attrs = {};\n\n    // Allows the use of the bidi attr.\n    if (node.attrs.bidi) {\n      bidi(node, node.attrs.bidi);\n    }\n\n    return node;\n  };\n\n  Object.keys(defaultMithril).forEach((key) => (modifiedMithril[key] = defaultMithril[key]));\n\n  global.m = modifiedMithril;\n}\n","import type Application from './Application';\n\n// Used to fix typings\nconst w = window as any;\n\n/**\n * Proxy app. Common JS is run first, at which point `window.app` is not\n * set as this is done by the namespaced JS.\n *\n * When the corrent value is set, this code would retain the reference to\n * the original invalid value.\n *\n * By using a proxy, we can ensure that our `window.app` value is always\n * up-to-date with the latest reference.\n */\nconst appProxy = new Proxy(\n  {},\n  {\n    get(_, properties) {\n      return Reflect.get(w.app, properties, w.app);\n    },\n    set(_, properties, value) {\n      return Reflect.set(w.app, properties, value, w.app);\n    },\n  }\n);\n\n/**\n * The instance of Application within the common namespace.\n */\nexport default appProxy as Application;\n","// Expose jQuery, mithril and dayjs to the window browser object\nimport 'expose-loader?exposes=$,jQuery!jquery';\nimport 'expose-loader?exposes=m!mithril';\nimport 'expose-loader?exposes=dayjs!dayjs';\n\nimport 'bootstrap/js/affix';\nimport 'bootstrap/js/dropdown';\nimport 'bootstrap/js/tooltip';\nimport 'bootstrap/js/transition';\nimport 'jquery.hotkeys/jquery.hotkeys';\n\nimport relativeTime from 'dayjs/plugin/relativeTime';\nimport localizedFormat from 'dayjs/plugin/localizedFormat';\n\ndayjs.extend(relativeTime);\ndayjs.extend(localizedFormat);\n\nimport patchMithril from './utils/patchMithril';\n\npatchMithril(window);\n\nimport app from './app';\n\nexport { app };\n\nimport './utils/arrayFlatPolyfill';\n\nconst tooltipGen = $.fn.tooltip;\n\n// Remove in a future version of Flarum.\n// @ts-ignore\n$.fn.tooltip = function (options, caller) {\n  // Show a warning when `$.tooltip` is used outside of the Tooltip component.\n  // This functionality is deprecated and should not be used.\n  if (!['DANGEROUS_tooltip_jquery_fn_deprecation_exempt'].includes(caller)) {\n    console.warn(\n      \"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\"\n    );\n  }\n\n  tooltipGen.bind(this)(options);\n};\n","export default function _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n  return self;\n}","export default function _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n  return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n  setPrototypeOf(subClass, superClass);\n}","export default function _extends() {\n  _extends = Object.assign ? Object.assign.bind() : function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n    return target;\n  };\n  return _extends.apply(this, arguments);\n}","import type Mithril from 'mithril';\n\n/**\n * Mithril 2 does not completely rerender the page if a route change leads to the same route\n * (or the same component handling a different route). This util calls m.route.set, forcing a reonit.\n *\n * @see https://mithril.js.org/route.html#key-parameter\n */\nexport default function setRouteWithForcedRefresh(route: string, params = null, options: Mithril.RouteOptions = {}) {\n  const newOptions = { ...options };\n  newOptions.state = newOptions.state || {};\n  newOptions.state.key = Date.now();\n\n  m.route.set(route, params, newOptions);\n}\n","import setRouteWithForcedRefresh from '../../common/utils/setRouteWithForcedRefresh';\nimport IHistory, { HistoryEntry } from '../../common/IHistory';\n\n/**\n * The `History` class keeps track and manages a stack of routes that the user\n * has navigated to in their session.\n *\n * An item can be pushed to the top of the stack using the `push` method. An\n * item in the stack has a name and a URL. The name need not be unique; if it is\n * the same as the item before it, that will be overwritten with the new URL. In\n * this way, if a user visits a discussion, and then visits another discussion,\n * popping the history stack will still take them back to the discussion list\n * rather than the previous discussion.\n */\nexport default class History implements IHistory {\n  /**\n   * The stack of routes that have been navigated to.\n   */\n  protected stack: HistoryEntry[] = [];\n\n  /**\n   * Get the item on the top of the stack.\n   */\n  getCurrent(): HistoryEntry {\n    return this.stack[this.stack.length - 1];\n  }\n\n  /**\n   * Get the previous item on the stack.\n   */\n  getPrevious(): HistoryEntry {\n    return this.stack[this.stack.length - 2];\n  }\n\n  /**\n   * Push an item to the top of the stack.\n   *\n   * @param {string} name The name of the route.\n   * @param {string} title The title of the route.\n   * @param {string} [url] The URL of the route. The current URL will be used if\n   *     not provided.\n   */\n  push(name: string, title: string, url = m.route.get()) {\n    // If we're pushing an item with the same name as second-to-top item in the\n    // stack, we will assume that the user has clicked the 'back' button in\n    // their browser. In this case, we don't want to push a new item, so we will\n    // pop off the top item, and then the second-to-top item will be overwritten\n    // below.\n    const secondTop = this.stack[this.stack.length - 2];\n    if (secondTop && secondTop.name === name) {\n      this.stack.pop();\n    }\n\n    // If we're pushing an item with the same name as the top item in the stack,\n    // then we'll overwrite it with the new URL.\n    const top = this.getCurrent();\n    if (top && top.name === name) {\n      Object.assign(top, { url, title });\n    } else {\n      this.stack.push({ name, url, title });\n    }\n  }\n\n  /**\n   * Check whether or not the history stack is able to be popped.\n   */\n  canGoBack(): boolean {\n    return this.stack.length > 1;\n  }\n\n  /**\n   * Go back to the previous route in the history stack.\n   */\n  back() {\n    if (!this.canGoBack()) {\n      return this.home();\n    }\n\n    this.stack.pop();\n\n    m.route.set(this.getCurrent().url);\n  }\n\n  /**\n   * Get the URL of the previous page.\n   */\n  backUrl(): string {\n    const secondTop = this.stack[this.stack.length - 2];\n\n    return secondTop.url;\n  }\n\n  /**\n   * Go to the first route in the history stack.\n   */\n  home() {\n    this.stack.splice(0);\n\n    setRouteWithForcedRefresh('/');\n  }\n}\n","/**\n * The `Pane` class manages the page's discussion list sidepane. The pane is a\n * part of the content view (DiscussionPage component), but its visibility is\n * determined by CSS classes applied to the outer page element. This class\n * manages the application of those CSS classes.\n */\nexport default class Pane {\n  constructor(element) {\n    /**\n     * The localStorage key to store the pane's pinned state with.\n     *\n     * @type {String}\n     * @protected\n     */\n    this.pinnedKey = 'panePinned';\n\n    /**\n     * The page element.\n     *\n     * @type {jQuery}\n     * @protected\n     */\n    this.$element = $(element);\n\n    /**\n     * Whether or not the pane is currently pinned.\n     *\n     * @type {Boolean}\n     * @protected\n     */\n    this.pinned = localStorage.getItem(this.pinnedKey) === 'true';\n\n    /**\n     * Whether or not the pane is currently exists.\n     *\n     * @type {Boolean}\n     * @protected\n     */\n    this.active = false;\n\n    /**\n     * Whether or not the pane is currently showing, or is hidden off the edge\n     * of the screen.\n     *\n     * @type {Boolean}\n     * @protected\n     */\n    this.showing = false;\n\n    this.render();\n  }\n\n  /**\n   * Enable the pane.\n   */\n  enable() {\n    this.active = true;\n    this.render();\n  }\n\n  /**\n   * Disable the pane.\n   */\n  disable() {\n    this.active = false;\n    this.showing = false;\n    this.render();\n  }\n\n  /**\n   * Show the pane.\n   */\n  show() {\n    clearTimeout(this.hideTimeout);\n    this.showing = true;\n    this.render();\n  }\n\n  /**\n   * Hide the pane.\n   */\n  hide() {\n    this.showing = false;\n    this.render();\n  }\n\n  /**\n   * Begin a timeout to hide the pane, which can be cancelled by showing the\n   * pane.\n   */\n  onmouseleave() {\n    this.hideTimeout = setTimeout(this.hide.bind(this), 250);\n  }\n\n  /**\n   * Toggle whether or not the pane is pinned.\n   */\n  togglePinned() {\n    this.pinned = !this.pinned;\n\n    localStorage.setItem(this.pinnedKey, this.pinned ? 'true' : 'false');\n\n    this.render();\n  }\n\n  /**\n   * Apply the appropriate CSS classes to the page element.\n   *\n   * @protected\n   */\n  render() {\n    this.$element.toggleClass('panePinned', this.pinned).toggleClass('hasPane', this.active).toggleClass('paneShowing', this.showing);\n  }\n}\n","import type Mithril from 'mithril';\n\nexport interface ComponentAttrs extends Mithril.Attributes {}\n\n/**\n * The `Component` class defines a user interface 'building block'. A component\n * generates a virtual DOM to be rendered on each redraw.\n *\n * Essentially, this is a wrapper for Mithril's components that adds several useful features:\n *\n *  - In the `oninit` and `onbeforeupdate` lifecycle hooks, we store vnode attrs in `this.attrs.\n *    This allows us to use attrs across components without having to pass the vnode to every single\n *    method.\n *  - The static `initAttrs` method allows a convenient way to provide defaults (or to otherwise modify)\n *    the attrs that have been passed into a component.\n *  - When the component is created in the DOM, we store its DOM element under `this.element`; this lets\n *    us use jQuery to modify child DOM state from internal methods via the `this.$()` method.\n *  - A convenience `component` method, which serves as an alternative to hyperscript and JSX.\n *\n * As with other Mithril components, components extending Component can be initialized\n * and nested using JSX, hyperscript, or a combination of both. The `component` method can also\n * be used.\n *\n * @example\n * return m('div', <MyComponent foo=\"bar\"><p>Hello World</p></MyComponent>);\n *\n * @example\n * return m('div', MyComponent.component({foo: 'bar'), m('p', 'Hello World!'));\n *\n * @see https://mithril.js.org/components.html\n */\nexport default abstract class Component<Attrs extends ComponentAttrs = ComponentAttrs, State = undefined> implements Mithril.ClassComponent<Attrs> {\n  /**\n   * The root DOM element for the component.\n   */\n  element!: Element;\n\n  /**\n   * The attributes passed into the component.\n   *\n   * @see https://mithril.js.org/components.html#passing-data-to-components\n   */\n  attrs!: Attrs;\n\n  /**\n   * Class component state that is persisted between redraws.\n   *\n   * Updating this will **not** automatically trigger a redraw, unlike\n   * other frameworks.\n   *\n   * This is different to Vnode state, which is always an instance of your\n   * class component.\n   *\n   * This is `undefined` by default.\n   */\n  state!: State;\n\n  /**\n   * @inheritdoc\n   */\n  abstract view(vnode: Mithril.Vnode<Attrs, this>): Mithril.Children;\n\n  /**\n   * @inheritdoc\n   */\n  oninit(vnode: Mithril.Vnode<Attrs, this>) {\n    this.setAttrs(vnode.attrs);\n  }\n\n  /**\n   * @inheritdoc\n   */\n  oncreate(vnode: Mithril.VnodeDOM<Attrs, this>) {\n    this.element = vnode.dom;\n  }\n\n  /**\n   * @inheritdoc\n   */\n  onbeforeupdate(vnode: Mithril.VnodeDOM<Attrs, this>) {\n    this.setAttrs(vnode.attrs);\n  }\n\n  /**\n   * @inheritdoc\n   */\n  onupdate(vnode: Mithril.VnodeDOM<Attrs, this>) {}\n\n  /**\n   * @inheritdoc\n   */\n  onbeforeremove(vnode: Mithril.VnodeDOM<Attrs, this>) {}\n\n  /**\n   * @inheritdoc\n   */\n  onremove(vnode: Mithril.VnodeDOM<Attrs, this>) {}\n\n  /**\n   * Returns a jQuery object for this component's element. If you pass in a\n   * selector string, this method will return a jQuery object, using the current\n   * element as its buffer.\n   *\n   * For example, calling `component.$('li')` will return a jQuery object\n   * containing all of the `li` elements inside the DOM element of this\n   * component.\n   *\n   * @param [selector] a jQuery-compatible selector string\n   * @returns the jQuery object for the DOM node\n   * @final\n   */\n  $(selector?: string): JQuery {\n    const $element = $(this.element) as JQuery<HTMLElement>;\n\n    return selector ? $element.find(selector) : $element;\n  }\n\n  /**\n   * Convenience method to attach a component without JSX.\n   * Has the same effect as calling `m(THIS_CLASS, attrs, children)`.\n   *\n   * @see https://mithril.js.org/hyperscript.html#mselector,-attributes,-children\n   */\n  static component<SAttrs extends ComponentAttrs = ComponentAttrs>(attrs: SAttrs = {} as SAttrs, children: Mithril.Children = null): Mithril.Vnode {\n    const componentAttrs = { ...attrs };\n\n    return m(this as any, componentAttrs, children);\n  }\n\n  /**\n   * Saves a reference to the vnode attrs after running them through initAttrs,\n   * and checking for common issues.\n   */\n  private setAttrs(attrs: Attrs = {} as Attrs): void {\n    (this.constructor as typeof Component).initAttrs(attrs);\n\n    if (attrs) {\n      if ('children' in attrs) {\n        throw new Error(\n          `[${\n            (this.constructor as typeof Component).name\n          }] The \"children\" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute`\n        );\n      }\n\n      if ('tag' in attrs) {\n        throw new Error(`[${(this.constructor as typeof Component).name}] You cannot use the \"tag\" attribute name with Mithril 2.`);\n      }\n    }\n\n    this.attrs = attrs;\n  }\n\n  /**\n   * Initialize the component's attrs.\n   *\n   * This can be used to assign default values for missing, optional attrs.\n   */\n  static initAttrs(attrs: unknown): void {}\n}\n","/**\n * Check if class A is the same as or a subclass of class B.\n */\nexport default function subclassOf(A, B) {\n  return A && (A === B || A.prototype instanceof B);\n}\n","import subclassOf from '../../common/utils/subclassOf';\n\nexport default class PageState {\n  constructor(type, data = {}) {\n    this.type = type;\n    this.data = data;\n  }\n\n  /**\n   * Determine whether the page matches the given class and data.\n   *\n   * @param {object} type The page class to check against. Subclasses are accepted as well.\n   * @param {Record<string, unknown>} data\n   * @return {boolean}\n   */\n  matches(type, data = {}) {\n    // Fail early when the page is of a different type\n    if (!subclassOf(this.type, type)) return false;\n\n    // Now that the type is known to be correct, we loop through the provided\n    // data to see whether it matches the data in our state.\n    return Object.keys(data).every((key) => this.data[key] === data[key]);\n  }\n\n  get(key) {\n    return this.data[key];\n  }\n\n  set(key, value) {\n    this.data[key] = value;\n  }\n}\n","import type Mithril from 'mithril';\nimport app from '../app';\nimport Component from '../Component';\nimport PageState from '../states/PageState';\n\nexport interface IPageAttrs {\n  key?: number;\n  routeName: string;\n}\n\n/**\n * The `Page` component\n *\n * @abstract\n */\nexport default abstract class Page<CustomAttrs extends IPageAttrs = IPageAttrs, CustomState = undefined> extends Component<CustomAttrs, CustomState> {\n  /**\n   * A class name to apply to the body while the route is active.\n   */\n  protected bodyClass = '';\n\n  /**\n   * Whether we should scroll to the top of the page when its rendered.\n   */\n  protected scrollTopOnCreate = true;\n\n  /**\n   * Whether the browser should restore scroll state on refreshes.\n   */\n  protected useBrowserScrollRestoration = true;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    app.previous = app.current;\n    app.current = new PageState(this.constructor, { routeName: this.attrs.routeName });\n\n    app.drawer.hide();\n    app.modal.close();\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    if (this.bodyClass) {\n      $('#app').addClass(this.bodyClass);\n    }\n\n    if (this.scrollTopOnCreate) {\n      $(window).scrollTop(0);\n    }\n\n    if ('scrollRestoration' in history) {\n      history.scrollRestoration = this.useBrowserScrollRestoration ? 'auto' : 'manual';\n    }\n  }\n\n  onremove(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onremove(vnode);\n\n    if (this.bodyClass) {\n      $('#app').removeClass(this.bodyClass);\n    }\n  }\n}\n","function _defineProperties(target, props) {\n  for (var i = 0; i < props.length; i++) {\n    var descriptor = props[i];\n    descriptor.enumerable = descriptor.enumerable || false;\n    descriptor.configurable = true;\n    if (\"value\" in descriptor) descriptor.writable = true;\n    Object.defineProperty(target, descriptor.key, descriptor);\n  }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n  if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n  if (staticProps) _defineProperties(Constructor, staticProps);\n  Object.defineProperty(Constructor, \"prototype\", {\n    writable: false\n  });\n  return Constructor;\n}","/**\n * Returns if the passed value is an object.\n *\n * In this context, \"object\" refers to **any non-primitive value**, including\n * arrays, function, maps, dates, and more.\n *\n * @example\n * isObject({}); // true\n * @example\n * isObject([]); // true\n * @example\n * isObject(function () {}); // true\n * @example\n * isObject(Object(1)); // true\n * @example\n * isObject(null); // false\n * @example\n * isObject(1); // false\n * @example\n * isObject(\"hello world\"); // false\n *\n * @see https://github.com/jashkenas/underscore/blob/943977e34e2279503528a71ddcc2dd5f96483945/underscore.js#L87-L91\n */\nexport default function isObject(obj: unknown): obj is object {\n  const type = typeof obj;\n  return type === 'function' || (type === 'object' && !!obj);\n}\n","import isObject from './isObject';\n\nexport interface IItemObject<T> {\n  content: T;\n  itemName: string;\n  priority: number;\n}\n\nclass Item<T> {\n  content: T;\n  priority: number;\n\n  constructor(content: T, priority: number) {\n    this.content = content;\n    this.priority = priority;\n  }\n}\n\n/**\n * The `ItemList` class collects items and then arranges them into an array\n * by priority.\n */\nexport default class ItemList<T> {\n  /**\n   * The items in the list.\n   */\n  protected _items: Record<string, Item<T>> = {};\n\n  // TODO: [Flarum 2.0] Remove `.items` getter.\n  /**\n   * A **read-only copy** of items in the list.\n   *\n   * We don't allow adding new items to the ItemList via setting new properties,\n   * nor do we allow modifying existing items directly.\n   *\n   * @deprecated Use {@link ItemList.toObject} instead.\n   */\n  get items(): DeepReadonly<Record<string, Item<T>>> {\n    return new Proxy(this._items, {\n      set() {\n        console.warn('Modifying `ItemList.items` is not allowed.');\n        return false;\n      },\n    });\n  }\n\n  /**\n   * Check whether the list is empty.\n   */\n  isEmpty(): boolean {\n    return Object.keys(this._items).length === 0;\n  }\n\n  /**\n   * Check whether an item is present in the list.\n   */\n  has(key: string): boolean {\n    return Object.keys(this._items).includes(key);\n  }\n\n  /**\n   * Get the content of an item.\n   */\n  get(key: string): T {\n    return this._items[key].content;\n  }\n\n  /**\n   * Get the priority of an item.\n   */\n  getPriority(key: string): number {\n    return this._items[key].priority;\n  }\n\n  /**\n   * Add an item to the list.\n   *\n   * @param key A unique key for the item.\n   * @param content The item's content.\n   * @param priority The priority of the item. Items with a higher priority\n   * will be positioned before items with a lower priority.\n   */\n  add(key: string, content: T, priority: number = 0): this {\n    this._items[key] = new Item(content, priority);\n\n    return this;\n  }\n\n  // TODO: [Flarum 2.0] Remove deprecated `.replace()` method.\n  /**\n   * Replace an item and/or priority in the list, only if it is already present.\n   *\n   * If `content` or `priority` are `null`, these values will not be replaced.\n   *\n   * If the provided `key` is not present, nothing will happen.\n   *\n   * @deprecated Please use the {@link ItemList.setContent} and {@link ItemList.setPriority}\n   * methods to replace items and their priorities. This method will be removed in Flarum 2.0.\n   *\n   * @param key The key of the item in the list\n   * @param content The item's new content\n   * @param priority The item's new priority\n   *\n   * @example <caption>Replace priority and not content.</caption>\n   * items.replace('myItem', null, 10);\n   *\n   * @example <caption>Replace content and not priority.</caption>\n   * items.replace('myItem', <p>My new value.</p>);\n   *\n   * @example <caption>Replace content and priority.</caption>\n   * items.replace('myItem', <p>My new value.</p>, 10);\n   */\n  replace(key: string, content: T | null = null, priority: number | null = null): this {\n    if (!this.has(key)) return this;\n\n    if (content !== null) {\n      this._items[key].content = content;\n    }\n\n    if (priority !== null) {\n      this._items[key].priority = priority;\n    }\n\n    return this;\n  }\n\n  /**\n   * Replaces an item's content, if the provided item key exists.\n   *\n   * If the provided `key` is not present, an error will be thrown.\n   *\n   * @param key The key of the item in the list\n   * @param content The item's new content\n   *\n   * @example <caption>Replace item content.</caption>\n   * items.setContent('myItem', <p>My new value.</p>);\n   *\n   * @example <caption>Replace item content and priority.</caption>\n   *          items\n   *            .setContent('myItem', <p>My new value.</p>)\n   *            .setPriority('myItem', 10);\n   *\n   * @throws If the provided `key` is not present in the ItemList.\n   */\n  setContent(key: string, content: T): this {\n    if (!this.has(key)) {\n      throw new Error(`[ItemList] Cannot set content of Item. Key \\`${key}\\` is not present.`);\n    }\n\n    // Saves on bundle size to call the deprecated method internally\n    return this.replace(key, content);\n  }\n\n  /**\n   * Replaces an item's priority, if the provided item key exists.\n   *\n   * If the provided `key` is not present, an error will be thrown.\n   *\n   * @param key The key of the item in the list\n   * @param priority The item's new priority\n   *\n   * @example <caption>Replace item priority.</caption>\n   * items.setPriority('myItem', 10);\n   *\n   * @example <caption>Replace item priority and content.</caption>\n   *          items\n   *            .setPriority('myItem', 10)\n   *            .setContent('myItem', <p>My new value.</p>);\n   *\n   * @throws If the provided `key` is not present in the ItemList.\n   */\n  setPriority(key: string, priority: number): this {\n    if (!this.has(key)) {\n      throw new Error(`[ItemList] Cannot set priority of Item. Key \\`${key}\\` is not present.`);\n    }\n\n    this._items[key].priority = priority;\n\n    return this;\n  }\n\n  /**\n   * Remove an item from the list.\n   *\n   * If the provided `key` is not present, nothing will happen.\n   */\n  remove(key: string): this {\n    delete this._items[key];\n\n    return this;\n  }\n\n  /**\n   * Merge another list's items into this one.\n   *\n   * The list passed to this function will overwrite items which already exist\n   * with the same key.\n   */\n  merge(otherList: ItemList<T>): ItemList<T> {\n    Object.keys(otherList._items).forEach((key) => {\n      const val = otherList._items[key];\n\n      if (val instanceof Item) {\n        this._items[key] = val;\n      }\n    });\n\n    return this;\n  }\n\n  /**\n   * Convert the list into an array of item content arranged by priority.\n   *\n   * This **does not** preserve the original types of primitives and proxies\n   * all content values to make `itemName` accessible on them.\n   *\n   * **NOTE:** If your ItemList holds primitive types (such as numbers, booleans\n   * or strings), these will be converted to their object counterparts if you do\n   * not provide `true` to this function.\n   *\n   * **NOTE:** Modifying any objects in the final array may also update the\n   * content of the original ItemList.\n   *\n   * @param keepPrimitives Converts item content to objects and sets the\n   * `itemName` property on them.\n   *\n   * @see https://github.com/flarum/core/issues/3030\n   */\n  toArray(keepPrimitives?: false): (T & { itemName: string })[];\n  /**\n   * Convert the list into an array of item content arranged by priority.\n   *\n   * Content values that are already objects will be proxied and have\n   * `itemName` accessible on them. Primitive values will not have the\n   * `itemName` property accessible.\n   *\n   * **NOTE:** Modifying any objects in the final array may also update the\n   * content of the original ItemList.\n   *\n   * @param keepPrimitives Converts item content to objects and sets the\n   * `itemName` property on them.\n   */\n  toArray(keepPrimitives: true): (T extends object ? T & Readonly<{ itemName: string }> : T)[];\n\n  toArray(keepPrimitives: boolean = false): T[] | (T & Readonly<{ itemName: string }>)[] {\n    const items: Item<T>[] = Object.keys(this._items).map((key, i) => {\n      const item = this._items[key];\n\n      if (!keepPrimitives || isObject(item.content)) {\n        // Convert content to object, then proxy it\n        return {\n          ...item,\n          content: this.createItemContentProxy(isObject(item.content) ? item.content : Object(item.content), key),\n        };\n      } else {\n        // ...otherwise just return a clone of the item.\n        return { ...item };\n      }\n    });\n\n    return items.sort((a, b) => b.priority - a.priority).map((item) => item.content);\n  }\n\n  /**\n   * A read-only map of all keys to their respective items in no particular order.\n   *\n   * We don't allow adding new items to the ItemList via setting new properties,\n   * nor do we allow modifying existing items directly. You should use the\n   * {@link ItemList.add}, {@link ItemList.setContent} and\n   * {@link ItemList.setPriority} methods instead.\n   *\n   * To match the old behaviour of the `ItemList.items` property, call\n   * `Object.values(ItemList.toObject())`.\n   *\n   * @example\n   * const items = new ItemList();\n   * items.add('b', 'My cool value', 20);\n   * items.add('a', 'My value', 10);\n   * items.toObject();\n   * // {\n   * //   a: { content: 'My value', priority: 10, itemName: 'a' },\n   * //   b: { content: 'My cool value', priority: 20, itemName: 'b' },\n   * // }\n   */\n  toObject(): DeepReadonly<Record<string, IItemObject<T>>> {\n    return Object.keys(this._items).reduce((map, key) => {\n      const obj = {\n        content: this.get(key),\n        itemName: key,\n        priority: this.getPriority(key),\n      };\n\n      map[key] = obj;\n\n      return map;\n    }, {} as Record<string, IItemObject<T>>);\n  }\n\n  /**\n   * Proxies an item's content, adding the `itemName` readonly property to it.\n   *\n   * @example\n   * createItemContentProxy({ foo: 'bar' }, 'myItem');\n   * // { foo: 'bar', itemName: 'myItem' }\n   *\n   * @param content The item's content (objects only)\n   * @param key The item's key\n   * @return Proxied content\n   *\n   * @internal\n   */\n  private createItemContentProxy<C extends object>(content: C, key: string): Readonly<C & { itemName: string }> {\n    return new Proxy(content, {\n      get(target, property, receiver) {\n        if (property === 'itemName') return key;\n\n        return Reflect.get(target, property, receiver);\n      },\n      set(target, property, value, receiver) {\n        if (key !== null && property === 'itemName') {\n          throw new Error('`itemName` property is read-only');\n        }\n\n        return Reflect.set(target, property, value, receiver);\n      },\n    }) as C & { itemName: string };\n  }\n}\n","import Component from '../Component';\n\n/**\n * The `Separator` component defines a menu separator item.\n */\nclass Separator extends Component {\n  view() {\n    return <li className=\"Dropdown-separator\" />;\n  }\n}\n\nSeparator.isListItem = true;\n\nexport default Separator;\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f);else for(t in e)e[t]&&(n&&(n+=\" \"),n+=t);return n}export function clsx(){for(var e,t,f=0,n=\"\";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","import clsx from 'clsx';\n\n/**\n * This util exposes `clsx` to core and extensions as a re-usable utility.\n *\n * For full documentation, see `clsx` on GitHub.\n *\n * @see https://github.com/lukeed/clsx\n */\nconst classList = clsx;\n\nexport default classList;\n","import type Mithril from 'mithril';\nimport Component, { ComponentAttrs } from '../Component';\nimport Separator from '../components/Separator';\nimport classList from '../utils/classList';\n\ntype ModdedVnodeAttrs = {\n  itemClassName?: string;\n  key?: string;\n};\n\ntype ModdedTag = Mithril.Vnode['tag'] & {\n  isListItem?: boolean;\n  isActive?: (attrs: ComponentAttrs) => boolean;\n};\n\ntype ModdedVnode = Mithril.Vnode<ModdedVnodeAttrs> & { itemName?: string; itemClassName?: string; tag: ModdedTag };\n\ntype ModdedChild = ModdedVnode | string | number | boolean | null | undefined;\ntype ModdedChildArray = ModdedChildren[];\ntype ModdedChildren = ModdedChild | ModdedChildArray;\n\n/**\n * This type represents an element of a list returned by `ItemList.toArray()`,\n * coupled with some static properties used on various components.\n */\nexport type ModdedChildrenWithItemName = ModdedChildren & { itemName?: string };\n\nfunction isVnode(item: ModdedChildren): item is Mithril.Vnode {\n  return typeof item === 'object' && item !== null && 'tag' in item;\n}\n\nfunction isSeparator(item: ModdedChildren): boolean {\n  return isVnode(item) && item.tag === Separator;\n}\n\nfunction withoutUnnecessarySeparators(items: ModdedChildrenWithItemName[]): ModdedChildrenWithItemName[] {\n  const newItems: ModdedChildrenWithItemName[] = [];\n  let prevItem: ModdedChildren;\n\n  items.filter(Boolean).forEach((item, i: number) => {\n    if (!isSeparator(item) || (prevItem && !isSeparator(prevItem) && i !== items.length - 1)) {\n      prevItem = item;\n      newItems.push(item);\n    }\n  });\n\n  return newItems;\n}\n\n/**\n * The `listItems` helper wraps an array of components in the provided tag,\n * stripping out any unnecessary `Separator` components.\n *\n * By default, this tag is an `<li>` tag, but this is customisable through the\n * second function parameter, `customTag`.\n */\nexport default function listItems<Attrs extends ComponentAttrs>(\n  rawItems: ModdedChildrenWithItemName[],\n  customTag: VnodeElementTag<Attrs> = 'li',\n  attributes: Attrs = {} as Attrs\n): Mithril.Vnode[] {\n  const items = rawItems instanceof Array ? rawItems : [rawItems];\n  const Tag = customTag;\n\n  return withoutUnnecessarySeparators(items).map((item) => {\n    const classes = [item.itemName && `item-${item.itemName}`];\n\n    if (isVnode(item) && item.tag.isListItem) {\n      item.attrs = item.attrs || {};\n      item.attrs.key = item.attrs.key || item.itemName;\n      item.key = item.attrs.key;\n\n      return item;\n    }\n\n    if (isVnode(item)) {\n      classes.push(item.attrs?.itemClassName || item.itemClassName);\n\n      if (item.tag.isActive?.(item.attrs)) {\n        classes.push('active');\n      }\n    }\n\n    const key = (isVnode(item) && item?.attrs?.key) || item.itemName;\n\n    return (\n      <Tag className={classList(classes)} key={key} {...attributes}>\n        {item}\n      </Tag>\n    );\n  });\n}\n","import Component from '../../common/Component';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\n\n/**\n * The `DiscussionHero` component displays the hero on a discussion page.\n *\n * ### attrs\n *\n * - `discussion`\n */\nexport default class DiscussionHero extends Component {\n  view() {\n    return (\n      <header className=\"Hero DiscussionHero\">\n        <div className=\"container\">\n          <ul className=\"DiscussionHero-items\">{listItems(this.items().toArray())}</ul>\n        </div>\n      </header>\n    );\n  }\n\n  /**\n   * Build an item list for the contents of the discussion hero.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  items() {\n    const items = new ItemList();\n    const discussion = this.attrs.discussion;\n    const badges = discussion.badges().toArray();\n\n    if (badges.length) {\n      items.add('badges', <ul className=\"DiscussionHero-badges badges\">{listItems(badges)}</ul>, 10);\n    }\n\n    items.add('title', <h1 className=\"DiscussionHero-title\">{discussion.title()}</h1>);\n\n    return items;\n  }\n}\n","export default function _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = Object.keys(source);\n  var key, i;\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (excluded.indexOf(key) >= 0) continue;\n    target[key] = source[key];\n  }\n  return target;\n}","/**\n * The `extract` utility deletes a property from an object and returns its\n * value.\n *\n * @param object The object that owns the property\n * @param property The name of the property to extract\n * @return The value of the property\n */\nexport default function extract<T, K extends keyof T>(object: T, property: K): T[K] {\n  const value = object[property];\n\n  delete object[property];\n\n  return value;\n}\n","/**\n * Truncate a string to the given length, appending ellipses if necessary.\n */\nexport function truncate(string: string, length: number, start: number = 0): string {\n  return (start > 0 ? '...' : '') + string.substring(start, start + length) + (string.length > start + length ? '...' : '');\n}\n\n/**\n * Create a slug out of the given string depending on the selected mode.\n * Invalid characters are converted to hyphens.\n *\n * NOTE: This method does not use the comparably sophisticated transliteration\n * mechanism that is employed in the backend. Therefore, it should only be used\n * to *suggest* slugs that can be overridden by the user.\n */\nexport function slug(string: string, mode: SluggingMode = SluggingMode.ALPHANUMERIC): string {\n  switch (mode) {\n    case SluggingMode.UTF8:\n      return (\n        string\n          .toLowerCase()\n          // Match non-word characters (take UTF8 into consideration) and replace with a dash.\n          .replace(/[^\\p{L}\\p{N}\\p{M}]/giu, '-')\n          .replace(/-+/g, '-')\n          .replace(/-$|^-/g, '')\n      );\n\n    case SluggingMode.ALPHANUMERIC:\n    default:\n      return string\n        .toLowerCase()\n        .replace(/[^a-z0-9]/gi, '-')\n        .replace(/-+/g, '-')\n        .replace(/-$|^-/g, '');\n  }\n}\n\nenum SluggingMode {\n  ALPHANUMERIC = 'alphanum',\n  UTF8 = 'utf8',\n}\n\n/**\n * Strip HTML tags and quotes out of the given string, replacing them with\n * meaningful punctuation.\n */\nexport function getPlainContent(string: string): string {\n  const html = string.replace(/(<\\/p>|<br>)/g, '$1 &nbsp;').replace(/<img\\b[^>]*>/gi, ' ');\n\n  const element = new DOMParser().parseFromString(html, 'text/html').documentElement;\n\n  getPlainContent.removeSelectors.forEach((selector) => {\n    const el = element.querySelectorAll(selector);\n    el.forEach((e) => {\n      e.remove();\n    });\n  });\n\n  return element.innerText.replace(/\\s+/g, ' ').trim();\n}\n\n/**\n * An array of DOM selectors to remove when getting plain content.\n *\n * @type {Array}\n */\ngetPlainContent.removeSelectors = ['blockquote', 'script'];\n\n/**\n * Make a string's first character uppercase.\n */\nexport function ucfirst(string: string): string {\n  return string.substr(0, 1).toUpperCase() + string.substr(1);\n}\n\n/**\n * Transform a camel case string to snake case.\n */\nexport function camelCaseToSnakeCase(str: string): string {\n  return str.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`);\n}\n\n/**\n * Generate a random string (a-z, 0-9) of a given length.\n *\n * Providing a length of less than 0 will result in an error.\n *\n * @param length Length of the random string to generate\n * @returns A random string of provided length\n */\nexport function generateRandomString(length: number): string {\n  if (length < 0) throw new Error('Cannot generate a random string with length less than 0.');\n  if (length === 0) return '';\n\n  const arr = new Uint8Array(length / 2);\n  window.crypto.getRandomValues(arr);\n\n  return Array.from(arr, (dec) => {\n    return dec.toString(16).padStart(2, '0');\n  }).join('');\n}\n","import Component from '../Component';\nimport extract from '../utils/extract';\n\n/**\n * The link component enables both internal and external links.\n * It will return a regular HTML link for any links to external sites,\n * and it will use Mithril's m.route.Link for any internal links.\n *\n * Links will default to internal; the 'external' attr must be set to\n * `true` for the link to be external.\n */\nexport default class Link extends Component {\n  view(vnode) {\n    let { options = {}, ...attrs } = vnode.attrs;\n\n    attrs.href ||= '';\n\n    // For some reason, m.route.Link does not like vnode.text, so if present, we\n    // need to convert it to text vnodes and store it in children.\n    const children = vnode.children || { tag: '#', children: vnode.text };\n\n    if (attrs.external) {\n      return <a {...attrs}>{children}</a>;\n    }\n\n    // If the href URL of the link is the same as the current page path\n    // we will not add a new entry to the browser history.\n    // This allows us to still refresh the Page component\n    // without adding endless history entries.\n    if (attrs.href === m.route.get()) {\n      if (!('replace' in options)) options.replace = true;\n    }\n\n    // Mithril 2 does not completely rerender the page if a route change leads to the same route\n    // (or the same component handling a different route).\n    // Here, the `force` parameter will use Mithril's key system to force a full rerender\n    // see https://mithril.js.org/route.html#key-parameter\n    if (extract(attrs, 'force')) {\n      if (!('state' in options)) options.state = {};\n      if (!('key' in options.state)) options.state.key = Date.now();\n    }\n\n    attrs.options = options;\n\n    return <m.route.Link {...attrs}>{children}</m.route.Link>;\n  }\n}\n","import type Mithril from 'mithril';\nimport type { ComponentAttrs } from '../Component';\nimport User from '../models/User';\nimport classList from '../utils/classList';\n\nexport interface AvatarAttrs extends ComponentAttrs {}\n\n/**\n * The `avatar` helper displays a user's avatar.\n *\n * @param user\n * @param attrs Attributes to apply to the avatar element\n */\nexport default function avatar(user: User | null, attrs: ComponentAttrs = {}): Mithril.Vnode {\n  attrs.className = classList('Avatar', attrs.className);\n  attrs.loading ??= 'lazy';\n  let content: string = '';\n\n  // If the `title` attribute is set to null or false, we don't want to give the\n  // avatar a title. On the other hand, if it hasn't been given at all, we can\n  // safely default it to the user's username.\n  const hasTitle: boolean | string = attrs.title === 'undefined' || attrs.title;\n  if (!hasTitle) delete attrs.title;\n\n  // If a user has been passed, then we will set up an avatar using their\n  // uploaded image, or the first letter of their username if they haven't\n  // uploaded one.\n  if (user) {\n    const username = user.displayName() || '?';\n    const avatarUrl = user.avatarUrl();\n\n    if (hasTitle) attrs.title = attrs.title || username;\n\n    if (avatarUrl) {\n      return <img {...attrs} src={avatarUrl} alt=\"\" />;\n    }\n\n    content = username.charAt(0).toUpperCase();\n    attrs.style = { '--avatar-bg': user.color() };\n  }\n\n  return <span {...attrs}>{content}</span>;\n}\n","import type Mithril from 'mithril';\nimport { truncate } from '../utils/string';\n\n/**\n * The `highlight` helper searches for a word phrase in a string, and wraps\n * matches with the <mark> tag.\n *\n * @param string The string to highlight.\n * @param phrase The word or words to highlight.\n * @param [length] The number of characters to truncate the string to.\n *     The string will be truncated surrounding the first match.\n */\nexport default function highlight(string: string, phrase?: string | RegExp, length?: number): Mithril.Vnode<any, any> | string {\n  if (!phrase && !length) return string;\n\n  // Convert the word phrase into a global regular expression (if it isn't\n  // already) so we can search the string for matched.\n  const regexp = phrase instanceof RegExp ? phrase : new RegExp(phrase ?? '', 'gi');\n\n  let highlighted = string;\n  let start = 0;\n\n  // If a length was given, the truncate the string surrounding the first match.\n  if (length) {\n    if (phrase) start = Math.max(0, string.search(regexp) - length / 2);\n\n    highlighted = truncate(highlighted, length, start);\n  }\n\n  // Convert the string into HTML entities, then highlight all matches with\n  // <mark> tags. Then we will return the result as a trusted HTML string.\n  highlighted = $('<div/>').text(highlighted).html();\n\n  if (phrase) highlighted = highlighted.replace(regexp, '<mark>$&</mark>');\n\n  return m.trust(highlighted);\n}\n","import type Mithril from 'mithril';\nimport classList from '../utils/classList';\n\n/**\n * The `icon` helper displays an icon.\n *\n * @param fontClass The full icon class, prefix and the icon’s name.\n * @param attrs Any other attributes to apply.\n */\nexport default function icon(fontClass: string, attrs: Mithril.Attributes = {}): Mithril.Vnode {\n  attrs.className = classList('icon', fontClass, attrs.className);\n\n  return <i aria-hidden=\"true\" {...attrs} />;\n}\n","import type Mithril from 'mithril';\n\n/**\n * Extract the text nodes from a virtual element.\n */\nexport default function extractText(vdom: Mithril.Children): string {\n  if (vdom instanceof Array) {\n    return vdom.map((element) => extractText(element)).join('');\n  } else if (typeof vdom === 'object' && vdom !== null) {\n    return vdom.children ? extractText(vdom.children) : String(vdom.text);\n  } else {\n    return String(vdom);\n  }\n}\n","import app from '../../common/app';\nimport dayjs from 'dayjs';\nimport extractText from './extractText';\n\n/**\n * The `humanTime` utility converts a date to a localized, human-readable time-\n * ago string.\n */\nexport default function humanTime(time: dayjs.ConfigType): string {\n  let d = dayjs(time);\n  const now = dayjs();\n\n  // To prevent showing things like \"in a few seconds\" due to small offsets\n  // between client and server time, we always reset future dates to the\n  // current time. This will result in \"just now\" being shown instead.\n  if (d.isAfter(now)) {\n    d = now;\n  }\n\n  const day = 864e5;\n  const diff = d.diff(dayjs());\n  let ago: string;\n\n  // If this date was more than a month ago, we'll show the name of the month\n  // in the string. If it wasn't this year, we'll show the year as well.\n  if (diff < -30 * day) {\n    if (d.year() === dayjs().year()) {\n      ago = d.format(extractText(app.translator.trans('core.lib.datetime_formats.humanTimeShort')));\n    } else {\n      ago = d.format(extractText(app.translator.trans('core.lib.datetime_formats.humanTimeLong')));\n    }\n  } else {\n    ago = d.fromNow();\n  }\n\n  return ago;\n}\n","import app from '../../common/app';\nimport extractText from './extractText';\n\n/**\n * The `abbreviateNumber` utility converts a number to a shorter localized form.\n *\n * @example\n * abbreviateNumber(1234);\n * // \"1.2K\"\n */\nexport default function abbreviateNumber(number: number): string {\n  // TODO: translation\n  if (number >= 1000000) {\n    return Math.floor(number / 1000000) + extractText(app.translator.trans('core.lib.number_suffix.mega_text'));\n  } else if (number >= 1000) {\n    return (number / 1000).toFixed(1) + extractText(app.translator.trans('core.lib.number_suffix.kilo_text'));\n  } else {\n    return number.toString();\n  }\n}\n","import app from '../../common/app';\nimport Component, { ComponentAttrs } from '../Component';\nimport icon from '../helpers/icon';\nimport listItems, { ModdedChildrenWithItemName } from '../helpers/listItems';\nimport extractText from '../utils/extractText';\nimport type Mithril from 'mithril';\n\nexport interface IDropdownAttrs extends ComponentAttrs {\n  /** A class name to apply to the dropdown toggle button. */\n  buttonClassName?: string;\n  /** A class name to apply to the dropdown menu. */\n  menuClassName?: string;\n  /** The name of an icon to show in the dropdown toggle button. */\n  icon?: string;\n  /** The name of an icon to show on the right of the button. */\n  caretIcon?: string;\n  /** The label of the dropdown toggle button. Defaults to 'Controls'. */\n  label: Mithril.Children;\n  /** The label used to describe the dropdown toggle button to assistive readers. Defaults to 'Toggle dropdown menu'. */\n  accessibleToggleLabel?: string;\n  /** An action to take when the dropdown is collapsed. */\n  onhide?: () => void;\n  /** An action to take when the dropdown is opened. */\n  onshow?: () => void;\n\n  lazyDraw?: boolean;\n}\n\n/**\n * The `Dropdown` component displays a button which, when clicked, shows a\n * dropdown menu beneath it.\n *\n * The children will be displayed as a list inside the dropdown menu.\n */\nexport default class Dropdown<CustomAttrs extends IDropdownAttrs = IDropdownAttrs> extends Component<CustomAttrs> {\n  protected showing = false;\n\n  static initAttrs(attrs: IDropdownAttrs) {\n    attrs.className ||= '';\n    attrs.buttonClassName ||= '';\n    attrs.menuClassName ||= '';\n    attrs.label ||= '';\n    attrs.caretIcon ??= 'fas fa-caret-down';\n    attrs.accessibleToggleLabel ||= extractText(app.translator.trans('core.lib.dropdown.toggle_dropdown_accessible_label'));\n  }\n\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    const items = vnode.children ? listItems(vnode.children as ModdedChildrenWithItemName[]) : [];\n    const renderItems = this.attrs.lazyDraw ? this.showing : true;\n\n    return (\n      <div className={'ButtonGroup Dropdown dropdown ' + this.attrs.className + ' itemCount' + items.length + (this.showing ? ' open' : '')}>\n        {this.getButton(vnode.children as Mithril.ChildArray)}\n        {renderItems && this.getMenu(items)}\n      </div>\n    );\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    // When opening the dropdown menu, work out if the menu goes beyond the\n    // bottom of the viewport. If it does, we will apply class to make it show\n    // above the toggle button instead of below it.\n    this.$().on('shown.bs.dropdown', () => {\n      const { lazyDraw, onshow } = this.attrs;\n\n      this.showing = true;\n\n      // If using lazy drawing, redraw before calling `onshow` function\n      // to make sure the menu DOM exists in case the callback tries to use it.\n      if (lazyDraw) {\n        m.redraw.sync();\n      }\n\n      if (typeof onshow === 'function') {\n        onshow();\n      }\n\n      // If not using lazy drawing, keep previous functionality\n      // of redrawing after calling onshow()\n      if (!lazyDraw) {\n        m.redraw();\n      }\n\n      const $menu = this.$('.Dropdown-menu');\n      const isRight = $menu.hasClass('Dropdown-menu--right');\n\n      const top = $menu.offset()?.top ?? 0;\n      const height = $menu.height() ?? 0;\n      const windowSrollTop = $(window).scrollTop() ?? 0;\n      const windowHeight = $(window).height() ?? 0;\n\n      $menu.removeClass('Dropdown-menu--top Dropdown-menu--right');\n\n      $menu.toggleClass('Dropdown-menu--top', top + height > windowSrollTop + windowHeight);\n\n      if (($menu.offset()?.top || 0) < 0) {\n        $menu.removeClass('Dropdown-menu--top');\n      }\n\n      const left = $menu.offset()?.left ?? 0;\n      const width = $menu.width() ?? 0;\n      const windowScrollLeft = $(window).scrollLeft() ?? 0;\n      const windowWidth = $(window).width() ?? 0;\n\n      $menu.toggleClass('Dropdown-menu--right', isRight || left + width > windowScrollLeft + windowWidth);\n    });\n\n    this.$().on('hidden.bs.dropdown', () => {\n      this.showing = false;\n\n      if (this.attrs.onhide) {\n        this.attrs.onhide();\n      }\n\n      m.redraw();\n    });\n  }\n\n  /**\n   * Get the template for the button.\n   */\n  getButton(children: Mithril.ChildArray): Mithril.Vnode<any, any> {\n    return (\n      <button\n        className={'Dropdown-toggle ' + this.attrs.buttonClassName}\n        aria-haspopup=\"menu\"\n        aria-label={this.attrs.accessibleToggleLabel}\n        data-toggle=\"dropdown\"\n        onclick={this.attrs.onclick}\n      >\n        {this.getButtonContent(children)}\n      </button>\n    );\n  }\n\n  /**\n   * Get the template for the button's content.\n   */\n  getButtonContent(children: Mithril.ChildArray): Mithril.ChildArray {\n    return [\n      this.attrs.icon ? icon(this.attrs.icon, { className: 'Button-icon' }) : '',\n      <span className=\"Button-label\">{this.attrs.label}</span>,\n      this.attrs.caretIcon ? icon(this.attrs.caretIcon, { className: 'Button-caret' }) : '',\n    ];\n  }\n\n  getMenu(items: Mithril.Vnode<any, any>[]): Mithril.Vnode<any, any> {\n    return <ul className={'Dropdown-menu dropdown-menu ' + this.attrs.menuClassName}>{items}</ul>;\n  }\n}\n","import dayjs from 'dayjs';\nimport type Mithril from 'mithril';\nimport humanTimeUtil from '../utils/humanTime';\n\n/**\n * The `humanTime` helper displays a time in a human-friendly time-ago format\n * (e.g. '12 days ago'), wrapped in a <time> tag with other information about\n * the time.\n */\nexport default function humanTime(time: Date): Mithril.Vnode {\n  const d = dayjs(time);\n\n  const datetime = d.format();\n  const full = d.format('LLLL');\n  const ago = humanTimeUtil(time);\n\n  return (\n    <time pubdate datetime={datetime} title={full} data-humantime>\n      {ago}\n    </time>\n  );\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport humanTime from '../../common/helpers/humanTime';\nimport icon from '../../common/helpers/icon';\n\n/**\n * Displays information about a the first or last post in a discussion.\n *\n * ### Attrs\n *\n * - `discussion`\n * - `lastPost`\n */\nexport default class TerminalPost extends Component {\n  view() {\n    const discussion = this.attrs.discussion;\n    const lastPost = this.attrs.lastPost && discussion.replyCount();\n\n    const user = discussion[lastPost ? 'lastPostedUser' : 'user']();\n    const time = discussion[lastPost ? 'lastPostedAt' : 'createdAt']();\n\n    return (\n      <span>\n        {!!lastPost && icon('fas fa-reply')}{' '}\n        {app.translator.trans('core.forum.discussion_list.' + (lastPost ? 'replied' : 'started') + '_text', {\n          user,\n          ago: humanTime(time),\n        })}\n      </span>\n    );\n  }\n}\n","/**\n * The `SubtreeRetainer` class keeps track of a number of pieces of data,\n * comparing the values of these pieces at every iteration.\n *\n * This is useful for preventing redraws to relatively static (or huge)\n * components whose VDOM only depends on very few values, when none of them\n * have changed.\n *\n * @example\n * // Check two callbacks for changes on each update\n * this.subtree = new SubtreeRetainer(\n *   () => this.attrs.post.freshness,\n *   () => this.showing\n * );\n *\n * // Add more callbacks to be checked for updates\n * this.subtree.check(() => this.attrs.user.freshness);\n *\n * // In a component's onbeforeupdate() method:\n * return this.subtree.needsRebuild()\n *\n * @see https://mithril.js.org/lifecycle-methods.html#onbeforeupdate\n */\nexport default class SubtreeRetainer {\n  protected callbacks: (() => any)[];\n  protected data: Record<string, any>;\n\n  /**\n   * @param callbacks Functions returning data to keep track of.\n   */\n  constructor(...callbacks: (() => any)[]) {\n    this.callbacks = callbacks;\n    this.data = {};\n\n    // Build the initial data, so it is available when calling\n    // needsRebuild from the onbeforeupdate hook.\n    this.needsRebuild();\n  }\n\n  /**\n   * Return whether any data has changed since the last check.\n   * If so, Mithril needs to re-diff the vnode and its children.\n   */\n  needsRebuild(): boolean {\n    let needsRebuild = false;\n\n    this.callbacks.forEach((callback, i) => {\n      const result = callback();\n\n      if (result !== this.data[i]) {\n        this.data[i] = result;\n        needsRebuild = true;\n      }\n    });\n\n    return needsRebuild;\n  }\n\n  /**\n   * Add another callback to be checked.\n   */\n  check(...callbacks: (() => any)[]): void {\n    this.callbacks = this.callbacks.concat(callbacks);\n    // Update the data cache when new checks are added.\n    this.needsRebuild();\n  }\n\n  /**\n   * Invalidate the subtree, forcing it to be redrawn.\n   */\n  invalidate(): void {\n    this.data = {};\n  }\n}\n","import app from '../../common/app';\nimport Component, { ComponentAttrs } from '../Component';\nimport classList from '../utils/classList';\n\nexport interface LoadingIndicatorAttrs extends ComponentAttrs {\n  /**\n   * Custom classes for the loading indicator's container.\n   */\n  className?: string;\n  /**\n   * Custom classes for the loading indicator's container.\n   */\n  containerClassName?: string;\n  /**\n   * Optional size for the loading indicator.\n   */\n  size?: 'large' | 'medium' | 'small';\n  /**\n   * Optional attributes to apply to the loading indicator's container.\n   */\n  containerAttrs?: Partial<ComponentAttrs>;\n  /**\n   * Display type of the spinner.\n   *\n   * @default 'block'\n   */\n  display?: 'block' | 'inline' | 'unset';\n}\n\n/**\n * The `LoadingIndicator` component displays a simple CSS-based loading spinner.\n *\n * To set a custom color, use the CSS `color` property.\n *\n * To increase spacing around the spinner, use the CSS `height` property on the\n * spinner's **container**. Setting the `display` attribute to `block` will set\n * a height of `100px` by default.\n *\n * To apply a custom size to the loading indicator, set the `--size` and\n * `--thickness` CSS custom properties on the loading indicator container.\n *\n * If you *really* want to change how this looks as part of your custom theme,\n * you can override the `border-radius` and `border` then set either a\n * background image, or use `content: \"\\<glyph>\"` (e.g. `content: \"\\f1ce\"`)\n * and `font-family: 'Font Awesome 5 Free'` to set an FA icon if you'd rather.\n *\n * ### Attrs\n *\n * - `containerClassName` Class name(s) to apply to the indicator's parent\n * - `className` Class name(s) to apply to the indicator itself\n * - `display` Determines how the spinner should be displayed (`inline`, `block` (default) or `unset`)\n * - `size` Size of the loading indicator (`small`, `medium` or `large`)\n * - `containerAttrs` Optional attrs to be applied to the container DOM element\n *\n * All other attrs will be assigned as attributes on the DOM element.\n */\nexport default class LoadingIndicator extends Component<LoadingIndicatorAttrs> {\n  view() {\n    const { display = 'block', size = 'medium', containerClassName, className, ...attrs } = this.attrs;\n\n    const completeClassName = classList('LoadingIndicator', className);\n    const completeContainerClassName = classList(\n      'LoadingIndicator-container',\n      display !== 'unset' && `LoadingIndicator-container--${display}`,\n      size && `LoadingIndicator-container--${size}`,\n      containerClassName\n    );\n\n    return (\n      <div\n        aria-label={app.translator.trans('core.lib.loading_indicator.accessible_label')}\n        role=\"status\"\n        {...attrs.containerAttrs}\n        data-size={size}\n        className={completeContainerClassName}\n      >\n        <div aria-hidden=\"true\" className={completeClassName} {...attrs} />\n      </div>\n    );\n  }\n}\n","import Component from '../Component';\n\n/**\n * The `ConfirmDocumentUnload` component can be used to register a global\n * event handler that prevents closing the browser window/tab based on the\n * return value of a given callback prop.\n *\n * ### Attrs\n *\n * - `when` - a callback returning true when the browser should prompt for\n *            confirmation before closing the window/tab\n */\nexport default class ConfirmDocumentUnload extends Component {\n  handler() {\n    return this.attrs.when() || undefined;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.boundHandler = this.handler.bind(this);\n    $(window).on('beforeunload', this.boundHandler);\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    $(window).off('beforeunload', this.boundHandler);\n  }\n\n  view(vnode) {\n    return <>{vnode.children}</>;\n  }\n}\n","import app from '../app';\n\n/**\n * Calls `console.warn` with the provided arguments, but only if the forum is in debug mode.\n *\n * This function is intended to provide warnings to extension developers about issues with\n * their extensions that may not be easily noticed when testing, such as accessibility\n * issues.\n *\n * These warnings should be hidden on production forums to ensure webmasters are not\n * inundated with do-gooders telling them they have an issue when it isn't something they\n * can fix.\n */\nexport default function fireDebugWarning(...args: Parameters<typeof console.warn>): void {\n  if (!app.forum.attribute('debug')) return;\n\n  console.warn(...args);\n}\n\n/**\n * Fire a Flarum deprecation warning which is shown in the JS console.\n *\n * These warnings are only shown when the forum is in debug mode, and the function exists to\n * reduce bundle size caused by multiple warnings across our JavaScript.\n *\n * @param message The message to display. (Short, but sweet, please!)\n * @param githubId The PR or Issue ID with more info in relation to this change.\n * @param [removedFrom] The version in which this feature will be completely removed. (default: 2.0)\n * @param [repo] The repo which the issue or PR is located in. (default: flarum/core)\n *\n * @see {@link fireDebugWarning}\n */\nexport function fireDeprecationWarning(message: string, githubId: string, removedFrom: string = '2.0', repo: string = 'flarum/core'): void {\n  // GitHub auto-redirects between `/pull` and `/issues` for us, so using `/pull` saves 2 bytes!\n  fireDebugWarning(`[Flarum ${removedFrom} Deprecation] ${message}\\n\\nSee: https://github.com/${repo}/pull/${githubId}`);\n}\n","import type Mithril from 'mithril';\nimport Component, { ComponentAttrs } from '../Component';\nimport fireDebugWarning from '../helpers/fireDebugWarning';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport extractText from '../utils/extractText';\nimport LoadingIndicator from './LoadingIndicator';\n\nexport interface IButtonAttrs extends ComponentAttrs {\n  /**\n   * Class(es) of an optional icon to be rendered within the button.\n   *\n   * If provided, the button will gain a `has-icon` class.\n   */\n  icon?: string;\n  /**\n   * Disables button from user input.\n   *\n   * Default: `false`\n   */\n  disabled?: boolean;\n  /**\n   * Show a loading spinner within the button.\n   *\n   * If `true`, also disables the button.\n   *\n   * Default: `false`\n   */\n  loading?: boolean;\n  /**\n   * **DEPRECATED:** Please use the `aria-label` attribute instead. For tooltips, use\n   * the `<Tooltip>` component.\n   *\n   * Accessible text for the button. This should always be present if the button only\n   * contains an icon.\n   *\n   * The textual content of this attribute is passed to the DOM element as `aria-label`.\n   *\n   * @deprecated\n   */\n  title?: string | Mithril.ChildArray;\n  /**\n   * Accessible text for the button. This should always be present if the button only\n   * contains an icon.\n   *\n   * The textual content of this attribute is passed to the DOM element as `aria-label`.\n   */\n  'aria-label'?: string | Mithril.ChildArray;\n  /**\n   * Button type.\n   *\n   * Default: `\"button\"`\n   *\n   * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type\n   */\n  type?: string;\n}\n\n/**\n * The `Button` component defines an element which, when clicked, performs an\n * action.\n *\n * Other attrs will be assigned as attributes on the `<button>` element.\n *\n * Note that a Button has no default class names. This is because a Button can\n * be used to represent any generic clickable control, like a menu item. Common\n * styles can be applied by providing `className=\"Button\"` to the Button component.\n */\nexport default class Button<CustomAttrs extends IButtonAttrs = IButtonAttrs> extends Component<CustomAttrs> {\n  view(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    let { type, title, 'aria-label': ariaLabel, icon: iconName, disabled, loading, className, class: _class, ...attrs } = this.attrs;\n\n    // If no `type` attr provided, set to \"button\"\n    type ||= 'button';\n\n    // Use `title` attribute as `aria-label` if none provided\n    ariaLabel ||= title;\n\n    // If given a translation object, extract the text.\n    if (typeof ariaLabel === 'object') {\n      ariaLabel = extractText(ariaLabel);\n    }\n\n    if (disabled || loading) {\n      delete attrs.onclick;\n    }\n\n    className = classList(_class, className, {\n      hasIcon: iconName,\n      disabled: disabled || loading,\n      loading: loading,\n    });\n\n    const buttonAttrs = {\n      disabled,\n      className,\n      type,\n      'aria-label': ariaLabel,\n      ...attrs,\n    };\n\n    return <button {...buttonAttrs}>{this.getButtonContent(vnode.children)}</button>;\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    const { 'aria-label': ariaLabel } = this.attrs;\n\n    if (this.view === Button.prototype.view && !ariaLabel && !extractText(vnode.children) && !this.element?.getAttribute?.('aria-label')) {\n      fireDebugWarning(\n        '[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',\n        this.element\n      );\n    }\n  }\n\n  /**\n   * Get the template for the button's content.\n   */\n  protected getButtonContent(children: Mithril.Children): Mithril.ChildArray {\n    const iconName = this.attrs.icon;\n\n    return [\n      iconName && icon(iconName, { className: 'Button-icon' }),\n      children && <span className=\"Button-label\">{children}</span>,\n      this.attrs.loading && <LoadingIndicator size=\"small\" display=\"inline\" />,\n    ];\n  }\n}\n","/*\n * Original Copyright GitHub, Inc. Licensed under the MIT License.\n * See license text at https://github.com/github/markdown-toolbar-element/blob/master/LICENSE.\n */\n\nexport interface SelectionRange {\n  text: string;\n  selectionStart: number | undefined;\n  selectionEnd: number | undefined;\n}\n\nlet canInsertText: boolean | null = null;\n\nexport default function insertText(textarea: HTMLTextAreaElement, { text, selectionStart, selectionEnd }: SelectionRange) {\n  const originalSelectionStart = textarea.selectionStart;\n  const before = textarea.value.slice(0, originalSelectionStart);\n  const after = textarea.value.slice(textarea.selectionEnd);\n\n  if (canInsertText === null || canInsertText === true) {\n    textarea.contentEditable = 'true';\n    try {\n      canInsertText = document.execCommand('insertText', false, text);\n    } catch (error) {\n      canInsertText = false;\n    }\n    textarea.contentEditable = 'false';\n  }\n\n  if (canInsertText && !textarea.value.slice(0, textarea.selectionStart).endsWith(text)) {\n    canInsertText = false;\n  }\n\n  if (!canInsertText) {\n    textarea.value = before + text + after;\n    textarea.dispatchEvent(new CustomEvent('input', { bubbles: true, cancelable: true }));\n  }\n\n  if (selectionStart != null && selectionEnd != null) {\n    textarea.setSelectionRange(selectionStart, selectionEnd);\n  } else {\n    textarea.setSelectionRange(originalSelectionStart, textarea.selectionEnd);\n  }\n}\n","import getCaretCoordinates from 'textarea-caret';\nimport insertText from './insertText';\nimport ItemList from './ItemList';\nimport type EditorDriverInterface from './EditorDriverInterface';\nimport { type EditorDriverParams } from './EditorDriverInterface';\n\nexport default class BasicEditorDriver implements EditorDriverInterface {\n  el: HTMLTextAreaElement;\n\n  constructor(dom: HTMLElement, params: EditorDriverParams) {\n    this.el = document.createElement('textarea');\n\n    this.build(dom, params);\n  }\n\n  protected build(dom: HTMLElement, params: EditorDriverParams) {\n    this.el.className = params.classNames.join(' ');\n    this.el.disabled = params.disabled;\n    this.el.placeholder = params.placeholder;\n    this.el.value = params.value;\n\n    const callInputListeners = (e: Event) => {\n      params.inputListeners.forEach((listener) => {\n        listener();\n      });\n\n      e.redraw = false;\n    };\n\n    this.el.oninput = (e) => {\n      params.oninput(this.el.value);\n      callInputListeners(e);\n    };\n\n    this.el.onclick = callInputListeners;\n    this.el.onkeyup = callInputListeners;\n\n    this.el.addEventListener('keydown', (e) => {\n      this.keyHandlers(params)\n        .toArray()\n        .forEach((handler) => handler(e));\n    });\n\n    dom.append(this.el);\n  }\n\n  protected keyHandlers(params: EditorDriverParams) {\n    const items = new ItemList<(e: KeyboardEvent) => void>();\n\n    items.add('submit', function (e: KeyboardEvent) {\n      if ((e.metaKey || e.ctrlKey) && e.key === 'Enter') {\n        params.onsubmit();\n      }\n    });\n\n    return items;\n  }\n\n  moveCursorTo(position: number) {\n    this.setSelectionRange(position, position);\n  }\n\n  getSelectionRange(): Array<number> {\n    return [this.el.selectionStart, this.el.selectionEnd];\n  }\n\n  getLastNChars(n: number): string {\n    const value = this.el.value;\n\n    return value.slice(Math.max(0, this.el.selectionStart - n), this.el.selectionStart);\n  }\n\n  insertAtCursor(text: string) {\n    this.insertAt(this.el.selectionStart, text);\n  }\n\n  insertAt(pos: number, text: string) {\n    this.insertBetween(pos, pos, text);\n  }\n\n  insertBetween(selectionStart: number, selectionEnd: number, text: string) {\n    this.setSelectionRange(selectionStart, selectionEnd);\n\n    const cursorPos = selectionStart + text.length;\n    insertText(this.el, { text, selectionStart: cursorPos, selectionEnd: cursorPos });\n  }\n\n  replaceBeforeCursor(start: number, text: string) {\n    this.insertBetween(start, this.el.selectionStart, text);\n  }\n\n  protected setSelectionRange(start: number, end: number) {\n    this.el.setSelectionRange(start, end);\n    this.focus();\n  }\n\n  getCaretCoordinates(position: number) {\n    const relCoords = getCaretCoordinates(this.el, position);\n\n    return {\n      top: relCoords.top - this.el.scrollTop,\n      left: relCoords.left,\n    };\n  }\n\n  // DOM Interactions\n\n  /**\n   * Set the disabled status of the editor.\n   */\n  disabled(disabled: boolean) {\n    this.el.disabled = disabled;\n  }\n\n  /**\n   * Focus on the editor.\n   */\n  focus() {\n    this.el.focus();\n  }\n\n  /**\n   * Destroy the editor\n   */\n  destroy() {\n    this.el.remove();\n  }\n}\n","import Component from '../Component';\nimport type Mithril from 'mithril';\nimport classList from '../utils/classList';\nimport extractText from '../utils/extractText';\n\nexport interface TooltipAttrs extends Mithril.CommonAttributes<TooltipAttrs, Tooltip> {\n  /**\n   * Tooltip textual content.\n   *\n   * String arrays, like those provided by the translator, will be flattened\n   * into strings.\n   */\n  text: string | string[];\n  /**\n   * Use to manually show or hide the tooltip. `undefined` will show based on cursor events.\n   *\n   * Default: `undefined`.\n   */\n  tooltipVisible?: boolean;\n  /**\n   * Whether to show on focus.\n   *\n   * Default: `true`.\n   */\n  showOnFocus?: boolean;\n  /**\n   * Tooltip position around element.\n   *\n   * Default: `'top'`.\n   */\n  position?: 'top' | 'bottom' | 'left' | 'right';\n  /**\n   * Whether HTML content is allowed in the tooltip.\n   *\n   * **Warning:** this is a possible XSS attack vector. This option shouldn't\n   * be used wherever possible, and may not work when we migrate to another\n   * tooltip library. Be prepared for this to break in Flarum stable.\n   *\n   * Default: `false`.\n   *\n   * @deprecated\n   */\n  html?: boolean;\n  /**\n   * Sets the delay between a trigger state occurring and the tooltip appearing\n   * on-screen.\n   *\n   * **Warning:** this option may be removed when switching to another tooltip\n   * library. Be prepared for this to break in Flarum stable.\n   *\n   * Default: `0`.\n   *\n   * @deprecated\n   */\n  delay?: number;\n  /**\n   * Used to disable the warning for passing text to the `title` attribute.\n   *\n   * Tooltip text should be passed to the `text` attribute.\n   */\n  ignoreTitleWarning?: boolean;\n}\n\n/**\n * The `Tooltip` component is used to create a tooltip for an element. It\n * requires a single child element to be passed to it. Passing multiple\n * children or fragments will throw an error.\n *\n * You should use this for any tooltips you create to allow for backwards\n * compatibility when we switch to another tooltip library instead of\n * Bootstrap tooltips.\n *\n * If you need to pass multiple children, surround them with another element,\n * such as a `<span>` or `<div>`.\n *\n * **Note:** this component will overwrite the `title` attribute of the first\n * child you pass to it, as this is how the current tooltip system works in\n * Flarum. This shouldn't be an issue if you're using this component correctly.\n *\n * @example <caption>Basic usage</caption>\n *          <Tooltip text=\"You wish!\">\n *            <Button>\n *              Click for free money!\n *            </Button>\n *          </Tooltip>\n *\n * @example <caption>Use of `position` and `showOnFocus` attrs</caption>\n *          <Tooltip text=\"Woah! That's cool!\" position=\"bottom\" showOnFocus>\n *            <span>3 replies</span>\n *          </Tooltip>\n *\n * @example <caption>Incorrect usage</caption>\n *          // This is wrong! Surround the children with a <span> or similar.\n *          <Tooltip text=\"This won't work\">\n *            Click\n *            <a href=\"/\">here</a>\n *          </Tooltip>\n */\nexport default class Tooltip extends Component<TooltipAttrs> {\n  private firstChild: Mithril.Vnode<any, any> | null = null;\n  private childDomNode: HTMLElement | null = null;\n\n  private oldText: string = '';\n  private oldVisibility: boolean | undefined;\n\n  private shouldRecreateTooltip: boolean = false;\n  private shouldChangeTooltipVisibility: boolean = false;\n\n  view(vnode: Mithril.Vnode<TooltipAttrs, this>) {\n    /**\n     * We know this will be a ChildArray and not a primitive as this\n     * vnode is a component, not a text or trusted HTML vnode.\n     */\n    const children = vnode.children as Mithril.ChildArray | undefined;\n\n    // We remove these to get the remaining attrs to pass to the DOM element\n    const { text, tooltipVisible, showOnFocus = true, position = 'top', ignoreTitleWarning = false, html = false, delay = 0, ...attrs } = this.attrs;\n\n    if ((this.attrs as any).title && !ignoreTitleWarning) {\n      console.warn(\n        '`title` attribute was passed to Tooltip component. Was this intentional? Tooltip content should be passed to the `text` attr instead.'\n      );\n    }\n\n    const realText = this.getRealText();\n\n    // We need to recreate the tooltip if the text has changed\n    if (realText !== this.oldText) {\n      this.oldText = realText;\n      this.shouldRecreateTooltip = true;\n    }\n\n    if (tooltipVisible !== this.oldVisibility) {\n      this.oldVisibility = this.attrs.tooltipVisible;\n      this.shouldChangeTooltipVisibility = true;\n    }\n\n    // We'll try our best to detect any issues created by devs before they cause any weird effects.\n    // Throwing an error will prevent the forum rendering, but will be better at alerting devs to\n    // an issue.\n\n    if (typeof children === 'undefined') {\n      throw new Error(\n        `Tooltip component was provided with no direct child DOM element. Tooltips must contain a single direct DOM node to attach to.`\n      );\n    }\n\n    if (children.length !== 1) {\n      throw new Error(\n        `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>.`\n      );\n    }\n\n    const firstChild = children[0];\n\n    if (typeof firstChild !== 'object' || Array.isArray(firstChild) || firstChild === null) {\n      throw new Error(\n        `Tooltip component was provided with no direct child DOM element. Tooltips must contain a single direct DOM node to attach to.`\n      );\n    }\n\n    if (typeof firstChild.tag === 'string' && ['#', '[', '<'].includes(firstChild.tag)) {\n      throw new Error(\n        `Tooltip component with provided with a vnode with tag \"${firstChild.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>.`\n      );\n    }\n\n    this.firstChild = firstChild;\n\n    return children;\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<TooltipAttrs, this>) {\n    super.oncreate(vnode);\n\n    this.checkDomNodeChanged();\n    this.recreateTooltip();\n  }\n\n  onupdate(vnode: Mithril.VnodeDOM<TooltipAttrs, this>) {\n    super.onupdate(vnode);\n\n    this.checkDomNodeChanged();\n    this.recreateTooltip();\n  }\n\n  private recreateTooltip() {\n    if (this.shouldRecreateTooltip && this.childDomNode !== null) {\n      $(this.childDomNode).tooltip(\n        'destroy',\n        // @ts-expect-error We don't want this arg to be part of the public API. It only exists to prevent deprecation warnings when using `$.tooltip` in this component.\n        'DANGEROUS_tooltip_jquery_fn_deprecation_exempt'\n      );\n      this.createTooltip();\n      this.shouldRecreateTooltip = false;\n    }\n\n    if (this.shouldChangeTooltipVisibility) {\n      this.shouldChangeTooltipVisibility = false;\n      this.updateVisibility();\n    }\n  }\n\n  private updateVisibility() {\n    if (this.childDomNode === null) return;\n\n    if (this.attrs.tooltipVisible === true) {\n      $(this.childDomNode).tooltip(\n        'show',\n        // @ts-expect-error We don't want this arg to be part of the public API. It only exists to prevent deprecation warnings when using `$.tooltip` in this component.\n        'DANGEROUS_tooltip_jquery_fn_deprecation_exempt'\n      );\n    } else if (this.attrs.tooltipVisible === false) {\n      $(this.childDomNode).tooltip(\n        'hide',\n        // @ts-expect-error We don't want this arg to be part of the public API. It only exists to prevent deprecation warnings when using `$.tooltip` in this component.\n        'DANGEROUS_tooltip_jquery_fn_deprecation_exempt'\n      );\n    }\n  }\n\n  private createTooltip() {\n    if (this.childDomNode === null) return;\n\n    const {\n      showOnFocus = true,\n      position = 'top',\n      delay,\n      // This will have no effect when switching to CSS tooltips\n      html = false,\n      tooltipVisible,\n      text,\n    } = this.attrs;\n\n    // Fancy \"hack\" to assemble the trigger string\n    const trigger = typeof tooltipVisible === 'boolean' ? 'manual' : classList('hover', [showOnFocus && 'focus']);\n\n    const realText = this.getRealText();\n    this.childDomNode.setAttribute('title', realText);\n    this.childDomNode.setAttribute('aria-label', realText);\n\n    // https://getbootstrap.com/docs/3.3/javascript/#tooltips-options\n    $(this.childDomNode).tooltip(\n      {\n        html,\n        delay,\n        placement: position,\n        trigger,\n      },\n      // @ts-expect-error We don't want this arg to be part of the public API. It only exists to prevent deprecation warnings when using `$.tooltip` in this component.\n      'DANGEROUS_tooltip_jquery_fn_deprecation_exempt'\n    );\n  }\n\n  private getRealText(): string {\n    const { text } = this.attrs;\n\n    return Array.isArray(text) ? extractText(text) : text;\n  }\n\n  /**\n   * Checks if the tooltip DOM node has changed.\n   *\n   * If it has, it updates `this.childDomNode` to the new node, and sets\n   * `shouldRecreateTooltip` to `true`.\n   */\n  private checkDomNodeChanged() {\n    const domNode = (this.firstChild as Mithril.VnodeDOM<any, any>).dom as HTMLElement;\n\n    if (domNode && !domNode.isSameNode(this.childDomNode)) {\n      this.childDomNode = domNode;\n      this.shouldRecreateTooltip = true;\n    }\n  }\n}\n","import app from '../../common/app';\n\nimport Component from '../Component';\nimport ItemList from '../utils/ItemList';\nimport listItems from '../helpers/listItems';\nimport Button from './Button';\n\nimport BasicEditorDriver from '../utils/BasicEditorDriver';\nimport Tooltip from './Tooltip';\n\n/**\n * The `TextEditor` component displays a textarea with controls, including a\n * submit button.\n *\n * ### Attrs\n *\n * - `composer`\n * - `submitLabel`\n * - `value`\n * - `placeholder`\n * - `disabled`\n * - `preview`\n */\nexport default class TextEditor extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * The value of the editor.\n     *\n     * @type {String}\n     */\n    this.value = this.attrs.value || '';\n\n    /**\n     * Whether the editor is disabled.\n     */\n    this.disabled = !!this.attrs.disabled;\n  }\n\n  view() {\n    return (\n      <div className=\"TextEditor\">\n        <div className=\"TextEditor-editorContainer\"></div>\n\n        <ul className=\"TextEditor-controls Composer-footer\">\n          {listItems(this.controlItems().toArray())}\n          <li className=\"TextEditor-toolbar\">{this.toolbarItems().toArray()}</li>\n        </ul>\n      </div>\n    );\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.attrs.composer.editor = this.buildEditor(this.$('.TextEditor-editorContainer')[0]);\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    const newDisabled = !!this.attrs.disabled;\n\n    if (this.disabled !== newDisabled) {\n      this.disabled = newDisabled;\n      this.attrs.composer.editor.disabled(newDisabled);\n    }\n  }\n\n  buildEditorParams() {\n    return {\n      classNames: ['FormControl', 'Composer-flexible', 'TextEditor-editor'],\n      disabled: this.disabled,\n      placeholder: this.attrs.placeholder || '',\n      value: this.value,\n      oninput: this.oninput.bind(this),\n      inputListeners: [],\n      onsubmit: () => {\n        this.onsubmit();\n        m.redraw();\n      },\n    };\n  }\n\n  buildEditor(dom) {\n    return new BasicEditorDriver(dom, this.buildEditorParams());\n  }\n\n  /**\n   * Build an item list for the text editor controls.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controlItems() {\n    const items = new ItemList();\n\n    items.add(\n      'submit',\n      <Button icon=\"fas fa-paper-plane\" className=\"Button Button--primary\" itemClassName=\"App-primaryControl\" onclick={this.onsubmit.bind(this)}>\n        {this.attrs.submitLabel}\n      </Button>\n    );\n\n    if (this.attrs.preview) {\n      items.add(\n        'preview',\n        <Tooltip text={app.translator.trans('core.forum.composer.preview_tooltip')}>\n          <Button icon=\"far fa-eye\" className=\"Button Button--icon\" onclick={this.attrs.preview} />\n        </Tooltip>\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the toolbar controls.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  toolbarItems() {\n    return new ItemList();\n  }\n\n  /**\n   * Handle input into the textarea.\n   *\n   * @param {string} value\n   */\n  oninput(value) {\n    this.value = value;\n\n    this.attrs.onchange(this.value);\n  }\n\n  /**\n   * Handle the submit button being clicked.\n   */\n  onsubmit() {\n    this.attrs.onsubmit(this.value);\n  }\n}\n","import Component from '../../common/Component';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport ConfirmDocumentUnload from '../../common/components/ConfirmDocumentUnload';\nimport TextEditor from '../../common/components/TextEditor';\nimport avatar from '../../common/helpers/avatar';\nimport listItems from '../../common/helpers/listItems';\nimport ItemList from '../../common/utils/ItemList';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `ComposerBody` component handles the body, or the content, of the\n * composer. Subclasses should implement the `onsubmit` method and override\n * `headerTimes`.\n *\n * ### Attrs\n *\n * - `composer`\n * - `originalContent`\n * - `submitLabel`\n * - `placeholder`\n * - `user`\n * - `confirmExit`\n * - `disabled`\n *\n * @abstract\n */\nexport default class ComposerBody extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.composer = this.attrs.composer;\n\n    /**\n     * Whether or not the component is loading.\n     *\n     * @type {Boolean}\n     */\n    this.loading = false;\n\n    // Let the composer state know to ask for confirmation under certain\n    // circumstances, if the body supports / requires it and has a corresponding\n    // confirmation question to ask.\n    if (this.attrs.confirmExit) {\n      this.composer.preventClosingWhen(() => this.hasChanges(), this.attrs.confirmExit);\n    }\n\n    this.composer.fields.content(this.attrs.originalContent || '');\n  }\n\n  view() {\n    return (\n      <ConfirmDocumentUnload when={this.hasChanges.bind(this)}>\n        <div className={classList('ComposerBody', this.attrs.className)}>\n          {avatar(this.attrs.user, { className: 'ComposerBody-avatar' })}\n          <div className=\"ComposerBody-content\">\n            <ul className=\"ComposerBody-header\">{listItems(this.headerItems().toArray())}</ul>\n            <div className=\"ComposerBody-editor\">\n              <TextEditor\n                submitLabel={this.attrs.submitLabel}\n                placeholder={this.attrs.placeholder}\n                disabled={this.loading || this.attrs.disabled}\n                composer={this.composer}\n                preview={this.jumpToPreview?.bind(this)}\n                onchange={this.composer.fields.content}\n                onsubmit={this.onsubmit.bind(this)}\n                value={this.composer.fields.content()}\n              />\n            </div>\n          </div>\n          <LoadingIndicator display=\"unset\" containerClassName={classList('ComposerBody-loading', this.loading && 'active')} size=\"large\" />\n        </div>\n      </ConfirmDocumentUnload>\n    );\n  }\n\n  /**\n   * Check if there is any unsaved data.\n   *\n   * @return {boolean}\n   */\n  hasChanges() {\n    const content = this.composer.fields.content();\n\n    return content && content !== this.attrs.originalContent;\n  }\n\n  /**\n   * Build an item list for the composer's header.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  headerItems() {\n    return new ItemList();\n  }\n\n  /**\n   * Handle the submit event of the text editor.\n   *\n   * @abstract\n   */\n  onsubmit() {}\n\n  /**\n   * Stop loading.\n   */\n  loaded() {\n    this.loading = false;\n    m.redraw();\n  }\n}\n","import app from '../../forum/app';\nimport ComposerBody from './ComposerBody';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport icon from '../../common/helpers/icon';\nimport extractText from '../../common/utils/extractText';\n\nfunction minimizeComposerIfFullScreen(e) {\n  if (app.composer.isFullScreen()) {\n    app.composer.minimize();\n    e.stopPropagation();\n  }\n}\n\n/**\n * The `ReplyComposer` component displays the composer content for replying to a\n * discussion.\n *\n * ### Attrs\n *\n * - All of the attrs of ComposerBody\n * - `discussion`\n */\nexport default class ReplyComposer extends ComposerBody {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.placeholder = attrs.placeholder || extractText(app.translator.trans('core.forum.composer_reply.body_placeholder'));\n    attrs.submitLabel = attrs.submitLabel || app.translator.trans('core.forum.composer_reply.submit_button');\n    attrs.confirmExit = attrs.confirmExit || extractText(app.translator.trans('core.forum.composer_reply.discard_confirmation'));\n  }\n\n  headerItems() {\n    const items = super.headerItems();\n    const discussion = this.attrs.discussion;\n\n    items.add(\n      'title',\n      <h3>\n        {icon('fas fa-reply')}{' '}\n        <Link href={app.route.discussion(discussion)} onclick={minimizeComposerIfFullScreen}>\n          {discussion.title()}\n        </Link>\n      </h3>\n    );\n\n    return items;\n  }\n\n  /**\n   * Jump to the preview when triggered by the text editor.\n   */\n  jumpToPreview(e) {\n    minimizeComposerIfFullScreen(e);\n\n    m.route.set(app.route.discussion(this.attrs.discussion, 'reply'));\n  }\n\n  /**\n   * Get the data to submit to the server when the reply is saved.\n   *\n   * @return {Record<string, unknown>}\n   */\n  data() {\n    return {\n      content: this.composer.fields.content(),\n      relationships: { discussion: this.attrs.discussion },\n    };\n  }\n\n  onsubmit() {\n    const discussion = this.attrs.discussion;\n\n    this.loading = true;\n    m.redraw();\n\n    const data = this.data();\n\n    app.store\n      .createRecord('posts')\n      .save(data)\n      .then((post) => {\n        // If we're currently viewing the discussion which this reply was made\n        // in, then we can update the post stream and scroll to the post.\n        if (app.viewingDiscussion(discussion)) {\n          const stream = app.current.get('stream');\n          stream.update().then(() => stream.goToNumber(post.number()));\n        } else {\n          // Otherwise, we'll create an alert message to inform the user that\n          // their reply has been posted, containing a button which will\n          // transition to their new post when clicked.\n          let alert;\n          const viewButton = (\n            <Button\n              className=\"Button Button--link\"\n              onclick={() => {\n                m.route.set(app.route.post(post));\n                app.alerts.dismiss(alert);\n              }}\n            >\n              {app.translator.trans('core.forum.composer_reply.view_button')}\n            </Button>\n          );\n          alert = app.alerts.show(\n            {\n              type: 'success',\n              controls: [viewButton],\n            },\n            app.translator.trans('core.forum.composer_reply.posted_message')\n          );\n        }\n\n        this.composer.hide();\n      }, this.loaded.bind(this));\n  }\n}\n","import Component, { ComponentAttrs } from '../Component';\nimport Button from './Button';\nimport listItems from '../helpers/listItems';\nimport extract from '../utils/extract';\nimport type Mithril from 'mithril';\nimport classList from '../utils/classList';\nimport app from '../app';\nimport iconHelper from '../helpers/icon';\n\nexport interface AlertAttrs extends ComponentAttrs {\n  /** The type of alert this is. Will be used to give the alert a class name of `Alert--{type}`. */\n  type?: string;\n  /** Title of the alert. Optional. */\n  title?: Mithril.Children;\n  /** Icon used next to the title. Optional. */\n  icon?: string;\n  /** An array of controls to show in the alert. */\n  controls?: Mithril.Children;\n  /** Whether or not the alert can be dismissed. */\n  dismissible?: boolean;\n  /** A callback to run when the alert is dismissed */\n  ondismiss?: Function;\n}\n\n/**\n * The `Alert` component represents an alert box, which contains a message,\n * some controls, and may be dismissible.\n */\nexport default class Alert<T extends AlertAttrs = AlertAttrs> extends Component<T> {\n  view(vnode: Mithril.VnodeDOM<T, this>) {\n    const attrs = Object.assign({}, this.attrs);\n\n    const type = extract(attrs, 'type');\n    attrs.className = classList('Alert', `Alert--${type}`, attrs.className);\n\n    const title = extract(attrs, 'title');\n    const icon = extract(attrs, 'icon');\n    const content = extract(attrs, 'content') || vnode.children;\n    const controls = (extract(attrs, 'controls') || []) as Mithril.Vnode[];\n\n    // If the alert is meant to be dismissible (which is the case by default),\n    // then we will create a dismiss button to append as the final control in\n    // the alert.\n    const dismissible = extract(attrs, 'dismissible');\n    const ondismiss = extract(attrs, 'ondismiss');\n    const dismissControl: Mithril.Vnode[] = [];\n\n    if (dismissible || dismissible === undefined) {\n      dismissControl.push(\n        <Button\n          aria-label={app.translator.trans('core.lib.alert.dismiss_a11y_label')}\n          icon=\"fas fa-times\"\n          className=\"Button Button--link Button--icon Alert-dismiss\"\n          onclick={ondismiss}\n        />\n      );\n    }\n\n    return (\n      <div {...attrs}>\n        {!!title && (\n          <div className=\"Alert-title\">\n            {!!icon && <span className=\"Alert-title-icon\">{iconHelper(icon)}</span>}\n            <span className=\"Alert-title-text\">{title}</span>\n          </div>\n        )}\n        <span className=\"Alert-body\">{content}</span>\n        <ul className=\"Alert-controls\">{listItems(controls.concat(dismissControl))}</ul>\n      </div>\n    );\n  }\n}\n","import app from '../../common/app';\nimport Component from '../Component';\nimport Alert, { AlertAttrs } from './Alert';\nimport Button from './Button';\n\nimport type Mithril from 'mithril';\nimport type ModalManagerState from '../states/ModalManagerState';\nimport type RequestError from '../utils/RequestError';\nimport type ModalManager from './ModalManager';\nimport fireDebugWarning from '../helpers/fireDebugWarning';\nimport classList from '../utils/classList';\n\nexport interface IInternalModalAttrs {\n  state: ModalManagerState;\n  animateShow: ModalManager['animateShow'];\n  animateHide: ModalManager['animateHide'];\n}\n\nexport interface IDismissibleOptions {\n  /**\n   * @deprecated Check specific individual attributes instead. Will be removed in Flarum 2.0.\n   */\n  isDismissible: boolean;\n  viaCloseButton: boolean;\n  viaEscKey: boolean;\n  viaBackdropClick: boolean;\n}\n\n/**\n * The `Modal` component displays a modal dialog, wrapped in a form. Subclasses\n * should implement the `className`, `title`, and `content` methods.\n */\nexport default abstract class Modal<ModalAttrs extends IInternalModalAttrs = IInternalModalAttrs, CustomState = undefined> extends Component<\n  ModalAttrs,\n  CustomState\n> {\n  // TODO: [Flarum 2.0] remove `isDismissible` static attribute\n  /**\n   * Determine whether or not the modal should be dismissible via an 'x' button.\n   *\n   * @deprecated Use the individual `isDismissibleVia...` attributes instead and remove references to this.\n   */\n  static readonly isDismissible: boolean = true;\n\n  /**\n   * Can the model be dismissed with a close button (X)?\n   *\n   * If `false`, no close button is shown.\n   */\n  protected static readonly isDismissibleViaCloseButton: boolean = true;\n  /**\n   * Can the modal be dismissed by pressing the Esc key on a keyboard?\n   */\n  protected static readonly isDismissibleViaEscKey: boolean = true;\n  /**\n   * Can the modal be dismissed via a click on the backdrop.\n   */\n  protected static readonly isDismissibleViaBackdropClick: boolean = true;\n\n  static get dismissibleOptions(): IDismissibleOptions {\n    // If someone sets this to `false`, provide the same behaviour as previous versions of Flarum.\n    if (!this.isDismissible) {\n      return {\n        isDismissible: false,\n        viaCloseButton: false,\n        viaEscKey: false,\n        viaBackdropClick: false,\n      };\n    }\n\n    return {\n      isDismissible: true,\n      viaCloseButton: this.isDismissibleViaCloseButton,\n      viaEscKey: this.isDismissibleViaEscKey,\n      viaBackdropClick: this.isDismissibleViaBackdropClick,\n    };\n  }\n\n  protected loading: boolean = false;\n\n  /**\n   * Attributes for an alert component to show below the header.\n   */\n  alertAttrs: AlertAttrs | null = null;\n\n  oninit(vnode: Mithril.Vnode<ModalAttrs, this>) {\n    super.oninit(vnode);\n\n    // TODO: [Flarum 2.0] Remove the code below.\n    // This code prevents extensions which do not implement all abstract methods of this class from breaking\n    // the forum frontend. Without it, function calls would would error rather than returning `undefined.`\n\n    const missingMethods: string[] = [];\n\n    ['className', 'title', 'content', 'onsubmit'].forEach((method) => {\n      if (!(this as any)[method]) {\n        (this as any)[method] = function (): void {};\n        missingMethods.push(method);\n      }\n    });\n\n    if (missingMethods.length > 0) {\n      fireDebugWarning(\n        `Modal \\`${this.constructor.name}\\` does not implement all abstract methods of the Modal super class. Missing methods: ${missingMethods.join(\n          ', '\n        )}.`\n      );\n    }\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<ModalAttrs, this>) {\n    super.oncreate(vnode);\n\n    this.attrs.animateShow(() => this.onready());\n  }\n\n  onbeforeremove(vnode: Mithril.VnodeDOM<ModalAttrs, this>): Promise<void> | void {\n    super.onbeforeremove(vnode);\n\n    // If the global modal state currently contains a modal,\n    // we've just opened up a new one, and accordingly,\n    // we don't need to show a hide animation.\n    if (!this.attrs.state.modal) {\n      // Here, we ensure that the animation has time to complete.\n      // See https://mithril.js.org/lifecycle-methods.html#onbeforeremove\n      // Bootstrap's Modal.TRANSITION_DURATION is 300 ms.\n      return new Promise((resolve) => setTimeout(resolve, 300));\n    }\n  }\n\n  /**\n   * @todo split into FormModal and Modal in 2.0\n   */\n  view() {\n    if (this.alertAttrs) {\n      this.alertAttrs.dismissible = false;\n    }\n\n    return (\n      <div className={classList('Modal modal-dialog fade', this.className())}>\n        <div className=\"Modal-content\">\n          {this.dismissibleOptions.viaCloseButton && (\n            <div className=\"Modal-close App-backControl\">\n              <Button\n                icon=\"fas fa-times\"\n                onclick={() => this.hide()}\n                className=\"Button Button--icon Button--link\"\n                aria-label={app.translator.trans('core.lib.modal.close')}\n              />\n            </div>\n          )}\n\n          <form onsubmit={this.onsubmit.bind(this)}>\n            <div className=\"Modal-header\">\n              <h3 className=\"App-titleControl App-titleControl--text\">{this.title()}</h3>\n            </div>\n\n            {!!this.alertAttrs && (\n              <div className=\"Modal-alert\">\n                <Alert {...this.alertAttrs} />\n              </div>\n            )}\n\n            {this.content()}\n          </form>\n        </div>\n      </div>\n    );\n  }\n\n  /**\n   * Get the class name to apply to the modal.\n   */\n  abstract className(): string;\n\n  /**\n   * Get the title of the modal dialog.\n   */\n  abstract title(): Mithril.Children;\n\n  /**\n   * Get the content of the modal.\n   */\n  abstract content(): Mithril.Children;\n\n  /**\n   * Handle the modal form's submit event.\n   */\n  onsubmit(e: SubmitEvent): void {\n    // ...\n  }\n\n  /**\n   * Callback executed when the modal is shown and ready to be interacted with.\n   *\n   * @remark Focuses the first input in the modal.\n   */\n  onready(): void {\n    this.$().find('input, select, textarea').first().trigger('focus').trigger('select');\n  }\n\n  /**\n   * Hides the modal.\n   */\n  hide(): void {\n    this.attrs.animateHide();\n  }\n\n  /**\n   * Sets `loading` to false and triggers a redraw.\n   */\n  loaded(): void {\n    this.loading = false;\n    m.redraw();\n  }\n\n  /**\n   * Shows an alert describing an error returned from the API, and gives focus to\n   * the first relevant field involved in the error.\n   */\n  onerror(error: RequestError): void {\n    this.alertAttrs = error.alert;\n\n    m.redraw();\n\n    if (error.status === 422 && error.response?.errors) {\n      this.$('form [name=' + (error.response.errors as any[])[0].source.pointer.replace('/data/attributes/', '') + ']').trigger('select');\n    } else {\n      this.onready();\n    }\n  }\n\n  private get dismissibleOptions(): IDismissibleOptions {\n    return (this.constructor as typeof Modal).dismissibleOptions;\n  }\n}\n","import Stream from 'mithril/stream';\n\nexport default Stream;\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport extractText from '../../common/utils/extractText';\nimport Stream from '../../common/utils/Stream';\nimport Mithril from 'mithril';\nimport RequestError from '../../common/utils/RequestError';\nimport ItemList from '../../common/utils/ItemList';\n\nexport interface IForgotPasswordModalAttrs extends IInternalModalAttrs {\n  email?: string;\n}\n\n/**\n * The `ForgotPasswordModal` component displays a modal which allows the user to\n * enter their email address and request a link to reset their password.\n */\nexport default class ForgotPasswordModal<CustomAttrs extends IForgotPasswordModalAttrs = IForgotPasswordModalAttrs> extends Modal<CustomAttrs> {\n  /**\n   * The value of the email input.\n   */\n  email!: Stream<string>;\n\n  success: boolean = false;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.email = Stream(this.attrs.email || '');\n  }\n\n  className() {\n    return 'ForgotPasswordModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.forgot_password.title');\n  }\n\n  content() {\n    if (this.success) {\n      return (\n        <div className=\"Modal-body\">\n          <div className=\"Form Form--centered\">\n            <p className=\"helpText\">{app.translator.trans('core.forum.forgot_password.email_sent_message')}</p>\n            <div className=\"Form-group\">\n              <Button className=\"Button Button--primary Button--block\" onclick={this.hide.bind(this)}>\n                {app.translator.trans('core.forum.forgot_password.dismiss_button')}\n              </Button>\n            </div>\n          </div>\n        </div>\n      );\n    }\n\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">\n          <p className=\"helpText\">{app.translator.trans('core.forum.forgot_password.text')}</p>\n          {this.fields().toArray()}\n        </div>\n      </div>\n    );\n  }\n\n  fields() {\n    const items = new ItemList();\n\n    const emailLabel = extractText(app.translator.trans('core.forum.forgot_password.email_placeholder'));\n\n    items.add(\n      'email',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"email\"\n          type=\"email\"\n          placeholder={emailLabel}\n          aria-label={emailLabel}\n          bidi={this.email}\n          disabled={this.loading}\n        />\n      </div>,\n      50\n    );\n\n    items.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.forum.forgot_password.submit_button')}\n        </Button>\n      </div>,\n      -10\n    );\n\n    return items;\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    app\n      .request({\n        method: 'POST',\n        url: app.forum.attribute('apiUrl') + '/forgot',\n        body: this.requestParams(),\n        errorHandler: this.onerror.bind(this),\n      })\n      .then(() => {\n        this.success = true;\n        this.alertAttrs = null;\n      })\n      .catch(() => {})\n      .then(this.loaded.bind(this));\n  }\n\n  requestParams(): Record<string, unknown> {\n    const data = {\n      email: this.email(),\n    };\n\n    return data;\n  }\n\n  onerror(error: RequestError) {\n    if (error.status === 404 && error.alert) {\n      error.alert.content = app.translator.trans('core.forum.forgot_password.not_found_message');\n    }\n\n    super.onerror(error);\n  }\n}\n","import Component from '../../common/Component';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `LogInButtons` component displays a collection of social login buttons.\n */\nexport default class LogInButtons extends Component {\n  view() {\n    return <div className=\"LogInButtons\">{this.items().toArray()}</div>;\n  }\n\n  /**\n   * Build a list of LogInButton components.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  items() {\n    return new ItemList();\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport LogInModal from './LogInModal';\nimport Button from '../../common/components/Button';\nimport LogInButtons from './LogInButtons';\nimport extractText from '../../common/utils/extractText';\nimport ItemList from '../../common/utils/ItemList';\nimport Stream from '../../common/utils/Stream';\nimport type Mithril from 'mithril';\n\nexport interface ISignupModalAttrs extends IInternalModalAttrs {\n  username?: string;\n  email?: string;\n  password?: string;\n  token?: string;\n  provided?: string[];\n}\n\nexport type SignupBody = {\n  username: string;\n  email: string;\n} & ({ token: string } | { password: string });\n\nexport default class SignUpModal<CustomAttrs extends ISignupModalAttrs = ISignupModalAttrs> extends Modal<CustomAttrs> {\n  /**\n   * The value of the username input.\n   */\n  username!: Stream<string>;\n\n  /**\n   * The value of the email input.\n   */\n  email!: Stream<string>;\n\n  /**\n   * The value of the password input.\n   */\n  password!: Stream<string>;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.username = Stream(this.attrs.username || '');\n    this.email = Stream(this.attrs.email || '');\n    this.password = Stream(this.attrs.password || '');\n  }\n\n  className() {\n    return 'Modal--small SignUpModal';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.sign_up.title');\n  }\n\n  content() {\n    return [<div className=\"Modal-body\">{this.body()}</div>, <div className=\"Modal-footer\">{this.footer()}</div>];\n  }\n\n  isProvided(field: string): boolean {\n    return this.attrs.provided?.includes(field) ?? false;\n  }\n\n  body() {\n    return [!this.attrs.token && <LogInButtons />, <div className=\"Form Form--centered\">{this.fields().toArray()}</div>];\n  }\n\n  fields() {\n    const items = new ItemList();\n\n    const usernameLabel = extractText(app.translator.trans('core.forum.sign_up.username_placeholder'));\n    const emailLabel = extractText(app.translator.trans('core.forum.sign_up.email_placeholder'));\n    const passwordLabel = extractText(app.translator.trans('core.forum.sign_up.password_placeholder'));\n\n    items.add(\n      'username',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"username\"\n          type=\"text\"\n          placeholder={usernameLabel}\n          aria-label={usernameLabel}\n          bidi={this.username}\n          disabled={this.loading || this.isProvided('username')}\n        />\n      </div>,\n      30\n    );\n\n    items.add(\n      'email',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"email\"\n          type=\"email\"\n          placeholder={emailLabel}\n          aria-label={emailLabel}\n          bidi={this.email}\n          disabled={this.loading || this.isProvided('email')}\n        />\n      </div>,\n      20\n    );\n\n    if (!this.attrs.token) {\n      items.add(\n        'password',\n        <div className=\"Form-group\">\n          <input\n            className=\"FormControl\"\n            name=\"password\"\n            type=\"password\"\n            autocomplete=\"new-password\"\n            placeholder={passwordLabel}\n            aria-label={passwordLabel}\n            bidi={this.password}\n            disabled={this.loading}\n          />\n        </div>,\n        10\n      );\n    }\n\n    items.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.forum.sign_up.submit_button')}\n        </Button>\n      </div>,\n      -10\n    );\n\n    return items;\n  }\n\n  footer() {\n    return [\n      <p className=\"SignUpModal-logIn\">{app.translator.trans('core.forum.sign_up.log_in_text', { a: <a onclick={this.logIn.bind(this)} /> })}</p>,\n    ];\n  }\n\n  /**\n   * Open the log in modal, prefilling it with an email/username/password if\n   * the user has entered one.\n   */\n  logIn() {\n    const attrs = {\n      identification: this.email() || this.username(),\n    };\n\n    app.modal.show(LogInModal, attrs);\n  }\n\n  onready() {\n    if (this.attrs.username && !this.attrs.email) {\n      this.$('[name=email]').select();\n    } else {\n      this.$('[name=username]').select();\n    }\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    const body = this.submitData();\n\n    app\n      .request({\n        url: app.forum.attribute('baseUrl') + '/register',\n        method: 'POST',\n        body,\n        errorHandler: this.onerror.bind(this),\n      })\n      .then(() => window.location.reload(), this.loaded.bind(this));\n  }\n\n  /**\n   * Get the data that should be submitted in the sign-up request.\n   */\n  submitData(): SignupBody {\n    const authData = this.attrs.token ? { token: this.attrs.token } : { password: this.password() };\n\n    const data = {\n      username: this.username(),\n      email: this.email(),\n      ...authData,\n    };\n\n    return data;\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport ForgotPasswordModal from './ForgotPasswordModal';\nimport SignUpModal from './SignUpModal';\nimport Button from '../../common/components/Button';\nimport LogInButtons from './LogInButtons';\nimport extractText from '../../common/utils/extractText';\nimport ItemList from '../../common/utils/ItemList';\nimport Stream from '../../common/utils/Stream';\nimport type Mithril from 'mithril';\nimport RequestError from '../../common/utils/RequestError';\nimport type { LoginParams } from '../../common/Session';\n\nexport interface ILoginModalAttrs extends IInternalModalAttrs {\n  identification?: string;\n  password?: string;\n  remember?: boolean;\n}\n\nexport default class LogInModal<CustomAttrs extends ILoginModalAttrs = ILoginModalAttrs> extends Modal<CustomAttrs> {\n  /**\n   * The value of the identification input.\n   */\n  identification!: Stream<string>;\n  /**\n   * The value of the password input.\n   */\n  password!: Stream<string>;\n  /**\n   * The value of the remember me input.\n   */\n  remember!: Stream<boolean>;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.identification = Stream(this.attrs.identification || '');\n    this.password = Stream(this.attrs.password || '');\n    this.remember = Stream(!!this.attrs.remember);\n  }\n\n  className() {\n    return 'LogInModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.log_in.title');\n  }\n\n  content() {\n    return [<div className=\"Modal-body\">{this.body()}</div>, <div className=\"Modal-footer\">{this.footer()}</div>];\n  }\n\n  body() {\n    return [<LogInButtons />, <div className=\"Form Form--centered\">{this.fields().toArray()}</div>];\n  }\n\n  fields() {\n    const items = new ItemList();\n\n    const identificationLabel = extractText(app.translator.trans('core.forum.log_in.username_or_email_placeholder'));\n    const passwordLabel = extractText(app.translator.trans('core.forum.log_in.password_placeholder'));\n\n    items.add(\n      'identification',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"identification\"\n          type=\"text\"\n          placeholder={identificationLabel}\n          aria-label={identificationLabel}\n          bidi={this.identification}\n          disabled={this.loading}\n        />\n      </div>,\n      30\n    );\n\n    items.add(\n      'password',\n      <div className=\"Form-group\">\n        <input\n          className=\"FormControl\"\n          name=\"password\"\n          type=\"password\"\n          autocomplete=\"current-password\"\n          placeholder={passwordLabel}\n          aria-label={passwordLabel}\n          bidi={this.password}\n          disabled={this.loading}\n        />\n      </div>,\n      20\n    );\n\n    items.add(\n      'remember',\n      <div className=\"Form-group\">\n        <div>\n          <label className=\"checkbox\">\n            <input type=\"checkbox\" bidi={this.remember} disabled={this.loading} />\n            {app.translator.trans('core.forum.log_in.remember_me_label')}\n          </label>\n        </div>\n      </div>,\n      10\n    );\n\n    items.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.forum.log_in.submit_button')}\n        </Button>\n      </div>,\n      -10\n    );\n\n    return items;\n  }\n\n  footer() {\n    return (\n      <>\n        <p className=\"LogInModal-forgotPassword\">\n          <a onclick={this.forgotPassword.bind(this)}>{app.translator.trans('core.forum.log_in.forgot_password_link')}</a>\n        </p>\n        {app.forum.attribute<boolean>('allowSignUp') && (\n          <p className=\"LogInModal-signUp\">{app.translator.trans('core.forum.log_in.sign_up_text', { a: <a onclick={this.signUp.bind(this)} /> })}</p>\n        )}\n      </>\n    );\n  }\n\n  /**\n   * Open the forgot password modal, prefilling it with an email if the user has\n   * entered one.\n   */\n  forgotPassword() {\n    const email = this.identification();\n    const attrs = email.includes('@') ? { email } : undefined;\n\n    app.modal.show(ForgotPasswordModal, attrs);\n  }\n\n  /**\n   * Open the sign up modal, prefilling it with an email/username/password if\n   * the user has entered one.\n   */\n  signUp() {\n    const identification = this.identification();\n\n    const attrs = {\n      [identification.includes('@') ? 'email' : 'username']: identification,\n    };\n\n    app.modal.show(SignUpModal, attrs);\n  }\n\n  onready() {\n    this.$('[name=' + (this.identification() ? 'password' : 'identification') + ']').trigger('select');\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    app.session.login(this.loginParams(), { errorHandler: this.onerror.bind(this) }).then(() => window.location.reload(), this.loaded.bind(this));\n  }\n\n  loginParams(): LoginParams {\n    const data = {\n      identification: this.identification(),\n      password: this.password(),\n      remember: this.remember(),\n    };\n\n    return data;\n  }\n\n  onerror(error: RequestError) {\n    if (error.status === 401 && error.alert) {\n      error.alert.content = app.translator.trans('core.forum.log_in.invalid_login_message');\n      this.password('');\n    }\n\n    super.onerror(error);\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport Stream from '../../common/utils/Stream';\nimport Mithril from 'mithril';\nimport Discussion from '../../common/models/Discussion';\n\nexport interface IRenameDiscussionModalAttrs extends IInternalModalAttrs {\n  discussion: Discussion;\n  currentTitle: string;\n}\n\n/**\n * The 'RenameDiscussionModal' displays a modal dialog with an input to rename a discussion\n */\nexport default class RenameDiscussionModal<CustomAttrs extends IRenameDiscussionModalAttrs = IRenameDiscussionModalAttrs> extends Modal<CustomAttrs> {\n  discussion!: Discussion;\n  currentTitle!: string;\n  newTitle!: Stream<string>;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.discussion = this.attrs.discussion;\n    this.currentTitle = this.attrs.currentTitle;\n    this.newTitle = Stream(this.currentTitle);\n  }\n\n  className() {\n    return 'RenameDiscussionModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.rename_discussion.title');\n  }\n\n  content() {\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">\n          <div className=\"Form-group\">\n            <input className=\"FormControl\" bidi={this.newTitle} type=\"text\" />\n          </div>\n          <div className=\"Form-group\">\n            <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n              {app.translator.trans('core.forum.rename_discussion.submit_button')}\n            </Button>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  onsubmit(e: SubmitEvent): Promise<void> | void {\n    e.preventDefault();\n\n    this.loading = true;\n\n    const title = this.newTitle();\n    const currentTitle = this.currentTitle;\n\n    // If the title is different to what it was before, then save it. After the\n    // save has completed, update the post stream as there will be a new post\n    // indicating that the discussion was renamed.\n    if (title && title !== currentTitle) {\n      return this.discussion\n        .save({ title })\n        .then(() => {\n          if (app.viewingDiscussion(this.discussion)) {\n            app.current.get('stream').update();\n          }\n          m.redraw();\n          this.hide();\n        })\n        .catch(() => {\n          this.loading = false;\n          m.redraw();\n        });\n    } else {\n      this.hide();\n    }\n  }\n}\n","import app from '../../forum/app';\nimport DiscussionPage from '../components/DiscussionPage';\nimport ReplyComposer from '../components/ReplyComposer';\nimport LogInModal from '../components/LogInModal';\nimport Button from '../../common/components/Button';\nimport Separator from '../../common/components/Separator';\nimport RenameDiscussionModal from '../components/RenameDiscussionModal';\nimport ItemList from '../../common/utils/ItemList';\nimport extractText from '../../common/utils/extractText';\n\n/**\n * The `DiscussionControls` utility constructs a list of buttons for a\n * discussion which perform actions on it.\n */\nexport default {\n  /**\n   * Get a list of controls for a discussion.\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @param {import('../../common/Component').default<any, any>} context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controls(discussion, context) {\n    const items = new ItemList();\n\n    ['user', 'moderation', 'destructive'].forEach((section) => {\n      const controls = this[section + 'Controls'](discussion, context).toArray();\n      if (controls.length) {\n        controls.forEach((item) => items.add(item.itemName, item));\n        items.add(section + 'Separator', <Separator />);\n      }\n    });\n\n    return items;\n  },\n\n  /**\n   * Get controls for a discussion pertaining to the current user (e.g. reply,\n   * follow).\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  userControls(discussion, context) {\n    const items = new ItemList();\n\n    // Only add a reply control if this is the discussion's controls dropdown\n    // for the discussion page itself. We don't want it to show up for\n    // discussions in the discussion list, etc.\n    if (context instanceof DiscussionPage) {\n      items.add(\n        'reply',\n        !app.session.user || discussion.canReply() ? (\n          <Button\n            icon=\"fas fa-reply\"\n            onclick={() => {\n              // If the user is not logged in, the promise rejects, and a login modal shows up.\n              // Since that's already handled, we dont need to show an error message in the console.\n              return this.replyAction\n                .bind(discussion)(true, false)\n                .catch(() => {});\n            }}\n          >\n            {app.translator.trans(\n              app.session.user ? 'core.forum.discussion_controls.reply_button' : 'core.forum.discussion_controls.log_in_to_reply_button'\n            )}\n          </Button>\n        ) : (\n          <Button\n            icon=\"fas fa-reply\"\n            className=\"disabled\"\n            title={extractText(app.translator.trans('core.forum.discussion_controls.cannot_reply_text'))}\n          >\n            {app.translator.trans('core.forum.discussion_controls.cannot_reply_button')}\n          </Button>\n        )\n      );\n    }\n\n    return items;\n  },\n\n  /**\n   * Get controls for a discussion pertaining to moderation (e.g. rename, lock).\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  moderationControls(discussion) {\n    const items = new ItemList();\n\n    if (discussion.canRename()) {\n      items.add(\n        'rename',\n        <Button icon=\"fas fa-pencil-alt\" onclick={this.renameAction.bind(discussion)}>\n          {app.translator.trans('core.forum.discussion_controls.rename_button')}\n        </Button>\n      );\n    }\n\n    return items;\n  },\n\n  /**\n   * Get controls for a discussion which are destructive (e.g. delete).\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  destructiveControls(discussion) {\n    const items = new ItemList();\n\n    if (!discussion.isHidden()) {\n      if (discussion.canHide()) {\n        items.add(\n          'hide',\n          <Button icon=\"far fa-trash-alt\" onclick={this.hideAction.bind(discussion)}>\n            {app.translator.trans('core.forum.discussion_controls.delete_button')}\n          </Button>\n        );\n      }\n    } else {\n      if (discussion.canHide()) {\n        items.add(\n          'restore',\n          <Button icon=\"fas fa-reply\" onclick={this.restoreAction.bind(discussion)}>\n            {app.translator.trans('core.forum.discussion_controls.restore_button')}\n          </Button>\n        );\n      }\n\n      if (discussion.canDelete()) {\n        items.add(\n          'delete',\n          <Button icon=\"fas fa-times\" onclick={this.deleteAction.bind(discussion)}>\n            {app.translator.trans('core.forum.discussion_controls.delete_forever_button')}\n          </Button>\n        );\n      }\n    }\n\n    return items;\n  },\n\n  /**\n   * Open the reply composer for the discussion. A promise will be returned,\n   * which resolves when the composer opens successfully. If the user is not\n   * logged in, they will be prompted. If they don't have permission to\n   * reply, the promise will be rejected.\n   *\n   * @param {boolean} goToLast Whether or not to scroll down to the last post if the discussion is being viewed.\n   * @param {boolean} forceRefresh Whether or not to force a reload of the composer component, even if it is already open for this discussion.\n   *\n   * @return {Promise<void>}\n   */\n  replyAction(goToLast, forceRefresh) {\n    return new Promise((resolve, reject) => {\n      if (app.session.user) {\n        if (this.canReply()) {\n          if (!app.composer.composingReplyTo(this) || forceRefresh) {\n            app.composer.load(ReplyComposer, {\n              user: app.session.user,\n              discussion: this,\n            });\n          }\n          app.composer.show();\n\n          if (goToLast && app.viewingDiscussion(this) && !app.composer.isFullScreen()) {\n            app.current.get('stream').goToNumber('reply');\n          }\n\n          return resolve(app.composer);\n        } else {\n          return reject();\n        }\n      }\n\n      app.modal.show(LogInModal);\n\n      return reject();\n    });\n  },\n\n  /**\n   * Hide a discussion.\n   *\n   * @return {Promise<void>}\n   */\n  hideAction() {\n    this.pushData({ attributes: { hiddenAt: new Date() }, relationships: { hiddenUser: app.session.user } });\n\n    return this.save({ isHidden: true });\n  },\n\n  /**\n   * Restore a discussion.\n   *\n   * @return {Promise<void>}\n   */\n  restoreAction() {\n    this.pushData({ attributes: { hiddenAt: null }, relationships: { hiddenUser: null } });\n\n    return this.save({ isHidden: false });\n  },\n\n  /**\n   * Delete the discussion after confirming with the user.\n   *\n   * @return {Promise<void>}\n   */\n  deleteAction() {\n    if (confirm(extractText(app.translator.trans('core.forum.discussion_controls.delete_confirmation')))) {\n      // If we're currently viewing the discussion that was deleted, go back\n      // to the previous page.\n      if (app.viewingDiscussion(this)) {\n        app.history.back();\n      }\n\n      return this.delete().then(() => app.discussions.removeDiscussion(this));\n    }\n  },\n\n  /**\n   * Rename the discussion.\n   */\n  renameAction() {\n    return app.modal.show(RenameDiscussionModal, {\n      currentTitle: this.title(),\n      discussion: this,\n    });\n  },\n};\n","/**\n * The `slidable` utility adds touch gestures to an element so that it can be\n * slid away to reveal controls underneath, and then released to activate those\n * controls.\n *\n * It relies on the element having children with particular CSS classes.\n *\n * The function returns a record with a `reset` proeprty. This is a function\n * which reverts the slider to its original position. This should be called,\n * for example, when a controls dropdown is closed.\n *\n * @param {HTMLElement | SVGElement | Element} element\n * @return {{ reset : () => void }}\n */\nexport default function slidable(element) {\n  const $element = $(element);\n  const threshold = 50;\n\n  let $underneathLeft;\n  let $underneathRight;\n\n  let startX;\n  let startY;\n  let couldBeSliding = false;\n  let isSliding = false;\n  let pos = 0;\n\n  /**\n   * Animate the slider to a new position.\n   *\n   * @param {number} newPos\n   * @param {Partial<JQueryAnimationOptions>} [options]\n   */\n  const animatePos = (newPos, options = {}) => {\n    // Since we can't animate the transform property with jQuery, we'll use a\n    // bit of a workaround. We set up the animation with a step function that\n    // will set the transform property, but then we animate an unused property\n    // (background-position-x) with jQuery.\n    options.duration ||= 'fast';\n    options.step = function (x) {\n      $(this).css('transform', 'translate(' + x + 'px, 0)');\n    };\n\n    $element.find('.Slidable-content').animate({ 'background-position-x': newPos }, options);\n  };\n\n  /**\n   * Revert the slider to its original position.\n   */\n  const reset = () => {\n    animatePos(0, {\n      complete: function () {\n        $element.removeClass('sliding');\n        $underneathLeft.hide();\n        $underneathRight.hide();\n        isSliding = false;\n      },\n    });\n  };\n\n  $element\n    .find('.Slidable-content')\n    .on('touchstart', function (e) {\n      // Update the references to the elements underneath the slider, provided\n      // they're not disabled.\n      $underneathLeft = $element.find('.Slidable-underneath--left:not(.disabled)');\n      $underneathRight = $element.find('.Slidable-underneath--right:not(.disabled)');\n\n      startX = e.originalEvent.targetTouches[0].clientX;\n      startY = e.originalEvent.targetTouches[0].clientY;\n\n      couldBeSliding = true;\n      pos = 0;\n    })\n\n    .on('touchmove', function (e) {\n      const newX = e.originalEvent.targetTouches[0].clientX;\n      const newY = e.originalEvent.targetTouches[0].clientY;\n\n      // Once the user moves their touch in a direction that's more up/down than\n      // left/right, we'll assume they're scrolling the page. But if they do\n      // move in a horizontal direction at first, then we'll lock their touch\n      // into the slider.\n      if (couldBeSliding && Math.abs(newX - startX) > Math.abs(newY - startY)) {\n        isSliding = true;\n      }\n      couldBeSliding = false;\n\n      if (isSliding) {\n        pos = newX - startX;\n\n        // If there are controls underneath the either side, then we'll show/hide\n        // them depending on the slider's position. We also make the controls\n        // icon get a bit bigger the further they slide.\n        const toggle = ($underneath, side) => {\n          if ($underneath.length) {\n            const active = side === 'left' ? pos > 0 : pos < 0;\n\n            if (active && $underneath.hasClass('Slidable-underneath--elastic')) {\n              pos -= pos * 0.5;\n            }\n            $underneath.toggle(active);\n\n            const scale = Math.max(0, Math.min(1, (Math.abs(pos) - 25) / threshold));\n            $underneath.find('.icon').css('transform', 'scale(' + scale + ')');\n          } else {\n            pos = Math[side === 'left' ? 'min' : 'max'](0, pos);\n          }\n        };\n\n        toggle($underneathLeft, 'left');\n        toggle($underneathRight, 'right');\n\n        $(this).css('transform', 'translate(' + pos + 'px, 0)');\n        $(this).css('background-position-x', pos + 'px');\n\n        $element.toggleClass('sliding', !!pos);\n\n        e.preventDefault();\n      }\n    })\n\n    .on('touchend', function () {\n      // If the user releases the touch and the slider is past the threshold\n      // position on either side, then we will activate the control for that\n      // side. We will also animate the slider's position all the way to the\n      // other side, or back to its original position, depending on whether or\n      // not the side is 'elastic'.\n      const activate = ($underneath) => {\n        $underneath.click();\n\n        if ($underneath.hasClass('Slidable-underneath--elastic')) {\n          reset();\n        } else {\n          animatePos((pos > 0 ? 1 : -1) * $element.width());\n        }\n      };\n\n      if ($underneathRight.length && pos < -threshold) {\n        activate($underneathRight);\n      } else if ($underneathLeft.length && pos > threshold) {\n        activate($underneathLeft);\n      } else {\n        reset();\n      }\n\n      couldBeSliding = false;\n      isSliding = false;\n    });\n\n  return { reset };\n}\n","const specialChars = /[.*+?^${}()|[\\]\\\\]/g;\n\n/**\n * Escapes the `RegExp` special characters in `input`.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\n */\nexport default function escapeRegExp(input: string): string {\n  return input.replace(specialChars, '\\\\$&');\n}\n","import app from '../../forum/app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport Link from '../../common/components/Link';\nimport avatar from '../../common/helpers/avatar';\nimport listItems from '../../common/helpers/listItems';\nimport highlight from '../../common/helpers/highlight';\nimport icon from '../../common/helpers/icon';\nimport humanTime from '../../common/utils/humanTime';\nimport ItemList from '../../common/utils/ItemList';\nimport abbreviateNumber from '../../common/utils/abbreviateNumber';\nimport Dropdown from '../../common/components/Dropdown';\nimport TerminalPost from './TerminalPost';\nimport SubtreeRetainer from '../../common/utils/SubtreeRetainer';\nimport DiscussionControls from '../utils/DiscussionControls';\nimport slidable from '../utils/slidable';\nimport classList from '../../common/utils/classList';\nimport DiscussionPage from './DiscussionPage';\nimport escapeRegExp from '../../common/utils/escapeRegExp';\nimport Tooltip from '../../common/components/Tooltip';\nimport type Discussion from '../../common/models/Discussion';\nimport type Mithril from 'mithril';\nimport type { DiscussionListParams } from '../states/DiscussionListState';\n\nexport interface IDiscussionListItemAttrs extends ComponentAttrs {\n  discussion: Discussion;\n  params: DiscussionListParams;\n}\n\n/**\n * The `DiscussionListItem` component shows a single discussion in the\n * discussion list.\n */\nexport default class DiscussionListItem<CustomAttrs extends IDiscussionListItemAttrs = IDiscussionListItemAttrs> extends Component<CustomAttrs> {\n  /**\n   * Ensures that the discussion will not be redrawn\n   * unless new data comes in.\n   */\n  subtree!: SubtreeRetainer;\n\n  highlightRegExp?: RegExp;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.subtree = new SubtreeRetainer(\n      () => this.attrs.discussion.freshness,\n      () => {\n        const time = app.session.user && app.session.user.markedAllAsReadAt();\n        return time && time.getTime();\n      },\n      () => this.active()\n    );\n  }\n\n  elementAttrs() {\n    return {\n      className: classList('DiscussionListItem', {\n        active: this.active(),\n        'DiscussionListItem--hidden': this.attrs.discussion.isHidden(),\n        Slidable: 'ontouchstart' in window,\n      }),\n    };\n  }\n\n  view() {\n    const attrs = this.elementAttrs();\n\n    return <div {...attrs}>{this.viewItems().toArray()}</div>;\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    const discussion = this.attrs.discussion;\n    const controls = DiscussionControls.controls(discussion, this).toArray();\n\n    items.add('controls', this.controlsView(controls), 100);\n    items.add('slidableUnderneath', this.slidableUnderneathView(), 90);\n    items.add('content', this.contentView(), 80);\n\n    return items;\n  }\n\n  controlsView(controls: Mithril.ChildArray): Mithril.Children {\n    return (\n      <>\n        {!!controls.length && (\n          <Dropdown\n            icon=\"fas fa-ellipsis-v\"\n            className=\"DiscussionListItem-controls\"\n            buttonClassName=\"Button Button--icon Button--flat Slidable-underneath Slidable-underneath--right\"\n            accessibleToggleLabel={app.translator.trans('core.forum.discussion_controls.toggle_dropdown_accessible_label')}\n          >\n            {controls}\n          </Dropdown>\n        )}\n      </>\n    );\n  }\n\n  slidableUnderneathView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n    const isUnread = discussion.isUnread();\n\n    return (\n      <span\n        className={classList('Slidable-underneath Slidable-underneath--left Slidable-underneath--elastic', { disabled: !isUnread })}\n        onclick={this.markAsRead.bind(this)}\n      >\n        {icon('fas fa-check')}\n      </span>\n    );\n  }\n\n  contentView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n    const isUnread = discussion.isUnread();\n    const isRead = discussion.isRead();\n\n    return (\n      <div className={classList('DiscussionListItem-content', 'Slidable-content', { unread: isUnread, read: isRead })}>\n        {this.contentItems().toArray()}\n      </div>\n    );\n  }\n\n  contentItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('authorAvatar', this.authorAvatarView(), 100);\n    items.add('badges', this.badgesView(), 90);\n    items.add('main', this.mainView(), 80);\n    items.add('replyCount', this.replyCountItem(), 70);\n\n    return items;\n  }\n\n  authorAvatarView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n    const user = discussion.user();\n\n    return (\n      <Tooltip\n        text={app.translator.trans('core.forum.discussion_list.started_text', { user, ago: humanTime(discussion.createdAt()) })}\n        position=\"right\"\n      >\n        <Link className=\"DiscussionListItem-author\" href={user ? app.route.user(user) : '#'}>\n          {avatar(user || null, { title: '' })}\n        </Link>\n      </Tooltip>\n    );\n  }\n\n  badgesView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n\n    return <ul className=\"DiscussionListItem-badges badges\">{listItems(discussion.badges().toArray())}</ul>;\n  }\n\n  mainView(): Mithril.Children {\n    const discussion = this.attrs.discussion;\n    const jumpTo = this.getJumpTo();\n\n    return (\n      <Link href={app.route.discussion(discussion, jumpTo)} className=\"DiscussionListItem-main\">\n        {this.mainItems().toArray()}\n      </Link>\n    );\n  }\n\n  mainItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    const discussion = this.attrs.discussion;\n\n    items.add('title', <h2 className=\"DiscussionListItem-title\">{highlight(discussion.title(), this.highlightRegExp)}</h2>, 100);\n    items.add('info', <ul className=\"DiscussionListItem-info\">{listItems(this.infoItems().toArray())}</ul>, 90);\n\n    return items;\n  }\n\n  getJumpTo() {\n    const discussion = this.attrs.discussion;\n    let jumpTo = 0;\n\n    if (this.attrs.params.q) {\n      const post = discussion.mostRelevantPost();\n      if (post) {\n        jumpTo = post.number();\n      }\n\n      const phrase = escapeRegExp(this.attrs.params.q);\n      this.highlightRegExp = new RegExp(phrase + '|' + phrase.trim().replace(/\\s+/g, '|'), 'gi');\n    } else {\n      jumpTo = Math.min(discussion.lastPostNumber() ?? 0, (discussion.lastReadPostNumber() || 0) + 1);\n    }\n\n    return jumpTo;\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    // If we're on a touch device, set up the discussion row to be slidable.\n    // This allows the user to drag the row to either side of the screen to\n    // reveal controls.\n    if ('ontouchstart' in window) {\n      const slidableInstance = slidable(this.element);\n\n      this.$('.DiscussionListItem-controls').on('hidden.bs.dropdown', () => slidableInstance.reset());\n    }\n  }\n\n  onbeforeupdate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onbeforeupdate(vnode);\n\n    return this.subtree.needsRebuild();\n  }\n\n  /**\n   * Determine whether or not the discussion is currently being viewed.\n   */\n  active() {\n    return app.current.matches(DiscussionPage, { discussion: this.attrs.discussion });\n  }\n\n  /**\n   * Determine whether or not information about who started the discussion\n   * should be displayed instead of information about the most recent reply to\n   * the discussion.\n   */\n  showFirstPost() {\n    return ['newest', 'oldest'].includes(this.attrs.params.sort ?? '');\n  }\n\n  /**\n   * Determine whether or not the number of replies should be shown instead of\n   * the number of unread posts.\n   *\n   * @return {boolean}\n   */\n  showRepliesCount() {\n    return this.attrs.params.sort === 'replies';\n  }\n\n  /**\n   * Mark the discussion as read.\n   */\n  markAsRead() {\n    const discussion = this.attrs.discussion;\n\n    if (discussion.isUnread()) {\n      discussion.save({ lastReadPostNumber: discussion.lastPostNumber() });\n      m.redraw();\n    }\n  }\n\n  /**\n   * Build an item list of info for a discussion listing. By default this is\n   * just the first/last post indicator.\n   */\n  infoItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.attrs.params.q) {\n      const post = this.attrs.discussion.mostRelevantPost() || this.attrs.discussion.firstPost();\n\n      if (post && post.contentType() === 'comment') {\n        const excerpt = highlight(post.contentPlain() ?? '', this.highlightRegExp, 175);\n        items.add('excerpt', excerpt, -100);\n      }\n    } else {\n      items.add('terminalPost', <TerminalPost discussion={this.attrs.discussion} lastPost={!this.showFirstPost()} />);\n    }\n\n    return items;\n  }\n\n  replyCountItem() {\n    const discussion = this.attrs.discussion;\n    const showUnread = !this.showRepliesCount() && discussion.isUnread();\n\n    if (showUnread) {\n      return (\n        <button className=\"Button--ua-reset DiscussionListItem-count\" onclick={this.markAsRead.bind(this)}>\n          <span aria-hidden=\"true\">{abbreviateNumber(discussion.unreadCount())}</span>\n\n          <span className=\"visually-hidden\">\n            {app.translator.trans('core.forum.discussion_list.unread_replies_a11y_label', { count: discussion.replyCount() })}\n          </span>\n        </button>\n      );\n    }\n\n    return (\n      <span className=\"DiscussionListItem-count\">\n        <span aria-hidden=\"true\">{abbreviateNumber(discussion.replyCount())}</span>\n\n        <span className=\"visually-hidden\">\n          {app.translator.trans('core.forum.discussion_list.total_replies_a11y_label', { count: discussion.replyCount() })}\n        </span>\n      </span>\n    );\n  }\n}\n","import Component from '../Component';\n\n/**\n * The `Placeholder` component displays a muted text with some call to action,\n * usually used as an empty state.\n *\n * ### Attrs\n *\n * - `text`\n */\nexport default class Placeholder extends Component {\n  view() {\n    return (\n      <div className=\"Placeholder\">\n        <p>{this.attrs.text}</p>\n      </div>\n    );\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport DiscussionListItem from './DiscussionListItem';\nimport Button from '../../common/components/Button';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport Placeholder from '../../common/components/Placeholder';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `DiscussionList` component displays a list of discussions.\n *\n * ### Attrs\n *\n * - `state` A DiscussionListState object that represents the discussion lists's state.\n */\nexport default class DiscussionList extends Component {\n  view() {\n    /**\n     * @type {import('../states/DiscussionListState').default}\n     */\n    const state = this.attrs.state;\n\n    const params = state.getParams();\n    const isLoading = state.isInitialLoading() || state.isLoadingNext();\n\n    let loading;\n\n    if (isLoading) {\n      loading = <LoadingIndicator />;\n    } else if (state.hasNext()) {\n      loading = (\n        <Button className=\"Button\" onclick={state.loadNext.bind(state)}>\n          {app.translator.trans('core.forum.discussion_list.load_more_button')}\n        </Button>\n      );\n    }\n\n    if (state.isEmpty()) {\n      const text = app.translator.trans('core.forum.discussion_list.empty_text');\n      return (\n        <div className=\"DiscussionList\">\n          <Placeholder text={text} />\n        </div>\n      );\n    }\n\n    const pageSize = state.pageSize;\n\n    return (\n      <div className={classList('DiscussionList', { 'DiscussionList--searchResults': state.isSearchResults() })}>\n        <ul role=\"feed\" aria-busy={isLoading} className=\"DiscussionList-discussions\">\n          {state.getPages().map((pg, pageNum) => {\n            return pg.items.map((discussion, itemNum) => (\n              <li key={discussion.id()} data-id={discussion.id()} role=\"article\" aria-setsize=\"-1\" aria-posinset={pageNum * pageSize + itemNum}>\n                <DiscussionListItem discussion={discussion} params={params} />\n              </li>\n            ));\n          })}\n        </ul>\n        <div className=\"DiscussionList-loadMore\">{loading}</div>\n      </div>\n    );\n  }\n}\n","import app from '../../forum/app';\nimport DiscussionList from './DiscussionList';\nimport Component from '../../common/Component';\nimport DiscussionPage from './DiscussionPage';\n\nconst hotEdge = (e) => {\n  if (e.pageX < 10) app.pane.show();\n};\n\n/**\n * The `DiscussionListPane` component displays the list of previously viewed\n * discussions in a panel that can be displayed by moving the mouse to the left\n * edge of the screen, where it can also be pinned in place.\n *\n * ### Attrs\n *\n * - `state` A DiscussionListState object that represents the discussion lists's state.\n */\nexport default class DiscussionListPane extends Component {\n  view() {\n    if (!this.attrs.state.hasItems()) {\n      return;\n    }\n\n    return <aside className=\"DiscussionPage-list\">{this.enoughSpace() && <DiscussionList state={this.attrs.state} />}</aside>;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    const $list = $(vnode.dom);\n\n    // When the mouse enters and leaves the discussions pane, we want to show\n    // and hide the pane respectively. We also create a 10px 'hot edge' on the\n    // left of the screen to activate the pane.\n    const pane = app.pane;\n    $list.hover(pane.show.bind(pane), pane.onmouseleave.bind(pane));\n\n    $(document).on('mousemove', hotEdge);\n\n    // When coming from another discussion, scroll to the previous postition\n    // to prevent the discussion list jumping around.\n    if (app.previous.matches(DiscussionPage)) {\n      const top = app.cache.discussionListPaneScrollTop || 0;\n      $list.scrollTop(top);\n    } else {\n      // If the discussion we are viewing is listed in the discussion list, then\n      // we will make sure it is visible in the viewport – if it is not we will\n      // scroll the list down to it.\n      const $discussion = $list.find('.DiscussionListItem.active');\n      if ($discussion.length) {\n        const listTop = $list.offset().top;\n        const listBottom = listTop + $list.outerHeight();\n        const discussionTop = $discussion.offset().top;\n        const discussionBottom = discussionTop + $discussion.outerHeight();\n\n        if (discussionTop < listTop || discussionBottom > listBottom) {\n          $list.scrollTop($list.scrollTop() - listTop + discussionTop);\n        }\n      }\n    }\n  }\n\n  onremove(vnode) {\n    app.cache.discussionListPaneScrollTop = $(vnode.dom).scrollTop();\n    $(document).off('mousemove', hotEdge);\n  }\n\n  /**\n   * Are we on a device that's larger than we consider \"mobile\"?\n   *\n   * @returns {boolean}\n   */\n  enoughSpace() {\n    return !$('.App-navigation').is(':visible');\n  }\n}\n","/**\n * The `ScrollListener` class sets up a listener that handles window scroll\n * events.\n */\nexport default class ScrollListener {\n  /**\n   * @param {(top: number) => void} callback The callback to run when the scroll position\n   *     changes.\n   */\n  constructor(callback) {\n    this.callback = callback;\n    this.ticking = false;\n  }\n\n  /**\n   * On each animation frame, as long as the listener is active, run the\n   * `update` method.\n   *\n   * @protected\n   */\n  loop() {\n    // THROTTLE: If the callback is still running (or hasn't yet run), we ignore\n    // further scroll events.\n    if (this.ticking) return;\n\n    // Schedule the callback to be executed soon (TM), and stop throttling once\n    // the callback is done.\n    requestAnimationFrame(() => {\n      this.update();\n      this.ticking = false;\n    });\n\n    this.ticking = true;\n  }\n\n  /**\n   * Run the callback, whether there was a scroll event or not.\n   */\n  update() {\n    this.callback(window.pageYOffset);\n  }\n\n  /**\n   * Start listening to and handling the window's scroll position.\n   */\n  start() {\n    if (!this.active) {\n      window.addEventListener('scroll', (this.active = this.loop.bind(this)), { passive: true });\n    }\n  }\n\n  /**\n   * Stop listening to and handling the window's scroll position.\n   */\n  stop() {\n    window.removeEventListener('scroll', this.active);\n\n    this.active = null;\n  }\n}\n","import Component from '../../common/Component';\nimport avatar from '../../common/helpers/avatar';\n\n/**\n * The `LoadingPost` component shows a placeholder that looks like a post,\n * indicating that the post is loading.\n */\nexport default class LoadingPost extends Component {\n  view() {\n    return (\n      <div className=\"Post CommentPost LoadingPost\">\n        <header className=\"Post-header\">\n          {avatar(null, { className: 'PostUser-avatar' })}\n          <div className=\"fakeText\" />\n        </header>\n\n        <div className=\"Post-body\">\n          <div className=\"fakeText\" />\n          <div className=\"fakeText\" />\n          <div className=\"fakeText\" />\n        </div>\n      </div>\n    );\n  }\n}\n","import app from '../../common/app';\nimport type Mithril from 'mithril';\nimport User from '../models/User';\n\n/**\n * The `username` helper displays a user's username in a <span className=\"username\">\n * tag. If the user doesn't exist, the username will be displayed as [deleted].\n */\nexport default function username(user: User | null | undefined | false): Mithril.Vnode {\n  const name = (user && user.displayName()) || app.translator.trans('core.lib.username.deleted_text');\n\n  return <span className=\"username\">{name}</span>;\n}\n","/*global s9e*/\n\nimport Component from '../../common/Component';\n\n/**\n * The `ComposerPostPreview` component renders Markdown as HTML using the\n * TextFormatter library, polling a data source for changes every 50ms. This is\n * done to prevent expensive redraws on e.g. every single keystroke, while\n * still retaining the perception of live updates for the user.\n *\n * ### Attrs\n *\n * - `composer` The state of the composer controlling this preview.\n * - `className` A CSS class for the element surrounding the preview.\n * - `surround` A callback that can execute code before and after re-render, e.g. for scroll anchoring.\n */\nexport default class ComposerPostPreview extends Component {\n  static initAttrs(attrs) {\n    attrs.className = attrs.className || '';\n    attrs.surround = attrs.surround || ((preview) => preview());\n  }\n\n  view() {\n    return <div className={this.attrs.className} />;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    // Every 50ms, if the composer content has changed, then update the post's\n    // body with a preview.\n    let preview;\n    const updatePreview = () => {\n      // Since we're polling, the composer may have been closed in the meantime,\n      // so we bail in that case.\n      if (!this.attrs.composer.isVisible()) return;\n\n      const content = this.attrs.composer.fields.content();\n\n      if (preview === content) return;\n\n      preview = content;\n\n      this.attrs.surround(() => s9e.TextFormatter.preview(preview || '', vnode.dom));\n    };\n    updatePreview();\n\n    this.updateInterval = setInterval(updatePreview, 50);\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    clearInterval(this.updateInterval);\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport DiscussionControls from '../utils/DiscussionControls';\nimport ComposerPostPreview from './ComposerPostPreview';\nimport listItems from '../../common/helpers/listItems';\n\n/**\n * The `ReplyPlaceholder` component displays a placeholder for a reply, which,\n * when clicked, opens the reply composer.\n *\n * ### Attrs\n *\n * - `discussion`\n */\nexport default class ReplyPlaceholder extends Component {\n  view() {\n    if (app.composer.composingReplyTo(this.attrs.discussion)) {\n      return (\n        <article className=\"Post CommentPost editing\" aria-busy=\"true\">\n          <header className=\"Post-header\">\n            <div className=\"PostUser\">\n              <h3 className=\"PostUser-name\">\n                {avatar(app.session.user, { className: 'PostUser-avatar' })}\n                {username(app.session.user)}\n              </h3>\n              <ul className=\"PostUser-badges badges\">{listItems(app.session.user.badges().toArray())}</ul>\n            </div>\n          </header>\n          <ComposerPostPreview className=\"Post-body\" composer={app.composer} surround={this.anchorPreview.bind(this)} />\n        </article>\n      );\n    }\n\n    const reply = () => {\n      DiscussionControls.replyAction.call(this.attrs.discussion, true).catch(() => {});\n    };\n\n    return (\n      <button className=\"Post ReplyPlaceholder\" onclick={reply}>\n        <span className=\"Post-header\">\n          {avatar(app.session.user, { className: 'PostUser-avatar' })} {app.translator.trans('core.forum.post_stream.reply_placeholder')}\n        </span>\n      </button>\n    );\n  }\n\n  anchorPreview(preview) {\n    const anchorToBottom = $(window).scrollTop() + $(window).height() >= $(document).height();\n\n    preview();\n\n    if (anchorToBottom) {\n      $(window).scrollTop($(document).height());\n    }\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport ScrollListener from '../../common/utils/ScrollListener';\nimport PostLoading from './LoadingPost';\nimport ReplyPlaceholder from './ReplyPlaceholder';\nimport Button from '../../common/components/Button';\nimport ItemList from '../../common/utils/ItemList';\nimport extractText from '../../common/utils/extractText';\n\n/**\n * The `PostStream` component displays an infinitely-scrollable wall of posts in\n * a discussion. Posts that have not loaded will be displayed as placeholders.\n *\n * ### Attrs\n *\n * - `discussion`\n * - `stream`\n * - `targetPost`\n * - `onPositionChange`\n */\nexport default class PostStream extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.discussion = this.attrs.discussion;\n    this.stream = this.attrs.stream;\n\n    this.scrollListener = new ScrollListener(this.onscroll.bind(this));\n  }\n\n  view() {\n    let lastTime;\n\n    const viewingEnd = this.stream.viewingEnd();\n    const posts = this.stream.posts();\n    const postIds = this.discussion.postIds();\n\n    const postFadeIn = (vnode) => {\n      $(vnode.dom).addClass('fadeIn');\n      // 500 is the duration of the fadeIn CSS animation + 100ms,\n      // so the animation has time to complete\n      setTimeout(() => $(vnode.dom).removeClass('fadeIn'), 500);\n    };\n\n    const items = posts.map((post, i) => {\n      let content;\n      const attrs = { 'data-index': this.stream.visibleStart + i };\n\n      if (post) {\n        const time = post.createdAt();\n        const PostComponent = app.postComponents[post.contentType()];\n        content = !!PostComponent && <PostComponent post={post} />;\n\n        attrs.key = 'post' + post.id();\n        attrs.oncreate = postFadeIn;\n        attrs['data-time'] = time.toISOString();\n        attrs['data-number'] = post.number();\n        attrs['data-id'] = post.id();\n        attrs['data-type'] = post.contentType();\n\n        // If the post before this one was more than 4 days ago, we will\n        // display a 'time gap' indicating how long it has been in between\n        // the posts.\n        const dt = time - lastTime;\n\n        if (dt > 1000 * 60 * 60 * 24 * 4) {\n          content = [\n            <div className=\"PostStream-timeGap\">\n              <span>{app.translator.trans('core.forum.post_stream.time_lapsed_text', { period: dayjs().add(dt, 'ms').fromNow(true) })}</span>\n            </div>,\n            content,\n          ];\n        }\n\n        lastTime = time;\n      } else {\n        attrs.key = 'post' + postIds[this.stream.visibleStart + i];\n\n        content = <PostLoading />;\n      }\n\n      const postStreamElement = (\n        <div className=\"PostStream-item\" {...attrs}>\n          {content}\n        </div>\n      );\n\n      // If we're on the first post, call the afterFirstPostItems method and add any additional elements.\n      if (i === 0 && this.afterFirstPostItems().toArray().length > 0) {\n        // Using m.fragment to return multiple elements without an enclosing container\n        return m.fragment({ ...attrs }, [\n          postStreamElement,\n          <div className=\"PostStream-item PostStream-afterFirstPost\" key=\"afterFirstPost\">\n            {this.afterFirstPostItems().toArray()}\n          </div>,\n        ]);\n      }\n\n      return postStreamElement;\n    });\n\n    if (!viewingEnd && posts[this.stream.visibleEnd - this.stream.visibleStart - 1]) {\n      items.push(\n        <div className=\"PostStream-loadMore\" key=\"loadMore\">\n          <Button className=\"Button\" onclick={this.stream.loadNext.bind(this.stream)}>\n            {app.translator.trans('core.forum.post_stream.load_more_button')}\n          </Button>\n        </div>\n      );\n    }\n\n    // Allow extensions to add items to the end of the post stream.\n    if (viewingEnd) {\n      items.push(...this.endItems().toArray());\n    }\n\n    // If we're viewing the end of the discussion, the user can reply, and\n    // is not already doing so, then show a 'write a reply' placeholder.\n    if (viewingEnd && (!app.session.user || this.discussion.canReply())) {\n      items.push(\n        <div className=\"PostStream-item\" key=\"reply\" data-index={this.stream.count()} oncreate={postFadeIn}>\n          <ReplyPlaceholder discussion={this.discussion} />\n        </div>\n      );\n    }\n\n    return (\n      <div className=\"PostStream\" role=\"feed\" aria-live=\"off\" aria-busy={this.stream.pagesLoading ? 'true' : 'false'}>\n        {items}\n      </div>\n    );\n  }\n\n  /**\n   * @returns {ItemList<import('mithril').Children>}\n   */\n  afterFirstPostItems() {\n    const items = new ItemList();\n\n    return items;\n  }\n\n  /**\n   * @returns {ItemList<import('mithril').Children>}\n   */\n  endItems() {\n    const items = new ItemList();\n\n    return items;\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    this.triggerScroll();\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.triggerScroll();\n\n    // This is wrapped in setTimeout due to the following Mithril issue:\n    // https://github.com/lhorie/mithril.js/issues/637\n    setTimeout(() => this.scrollListener.start());\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    this.scrollListener.stop();\n    clearTimeout(this.calculatePositionTimeout);\n  }\n\n  /**\n   * Start scrolling, if appropriate, to a newly-targeted post.\n   */\n  triggerScroll() {\n    if (!this.stream.needsScroll) return;\n\n    const target = this.stream.targetPost;\n    this.stream.needsScroll = false;\n\n    if ('number' in target) {\n      this.scrollToNumber(target.number, this.stream.animateScroll);\n    } else if ('index' in target) {\n      this.scrollToIndex(target.index, this.stream.animateScroll, target.reply);\n    }\n  }\n\n  /**\n   *\n   * @param {number} top\n   */\n  onscroll(top = window.pageYOffset) {\n    if (this.stream.paused || this.stream.pagesLoading) return;\n\n    this.updateScrubber(top);\n\n    this.loadPostsIfNeeded(top);\n\n    // Throttle calculation of our position (start/end numbers of posts in the\n    // viewport) to 100ms.\n    clearTimeout(this.calculatePositionTimeout);\n    this.calculatePositionTimeout = setTimeout(this.calculatePosition.bind(this, top), 100);\n  }\n\n  /**\n   * Check if either extreme of the post stream is in the viewport,\n   * and if so, trigger loading the next/previous page.\n   *\n   * @param {number} top\n   */\n  loadPostsIfNeeded(top = window.pageYOffset) {\n    const marginTop = this.getMarginTop();\n    const viewportHeight = $(window).height() - marginTop;\n    const viewportTop = top + marginTop;\n    const loadAheadDistance = 300;\n\n    if (this.stream.visibleStart > 0) {\n      const $item = this.$('.PostStream-item[data-index=' + this.stream.visibleStart + ']');\n\n      if ($item.length && $item.offset().top > viewportTop - loadAheadDistance) {\n        this.stream.loadPrevious();\n      }\n    }\n\n    if (this.stream.visibleEnd < this.stream.count()) {\n      const $item = this.$('.PostStream-item[data-index=' + (this.stream.visibleEnd - 1) + ']');\n\n      if ($item.length && $item.offset().top + $item.outerHeight(true) < viewportTop + viewportHeight + loadAheadDistance) {\n        this.stream.loadNext();\n      }\n    }\n  }\n\n  updateScrubber(top = window.pageYOffset) {\n    const marginTop = this.getMarginTop();\n    const viewportHeight = $(window).height() - marginTop;\n    const viewportTop = top + marginTop;\n\n    // Before looping through all of the posts, we reset the scrollbar\n    // properties to a 'default' state. These values reflect what would be\n    // seen if the browser were scrolled right up to the top of the page,\n    // and the viewport had a height of 0.\n    const $items = this.$('.PostStream-item[data-index]');\n    let visible = 0;\n    let period = '';\n    let indexFromViewPort = null;\n\n    // Now loop through each of the items in the discussion. An 'item' is\n    // either a single post or a 'gap' of one or more posts that haven't\n    // been loaded yet.\n    $items.each(function () {\n      const $this = $(this);\n      const top = $this.offset().top;\n      const height = $this.outerHeight(true);\n\n      // If this item is above the top of the viewport, skip to the next\n      // one. If it's below the bottom of the viewport, break out of the\n      // loop.\n      if (top + height < viewportTop) {\n        return true;\n      }\n      if (top > viewportTop + viewportHeight) {\n        return false;\n      }\n\n      // Work out how many pixels of this item are visible inside the viewport.\n      // Then add the proportion of this item's total height to the index.\n      const visibleTop = Math.max(0, viewportTop - top);\n      const visibleBottom = Math.min(height, viewportTop + viewportHeight - top);\n      const visiblePost = visibleBottom - visibleTop;\n\n      // We take the index of the first item that passed the previous checks.\n      // It is the item that is first visible in the viewport.\n      if (indexFromViewPort === null) {\n        indexFromViewPort = parseFloat($this.data('index')) + visibleTop / height;\n      }\n\n      if (visiblePost > 0) {\n        visible += visiblePost / height;\n      }\n\n      // If this item has a time associated with it, then set the\n      // scrollbar's current period to a formatted version of this time.\n      const time = $this.data('time');\n      if (time) period = time;\n    });\n\n    // If indexFromViewPort is null, it means no posts are visible in the\n    // viewport. This can happen, when drafting a long reply post. In that case\n    // set the index to the last post.\n    this.stream.index = indexFromViewPort !== null ? indexFromViewPort + 1 : this.stream.count();\n    this.stream.visible = visible;\n    if (period) this.stream.description = dayjs(period).format(extractText(app.translator.trans('core.lib.datetime_formats.scrubber')));\n  }\n\n  /**\n   * Work out which posts (by number) are currently visible in the viewport, and\n   * fire an event with the information.\n   */\n  calculatePosition(top = window.pageYOffset) {\n    const marginTop = this.getMarginTop();\n    const $window = $(window);\n    const viewportHeight = $window.height() - marginTop;\n    const scrollTop = $window.scrollTop() + marginTop;\n    const viewportTop = top + marginTop;\n\n    let startNumber;\n    let endNumber;\n\n    this.$('.PostStream-item').each(function () {\n      const $item = $(this);\n      const top = $item.offset().top;\n      const height = $item.outerHeight(true);\n      const visibleTop = Math.max(0, viewportTop - top);\n\n      const threeQuartersVisible = visibleTop / height < 0.75;\n      const coversQuarterOfViewport = (height - visibleTop) / viewportHeight > 0.25;\n      if (startNumber === undefined && (threeQuartersVisible || coversQuarterOfViewport)) {\n        startNumber = $item.data('number');\n      }\n\n      if (top + height > scrollTop) {\n        if (top + height < scrollTop + viewportHeight) {\n          if ($item.data('number')) {\n            endNumber = $item.data('number');\n          }\n        } else return false;\n      }\n    });\n\n    if (startNumber) {\n      this.attrs.onPositionChange(startNumber || 1, endNumber, startNumber);\n    }\n  }\n\n  /**\n   * Get the distance from the top of the viewport to the point at which we\n   * would consider a post to be the first one visible.\n   *\n   * @return {number}\n   */\n  getMarginTop() {\n    const headerId = app.screen() === 'phone' ? '#app-navigation' : '#header';\n\n    return this.$() && $(headerId).outerHeight() + parseInt(this.$().css('margin-top'), 10);\n  }\n\n  /**\n   * Scroll down to a certain post by number and 'flash' it.\n   *\n   * @param {number} number\n   * @param {boolean} animate\n   * @return {JQueryDeferred}\n   */\n  scrollToNumber(number, animate) {\n    const $item = this.$(`.PostStream-item[data-number=${number}]`);\n\n    return this.scrollToItem($item, animate).then(this.flashItem.bind(this, $item));\n  }\n\n  /**\n   * Scroll down to a certain post by index.\n   *\n   * @param {number} index\n   * @param {boolean} animate\n   * @param {boolean} reply Whether or not to scroll to the reply placeholder.\n   * @return {JQueryDeferred}\n   */\n  scrollToIndex(index, animate, reply) {\n    const $item = reply ? $('.PostStream-item:last-child') : this.$(`.PostStream-item[data-index=${index}]`);\n\n    this.scrollToItem($item, animate, true, reply);\n\n    if (reply) {\n      this.flashItem($item);\n    }\n  }\n\n  /**\n   * Scroll down to the given post.\n   *\n   * @param {JQuery} $item\n   * @param {boolean} animate\n   * @param {boolean} force Whether or not to force scrolling to the item, even\n   *     if it is already in the viewport.\n   * @param {boolean} reply Whether or not to scroll to the reply placeholder.\n   * @return {JQueryDeferred}\n   */\n  scrollToItem($item, animate, force, reply) {\n    const $container = $('html, body').stop(true);\n    const index = $item.data('index');\n\n    if ($item.length) {\n      const itemTop = $item.offset().top - this.getMarginTop();\n      const itemBottom = $item.offset().top + $item.height();\n      const scrollTop = $(document).scrollTop();\n      const scrollBottom = scrollTop + $(window).height();\n\n      // If the item is already in the viewport, we may not need to scroll.\n      // If we're scrolling to the reply placeholder, we'll make sure its\n      // bottom will line up with the top of the composer.\n      if (force || itemTop < scrollTop || itemBottom > scrollBottom) {\n        const top = reply ? itemBottom - $(window).height() + app.composer.computedHeight() : $item.is(':first-child') ? 0 : itemTop;\n\n        if (!animate) {\n          $container.scrollTop(top);\n        } else if (top !== scrollTop) {\n          $container.animate({ scrollTop: top }, 'fast');\n        }\n      }\n    }\n\n    const updateScrubberHeight = () => {\n      // We manually set the index because we want to display the index of the\n      // exact post we've scrolled to, not just that of the first post within viewport.\n      this.updateScrubber();\n      if (index !== undefined) this.stream.index = index + 1;\n    };\n\n    // If we don't update this before the scroll, the scrubber will start\n    // at the top, and animate down, which can be confusing\n    updateScrubberHeight();\n    this.stream.forceUpdateScrubber = true;\n\n    return Promise.all([$container.promise(), this.stream.loadPromise]).then(() => {\n      m.redraw.sync();\n\n      // Rendering post contents will probably throw off our position.\n      // To counter this, we'll scroll either:\n      //   - To the reply placeholder (aligned with composer top)\n      //   - To the top of the page if we're on the first post\n      //   - To the top of a post (if that post exists)\n      // If the post does not currently exist, it's probably\n      // outside of the range we loaded in, so we won't adjust anything,\n      // as it will soon be rendered by the \"load more\" system.\n      let itemOffset;\n      if (reply) {\n        const $placeholder = $('.PostStream-item:last-child');\n        $(window).scrollTop($placeholder.offset().top + $placeholder.height() - $(window).height() + app.composer.computedHeight());\n      } else if (index === 0) {\n        $(window).scrollTop(0);\n      } else if ((itemOffset = $(`.PostStream-item[data-index=${index}]`).offset())) {\n        $(window).scrollTop(itemOffset.top - this.getMarginTop());\n      }\n\n      // We want to adjust this again after posts have been loaded in\n      // and position adjusted so that the scrubber's height is accurate.\n      updateScrubberHeight();\n\n      this.calculatePosition();\n      this.stream.paused = false;\n      // Check if we need to load more posts after scrolling.\n      this.loadPostsIfNeeded();\n    });\n  }\n\n  /**\n   * 'Flash' the given post, drawing the user's attention to it.\n   *\n   * @param {JQuery} $item\n   */\n  flashItem($item) {\n    // This might execute before the fadeIn class has been removed in PostStreamItem's\n    // oncreate, so we remove it just to be safe and avoid a double animation.\n    $item.removeClass('fadeIn');\n    $item.addClass('flash').on('animationend webkitAnimationEnd', (e) => {\n      $item.removeClass('flash');\n    });\n  }\n}\n","import app from '../../common/app';\n\n/**\n * The `formatNumber` utility localizes a number into a string with the\n * appropriate punctuation based on the provided locale otherwise will default to the users locale.\n *\n * @example\n * formatNumber(1234);\n * // 1,234\n */\nexport default function formatNumber(number: number, locale: string = app.data.locale): string {\n  return new Intl.NumberFormat(locale).format(number);\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport icon from '../../common/helpers/icon';\nimport formatNumber from '../../common/utils/formatNumber';\nimport ScrollListener from '../../common/utils/ScrollListener';\n\n/**\n * The `PostStreamScrubber` component displays a scrubber which can be used to\n * navigate/scrub through a post stream.\n *\n * ### Attrs\n *\n * - `stream`\n * - `className`\n */\nexport default class PostStreamScrubber extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.stream = this.attrs.stream;\n    this.handlers = {};\n\n    this.scrollListener = new ScrollListener(this.updateScrubberValues.bind(this, { fromScroll: true, forceHeightChange: true }));\n  }\n\n  view() {\n    const count = this.stream.count();\n\n    // Index is left blank for performance reasons, it is filled in in updateScubberValues\n    const viewing = app.translator.trans('core.forum.post_scrubber.viewing_text', {\n      count,\n      index: <span className=\"Scrubber-index\"></span>,\n      formattedCount: <span className=\"Scrubber-count\">{formatNumber(count)}</span>,\n    });\n\n    const unreadCount = this.stream.discussion.unreadCount();\n    const unreadPercent = count ? Math.min(count - this.stream.index, unreadCount) / count : 0;\n\n    function styleUnread(vnode) {\n      const $element = $(vnode.dom);\n      const newStyle = {\n        top: 100 - unreadPercent * 100 + '%',\n        height: unreadPercent * 100 + '%',\n        opacity: unreadPercent ? 1 : 0,\n      };\n\n      if (vnode.state.oldStyle) {\n        $element.stop(true).css(vnode.state.oldStyle).animate(newStyle);\n      } else {\n        $element.css(newStyle);\n      }\n\n      vnode.state.oldStyle = newStyle;\n    }\n    const classNames = ['PostStreamScrubber', 'Dropdown'];\n    if (this.attrs.className) classNames.push(this.attrs.className);\n\n    return (\n      <div className={classNames.join(' ')}>\n        <button className=\"Button Dropdown-toggle\" data-toggle=\"dropdown\">\n          {viewing} {icon('fas fa-sort')}\n        </button>\n\n        <div className=\"Dropdown-menu dropdown-menu\">\n          <div className=\"Scrubber\">\n            <a className=\"Scrubber-first\" onclick={this.goToFirst.bind(this)}>\n              {icon('fas fa-angle-double-up')} {this.firstPostLabel()}\n            </a>\n\n            <div className=\"Scrubber-scrollbar\">\n              <div className=\"Scrubber-before\" />\n              <div className=\"Scrubber-handle\">\n                <div className=\"Scrubber-bar\" />\n                <div className=\"Scrubber-info\">\n                  <strong>{viewing}</strong>\n                  <span className=\"Scrubber-description\"></span>\n                </div>\n              </div>\n              <div className=\"Scrubber-after\" />\n\n              <div className=\"Scrubber-unread\" oncreate={styleUnread} onupdate={styleUnread}>\n                {this.unreadLabel(unreadCount)}\n              </div>\n            </div>\n\n            <a className=\"Scrubber-last\" onclick={this.goToLast.bind(this)}>\n              {icon('fas fa-angle-double-down')} {this.lastPostLabel()}\n            </a>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  firstPostLabel() {\n    return app.translator.trans('core.forum.post_scrubber.original_post_link');\n  }\n\n  unreadLabel(unreadCount) {\n    return app.translator.trans('core.forum.post_scrubber.unread_text', { count: unreadCount });\n  }\n\n  lastPostLabel() {\n    return app.translator.trans('core.forum.post_scrubber.now_link');\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    if (this.stream.forceUpdateScrubber) {\n      this.stream.forceUpdateScrubber = false;\n      this.stream.loadPromise.then(() => this.updateScrubberValues({ animate: true, forceHeightChange: true }));\n    }\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    // Whenever the window is resized, adjust the height of the scrollbar\n    // so that it fills the height of the sidebar.\n    $(window)\n      .on('resize', (this.handlers.onresize = this.onresize.bind(this)))\n      .resize();\n\n    // When any part of the whole scrollbar is clicked, we want to jump to\n    // that position.\n    this.$('.Scrubber-scrollbar')\n      .bind('click', this.onclick.bind(this))\n\n      // Now we want to make the scrollbar handle draggable. Let's start by\n      // preventing default browser events from messing things up.\n      .bind('dragstart mousedown touchstart', (e) => e.preventDefault());\n\n    // When the mouse is pressed on the scrollbar handle, we capture some\n    // information about its current position. We will store this\n    // information in an object and pass it on to the document's\n    // mousemove/mouseup events later.\n    this.dragging = false;\n    this.mouseStart = 0;\n    this.indexStart = 0;\n\n    this.$('.Scrubber-handle')\n      .bind('mousedown touchstart', this.onmousedown.bind(this))\n\n      // Exempt the scrollbar handle from the 'jump to' click event.\n      .click((e) => e.stopPropagation());\n\n    // When the mouse moves and when it is released, we pass the\n    // information that we captured when the mouse was first pressed onto\n    // some event handlers. These handlers will move the scrollbar/stream-\n    // content as appropriate.\n    $(document)\n      .on('mousemove touchmove', (this.handlers.onmousemove = this.onmousemove.bind(this)))\n      .on('mouseup touchend', (this.handlers.onmouseup = this.onmouseup.bind(this)));\n\n    setTimeout(() => this.scrollListener.start());\n\n    this.stream.loadPromise.then(() => this.updateScrubberValues({ animate: false, forceHeightChange: true }));\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    this.scrollListener.stop();\n    $(window).off('resize', this.handlers.onresize);\n\n    $(document).off('mousemove touchmove', this.handlers.onmousemove).off('mouseup touchend', this.handlers.onmouseup);\n  }\n\n  /**\n   * Update the scrollbar's position to reflect the current values of the\n   * index/visible properties.\n   *\n   * @param {Partial<{fromScroll: boolean, forceHeightChange: boolean, animate: boolean}>} options\n   */\n  updateScrubberValues(options = {}) {\n    const index = this.stream.index;\n    const count = this.stream.count();\n    const visible = this.stream.visible || 1;\n    const percentPerPost = this.percentPerPost();\n\n    const $scrubber = this.$();\n    $scrubber.find('.Scrubber-index').text(formatNumber(this.stream.sanitizeIndex(Math.max(1, index))));\n    $scrubber.find('.Scrubber-description').text(this.stream.description);\n    $scrubber.toggleClass('disabled', this.stream.disabled());\n\n    const heights = {};\n    heights.before = Math.max(0, percentPerPost.index * Math.min(index - 1, count - visible));\n    heights.handle = Math.min(100 - heights.before, percentPerPost.visible * visible);\n    heights.after = 100 - heights.before - heights.handle;\n\n    // If the stream is paused, don't change height on scroll, as the viewport is being scrolled by the JS\n    // If a height change animation is already in progress, don't adjust height unless overriden\n    if ((options.fromScroll && this.stream.paused) || (this.adjustingHeight && !options.forceHeightChange)) return;\n\n    const func = options.animate ? 'animate' : 'css';\n    this.adjustingHeight = true;\n    const animationPromises = [];\n    for (const part in heights) {\n      const $part = $scrubber.find(`.Scrubber-${part}`);\n      animationPromises.push(\n        $part\n          .stop(true, true)\n          [func]({ height: heights[part] + '%' }, 'fast')\n          .promise()\n      );\n\n      // jQuery likes to put overflow:hidden, but because the scrollbar handle\n      // has a negative margin-left, we need to override.\n      if (func === 'animate') $part.css('overflow', 'visible');\n    }\n    Promise.all(animationPromises).then(() => (this.adjustingHeight = false));\n  }\n\n  /**\n   * Go to the first post in the discussion.\n   */\n  goToFirst() {\n    this.stream.goToFirst();\n    this.updateScrubberValues({ animate: true, forceHeightChange: true });\n  }\n\n  /**\n   * Go to the last post in the discussion.\n   */\n  goToLast() {\n    this.stream.goToLast();\n    this.updateScrubberValues({ animate: true, forceHeightChange: true });\n  }\n\n  onresize() {\n    // Adjust the height of the scrollbar so that it fills the height of\n    // the sidebar and doesn't overlap the footer.\n    const scrubber = this.$();\n    const scrollbar = this.$('.Scrubber-scrollbar');\n\n    scrollbar.css(\n      'max-height',\n      $(window).height() -\n        scrubber.offset().top +\n        $(window).scrollTop() -\n        parseInt($('#app').css('padding-bottom'), 10) -\n        (scrubber.outerHeight() - scrollbar.outerHeight())\n    );\n  }\n\n  onmousedown(e) {\n    e.redraw = false;\n    this.mouseStart = e.clientY || e.originalEvent.touches[0].clientY;\n    this.indexStart = this.stream.index;\n    this.dragging = true;\n    $('body').css('cursor', 'move');\n    this.$().toggleClass('dragging', this.dragging);\n  }\n\n  onmousemove(e) {\n    if (!this.dragging) return;\n\n    // Work out how much the mouse has moved by - first in pixels, then\n    // convert it to a percentage of the scrollbar's height, and then\n    // finally convert it into an index. Add this delta index onto\n    // the index at which the drag was started, and then scroll there.\n    const deltaPixels = (e.clientY || e.originalEvent.touches[0].clientY) - this.mouseStart;\n    const deltaPercent = (deltaPixels / this.$('.Scrubber-scrollbar').outerHeight()) * 100;\n    const deltaIndex = deltaPercent / this.percentPerPost().index || 0;\n    const newIndex = Math.min(this.indexStart + deltaIndex, this.stream.count() - 1);\n\n    this.stream.index = Math.max(0, newIndex);\n    this.updateScrubberValues();\n  }\n\n  onmouseup() {\n    this.$().toggleClass('dragging', this.dragging);\n    if (!this.dragging) return;\n\n    this.mouseStart = 0;\n    this.indexStart = 0;\n    this.dragging = false;\n    $('body').css('cursor', '');\n\n    this.$().removeClass('open');\n\n    // If the index we've landed on is in a gap, then tell the stream-\n    // content that we want to load those posts.\n    const intIndex = Math.floor(this.stream.index);\n    this.stream.goToIndex(intIndex);\n  }\n\n  onclick(e) {\n    // Calculate the index which we want to jump to based on the click position.\n\n    // 1. Get the offset of the click from the top of the scrollbar, as a\n    //    percentage of the scrollbar's height.\n    const $scrollbar = this.$('.Scrubber-scrollbar');\n    const offsetPixels = (e.pageY || e.originalEvent.touches[0].pageY) - $scrollbar.offset().top + $('body').scrollTop();\n    let offsetPercent = (offsetPixels / $scrollbar.outerHeight()) * 100;\n\n    // 2. We want the handle of the scrollbar to end up centered on the click\n    //    position. Thus, we calculate the height of the handle in percent and\n    //    use that to find a new offset percentage.\n    offsetPercent = offsetPercent - parseFloat($scrollbar.find('.Scrubber-handle')[0].style.height) / 2;\n\n    // 3. Now we can convert the percentage into an index, and tell the stream-\n    //    content component to jump to that index.\n    let offsetIndex = offsetPercent / this.percentPerPost().index;\n    offsetIndex = Math.max(0, Math.min(this.stream.count() - 1, offsetIndex));\n    this.stream.goToIndex(Math.floor(offsetIndex));\n    this.updateScrubberValues({ animate: true, forceHeightChange: true });\n\n    this.$().removeClass('open');\n  }\n\n  /**\n   * Get the percentage of the height of the scrubber that should be allocated\n   * to each post.\n   *\n   * @return {{ index: number, visible: number }}\n   * @property {Number} index The percent per post for posts on either side of\n   *     the visible part of the scrubber.\n   * @property {Number} visible The percent per post for the visible part of the\n   *     scrubber.\n   */\n  percentPerPost() {\n    const count = this.stream.count() || 1;\n    const visible = this.stream.visible || 1;\n\n    // To stop the handle of the scrollbar from getting too small when there\n    // are many posts, we define a minimum percentage height for the handle\n    // calculated from a 50 pixel limit. From this, we can calculate the\n    // minimum percentage per visible post. If this is greater than the actual\n    // percentage per post, then we need to adjust the 'before' percentage to\n    // account for it.\n    const minPercentVisible = (50 / this.$('.Scrubber-scrollbar').outerHeight()) * 100;\n    const percentPerVisiblePost = Math.max(100 / count, minPercentVisible / visible);\n    const percentPerPost = count === visible ? 0 : (100 - percentPerVisiblePost * visible) / (count - visible);\n\n    return {\n      index: percentPerPost,\n      visible: percentPerVisiblePost,\n    };\n  }\n}\n","import Dropdown, { IDropdownAttrs } from './Dropdown';\nimport Button from './Button';\nimport icon from '../helpers/icon';\nimport Mithril from 'mithril';\nimport classList from '../utils/classList';\n\nexport interface ISplitDropdownAttrs extends IDropdownAttrs {}\n\n/**\n * The `SplitDropdown` component is similar to `Dropdown`, but the first child\n * is displayed as its own button prior to the toggle button.\n */\nexport default class SplitDropdown extends Dropdown {\n  static initAttrs(attrs: ISplitDropdownAttrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = classList(attrs.className, 'Dropdown--split');\n    attrs.menuClassName = classList(attrs.menuClassName, 'Dropdown-menu--right');\n  }\n\n  getButton(children: Mithril.ChildArray): Mithril.Vnode<any, any> {\n    // Make a copy of the attrs of the first child component. We will assign\n    // these attrs to a new button, so that it has exactly the same behaviour as\n    // the first child.\n    const firstChild = this.getFirstChild(children);\n    const buttonAttrs = Object.assign({}, firstChild?.attrs);\n    buttonAttrs.className = classList(buttonAttrs.className, 'SplitDropdown-button Button', this.attrs.buttonClassName);\n\n    return (\n      <>\n        <Button {...buttonAttrs}>{firstChild.children}</Button>\n        <button\n          className={'Dropdown-toggle Button Button--icon ' + this.attrs.buttonClassName}\n          aria-haspopup=\"menu\"\n          aria-label={this.attrs.accessibleToggleLabel}\n          data-toggle=\"dropdown\"\n        >\n          {this.attrs.icon ? icon(this.attrs.icon, { className: 'Button-icon' }) : null}\n          {icon('fas fa-caret-down', { className: 'Button-caret' })}\n        </button>\n      </>\n    );\n  }\n\n  /**\n   * Get the first child. If the first child is an array, the first item in that\n   * array will be returned.\n   */\n  protected getFirstChild(children: Mithril.Children): Mithril.Vnode<any, any> {\n    let firstChild = children;\n\n    while (firstChild instanceof Array) firstChild = firstChild[0];\n\n    return firstChild as Mithril.Vnode<any, any>;\n  }\n}\n","/* eslint-disable no-undefined,no-param-reassign,no-shadow */\n\n/**\n * Throttle execution of a function. Especially useful for rate limiting\n * execution of handlers on events like resize and scroll.\n *\n * @param  {number}    delay -          A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param  {boolean}   [noTrailing] -   Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the\n *                                    throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time\n *                                    after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds,\n *                                    the internal counter is reset).\n * @param  {Function}  callback -       A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n *                                    to `callback` when the throttled-function is executed.\n * @param  {boolean}   [debounceMode] - If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end),\n *                                    schedule `callback` to execute after `delay` ms.\n *\n * @returns {Function}  A new, throttled, function.\n */\nexport default function (delay, noTrailing, callback, debounceMode) {\n\t/*\n\t * After wrapper has stopped being called, this timeout ensures that\n\t * `callback` is executed at the proper times in `throttle` and `end`\n\t * debounce modes.\n\t */\n\tlet timeoutID;\n\tlet cancelled = false;\n\n\t// Keep track of the last time `callback` was executed.\n\tlet lastExec = 0;\n\n\t// Function to clear existing timeout\n\tfunction clearExistingTimeout() {\n\t\tif (timeoutID) {\n\t\t\tclearTimeout(timeoutID);\n\t\t}\n\t}\n\n\t// Function to cancel next exec\n\tfunction cancel() {\n\t\tclearExistingTimeout();\n\t\tcancelled = true;\n\t}\n\n\t// `noTrailing` defaults to falsy.\n\tif (typeof noTrailing !== 'boolean') {\n\t\tdebounceMode = callback;\n\t\tcallback = noTrailing;\n\t\tnoTrailing = undefined;\n\t}\n\n\t/*\n\t * The `wrapper` function encapsulates all of the throttling / debouncing\n\t * functionality and when executed will limit the rate at which `callback`\n\t * is executed.\n\t */\n\tfunction wrapper(...arguments_) {\n\t\tlet self = this;\n\t\tlet elapsed = Date.now() - lastExec;\n\n\t\tif (cancelled) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Execute `callback` and update the `lastExec` timestamp.\n\t\tfunction exec() {\n\t\t\tlastExec = Date.now();\n\t\t\tcallback.apply(self, arguments_);\n\t\t}\n\n\t\t/*\n\t\t * If `debounceMode` is true (at begin) this is used to clear the flag\n\t\t * to allow future `callback` executions.\n\t\t */\n\t\tfunction clear() {\n\t\t\ttimeoutID = undefined;\n\t\t}\n\n\t\tif (debounceMode && !timeoutID) {\n\t\t\t/*\n\t\t\t * Since `wrapper` is being called for the first time and\n\t\t\t * `debounceMode` is true (at begin), execute `callback`.\n\t\t\t */\n\t\t\texec();\n\t\t}\n\n\t\tclearExistingTimeout();\n\n\t\tif (debounceMode === undefined && elapsed > delay) {\n\t\t\t/*\n\t\t\t * In throttle mode, if `delay` time has been exceeded, execute\n\t\t\t * `callback`.\n\t\t\t */\n\t\t\texec();\n\t\t} else if (noTrailing !== true) {\n\t\t\t/*\n\t\t\t * In trailing throttle mode, since `delay` time has not been\n\t\t\t * exceeded, schedule `callback` to execute `delay` ms after most\n\t\t\t * recent execution.\n\t\t\t *\n\t\t\t * If `debounceMode` is true (at begin), schedule `clear` to execute\n\t\t\t * after `delay` ms.\n\t\t\t *\n\t\t\t * If `debounceMode` is false (at end), schedule `callback` to\n\t\t\t * execute after `delay` ms.\n\t\t\t */\n\t\t\ttimeoutID = setTimeout(\n\t\t\t\tdebounceMode ? clear : exec,\n\t\t\t\tdebounceMode === undefined ? delay - elapsed : delay\n\t\t\t);\n\t\t}\n\t}\n\n\twrapper.cancel = cancel;\n\n\t// Return the wrapper function.\n\treturn wrapper;\n}\n","/* eslint-disable no-undefined */\n\nimport throttle from './throttle';\n\n/**\n * Debounce execution of a function. Debouncing, unlike throttling,\n * guarantees that a function is only executed a single time, either at the\n * very beginning of a series of calls, or at the very end.\n *\n * @param  {number}   delay -         A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n * @param  {boolean}  [atBegin] -     Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds\n *                                  after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call.\n *                                  (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset).\n * @param  {Function} callback -      A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n *                                  to `callback` when the debounced-function is executed.\n *\n * @returns {Function} A new, debounced function.\n */\nexport default function (delay, atBegin, callback) {\n\treturn callback === undefined\n\t\t? throttle(delay, atBegin, false)\n\t\t: throttle(delay, callback, atBegin !== false);\n}\n","/**\n * The `anchorScroll` utility saves the scroll position relative to an element,\n * and then restores it after a callback has been run.\n *\n * This is useful if a redraw will change the page's content above the viewport.\n * Normally doing this will result in the content in the viewport being pushed\n * down or pulled up. By wrapping the redraw with this utility, the scroll\n * position can be anchor to an element that is in or below the viewport, so\n * the content in the viewport will stay the same.\n *\n * @param {string | HTMLElement | SVGElement | Element} element The element to anchor the scroll position to.\n * @param {() => void} callback The callback to run that will change page content.\n */\nexport default function anchorScroll(element, callback) {\n  const $window = $(window);\n  const relativeScroll = $(element).offset().top - $window.scrollTop();\n\n  callback();\n\n  $window.scrollTop($(element).offset().top - relativeScroll);\n}\n","import app from '../../forum/app';\nimport { throttle } from 'throttle-debounce';\nimport anchorScroll from '../../common/utils/anchorScroll';\nimport type Discussion from '../../common/models/Discussion';\nimport type Post from '../../common/models/Post';\n\nexport default class PostStreamState {\n  /**\n   * The number of posts to load per page.\n   */\n  static loadCount = 20;\n\n  /**\n   * The discussion to display the post stream for.\n   */\n  discussion: Discussion;\n\n  /**\n   * Whether or not the infinite-scrolling auto-load functionality is\n   * disabled.\n   */\n  paused = false;\n\n  loadPageTimeouts: Record<number, NodeJS.Timeout> = {};\n  pagesLoading = 0;\n\n  index = 0;\n  number = 1;\n\n  /**\n   * The number of posts that are currently visible in the viewport.\n   */\n  visible = 1;\n  visibleStart = 0;\n  visibleEnd = 0;\n\n  animateScroll = false;\n  needsScroll = false;\n  targetPost: { number: number } | { index: number; reply?: boolean } | null = null;\n\n  /**\n   * The description to render on the scrubber.\n   */\n  description = '';\n\n  /**\n   * When the page is scrolled, goToIndex is called, or the page is loaded,\n   * various listeners result in the scrubber being updated with a new\n   * position and values. However, if goToNumber is called, the scrubber\n   * will not be updated. Accordingly, we add logic to the scrubber's\n   * onupdate to update itself, but only when needed, as indicated by this\n   * property.\n   *\n   */\n  forceUpdateScrubber = false;\n\n  loadPromise: Promise<void> | null = null;\n\n  loadNext: () => void;\n  loadPrevious: () => void;\n\n  constructor(discussion: Discussion, includedPosts: Post[] = []) {\n    this.discussion = discussion;\n\n    this.loadNext = throttle(300, this._loadNext);\n    this.loadPrevious = throttle(300, this._loadPrevious);\n\n    this.show(includedPosts);\n  }\n\n  /**\n   * Update the stream so that it loads and includes the latest posts in the\n   * discussion, if the end is being viewed.\n   */\n  update() {\n    if (!this.viewingEnd()) return Promise.resolve();\n\n    this.visibleEnd = this.count();\n\n    return this.loadRange(this.visibleStart, this.visibleEnd);\n  }\n\n  /**\n   * Load and scroll up to the first post in the discussion.\n   */\n  goToFirst(): Promise<void> {\n    return this.goToIndex(0);\n  }\n\n  /**\n   * Load and scroll down to the last post in the discussion.\n   */\n  goToLast(): Promise<void> {\n    return this.goToIndex(this.count() - 1, true);\n  }\n\n  /**\n   * Load and scroll to a post with a certain number.\n   *\n   * @param number The post number to go to. If 'reply', go to the last post and scroll the reply preview into view.\n   */\n  goToNumber(number: number | 'reply', noAnimation = false): Promise<void> {\n    // If we want to go to the reply preview, then we will go to the end of the\n    // discussion and then scroll to the very bottom of the page.\n    if (number === 'reply') {\n      const resultPromise = this.goToLast();\n      this.targetPost = { ...(this.targetPost as { index: number }), reply: true };\n      return resultPromise;\n    }\n\n    this.paused = true;\n\n    this.loadPromise = this.loadNearNumber(number);\n\n    this.needsScroll = true;\n    this.targetPost = { number };\n    this.animateScroll = !noAnimation;\n    this.number = number;\n\n    // In this case, the redraw is only called after the response has been loaded\n    // because we need to know the indices of the post range before we can\n    // start scrolling to items. Calling redraw early causes issues.\n    // Since this is only used for external navigation to the post stream, the delay\n    // before the stream is moved is not an issue.\n    return this.loadPromise.then(() => m.redraw());\n  }\n\n  /**\n   * Load and scroll to a certain index within the discussion.\n   */\n  goToIndex(index: number, noAnimation = false): Promise<void> {\n    this.paused = true;\n\n    this.loadPromise = this.loadNearIndex(index);\n\n    this.needsScroll = true;\n    this.targetPost = { index };\n    this.animateScroll = !noAnimation;\n    this.index = index;\n\n    m.redraw();\n\n    return this.loadPromise;\n  }\n\n  /**\n   * Clear the stream and load posts near a certain number. Returns a promise.\n   * If the post with the given number is already loaded, the promise will be\n   * resolved immediately.\n   */\n  loadNearNumber(number: number): Promise<void> {\n    if (this.posts().some((post) => post && Number(post.number()) === Number(number))) {\n      return Promise.resolve();\n    }\n\n    this.reset();\n\n    return app.store\n      .find<Post[]>('posts', {\n        filter: { discussion: this.discussion.id() as string },\n        page: { near: number },\n      })\n      .then(this.show.bind(this));\n  }\n\n  /**\n   * Clear the stream and load posts near a certain index. A page of posts\n   * surrounding the given index will be loaded. Returns a promise. If the given\n   * index is already loaded, the promise will be resolved immediately.\n   */\n  loadNearIndex(index: number): Promise<void> {\n    if (index >= this.visibleStart && index < this.visibleEnd) {\n      return Promise.resolve();\n    }\n\n    const start = this.sanitizeIndex(index - PostStreamState.loadCount / 2);\n    const end = start + PostStreamState.loadCount;\n\n    this.reset(start, end);\n\n    return this.loadRange(start, end).then(this.show.bind(this));\n  }\n\n  /**\n   * Load the next page of posts.\n   */\n  _loadNext() {\n    const start = this.visibleEnd;\n    const end = (this.visibleEnd = this.sanitizeIndex(this.visibleEnd + PostStreamState.loadCount));\n\n    // Unload the posts which are two pages back from the page we're currently\n    // loading.\n    const twoPagesAway = start - PostStreamState.loadCount * 2;\n    if (twoPagesAway > this.visibleStart && twoPagesAway >= 0) {\n      this.visibleStart = twoPagesAway + PostStreamState.loadCount + 1;\n\n      if (this.loadPageTimeouts[twoPagesAway]) {\n        clearTimeout(this.loadPageTimeouts[twoPagesAway]);\n        delete this.loadPageTimeouts[twoPagesAway];\n        this.pagesLoading--;\n      }\n    }\n\n    this.loadPage(start, end);\n  }\n\n  /**\n   * Load the previous page of posts.\n   */\n  _loadPrevious() {\n    const end = this.visibleStart;\n    const start = (this.visibleStart = this.sanitizeIndex(this.visibleStart - PostStreamState.loadCount));\n\n    // Unload the posts which are two pages back from the page we're currently\n    // loading.\n    const twoPagesAway = start + PostStreamState.loadCount * 2;\n    if (twoPagesAway < this.visibleEnd && twoPagesAway <= this.count()) {\n      this.visibleEnd = twoPagesAway;\n\n      if (this.loadPageTimeouts[twoPagesAway]) {\n        clearTimeout(this.loadPageTimeouts[twoPagesAway]);\n        delete this.loadPageTimeouts[twoPagesAway];\n        this.pagesLoading--;\n      }\n    }\n\n    this.loadPage(start, end, true);\n  }\n\n  /**\n   * Load a page of posts into the stream and redraw.\n   */\n  loadPage(start: number, end: number, backwards = false) {\n    this.pagesLoading++;\n\n    const redraw = () => {\n      if (start < this.visibleStart || end > this.visibleEnd) return;\n\n      const anchorIndex = backwards ? this.visibleEnd - 1 : this.visibleStart;\n      anchorScroll(`.PostStream-item[data-index=\"${anchorIndex}\"]`, m.redraw.sync);\n    };\n    redraw();\n\n    this.loadPageTimeouts[start] = setTimeout(\n      () => {\n        this.loadRange(start, end).then(() => {\n          redraw();\n          this.pagesLoading--;\n        });\n        delete this.loadPageTimeouts[start];\n      },\n      this.pagesLoading - 1 ? 1000 : 0\n    );\n  }\n\n  /**\n   * Load and inject the specified range of posts into the stream, without\n   * clearing it.\n   */\n  loadRange(start: number, end: number): Promise<Post[]> {\n    const loadIds: string[] = [];\n    const loaded: Post[] = [];\n\n    this.discussion\n      .postIds()\n      .slice(start, end)\n      .forEach((id) => {\n        const post = app.store.getById<Post>('posts', id);\n\n        if (post && post.discussion() && typeof post.canEdit() !== 'undefined') {\n          loaded.push(post);\n        } else {\n          loadIds.push(id);\n        }\n      });\n\n    if (loadIds.length) {\n      return app.store.find<Post[]>('posts', loadIds).then((newPosts) => {\n        return loaded.concat(newPosts).sort((a, b) => a.number() - b.number());\n      });\n    }\n\n    return Promise.resolve(loaded);\n  }\n\n  /**\n   * Set up the stream with the given array of posts.\n   */\n  show(posts: Post[]) {\n    this.visibleStart = posts.length ? this.discussion.postIds().indexOf(posts[0].id() ?? '0') : 0;\n    this.visibleEnd = this.sanitizeIndex(this.visibleStart + posts.length);\n  }\n\n  /**\n   * Reset the stream so that a specific range of posts is displayed. If a range\n   * is not specified, the first page of posts will be displayed.\n   */\n  reset(start?: number, end?: number) {\n    this.visibleStart = start || 0;\n    this.visibleEnd = this.sanitizeIndex(end || PostStreamState.loadCount);\n  }\n\n  /**\n   * Get the visible page of posts.\n   */\n  posts(): (Post | null)[] {\n    return this.discussion\n      .postIds()\n      .slice(this.visibleStart, this.visibleEnd)\n      .map((id) => {\n        const post = app.store.getById<Post>('posts', id);\n\n        return post && post.discussion() && typeof post.canEdit() !== 'undefined' ? post : null;\n      });\n  }\n\n  /**\n   * Get the total number of posts in the discussion.\n   */\n  count(): number {\n    return this.discussion.postIds().length;\n  }\n\n  /**\n   * Check whether or not the scrubber should be disabled, i.e. if all of the\n   * posts are visible in the viewport.\n   */\n  disabled(): boolean {\n    return this.visible >= this.count();\n  }\n\n  /**\n   * Are we currently viewing the end of the discussion?\n   */\n  viewingEnd(): boolean {\n    // In some cases, such as if we've stickied a post, an event post\n    // may have been added / removed. This means that `this.visibleEnd`\n    // and`this.count()` will be out of sync by 1 post, but we are still\n    // \"viewing the end\" of the post stream, so we should still reload\n    // all posts up until the last one.\n    return Math.abs(this.count() - this.visibleEnd) <= 1;\n  }\n\n  /**\n   * Make sure that the given index is not outside of the possible range of\n   * indexes in the discussion.\n   */\n  sanitizeIndex(index: number) {\n    return Math.max(0, Math.min(this.count(), Math.floor(index)));\n  }\n}\n","import type Mithril from 'mithril';\n\nimport app from '../../forum/app';\nimport Page, { IPageAttrs } from '../../common/components/Page';\nimport ItemList from '../../common/utils/ItemList';\nimport DiscussionHero from './DiscussionHero';\nimport DiscussionListPane from './DiscussionListPane';\nimport PostStream from './PostStream';\nimport PostStreamScrubber from './PostStreamScrubber';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport SplitDropdown from '../../common/components/SplitDropdown';\nimport listItems from '../../common/helpers/listItems';\nimport DiscussionControls from '../utils/DiscussionControls';\nimport PostStreamState from '../states/PostStreamState';\nimport Discussion from '../../common/models/Discussion';\nimport Post from '../../common/models/Post';\nimport { ApiResponseSingle } from '../../common/Store';\n\nexport interface IDiscussionPageAttrs extends IPageAttrs {\n  id: string;\n  near?: number;\n}\n\n/**\n * The `DiscussionPage` component displays a whole discussion page, including\n * the discussion list pane, the hero, the posts, and the sidebar.\n */\nexport default class DiscussionPage<CustomAttrs extends IDiscussionPageAttrs = IDiscussionPageAttrs> extends Page<CustomAttrs> {\n  /**\n   * The discussion that is being viewed.\n   */\n  protected discussion: Discussion | null = null;\n\n  /**\n   * A public API for interacting with the post stream.\n   */\n  protected stream: PostStreamState | null = null;\n\n  /**\n   * The number of the first post that is currently visible in the viewport.\n   */\n  protected near: number = 0;\n\n  protected useBrowserScrollRestoration = true;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.load();\n\n    // If the discussion list has been loaded, then we'll enable the pane (and\n    // hide it by default). Also, if we've just come from another discussion\n    // page, then we don't want Mithril to redraw the whole page – if it did,\n    // then the pane would redraw which would be slow and would cause problems with\n    // event handlers.\n    // We will also enable the pane if the discussion list is empty but loading,\n    // because the DiscussionComposer refreshes the list and redirects to the new discussion at the same time.\n    if (app.discussions.hasItems() || app.discussions.isLoading()) {\n      app.pane?.enable();\n      app.pane?.hide();\n    }\n\n    this.bodyClass = 'App--discussion';\n  }\n\n  onremove(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onremove(vnode);\n\n    // If we are indeed navigating away from this discussion, then disable the\n    // discussion list pane. Also, if we're composing a reply to this\n    // discussion, minimize the composer – unless it's empty, in which case\n    // we'll just close it.\n    app.pane?.disable();\n\n    if (this.discussion && app.composer.composingReplyTo(this.discussion) && !app.composer?.fields?.content()) {\n      app.composer.hide();\n    } else {\n      app.composer.minimize();\n    }\n  }\n\n  view(): Mithril.Children {\n    return <div className=\"DiscussionPage\">{this.viewItems().toArray()}</div>;\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('pane', <DiscussionListPane state={app.discussions} />, 100);\n    items.add(\n      'discussions',\n      <div className=\"DiscussionPage-discussion\">{this.discussion ? this.pageContent().toArray() : this.loadingItems().toArray()}</div>,\n      90\n    );\n\n    return items;\n  }\n\n  /**\n   * List of components shown while the discussion is loading.\n   */\n  loadingItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('spinner', <LoadingIndicator />, 100);\n\n    return items;\n  }\n\n  /**\n   * Function that renders the `sidebarItems` ItemList.\n   */\n  sidebar(): Mithril.Children {\n    return (\n      <nav className=\"DiscussionPage-nav\">\n        <ul>{listItems(this.sidebarItems().toArray())}</ul>\n      </nav>\n    );\n  }\n\n  /**\n   * Renders the discussion's hero.\n   */\n  hero(): Mithril.Children {\n    return <DiscussionHero discussion={this.discussion} />;\n  }\n\n  /**\n   * List of items rendered as the main page content.\n   */\n  pageContent(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('hero', this.hero(), 100);\n    items.add('main', <div className=\"container\">{this.mainContent().toArray()}</div>, 10);\n\n    return items;\n  }\n\n  /**\n   * List of items rendered inside the main page content container.\n   */\n  mainContent(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('sidebar', this.sidebar(), 100);\n\n    items.add(\n      'poststream',\n      <div className=\"DiscussionPage-stream\">\n        <PostStream discussion={this.discussion} stream={this.stream} onPositionChange={this.positionChanged.bind(this)} />\n      </div>,\n      10\n    );\n\n    return items;\n  }\n\n  /**\n   * Load the discussion from the API or use the preloaded one.\n   */\n  load(): void {\n    const preloadedDiscussion = app.preloadedApiDocument<Discussion>();\n    if (preloadedDiscussion) {\n      // We must wrap this in a setTimeout because if we are mounting this\n      // component for the first time on page load, then any calls to m.redraw\n      // will be ineffective and thus any configs (scroll code) will be run\n      // before stuff is drawn to the page.\n      setTimeout(this.show.bind(this, preloadedDiscussion), 0);\n    } else {\n      const params = this.requestParams();\n\n      app.store.find<Discussion>('discussions', m.route.param('id'), params).then(this.show.bind(this));\n    }\n\n    m.redraw();\n  }\n\n  /**\n   * Get the parameters that should be passed in the API request to get the\n   * discussion.\n   */\n  requestParams(): Record<string, unknown> {\n    return {\n      bySlug: true,\n      page: { near: this.near },\n    };\n  }\n\n  /**\n   * Initialize the component to display the given discussion.\n   */\n  show(discussion: ApiResponseSingle<Discussion>): void {\n    app.history.push('discussion', discussion.title());\n    app.setTitle(discussion.title());\n    app.setTitleCount(0);\n\n    // When the API responds with a discussion, it will also include a number of\n    // posts. Some of these posts are included because they are on the first\n    // page of posts we want to display (determined by the `near` parameter) –\n    // others may be included because due to other relationships introduced by\n    // extensions. We need to distinguish the two so we don't end up displaying\n    // the wrong posts. We do so by filtering out the posts that don't have\n    // the 'discussion' relationship linked, then sorting and splicing.\n    let includedPosts: Post[] = [];\n    if (discussion.payload && discussion.payload.included) {\n      const discussionId = discussion.id();\n\n      includedPosts = discussion.payload.included\n        .filter(\n          (record) =>\n            record.type === 'posts' &&\n            record.relationships &&\n            record.relationships.discussion &&\n            !Array.isArray(record.relationships.discussion.data) &&\n            record.relationships.discussion.data.id === discussionId\n        )\n        // We can make this assertion because posts should be in the store,\n        // since they were in the discussion's payload.\n        .map((record) => app.store.getById<Post>('posts', record.id) as Post)\n        .sort((a: Post, b: Post) => a.number() - b.number())\n        .slice(0, 20);\n    }\n\n    // Set up the post stream for this discussion, along with the first page of\n    // posts we want to display. Tell the stream to scroll down and highlight\n    // the specific post that was routed to.\n    this.stream = new PostStreamState(discussion, includedPosts);\n    const rawNearParam = m.route.param('near');\n    const nearParam = rawNearParam === 'reply' ? 'reply' : parseInt(rawNearParam);\n    this.stream.goToNumber(nearParam || (includedPosts[0]?.number() ?? 0), true).then(() => {\n      this.discussion = discussion;\n\n      app.current.set('discussion', discussion);\n      app.current.set('stream', this.stream);\n    });\n  }\n\n  /**\n   * Build an item list for the contents of the sidebar.\n   */\n  sidebarItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.discussion) {\n      items.add(\n        'controls',\n        <SplitDropdown\n          icon=\"fas fa-ellipsis-v\"\n          className=\"App-primaryControl\"\n          buttonClassName=\"Button--primary\"\n          accessibleToggleLabel={app.translator.trans('core.forum.discussion_controls.toggle_dropdown_accessible_label')}\n        >\n          {DiscussionControls.controls(this.discussion, this).toArray()}\n        </SplitDropdown>,\n        100\n      );\n    }\n\n    items.add('scrubber', <PostStreamScrubber stream={this.stream} className=\"App-titleControl\" />, -100);\n\n    return items;\n  }\n\n  /**\n   * When the posts that are visible in the post stream change (i.e. the user\n   * scrolls up or down), then we update the URL and mark the posts as read.\n   */\n  positionChanged(startNumber: number, endNumber: number): void {\n    const discussion = this.discussion;\n\n    if (!discussion) return;\n\n    // Construct a URL to this discussion with the updated position, then\n    // replace it into the window's history and our own history stack.\n    const url = app.route.discussion(discussion, (this.near = startNumber));\n\n    window.history.replaceState(null, document.title, url);\n    app.history.push('discussion', discussion.title());\n\n    // If the user hasn't read past here before, then we'll update their read\n    // state and redraw.\n    if (app.session.user && endNumber > (discussion.lastReadPostNumber() || 0)) {\n      discussion.save({ lastReadPostNumber: endNumber });\n      m.redraw();\n    }\n  }\n}\n","import Component from '../../common/Component';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\n\n/**\n * The `HeaderPrimary` component displays primary header controls. On the\n * default skin, these are shown just to the right of the forum title.\n */\nexport default class HeaderPrimary extends Component {\n  view() {\n    return <ul className=\"Header-controls\">{listItems(this.items().toArray())}</ul>;\n  }\n\n  /**\n   * Build an item list for the controls.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  items() {\n    return new ItemList();\n  }\n}\n","import Button from './Button';\nimport Link from './Link';\n\n/**\n * The `LinkButton` component defines a `Button` which links to a route.\n *\n * ### Attrs\n *\n * All of the attrs accepted by `Button`, plus:\n *\n * - `active` Whether or not the page that this button links to is currently\n *   active.\n * - `href` The URL to link to. If the current URL `m.route()` matches this,\n *   the `active` prop will automatically be set to true.\n * - `force` Whether the page should be fully rerendered. Defaults to `true`.\n */\nexport default class LinkButton extends Button {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.active = this.isActive(attrs);\n    if (attrs.force === undefined) attrs.force = true;\n  }\n\n  view(vnode) {\n    const vdom = super.view(vnode);\n\n    vdom.tag = Link;\n    vdom.attrs.active = String(vdom.attrs.active);\n    delete vdom.attrs.type;\n\n    return vdom;\n  }\n\n  /**\n   * Determine whether a component with the given attrs is 'active'.\n   *\n   * @param {object} attrs\n   * @return {boolean}\n   */\n  static isActive(attrs) {\n    return typeof attrs.active !== 'undefined' ? attrs.active : m.route.get()?.split('?')[0] === attrs.href?.split('?')[0];\n  }\n}\n","import app from '../../forum/app';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport Dropdown, { IDropdownAttrs } from '../../common/components/Dropdown';\nimport LinkButton from '../../common/components/LinkButton';\nimport Button from '../../common/components/Button';\nimport ItemList from '../../common/utils/ItemList';\nimport Separator from '../../common/components/Separator';\nimport extractText from '../../common/utils/extractText';\nimport type Mithril from 'mithril';\n\nexport interface ISessionDropdownAttrs extends IDropdownAttrs {}\n\n/**\n * The `SessionDropdown` component shows a button with the current user's\n * avatar/name, with a dropdown of session controls.\n */\nexport default class SessionDropdown<CustomAttrs extends ISessionDropdownAttrs = ISessionDropdownAttrs> extends Dropdown<CustomAttrs> {\n  static initAttrs(attrs: ISessionDropdownAttrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = 'SessionDropdown';\n    attrs.buttonClassName = 'Button Button--user Button--flat';\n    attrs.menuClassName = 'Dropdown-menu--right';\n\n    attrs.accessibleToggleLabel = extractText(app.translator.trans('core.forum.header.session_dropdown_accessible_label'));\n  }\n\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    return super.view({ ...vnode, children: this.items().toArray() });\n  }\n\n  getButtonContent() {\n    const user = app.session.user;\n\n    return [avatar(user), ' ', <span className=\"Button-label\">{username(user)}</span>];\n  }\n\n  /**\n   * Build an item list for the contents of the dropdown menu.\n   */\n  items(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n    const user = app.session.user!;\n\n    items.add(\n      'profile',\n      <LinkButton icon=\"fas fa-user\" href={app.route.user(user)}>\n        {app.translator.trans('core.forum.header.profile_button')}\n      </LinkButton>,\n      100\n    );\n\n    items.add(\n      'settings',\n      <LinkButton icon=\"fas fa-cog\" href={app.route('settings')}>\n        {app.translator.trans('core.forum.header.settings_button')}\n      </LinkButton>,\n      50\n    );\n\n    if (app.forum.attribute('adminUrl')) {\n      items.add(\n        'administration',\n        <LinkButton icon=\"fas fa-wrench\" href={app.forum.attribute('adminUrl')} target=\"_blank\">\n          {app.translator.trans('core.forum.header.admin_button')}\n        </LinkButton>,\n        0\n      );\n    }\n\n    items.add('separator', <Separator />, -90);\n\n    items.add(\n      'logOut',\n      <Button icon=\"fas fa-sign-out-alt\" onclick={app.session.logout.bind(app.session)}>\n        {app.translator.trans('core.forum.header.log_out_button')}\n      </Button>,\n      -100\n    );\n\n    return items;\n  }\n}\n","import Dropdown, { IDropdownAttrs } from './Dropdown';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport type Component from '../Component';\nimport type Mithril from 'mithril';\n\n/**\n * Determines via a vnode is currently \"active\".\n * Due to changes in Mithril 2, attrs will not be instantiated until AFTER view()\n * is initially called on the parent component, so we can not always depend on the\n * active attr to determine which element should be displayed as the \"active child\".\n *\n * This is a temporary patch, and as so, is not exported / placed in utils.\n */\nfunction isActive(vnode: Mithril.Children): boolean {\n  if (!vnode || typeof vnode !== 'object' || vnode instanceof Array) return false;\n\n  const tag = vnode.tag;\n\n  // Allow non-selectable dividers/headers to be added.\n  if (typeof tag === 'string' && tag !== 'a' && tag !== 'button') return false;\n\n  if ((typeof tag === 'object' || typeof tag === 'function') && 'initAttrs' in tag) {\n    (tag as unknown as typeof Component).initAttrs(vnode.attrs);\n  }\n\n  return (typeof tag === 'object' || typeof tag === 'function') && 'isActive' in tag ? (tag as any).isActive(vnode.attrs) : vnode.attrs.active;\n}\n\nexport interface ISelectDropdownAttrs extends IDropdownAttrs {\n  defaultLabel: string;\n}\n\n/**\n * The `SelectDropdown` component is the same as a `Dropdown`, except the toggle\n * button's label is set as the label of the first child which has a truthy\n * `active` prop.\n */\nexport default class SelectDropdown<CustomAttrs extends ISelectDropdownAttrs = ISelectDropdownAttrs> extends Dropdown<CustomAttrs> {\n  static initAttrs(attrs: ISelectDropdownAttrs) {\n    attrs.caretIcon ??= 'fas fa-sort';\n\n    super.initAttrs(attrs);\n\n    attrs.className = classList(attrs.className, 'Dropdown--select');\n  }\n\n  getButtonContent(children: Mithril.ChildArray): Mithril.ChildArray {\n    const activeChild = children.find(isActive);\n    let label = (activeChild && typeof activeChild === 'object' && 'children' in activeChild && activeChild.children) || this.attrs.defaultLabel;\n\n    // @ts-ignore\n    if (Array.isArray(label)) label = label[0];\n\n    return [<span className=\"Button-label\">{label}</span>, this.attrs.caretIcon ? icon(this.attrs.caretIcon, { className: 'Button-caret' }) : null];\n  }\n}\n","import app from '../common/app';\nimport { FlarumRequestOptions } from './Application';\nimport { fireDeprecationWarning } from './helpers/fireDebugWarning';\nimport Store, { ApiPayloadSingle, ApiResponseSingle, MetaInformation } from './Store';\n\nexport interface ModelIdentifier {\n  type: string;\n  id: string;\n}\n\nexport interface ModelAttributes {\n  [key: string]: unknown;\n}\n\nexport interface ModelRelationships {\n  [relationship: string]: {\n    data: ModelIdentifier | ModelIdentifier[];\n  };\n}\n\nexport interface UnsavedModelData {\n  type?: string;\n  attributes?: ModelAttributes;\n  relationships?: ModelRelationships;\n}\n\nexport interface SavedModelData {\n  type: string;\n  id: string;\n  attributes?: ModelAttributes;\n  relationships?: ModelRelationships;\n}\n\nexport type ModelData = UnsavedModelData | SavedModelData;\n\nexport interface SaveRelationships {\n  [relationship: string]: null | Model | Model[];\n}\n\nexport interface SaveAttributes {\n  [key: string]: unknown;\n  relationships?: SaveRelationships;\n}\n\n/**\n * The `Model` class represents a local data resource. It provides methods to\n * persist changes via the API.\n */\nexport default abstract class Model {\n  /**\n   * The resource object from the API.\n   */\n  data: ModelData = {};\n\n  /**\n   * The time at which the model's data was last updated. Watching the value\n   * of this property is a fast way to retain/cache a subtree if data hasn't\n   * changed.\n   */\n  freshness: Date = new Date();\n\n  /**\n   * Whether or not the resource exists on the server.\n   */\n  exists: boolean = false;\n\n  /**\n   * The data store that this resource should be persisted to.\n   */\n  protected store: Store;\n\n  /**\n   * @param data A resource object from the API.\n   * @param store The data store that this model should be persisted to.\n   */\n  constructor(data: ModelData = {}, store = app.store) {\n    this.data = data;\n    this.store = store;\n  }\n\n  /**\n   * Get the model's ID.\n   *\n   * @final\n   */\n  id(): string | undefined {\n    return 'id' in this.data ? this.data.id : undefined;\n  }\n\n  /**\n   * Get one of the model's attributes.\n   *\n   * @final\n   */\n  attribute<T = unknown>(attribute: string): T {\n    return this.data?.attributes?.[attribute] as T;\n  }\n\n  /**\n   * Merge new data into this model locally.\n   *\n   * @param data A resource object to merge into this model\n   */\n  pushData(data: ModelData | { relationships?: SaveRelationships }): this {\n    if ('id' in data) {\n      (this.data as SavedModelData).id = data.id;\n    }\n\n    if ('type' in data) {\n      this.data.type = data.type;\n    }\n\n    if ('attributes' in data) {\n      this.data.attributes ||= {};\n\n      // @deprecated\n      // Filter out relationships that got in by accident.\n      for (const key in data.attributes) {\n        const val = data.attributes[key];\n        if (val && val instanceof Model) {\n          fireDeprecationWarning('Providing models as attributes to `Model.pushData()` or `Model.pushAttributes()` is deprecated.', '3249');\n          delete data.attributes[key];\n          data.relationships ||= {};\n          data.relationships[key] = { data: Model.getIdentifier(val) };\n        }\n      }\n\n      Object.assign(this.data.attributes, data.attributes);\n    }\n\n    if ('relationships' in data) {\n      const relationships = this.data.relationships ?? {};\n\n      // For every relationship field, we need to check if we've\n      // been handed a Model instance. If so, we will convert it to a\n      // relationship data object.\n      for (const r in data.relationships) {\n        const relationship = data.relationships[r];\n\n        if (relationship === null) {\n          delete relationships[r];\n          delete data.relationships[r];\n          continue;\n        }\n\n        let identifier: ModelRelationships[string];\n        if (relationship instanceof Model) {\n          identifier = { data: Model.getIdentifier(relationship) };\n        } else if (relationship instanceof Array) {\n          identifier = { data: relationship.map(Model.getIdentifier) };\n        } else {\n          identifier = relationship;\n        }\n\n        data.relationships[r] = identifier;\n        relationships[r] = identifier;\n      }\n\n      this.data.relationships = relationships;\n    }\n\n    // Now that we've updated the data, we can say that the model is fresh.\n    // This is an easy way to invalidate retained subtrees etc.\n    this.freshness = new Date();\n\n    return this;\n  }\n\n  /**\n   * Merge new attributes into this model locally.\n   *\n   * @param attributes The attributes to merge.\n   */\n  pushAttributes(attributes: ModelAttributes) {\n    this.pushData({ attributes });\n  }\n\n  /**\n   * Merge new attributes into this model, both locally and with persistence.\n   *\n   * @param attributes The attributes to save. If a 'relationships' key\n   *     exists, it will be extracted and relationships will also be saved.\n   */\n  save(\n    attributes: SaveAttributes,\n    options: Omit<FlarumRequestOptions<ApiPayloadSingle>, 'url'> & { meta?: MetaInformation } = {}\n  ): Promise<ApiResponseSingle<this>> {\n    const data: ModelData & { id?: string } = {\n      type: this.data.type,\n      attributes,\n    };\n\n    if ('id' in this.data) {\n      data.id = this.data.id;\n    }\n\n    // If a 'relationships' key exists, extract it from the attributes hash and\n    // set it on the top-level data object instead. We will be sending this data\n    // object to the API for persistence.\n    if (attributes.relationships) {\n      data.relationships = {};\n\n      for (const key in attributes.relationships) {\n        const model = attributes.relationships[key];\n\n        if (model === null) continue;\n\n        data.relationships[key] = {\n          data: model instanceof Array ? model.map(Model.getIdentifier) : Model.getIdentifier(model),\n        };\n      }\n\n      delete attributes.relationships;\n    }\n\n    // Before we update the model's data, we should make a copy of the model's\n    // old data so that we can revert back to it if something goes awry during\n    // persistence.\n    const oldData = this.copyData();\n\n    this.pushData(data);\n\n    const request = {\n      data,\n      meta: options.meta || undefined,\n    };\n\n    return app\n      .request<ApiPayloadSingle>({\n        method: this.exists ? 'PATCH' : 'POST',\n        url: app.forum.attribute('apiUrl') + this.apiEndpoint(),\n        body: request,\n        ...options,\n      })\n      .then(\n        // If everything went well, we'll make sure the store knows that this\n        // model exists now (if it didn't already), and we'll push the data that\n        // the API returned into the store.\n        (payload) => {\n          return this.store.pushPayload<this>(payload);\n        },\n\n        // If something went wrong, though... good thing we backed up our model's\n        // old data! We'll revert to that and let others handle the error.\n        (err: Error) => {\n          this.pushData(oldData);\n          m.redraw();\n          throw err;\n        }\n      );\n  }\n\n  /**\n   * Send a request to delete the resource.\n   *\n   * @param body Data to send along with the DELETE request.\n   */\n  delete(body: FlarumRequestOptions<void>['body'] = {}, options: Omit<FlarumRequestOptions<void>, 'url'> = {}): Promise<void> {\n    if (!this.exists) return Promise.resolve();\n\n    return app\n      .request({\n        method: 'DELETE',\n        url: app.forum.attribute('apiUrl') + this.apiEndpoint(),\n        body,\n        ...options,\n      })\n      .then(() => {\n        this.exists = false;\n\n        this.store.remove(this);\n      });\n  }\n\n  /**\n   * Construct a path to the API endpoint for this resource.\n   */\n  protected apiEndpoint(): string {\n    return '/' + this.data.type + ('id' in this.data ? '/' + this.data.id : '');\n  }\n\n  protected copyData(): ModelData {\n    return JSON.parse(JSON.stringify(this.data));\n  }\n\n  protected rawRelationship<M extends Model>(relationship: string): undefined | ModelIdentifier;\n  protected rawRelationship<M extends Model[]>(relationship: string): undefined | ModelIdentifier[];\n  protected rawRelationship<_M extends Model | Model[]>(relationship: string): undefined | ModelIdentifier | ModelIdentifier[] {\n    return this.data.relationships?.[relationship]?.data;\n  }\n\n  /**\n   * Generate a function which returns the value of the given attribute.\n   *\n   * @param transform A function to transform the attribute value\n   */\n  static attribute<T>(name: string): () => T;\n  static attribute<T, O = unknown>(name: string, transform: (attr: O) => T): () => T;\n  static attribute<T, O = unknown>(name: string, transform?: (attr: O) => T): () => T {\n    return function (this: Model) {\n      if (transform) {\n        return transform(this.attribute(name));\n      }\n\n      return this.attribute(name);\n    };\n  }\n\n  /**\n   * Generate a function which returns the value of the given has-one\n   * relationship.\n   *\n   * @return false if no information about the\n   *     relationship exists; undefined if the relationship exists but the model\n   *     has not been loaded; or the model if it has been loaded.\n   */\n  static hasOne<M extends Model>(name: string): () => M | false;\n  static hasOne<M extends Model | null>(name: string): () => M | null | false;\n  static hasOne<M extends Model>(name: string): () => M | false {\n    return function (this: Model) {\n      const relationshipData = this.data.relationships?.[name]?.data;\n\n      if (relationshipData && relationshipData instanceof Array) {\n        throw new Error(`Relationship ${name} on model ${this.data.type} is plural, so the hasOne method cannot be used to access it.`);\n      }\n\n      if (relationshipData) {\n        return this.store.getById<M>(relationshipData.type, relationshipData.id) as M;\n      }\n\n      return false;\n    };\n  }\n\n  /**\n   * Generate a function which returns the value of the given has-many\n   * relationship.\n   *\n   * @return false if no information about the relationship\n   *     exists; an array if it does, containing models if they have been\n   *     loaded, and undefined for those that have not.\n   */\n  static hasMany<M extends Model>(name: string): () => (M | undefined)[] | false {\n    return function (this: Model) {\n      const relationshipData = this.data.relationships?.[name]?.data;\n\n      if (relationshipData && !(relationshipData instanceof Array)) {\n        throw new Error(`Relationship ${name} on model ${this.data.type} is singular, so the hasMany method cannot be used to access it.`);\n      }\n\n      if (relationshipData) {\n        return relationshipData.map((data) => this.store.getById<M>(data.type, data.id));\n      }\n\n      return false;\n    };\n  }\n\n  /**\n   * Transform the given value into a Date object.\n   */\n  static transformDate(value: string): Date;\n  static transformDate(value: string | null): Date | null;\n  static transformDate(value: string | undefined): Date | undefined;\n  static transformDate(value: string | null | undefined): Date | null | undefined;\n  static transformDate(value: string | null | undefined): Date | null | undefined {\n    return value != null ? new Date(value) : value;\n  }\n\n  /**\n   * Get a resource identifier object for the given model.\n   */\n  protected static getIdentifier(model: Model): ModelIdentifier;\n  protected static getIdentifier(model?: Model): ModelIdentifier | null {\n    if (!model || !('id' in model.data)) return null;\n\n    return {\n      type: model.data.type,\n      id: model.data.id,\n    };\n  }\n}\n","import Model from '../Model';\n\n/**\n * The `computed` utility creates a function that will cache its output until\n * any of the dependent values are dirty.\n *\n * @param dependentKeys The keys of the dependent values.\n * @param compute The function which computes the value using the\n *     dependent values.\n */\nexport default function computed<T, M = Model>(...args: [...string[], (this: M, ...args: unknown[]) => T]): () => T {\n  const keys = args.slice(0, -1) as string[];\n  const compute = args.slice(-1)[0] as (this: M, ...args: unknown[]) => T;\n\n  const dependentValues: Record<string, unknown> = {};\n  let computedValue: T;\n\n  return function (this: M) {\n    let recompute = false;\n\n    // Read all of the dependent values. If any of them have changed since last\n    // time, then we'll want to recompute our output.\n    keys.forEach((key) => {\n      const attr = (this as Record<string, unknown | (() => unknown)>)[key];\n      const value = typeof attr === 'function' ? attr.call(this) : attr;\n\n      if (dependentValues[key] !== value) {\n        recompute = true;\n        dependentValues[key] = value;\n      }\n    });\n\n    if (recompute) {\n      computedValue = compute.apply(\n        this,\n        keys.map((key) => dependentValues[key])\n      );\n    }\n\n    return computedValue;\n  };\n}\n","/**\n * The `isDark` utility converts a hex color to rgb, and then calculates a YIQ\n * value in order to get the appropriate brightness value. See\n * https://www.w3.org/TR/AERT/#color-contrast for references.\n *\n * A YIQ value >= 128 corresponds to a light color according to the W3C\n * standards, but we use a custom threshold for each light and dark modes\n * to preserve design consistency.\n */\nexport default function isDark(hexcolor: string | null): boolean {\n  // return if hexcolor is undefined or shorter than 4 characters, shortest hex form is #333;\n  // decided against regex hex color validation for performance considerations\n  if (!hexcolor || hexcolor.length < 4) {\n    return false;\n  }\n\n  let hexnumbers = hexcolor.replace('#', '');\n\n  if (hexnumbers.length === 3) {\n    hexnumbers += hexnumbers;\n  }\n\n  const r = parseInt(hexnumbers.slice(0, 2), 16);\n  const g = parseInt(hexnumbers.slice(2, 4), 16);\n  const b = parseInt(hexnumbers.slice(4, 6), 16);\n  const yiq = (r * 299 + g * 587 + b * 114) / 1000;\n\n  const threshold = parseInt(getComputedStyle(document.body).getPropertyValue('--yiq-threshold').trim()) || 128;\n\n  return yiq < threshold;\n}\n","import isDark from '../utils/isDark';\n\nexport default function textContrastClass(hexcolor: string | null | undefined): string {\n  if (!hexcolor) return 'text-contrast--unchanged';\n\n  return isDark(hexcolor) ? 'text-contrast--light' : 'text-contrast--dark';\n}\n","type KeyboardEventHandler = (event: KeyboardEvent) => void;\ntype ShouldHandle = (event: KeyboardEvent) => boolean;\n\nenum Keys {\n  Enter = 13,\n  Escape = 27,\n  Space = 32,\n  ArrowUp = 38,\n  ArrowDown = 40,\n  ArrowLeft = 37,\n  ArrowRight = 39,\n  Tab = 9,\n  Backspace = 8,\n}\n\n/**\n * The `KeyboardNavigatable` class manages lists that can be navigated with the\n * keyboard, calling callbacks for each actions.\n *\n * This helper encapsulates the key binding logic, providing a simple fluent\n * API for use.\n */\nexport default class KeyboardNavigatable {\n  /**\n   * Callback to be executed for a specified input.\n   */\n  protected callbacks = new Map<number, KeyboardEventHandler>();\n\n  /**\n   * Callback that determines whether keyboard input should be handled.\n   * By default, always handle keyboard navigation.\n   */\n  protected whenCallback: ShouldHandle = (event: KeyboardEvent) => true;\n\n  /**\n   * Provide a callback to be executed when navigating upwards.\n   *\n   * This will be triggered by the Up key.\n   */\n  onUp(callback: KeyboardEventHandler): KeyboardNavigatable {\n    this.callbacks.set(Keys.ArrowUp, (e) => {\n      e.preventDefault();\n      callback(e);\n    });\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when navigating downwards.\n   *\n   * This will be triggered by the Down key.\n   */\n  onDown(callback: KeyboardEventHandler): KeyboardNavigatable {\n    this.callbacks.set(Keys.ArrowDown, (e) => {\n      e.preventDefault();\n      callback(e);\n    });\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when the current item is selected..\n   *\n   * This will be triggered by the Return key (and Tab key, if not disabled).\n   */\n  onSelect(callback: KeyboardEventHandler, ignoreTabPress: boolean = false): KeyboardNavigatable {\n    const handler: KeyboardEventHandler = (e) => {\n      e.preventDefault();\n      callback(e);\n    };\n\n    if (!ignoreTabPress) this.callbacks.set(Keys.Tab, handler);\n    this.callbacks.set(Keys.Enter, handler);\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when the current item is tabbed into.\n   *\n   * This will be triggered by the Tab key.\n   */\n  onTab(callback: KeyboardEventHandler): KeyboardNavigatable {\n    const handler: KeyboardEventHandler = (e) => {\n      e.preventDefault();\n      callback(e);\n    };\n\n    this.callbacks.set(9, handler);\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when the navigation is canceled.\n   *\n   * This will be triggered by the Escape key.\n   */\n  onCancel(callback: KeyboardEventHandler): KeyboardNavigatable {\n    this.callbacks.set(Keys.Escape, (e) => {\n      e.stopPropagation();\n      e.preventDefault();\n      callback(e);\n    });\n\n    return this;\n  }\n\n  /**\n   * Provide a callback to be executed when previous input is removed.\n   *\n   * This will be triggered by the Backspace key.\n   */\n  onRemove(callback: KeyboardEventHandler): KeyboardNavigatable {\n    this.callbacks.set(Keys.Backspace, (e) => {\n      if (e instanceof KeyboardEvent && e.target instanceof HTMLInputElement && e.target.selectionStart === 0 && e.target.selectionEnd === 0) {\n        callback(e);\n        e.preventDefault();\n      }\n    });\n\n    return this;\n  }\n\n  /**\n   * Provide a callback that determines whether keyboard input should be handled.\n   */\n  when(callback: ShouldHandle): KeyboardNavigatable {\n    this.whenCallback = callback;\n\n    return this;\n  }\n\n  /**\n   * Set up the navigation key bindings on the given jQuery element.\n   */\n  bindTo($element: JQuery<HTMLElement>) {\n    // Handle navigation key events on the navigatable element.\n    $element[0].addEventListener('keydown', this.navigate.bind(this));\n  }\n\n  /**\n   * Interpret the given keyboard event as navigation commands.\n   */\n  navigate(event: KeyboardEvent) {\n    // This callback determines whether keyboard should be handled or ignored.\n    if (!this.whenCallback(event)) return;\n\n    const keyCallback = this.callbacks.get(event.which);\n    if (keyCallback) {\n      keyCallback(event);\n    }\n  }\n}\n","import Tooltip from './Tooltip';\nimport Component, { ComponentAttrs } from '../Component';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport textContrastClass from '../helpers/textContrastClass';\n\nexport interface IBadgeAttrs extends ComponentAttrs {\n  icon: string;\n  type?: string;\n  label?: string;\n  color?: string;\n}\n\n/**\n * The `Badge` component represents a user/discussion badge, indicating some\n * status (e.g. a discussion is stickied, a user is an admin).\n *\n * A badge may have the following special attrs:\n *\n * - `type` The type of badge this is. This will be used to give the badge a\n *   class name of `Badge--{type}`.\n * - `icon` The name of an icon to show inside the badge.\n * - `label`\n *\n * All other attrs will be assigned as attributes on the badge element.\n */\nexport default class Badge<CustomAttrs extends IBadgeAttrs = IBadgeAttrs> extends Component<CustomAttrs> {\n  view() {\n    const { type, icon: iconName, label, color, style = {}, ...attrs } = this.attrs;\n\n    const className = classList('Badge', [type && `Badge--${type}`], attrs.className, textContrastClass(color));\n\n    const iconChild = iconName ? icon(iconName, { className: 'Badge-icon' }) : m.trust('&nbsp;');\n\n    const newStyle = { ...style, '--badge-bg': color };\n\n    const badgeAttrs = {\n      ...attrs,\n      className,\n      style: newStyle,\n    };\n\n    const badgeNode = <div {...badgeAttrs}>{iconChild}</div>;\n\n    // If we don't have a tooltip label, don't render the tooltip component.\n    if (!label) return badgeNode;\n\n    return <Tooltip text={label}>{badgeNode}</Tooltip>;\n  }\n}\n","import app from '../../common/app';\nimport Model from '../Model';\nimport computed from '../utils/computed';\nimport ItemList from '../utils/ItemList';\nimport Badge from '../components/Badge';\nimport Mithril from 'mithril';\nimport Post from './Post';\nimport User from './User';\n\nexport default class Discussion extends Model {\n  title() {\n    return Model.attribute<string>('title').call(this);\n  }\n  slug() {\n    return Model.attribute<string>('slug').call(this);\n  }\n\n  createdAt() {\n    return Model.attribute<Date | undefined, string | undefined>('createdAt', Model.transformDate).call(this);\n  }\n  user() {\n    return Model.hasOne<User | null>('user').call(this);\n  }\n  firstPost() {\n    return Model.hasOne<Post | null>('firstPost').call(this);\n  }\n\n  lastPostedAt() {\n    return Model.attribute('lastPostedAt', Model.transformDate).call(this);\n  }\n  lastPostedUser() {\n    return Model.hasOne<User | null>('lastPostedUser').call(this);\n  }\n  lastPost() {\n    return Model.hasOne<Post | null>('lastPost').call(this);\n  }\n  lastPostNumber() {\n    return Model.attribute<number | null | undefined>('lastPostNumber').call(this);\n  }\n\n  commentCount() {\n    return Model.attribute<number | undefined>('commentCount').call(this);\n  }\n  replyCount() {\n    return computed<number, this>('commentCount', (commentCount) => Math.max(0, ((commentCount as number) ?? 0) - 1)).call(this);\n  }\n  posts() {\n    return Model.hasMany<Post>('posts').call(this);\n  }\n  mostRelevantPost() {\n    return Model.hasOne<Post | null>('mostRelevantPost').call(this);\n  }\n\n  lastReadAt() {\n    return Model.attribute('lastReadAt', Model.transformDate).call(this);\n  }\n  lastReadPostNumber() {\n    return Model.attribute<number | null | undefined>('lastReadPostNumber').call(this);\n  }\n  isUnread() {\n    return computed<boolean, this>('unreadCount', (unreadCount) => !!unreadCount).call(this);\n  }\n  isRead() {\n    return computed<boolean, this>('unreadCount', (unreadCount) => !!(app.session.user && !unreadCount)).call(this);\n  }\n\n  hiddenAt() {\n    return Model.attribute('hiddenAt', Model.transformDate).call(this);\n  }\n  hiddenUser() {\n    return Model.hasOne<User | null>('hiddenUser').call(this);\n  }\n  isHidden() {\n    return computed<boolean, this>('hiddenAt', (hiddenAt) => !!hiddenAt).call(this);\n  }\n\n  canReply() {\n    return Model.attribute<boolean | undefined>('canReply').call(this);\n  }\n  canRename() {\n    return Model.attribute<boolean | undefined>('canRename').call(this);\n  }\n  canHide() {\n    return Model.attribute<boolean | undefined>('canHide').call(this);\n  }\n  canDelete() {\n    return Model.attribute<boolean | undefined>('canDelete').call(this);\n  }\n\n  /**\n   * Remove a post from the discussion's posts relationship.\n   */\n  removePost(id: string): void {\n    const posts = this.rawRelationship<Post[]>('posts');\n\n    if (!posts) {\n      return;\n    }\n\n    posts.some((data, i) => {\n      if (id === data.id) {\n        posts.splice(i, 1);\n        return true;\n      }\n\n      return false;\n    });\n  }\n\n  /**\n   * Get the estimated number of unread posts in this discussion for the current\n   * user.\n   */\n  unreadCount(): number {\n    const user = app.session.user;\n\n    if (user && (user.markedAllAsReadAt()?.getTime() ?? 0) < this.lastPostedAt()?.getTime()!) {\n      const unreadCount = Math.max(0, (this.lastPostNumber() ?? 0) - (this.lastReadPostNumber() || 0));\n      // If posts have been deleted, it's possible that the unread count could exceed the\n      // actual post count. As such, we take the min of the two to ensure this isn't an issue.\n      return Math.min(unreadCount, this.commentCount() ?? 0);\n    }\n\n    return 0;\n  }\n\n  /**\n   * Get the Badge components that apply to this discussion.\n   */\n  badges(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.isHidden()) {\n      items.add('hidden', <Badge type=\"hidden\" icon=\"fas fa-trash\" label={app.translator.trans('core.lib.badge.hidden_tooltip')} />);\n    }\n\n    return items;\n  }\n\n  /**\n   * Get a list of all of the post IDs in this discussion.\n   */\n  postIds(): string[] {\n    return this.rawRelationship<Post[]>('posts')?.map((link) => link.id) ?? [];\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport listItems from '../../common/helpers/listItems';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport Discussion from '../../common/models/Discussion';\nimport ItemList from '../../common/utils/ItemList';\nimport Tooltip from '../../common/components/Tooltip';\n\n/**\n * The `NotificationList` component displays a list of the logged-in user's\n * notifications, grouped by discussion.\n */\nexport default class NotificationList extends Component {\n  view() {\n    const state = this.attrs.state;\n\n    return (\n      <div className=\"NotificationList\">\n        <div className=\"NotificationList-header\">\n          <h4 className=\"App-titleControl App-titleControl--text\">{app.translator.trans('core.forum.notifications.title')}</h4>\n\n          <div className=\"App-primaryControl\">{this.controlItems().toArray()}</div>\n        </div>\n\n        <div className=\"NotificationList-content\">{this.content(state)}</div>\n      </div>\n    );\n  }\n\n  controlItems() {\n    const items = new ItemList();\n    const state = this.attrs.state;\n\n    items.add(\n      'mark_all_as_read',\n      <Tooltip text={app.translator.trans('core.forum.notifications.mark_all_as_read_tooltip')}>\n        <Button\n          className=\"Button Button--link\"\n          data-container=\".NotificationList\"\n          icon=\"fas fa-check\"\n          title={app.translator.trans('core.forum.notifications.mark_all_as_read_tooltip')}\n          onclick={state.markAllAsRead.bind(state)}\n        />\n      </Tooltip>,\n      70\n    );\n\n    items.add(\n      'delete_all',\n      <Tooltip text={app.translator.trans('core.forum.notifications.delete_all_tooltip')}>\n        <Button\n          className=\"Button Button--link\"\n          data-container=\".NotificationList\"\n          icon=\"fas fa-trash-alt\"\n          title={app.translator.trans('core.forum.notifications.delete_all_tooltip')}\n          onclick={() => {\n            if (confirm(app.translator.trans('core.forum.notifications.delete_all_confirm'))) {\n              state.deleteAll.call(state);\n            }\n          }}\n        />\n      </Tooltip>,\n      50\n    );\n\n    return items;\n  }\n\n  content(state) {\n    if (state.isLoading()) {\n      return <LoadingIndicator className=\"LoadingIndicator--block\" />;\n    }\n\n    if (state.hasItems()) {\n      return state.getPages().map((page) => {\n        const groups = [];\n        const discussions = {};\n\n        page.items.forEach((notification) => {\n          const subject = notification.subject();\n\n          if (typeof subject === 'undefined') return;\n\n          // Get the discussion that this notification is related to. If it's not\n          // directly related to a discussion, it may be related to a post or\n          // other entity which is related to a discussion.\n          let discussion = null;\n          if (subject instanceof Discussion) discussion = subject;\n          else if (subject && subject.discussion) discussion = subject.discussion();\n\n          // If the notification is not related to a discussion directly or\n          // indirectly, then we will assign it to a neutral group.\n          const key = discussion ? discussion.id() : 0;\n          discussions[key] = discussions[key] || { discussion: discussion, notifications: [] };\n          discussions[key].notifications.push(notification);\n\n          if (groups.indexOf(discussions[key]) === -1) {\n            groups.push(discussions[key]);\n          }\n        });\n\n        return groups.map((group) => {\n          const badges = group.discussion && group.discussion.badges().toArray();\n\n          return (\n            <div className=\"NotificationGroup\">\n              {group.discussion ? (\n                <Link className=\"NotificationGroup-header\" href={app.route.discussion(group.discussion)}>\n                  {badges && !!badges.length && <ul className=\"NotificationGroup-badges badges\">{listItems(badges)}</ul>}\n                  <span>{group.discussion.title()}</span>\n                </Link>\n              ) : (\n                <div className=\"NotificationGroup-header\">{app.forum.attribute('title')}</div>\n              )}\n\n              <ul className=\"NotificationGroup-content\">\n                {group.notifications.map((notification) => {\n                  const NotificationComponent = app.notificationComponents[notification.contentType()];\n                  return (\n                    !!NotificationComponent && (\n                      <li>\n                        <NotificationComponent notification={notification} />\n                      </li>\n                    )\n                  );\n                })}\n              </ul>\n            </div>\n          );\n        });\n      });\n    }\n\n    return <div className=\"NotificationList-empty\">{app.translator.trans('core.forum.notifications.empty_text')}</div>;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.$notifications = this.$('.NotificationList-content');\n\n    // If we are on the notifications page, the window will be scrolling and not the $notifications element.\n    this.$scrollParent = this.inPanel() ? this.$notifications : $(window);\n\n    this.boundScrollHandler = this.scrollHandler.bind(this);\n    this.$scrollParent.on('scroll', this.boundScrollHandler);\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    this.$scrollParent.off('scroll', this.boundScrollHandler);\n  }\n\n  scrollHandler() {\n    const state = this.attrs.state;\n\n    // Whole-page scroll events are listened to on `window`, but we need to get the actual\n    // scrollHeight, scrollTop, and clientHeight from the document element.\n    const scrollParent = this.inPanel() ? this.$scrollParent[0] : document.documentElement;\n\n    // On very short screens, the scrollHeight + scrollTop might not reach the clientHeight\n    // by a fraction of a pixel, so we compensate for that.\n    const atBottom = Math.abs(scrollParent.scrollHeight - scrollParent.scrollTop - scrollParent.clientHeight) <= 1;\n\n    if (state.hasNext() && !state.isLoadingNext() && atBottom) {\n      state.loadNext();\n    }\n  }\n\n  /**\n   * If the NotificationList component isn't in a panel (e.g. on NotificationPage when mobile),\n   * we need to listen to scroll events on the window, and get scroll state from the body.\n   */\n  inPanel() {\n    return this.$notifications.css('overflow') === 'auto';\n  }\n}\n","import app from '../../forum/app';\nimport Dropdown, { IDropdownAttrs } from '../../common/components/Dropdown';\nimport icon from '../../common/helpers/icon';\nimport classList from '../../common/utils/classList';\nimport NotificationList from './NotificationList';\nimport extractText from '../../common/utils/extractText';\nimport type Mithril from 'mithril';\n\nexport interface INotificationsDropdown extends IDropdownAttrs {}\n\nexport default class NotificationsDropdown<CustomAttrs extends IDropdownAttrs = IDropdownAttrs> extends Dropdown<CustomAttrs> {\n  static initAttrs(attrs: INotificationsDropdown) {\n    attrs.className ||= 'NotificationsDropdown';\n    attrs.buttonClassName ||= 'Button Button--flat';\n    attrs.menuClassName ||= 'Dropdown-menu--right';\n    attrs.label ||= extractText(app.translator.trans('core.forum.notifications.tooltip'));\n    attrs.icon ||= 'fas fa-bell';\n\n    // For best a11y support, both `title` and `aria-label` should be used\n    attrs.accessibleToggleLabel ||= extractText(app.translator.trans('core.forum.notifications.toggle_dropdown_accessible_label'));\n\n    super.initAttrs(attrs);\n  }\n\n  getButton(children: Mithril.ChildArray): Mithril.Vnode<any, any> {\n    const newNotifications = this.getNewCount();\n\n    const vdom = super.getButton(children);\n\n    vdom.attrs.title = this.attrs.label;\n\n    vdom.attrs.className = classList(vdom.attrs.className, [newNotifications && 'new']);\n    vdom.attrs.onclick = this.onclick.bind(this);\n\n    return vdom;\n  }\n\n  getButtonContent(): Mithril.ChildArray {\n    const unread = this.getUnreadCount();\n\n    return [\n      this.attrs.icon ? icon(this.attrs.icon, { className: 'Button-icon' }) : null,\n      unread !== 0 && <span className=\"NotificationsDropdown-unread\">{unread}</span>,\n      <span className=\"Button-label\">{this.attrs.label}</span>,\n    ];\n  }\n\n  getMenu() {\n    return (\n      <div className={classList('Dropdown-menu', this.attrs.menuClassName)} onclick={this.menuClick.bind(this)}>\n        {this.showing && <NotificationList state={this.attrs.state} />}\n      </div>\n    );\n  }\n\n  onclick() {\n    if (app.drawer.isOpen()) {\n      this.goToRoute();\n    } else {\n      this.attrs.state.load();\n    }\n  }\n\n  goToRoute() {\n    m.route.set(app.route('notifications'));\n  }\n\n  getUnreadCount() {\n    return app.session.user!.unreadNotificationCount();\n  }\n\n  getNewCount() {\n    return app.session.user!.newNotificationCount();\n  }\n\n  menuClick(e: MouseEvent) {\n    // Don't close the notifications dropdown if the user is opening a link in a\n    // new tab or window.\n    if (e.shiftKey || e.metaKey || e.ctrlKey || e.button === 1) e.stopPropagation();\n  }\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n  try {\n    var info = gen[key](arg);\n    var value = info.value;\n  } catch (error) {\n    reject(error);\n    return;\n  }\n  if (info.done) {\n    resolve(value);\n  } else {\n    Promise.resolve(value).then(_next, _throw);\n  }\n}\nexport default function _asyncToGenerator(fn) {\n  return function () {\n    var self = this,\n      args = arguments;\n    return new Promise(function (resolve, reject) {\n      var gen = fn.apply(self, args);\n      function _next(value) {\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n      }\n      function _throw(err) {\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n      }\n      _next(undefined);\n    });\n  };\n}","import app from '../../forum/app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport Link from '../../common/components/Link';\nimport highlight from '../../common/helpers/highlight';\nimport Discussion from '../../common/models/Discussion';\nimport Post from '../../common/models/Post';\nimport type Mithril from 'mithril';\nimport ItemList from '../../common/utils/ItemList';\n\nexport interface DiscussionsSearchItemAttrs extends ComponentAttrs {\n  query: string;\n  discussion: Discussion;\n  mostRelevantPost: Post;\n}\n\nexport default class DiscussionsSearchItem extends Component<DiscussionsSearchItemAttrs> {\n  query!: string;\n  discussion!: Discussion;\n  mostRelevantPost!: Post | null | undefined;\n\n  oninit(vnode: Mithril.Vnode<DiscussionsSearchItemAttrs, this>) {\n    super.oninit(vnode);\n\n    this.query = this.attrs.query;\n    this.discussion = this.attrs.discussion;\n    this.mostRelevantPost = this.attrs.mostRelevantPost;\n  }\n\n  view() {\n    return (\n      <li className=\"DiscussionSearchResult\" data-index={'discussions' + this.discussion.id()}>\n        <Link href={app.route.discussion(this.discussion, (this.mostRelevantPost && this.mostRelevantPost.number()) || 0)}>\n          {this.viewItems().toArray()}\n        </Link>\n      </li>\n    );\n  }\n\n  discussionTitle() {\n    return this.discussion.title();\n  }\n\n  mostRelevantPostContent() {\n    return this.mostRelevantPost?.contentPlain();\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('discussion-title', <div className=\"DiscussionSearchResult-title\">{highlight(this.discussionTitle(), this.query)}</div>, 90);\n\n    !!this.mostRelevantPost &&\n      items.add(\n        'most-relevant',\n        <div className=\"DiscussionSearchResult-excerpt\">{highlight(this.mostRelevantPostContent() ?? '', this.query, 100)}</div>,\n        80\n      );\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport LinkButton from '../../common/components/LinkButton';\nimport { SearchSource } from './Search';\nimport type Mithril from 'mithril';\nimport Discussion from '../../common/models/Discussion';\nimport DiscussionsSearchItem from './DiscussionsSearchItem';\n\n/**\n * The `DiscussionsSearchSource` finds and displays discussion search results in\n * the search dropdown.\n */\nexport default class DiscussionsSearchSource implements SearchSource {\n  protected results = new Map<string, Discussion[]>();\n  queryString: string | null = null;\n\n  async search(query: string): Promise<void> {\n    query = query.toLowerCase();\n\n    this.results.set(query, []);\n\n    this.setQueryString(query);\n\n    const params = {\n      filter: { q: this.queryString || query },\n      page: { limit: this.limit() },\n      include: this.includes().join(','),\n    };\n\n    return app.store.find<Discussion[]>('discussions', params).then((results) => {\n      this.results.set(query, results);\n      m.redraw();\n    });\n  }\n\n  view(query: string): Array<Mithril.Vnode> {\n    query = query.toLowerCase();\n\n    this.setQueryString(query);\n\n    const results = (this.results.get(query) || []).map((discussion) => {\n      const mostRelevantPost = discussion.mostRelevantPost();\n\n      return <DiscussionsSearchItem query={query} discussion={discussion} mostRelevantPost={mostRelevantPost} />;\n    }) as Array<Mithril.Vnode>;\n\n    return [\n      <li className=\"Dropdown-header\">{app.translator.trans('core.forum.search.discussions_heading')}</li>,\n      <li>\n        <LinkButton icon=\"fas fa-search\" href={app.route('index', { q: this.queryString })}>\n          {app.translator.trans('core.forum.search.all_discussions_button', { query })}\n        </LinkButton>\n      </li>,\n      ...results,\n    ];\n  }\n\n  includes(): string[] {\n    return ['mostRelevantPost'];\n  }\n\n  limit(): number {\n    return 3;\n  }\n\n  queryMutators(): string[] {\n    return [];\n  }\n\n  setQueryString(query: string): void {\n    this.queryString = query + ' ' + this.queryMutators().join(' ');\n  }\n}\n","import type Mithril from 'mithril';\n\nimport app from '../../forum/app';\nimport highlight from '../../common/helpers/highlight';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport Link from '../../common/components/Link';\nimport { SearchSource } from './Search';\nimport User from '../../common/models/User';\n\n/**\n * The `UsersSearchSource` finds and displays user search results in the search\n * dropdown.\n */\nexport default class UsersSearchResults implements SearchSource {\n  protected results = new Map<string, User[]>();\n\n  async search(query: string): Promise<void> {\n    return app.store\n      .find<User[]>('users', {\n        filter: { q: query },\n        page: { limit: 5 },\n      })\n      .then((results) => {\n        this.results.set(query, results);\n        m.redraw();\n      });\n  }\n\n  view(query: string): Array<Mithril.Vnode> {\n    query = query.toLowerCase();\n\n    const results = (this.results.get(query) || [])\n      .concat(\n        app.store\n          .all<User>('users')\n          .filter((user) => [user.username(), user.displayName()].some((value) => value.toLowerCase().substr(0, query.length) === query))\n      )\n      .filter((e, i, arr) => arr.lastIndexOf(e) === i)\n      .sort((a, b) => a.displayName().localeCompare(b.displayName()));\n\n    if (!results.length) return [];\n\n    return [\n      <li className=\"Dropdown-header\">{app.translator.trans('core.forum.search.users_heading')}</li>,\n      ...results.map((user) => {\n        const name = username(user);\n\n        const children = [highlight(name.text as string, query)];\n\n        return (\n          <li className=\"UserSearchResult\" data-index={'users' + user.id()}>\n            <Link href={app.route.user(user)}>\n              {avatar(user)}\n              {{ ...name, text: undefined, children }}\n            </Link>\n          </li>\n        );\n      }),\n    ];\n  }\n}\n","import app from '../../forum/app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport ItemList from '../../common/utils/ItemList';\nimport classList from '../../common/utils/classList';\nimport extractText from '../../common/utils/extractText';\nimport KeyboardNavigatable from '../../common/utils/KeyboardNavigatable';\nimport icon from '../../common/helpers/icon';\nimport SearchState from '../states/SearchState';\nimport DiscussionsSearchSource from './DiscussionsSearchSource';\nimport UsersSearchSource from './UsersSearchSource';\nimport { fireDeprecationWarning } from '../../common/helpers/fireDebugWarning';\nimport type Mithril from 'mithril';\n\n/**\n * The `SearchSource` interface defines a section of search results in the\n * search dropdown.\n *\n * Search sources should be registered with the `Search` component class\n * by extending the `sourceItems` method. When the user types a\n * query, each search source will be prompted to load search results via the\n * `search` method. When the dropdown is redrawn, it will be constructed by\n * putting together the output from the `view` method of each source.\n */\nexport interface SearchSource {\n  /**\n   * Make a request to get results for the given query.\n   * The results will be updated internally in the search source, not exposed.\n   */\n  search(query: string): Promise<void>;\n\n  /**\n   * Get an array of virtual <li>s that list the search results for the given\n   * query.\n   */\n  view(query: string): Array<Mithril.Vnode>;\n}\n\nexport interface SearchAttrs extends ComponentAttrs {\n  /** The type of alert this is. Will be used to give the alert a class name of `Alert--{type}`. */\n  state: SearchState;\n}\n\n/**\n * The `Search` component displays a menu of as-you-type results from a variety\n * of sources.\n *\n * The search box will be 'activated' if the app's search state's\n * getInitialSearch() value is a truthy value. If this is the case, an 'x'\n * button will be shown next to the search field, and clicking it will clear the search.\n *\n * ATTRS:\n *\n * - state: SearchState instance.\n */\nexport default class Search<T extends SearchAttrs = SearchAttrs> extends Component<T, SearchState> {\n  /**\n   * The minimum query length before sources are searched.\n   */\n  protected static MIN_SEARCH_LEN = 3;\n\n  /**\n   * The instance of `SearchState` for this component.\n   */\n  protected searchState!: SearchState;\n\n  /**\n   * The instance of `SearchState` for this component.\n   *\n   * @deprecated Replace with`this.searchState` instead.\n   */\n  // TODO: [Flarum 2.0] Remove this.\n  // @ts-expect-error This is a get accessor, while superclass defines this as a property. This is needed to prevent breaking changes, however.\n  get state() {\n    fireDeprecationWarning('`state` property of the Search component is deprecated', '3212');\n    return this.searchState;\n  }\n  set state(state: SearchState) {\n    // Workaround to prevent triggering deprecation warnings due to Mithril\n    // setting state to undefined when creating components\n    state !== undefined && fireDeprecationWarning('`state` property of the Search component is deprecated', '3212');\n    this.searchState = state;\n  }\n\n  /**\n   * Whether or not the search input has focus.\n   */\n  protected hasFocus = false;\n\n  /**\n   * An array of SearchSources.\n   */\n  protected sources?: SearchSource[];\n\n  /**\n   * The number of sources that are still loading results.\n   */\n  protected loadingSources = 0;\n\n  /**\n   * The index of the currently-selected <li> in the results list. This can be\n   * a unique string (to account for the fact that an item's position may jump\n   * around as new results load), but otherwise it will be numeric (the\n   * sequential position within the list).\n   */\n  protected index: number = 0;\n\n  protected navigator!: KeyboardNavigatable;\n\n  protected searchTimeout?: number;\n\n  private updateMaxHeightHandler?: () => void;\n\n  oninit(vnode: Mithril.Vnode<T, this>) {\n    super.oninit(vnode);\n\n    this.searchState = this.attrs.state;\n  }\n\n  view() {\n    const currentSearch = this.searchState.getInitialSearch();\n\n    // Initialize search sources in the view rather than the constructor so\n    // that we have access to app.forum.\n    if (!this.sources) this.sources = this.sourceItems().toArray();\n\n    // Hide the search view if no sources were loaded\n    if (!this.sources.length) return <div></div>;\n\n    const searchLabel = extractText(app.translator.trans('core.forum.header.search_placeholder'));\n\n    const isActive = !!currentSearch;\n    const shouldShowResults = !!(this.searchState.getValue() && this.hasFocus);\n    const shouldShowClearButton = !!(!this.loadingSources && this.searchState.getValue());\n\n    return (\n      <div\n        role=\"search\"\n        aria-label={app.translator.trans('core.forum.header.search_role_label')}\n        className={classList('Search', {\n          open: this.searchState.getValue() && this.hasFocus,\n          focused: this.hasFocus,\n          active: isActive,\n          loading: !!this.loadingSources,\n        })}\n      >\n        <div className=\"Search-input\">\n          <input\n            aria-label={searchLabel}\n            className=\"FormControl\"\n            type=\"search\"\n            placeholder={searchLabel}\n            value={this.searchState.getValue()}\n            oninput={(e: InputEvent) => this.searchState.setValue((e?.target as HTMLInputElement)?.value)}\n            onfocus={() => (this.hasFocus = true)}\n            onblur={() => (this.hasFocus = false)}\n          />\n          {!!this.loadingSources && <LoadingIndicator size=\"small\" display=\"inline\" containerClassName=\"Button Button--icon Button--link\" />}\n          {shouldShowClearButton && (\n            <button\n              className=\"Search-clear Button Button--icon Button--link\"\n              onclick={this.clear.bind(this)}\n              aria-label={app.translator.trans('core.forum.header.search_clear_button_accessible_label')}\n              type=\"button\"\n            >\n              {icon('fas fa-times-circle')}\n            </button>\n          )}\n        </div>\n        <ul\n          className=\"Dropdown-menu Search-results\"\n          aria-hidden={!shouldShowResults || undefined}\n          aria-live={shouldShowResults ? 'polite' : undefined}\n        >\n          {shouldShowResults && this.sources.map((source) => source.view(this.searchState.getValue()))}\n        </ul>\n      </div>\n    );\n  }\n\n  updateMaxHeight() {\n    // Since extensions might add elements above the search box on mobile,\n    // we need to calculate and set the max height dynamically.\n    const resultsElementMargin = 14;\n    const maxHeight =\n      window.innerHeight - this.element.querySelector('.Search-input>.FormControl')!.getBoundingClientRect().bottom - resultsElementMargin;\n\n    this.element.querySelector<HTMLElement>('.Search-results')?.style?.setProperty('max-height', `${maxHeight}px`);\n  }\n\n  onupdate(vnode: Mithril.VnodeDOM<T, this>) {\n    super.onupdate(vnode);\n\n    // Highlight the item that is currently selected.\n    this.setIndex(this.getCurrentNumericIndex());\n\n    // If there are no sources, the search view is not shown.\n    if (!this.sources?.length) return;\n\n    this.updateMaxHeight();\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<T, this>) {\n    super.oncreate(vnode);\n\n    // If there are no sources, we shouldn't initialize logic for\n    // search elements, as they will not be shown.\n    if (!this.sources?.length) return;\n\n    const search = this;\n    const state = this.searchState;\n\n    // Highlight the item that is currently selected.\n    this.setIndex(this.getCurrentNumericIndex());\n\n    this.$('.Search-results')\n      .on('mousedown', (e) => e.preventDefault())\n      .on('click', () => this.$('input').trigger('blur'))\n\n      // Whenever the mouse is hovered over a search result, highlight it.\n      .on('mouseenter', '> li:not(.Dropdown-header)', function () {\n        search.setIndex(search.selectableItems().index(this));\n      });\n\n    const $input = this.$('input') as JQuery<HTMLInputElement>;\n\n    this.navigator = new KeyboardNavigatable();\n    this.navigator\n      .onUp(() => this.setIndex(this.getCurrentNumericIndex() - 1, true))\n      .onDown(() => this.setIndex(this.getCurrentNumericIndex() + 1, true))\n      .onSelect(this.selectResult.bind(this), true)\n      .onCancel(this.clear.bind(this))\n      .bindTo($input);\n\n    // Handle input key events on the search input, triggering results to load.\n    $input\n      .on('input focus', function () {\n        const query = this.value.toLowerCase();\n\n        if (!query) return;\n\n        if (search.searchTimeout) clearTimeout(search.searchTimeout);\n        search.searchTimeout = window.setTimeout(() => {\n          if (state.isCached(query)) return;\n\n          if (query.length >= (search.constructor as typeof Search).MIN_SEARCH_LEN) {\n            search.sources?.map((source) => {\n              if (!source.search) return;\n\n              search.loadingSources++;\n\n              source.search(query).then(() => {\n                search.loadingSources = Math.max(0, search.loadingSources - 1);\n                m.redraw();\n              });\n            });\n          }\n\n          state.cache(query);\n          m.redraw();\n        }, 250);\n      })\n\n      .on('focus', function () {\n        $(this)\n          .one('mouseup', (e) => e.preventDefault())\n          .trigger('select');\n      });\n\n    this.updateMaxHeightHandler = this.updateMaxHeight.bind(this);\n    window.addEventListener('resize', this.updateMaxHeightHandler);\n  }\n\n  onremove(vnode: Mithril.VnodeDOM<T, this>) {\n    super.onremove(vnode);\n\n    if (this.updateMaxHeightHandler) {\n      window.removeEventListener('resize', this.updateMaxHeightHandler);\n    }\n  }\n\n  /**\n   * Navigate to the currently selected search result and close the list.\n   */\n  selectResult() {\n    if (this.searchTimeout) clearTimeout(this.searchTimeout);\n\n    this.loadingSources = 0;\n\n    const selectedUrl = this.getItem(this.index).find('a').attr('href');\n    if (this.searchState.getValue() && selectedUrl) {\n      m.route.set(selectedUrl);\n    } else {\n      this.clear();\n    }\n\n    this.$('input').blur();\n  }\n\n  /**\n   * Clear the search\n   */\n  clear() {\n    this.searchState.clear();\n  }\n\n  /**\n   * Build an item list of SearchSources.\n   */\n  sourceItems(): ItemList<SearchSource> {\n    const items = new ItemList<SearchSource>();\n\n    if (app.forum.attribute('canViewForum')) items.add('discussions', new DiscussionsSearchSource());\n    if (app.forum.attribute('canSearchUsers')) items.add('users', new UsersSearchSource());\n\n    return items;\n  }\n\n  /**\n   * Get all of the search result items that are selectable.\n   */\n  selectableItems(): JQuery {\n    return this.$('.Search-results > li:not(.Dropdown-header)');\n  }\n\n  /**\n   * Get the position of the currently selected search result item.\n   * Returns zero if not found.\n   */\n  getCurrentNumericIndex(): number {\n    return Math.max(0, this.selectableItems().index(this.getItem(this.index)));\n  }\n\n  /**\n   * Get the <li> in the search results with the given index (numeric or named).\n   */\n  getItem(index: number): JQuery {\n    const $items = this.selectableItems();\n    let $item = $items.filter(`[data-index=\"${index}\"]`);\n\n    if (!$item.length) {\n      $item = $items.eq(index);\n    }\n\n    return $item;\n  }\n\n  /**\n   * Set the currently-selected search result item to the one with the given\n   * index.\n   */\n  setIndex(index: number, scrollToItem: boolean = false) {\n    const $items = this.selectableItems();\n    const $dropdown = $items.parent();\n\n    let fixedIndex = index;\n    if (index < 0) {\n      fixedIndex = $items.length - 1;\n    } else if (index >= $items.length) {\n      fixedIndex = 0;\n    }\n\n    const $item = $items.removeClass('active').eq(fixedIndex).addClass('active');\n\n    this.index = parseInt($item.attr('data-index') as string) || fixedIndex;\n\n    if (scrollToItem) {\n      const dropdownScroll = $dropdown.scrollTop()!;\n      const dropdownTop = $dropdown.offset()!.top;\n      const dropdownBottom = dropdownTop + $dropdown.outerHeight()!;\n      const itemTop = $item.offset()!.top;\n      const itemBottom = itemTop + $item.outerHeight()!;\n\n      let scrollTop;\n      if (itemTop < dropdownTop) {\n        scrollTop = dropdownScroll - dropdownTop + itemTop - parseInt($dropdown.css('padding-top'), 10);\n      } else if (itemBottom > dropdownBottom) {\n        scrollTop = dropdownScroll - dropdownBottom + itemBottom + parseInt($dropdown.css('padding-bottom'), 10);\n      }\n\n      if (typeof scrollTop !== 'undefined') {\n        $dropdown.stop(true).animate({ scrollTop }, 100);\n      }\n    }\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport Button from '../../common/components/Button';\nimport LogInModal from './LogInModal';\nimport SignUpModal from './SignUpModal';\nimport SessionDropdown from './SessionDropdown';\nimport SelectDropdown from '../../common/components/SelectDropdown';\nimport NotificationsDropdown from './NotificationsDropdown';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\nimport Search from '../components/Search';\n\n/**\n * The `HeaderSecondary` component displays secondary header controls, such as\n * the search box and the user menu. On the default skin, these are shown on the\n * right side of the header.\n */\nexport default class HeaderSecondary extends Component {\n  view() {\n    return <ul className=\"Header-controls\">{listItems(this.items().toArray())}</ul>;\n  }\n\n  /**\n   * Build an item list for the controls.\n   *\n   * @return {ItemList}\n   */\n  items() {\n    const items = new ItemList();\n\n    items.add('search', <Search state={app.search} />, 30);\n\n    if (app.forum.attribute('showLanguageSelector') && Object.keys(app.data.locales).length > 1) {\n      const locales = [];\n\n      for (const locale in app.data.locales) {\n        locales.push(\n          <Button\n            active={app.data.locale === locale}\n            icon={app.data.locale === locale ? 'fas fa-check' : true}\n            onclick={() => {\n              if (app.session.user) {\n                app.session.user.savePreferences({ locale }).then(() => window.location.reload());\n              } else {\n                document.cookie = `locale=${locale}; path=/; expires=Tue, 19 Jan 2038 03:14:07 GMT`;\n                window.location.reload();\n              }\n            }}\n          >\n            {app.data.locales[locale]}\n          </Button>\n        );\n      }\n\n      items.add(\n        'locale',\n        <SelectDropdown\n          buttonClassName=\"Button Button--link\"\n          accessibleToggleLabel={app.translator.trans('core.forum.header.locale_dropdown_accessible_label')}\n        >\n          {locales}\n        </SelectDropdown>,\n        20\n      );\n    }\n\n    if (app.session.user) {\n      items.add('notifications', <NotificationsDropdown state={app.notifications} />, 10);\n      items.add('session', <SessionDropdown />, 0);\n    } else {\n      if (app.forum.attribute('allowSignUp')) {\n        items.add(\n          'signUp',\n          <Button className=\"Button Button--link\" onclick={() => app.modal.show(SignUpModal)}>\n            {app.translator.trans('core.forum.header.sign_up_link')}\n          </Button>,\n          10\n        );\n      }\n\n      items.add(\n        'logIn',\n        <Button className=\"Button Button--link\" onclick={() => app.modal.show(LogInModal)}>\n          {app.translator.trans('core.forum.header.log_in_link')}\n        </Button>,\n        0\n      );\n    }\n\n    return items;\n  }\n}\n","import Button from '../../common/components/Button';\n\n/**\n * The `ComposerButton` component displays a button suitable for the composer\n * controls.\n */\nexport default class ComposerButton extends Button {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = attrs.className || 'Button Button--icon Button--link';\n  }\n}\n","import app from '../../forum/app';\nimport subclassOf from '../../common/utils/subclassOf';\nimport Stream from '../../common/utils/Stream';\nimport ReplyComposer from '../components/ReplyComposer';\n\nclass ComposerState {\n  constructor() {\n    /**\n     * The composer's current position.\n     *\n     * @type {ComposerState.Position}\n     */\n    this.position = ComposerState.Position.HIDDEN;\n\n    /**\n     * The composer's intended height, which can be modified by the user\n     * (by dragging the composer handle).\n     *\n     * @type {number}\n     */\n    this.height = null;\n\n    /**\n     * The dynamic component being shown inside the composer.\n     *\n     * @type {Object}\n     */\n    this.body = { attrs: {} };\n\n    /**\n     * A reference to the text editor that allows text manipulation.\n     *\n     * @type {import('../../common/utils/EditorDriverInterface')|null}\n     */\n    this.editor = null;\n\n    this.clear();\n  }\n\n  /**\n   * Load a content component into the composer.\n   *\n   * @param {typeof import('../components/ComposerBody').default} componentClass\n   */\n  load(componentClass, attrs) {\n    const body = { componentClass, attrs };\n\n    if (this.preventExit()) return;\n\n    // If we load a similar component into the composer, then Mithril will be\n    // able to diff the old/new contents and some DOM-related state from the\n    // old composer will remain. To prevent this from happening, we clear the\n    // component and force a redraw, so that the new component will be working\n    // on a blank slate.\n    if (this.isVisible()) {\n      this.clear();\n      m.redraw.sync();\n    }\n\n    this.body = body;\n  }\n\n  /**\n   * Clear the composer's content component.\n   */\n  clear() {\n    this.position = ComposerState.Position.HIDDEN;\n    this.body = { attrs: {} };\n    this.onExit = null;\n\n    this.fields = {\n      content: Stream(''),\n    };\n\n    if (this.editor) {\n      this.editor.destroy();\n    }\n    this.editor = null;\n  }\n\n  /**\n   * Show the composer.\n   */\n  show() {\n    if (this.position === ComposerState.Position.NORMAL || this.position === ComposerState.Position.FULLSCREEN) return;\n\n    this.position = ComposerState.Position.NORMAL;\n    m.redraw.sync();\n  }\n\n  /**\n   * Close the composer.\n   */\n  hide() {\n    this.clear();\n    m.redraw();\n  }\n\n  /**\n   * Confirm with the user so they don't lose their content, then close the\n   * composer.\n   */\n  close() {\n    if (this.preventExit()) return;\n\n    this.hide();\n  }\n\n  /**\n   * Minimize the composer. Has no effect if the composer is hidden.\n   */\n  minimize() {\n    if (!this.isVisible()) return;\n\n    this.position = ComposerState.Position.MINIMIZED;\n    m.redraw();\n  }\n\n  /**\n   * Take the composer into fullscreen mode. Has no effect if the composer is\n   * hidden.\n   */\n  fullScreen() {\n    if (!this.isVisible()) return;\n\n    this.position = ComposerState.Position.FULLSCREEN;\n    m.redraw();\n  }\n\n  /**\n   * Exit fullscreen mode.\n   */\n  exitFullScreen() {\n    if (this.position !== ComposerState.Position.FULLSCREEN) return;\n\n    this.position = ComposerState.Position.NORMAL;\n    m.redraw();\n  }\n\n  /**\n   * Determine whether the body matches the given component class and data.\n   *\n   * @param {object} type The component class to check against. Subclasses are accepted as well.\n   * @param {object} data\n   * @return {boolean}\n   */\n  bodyMatches(type, data = {}) {\n    // Fail early when the body is of a different type\n    if (!subclassOf(this.body.componentClass, type)) return false;\n\n    // Now that the type is known to be correct, we loop through the provided\n    // data to see whether it matches the data in the attributes for the body.\n    return Object.keys(data).every((key) => this.body.attrs[key] === data[key]);\n  }\n\n  /**\n   * Determine whether or not the Composer is visible.\n   *\n   * True when the composer is displayed on the screen and has a body component.\n   * It could be open in \"normal\" or full-screen mode, or even minimized.\n   *\n   * @returns {boolean}\n   */\n  isVisible() {\n    return this.position !== ComposerState.Position.HIDDEN;\n  }\n\n  /**\n   * Determine whether or not the Composer is covering the screen.\n   *\n   * This will be true if the Composer is in full-screen mode on desktop,\n   * or if we are on a mobile device, where we always consider the composer as full-screen..\n   *\n   * @return {boolean}\n   */\n  isFullScreen() {\n    return this.position === ComposerState.Position.FULLSCREEN || app.screen() === 'phone';\n  }\n\n  /**\n   * Check whether or not the user is currently composing a reply to a\n   * discussion.\n   *\n   * @param {import('../../common/models/Discussion').default} discussion\n   * @return {boolean}\n   */\n  composingReplyTo(discussion) {\n    return this.isVisible() && this.bodyMatches(ReplyComposer, { discussion });\n  }\n\n  /**\n   * Confirm with the user that they want to close the composer and lose their\n   * content.\n   *\n   * @return {boolean} Whether or not the exit was cancelled.\n   */\n  preventExit() {\n    if (!this.isVisible()) return;\n    if (!this.onExit) return;\n\n    if (this.onExit.callback()) {\n      return !confirm(this.onExit.message);\n    }\n  }\n\n  /**\n   * Configure when / what to ask the user before closing the composer.\n   *\n   * The provided callback will be used to determine whether asking for\n   * confirmation is necessary. If the callback returns true at the time of\n   * closing, the provided text will be shown in a standard confirmation dialog.\n   *\n   * @param {() => boolean} callback\n   * @param {string} message\n   */\n  preventClosingWhen(callback, message) {\n    this.onExit = { callback, message };\n  }\n\n  /**\n   * Minimum height of the Composer.\n   * @returns {number}\n   */\n  minimumHeight() {\n    return 200;\n  }\n\n  /**\n   * Maxmimum height of the Composer.\n   * @returns {number}\n   */\n  maximumHeight() {\n    return $(window).height() - $('#header').outerHeight();\n  }\n\n  /**\n   * Computed the composer's current height, based on the intended height, and\n   * the composer's current state. This will be applied to the composer\n   * content's DOM element.\n   * @returns {number | string}\n   */\n  computedHeight() {\n    // If the composer is minimized, then we don't want to set a height; we'll\n    // let the CSS decide how high it is. If it's fullscreen, then we need to\n    // make it as high as the window.\n    if (this.position === ComposerState.Position.MINIMIZED) {\n      return '';\n    } else if (this.position === ComposerState.Position.FULLSCREEN) {\n      return $(window).height();\n    }\n\n    // Otherwise, if it's normal or hidden, then we use the intended height.\n    // We don't let the composer get too small or too big, though.\n    return Math.max(this.minimumHeight(), Math.min(this.height, this.maximumHeight()));\n  }\n}\n\nComposerState.Position = {\n  HIDDEN: 'hidden',\n  NORMAL: 'normal',\n  MINIMIZED: 'minimized',\n  FULLSCREEN: 'fullScreen',\n};\n\nexport default ComposerState;\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport ItemList from '../../common/utils/ItemList';\nimport ComposerButton from './ComposerButton';\nimport listItems from '../../common/helpers/listItems';\nimport classList from '../../common/utils/classList';\nimport ComposerState from '../states/ComposerState';\n\n/**\n * The `Composer` component displays the composer. It can be loaded with a\n * content component with `load` and then its position/state can be altered with\n * `show`, `hide`, `close`, `minimize`, `fullScreen`, and `exitFullScreen`.\n */\nexport default class Composer extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * The composer's \"state\".\n     *\n     * @type {ComposerState}\n     */\n    this.state = this.attrs.state;\n\n    /**\n     * Whether or not the composer currently has focus.\n     *\n     * @type {Boolean}\n     */\n    this.active = false;\n\n    // Store the initial position so that we can trigger animations correctly.\n    this.prevPosition = this.state.position;\n  }\n\n  view() {\n    const body = this.state.body;\n    const classes = {\n      normal: this.state.position === ComposerState.Position.NORMAL,\n      minimized: this.state.position === ComposerState.Position.MINIMIZED,\n      fullScreen: this.state.position === ComposerState.Position.FULLSCREEN,\n      active: this.active,\n      visible: this.state.isVisible(),\n    };\n\n    // Set up a handler so that clicks on the content will show the composer.\n    const showIfMinimized = this.state.position === ComposerState.Position.MINIMIZED ? this.state.show.bind(this.state) : undefined;\n\n    const ComposerBody = body.componentClass;\n\n    return (\n      <div className={'Composer ' + classList(classes)}>\n        <div className=\"Composer-handle\" oncreate={this.configHandle.bind(this)} />\n        <ul className=\"Composer-controls\">{listItems(this.controlItems().toArray())}</ul>\n        <div className=\"Composer-content\" onclick={showIfMinimized}>\n          {ComposerBody && <ComposerBody {...body.attrs} composer={this.state} disabled={classes.minimized} />}\n        </div>\n      </div>\n    );\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    if (this.state.position === this.prevPosition) {\n      // Set the height of the Composer element and its contents on each redraw,\n      // so that they do not lose it if their DOM elements are recreated.\n      this.updateHeight();\n    } else {\n      this.animatePositionChange();\n\n      this.prevPosition = this.state.position;\n    }\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.initializeHeight();\n    this.$().hide().css('bottom', -this.state.computedHeight());\n\n    // Whenever any of the inputs inside the composer are have focus, we want to\n    // add a class to the composer to draw attention to it.\n    this.$().on('focus blur', ':input,.TextEditor-editorContainer', (e) => {\n      this.active = e.type === 'focusin';\n      m.redraw();\n    });\n\n    // When the escape key is pressed on any inputs, close the composer.\n    this.$().on('keydown', ':input,.TextEditor-editorContainer', 'esc', () => this.state.close());\n\n    this.handlers = {};\n\n    $(window)\n      .on('resize', (this.handlers.onresize = this.updateHeight.bind(this)))\n      .resize();\n\n    $(document)\n      .on('mousemove', (this.handlers.onmousemove = this.onmousemove.bind(this)))\n      .on('mouseup', (this.handlers.onmouseup = this.onmouseup.bind(this)));\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    $(window).off('resize', this.handlers.onresize);\n\n    $(document).off('mousemove', this.handlers.onmousemove).off('mouseup', this.handlers.onmouseup);\n  }\n\n  /**\n   * Add the necessary event handlers to the composer's handle so that it can\n   * be used to resize the composer.\n   */\n  configHandle(vnode) {\n    const composer = this;\n\n    $(vnode.dom)\n      .css('cursor', 'row-resize')\n      .bind('dragstart mousedown', (e) => e.preventDefault())\n      .mousedown(function (e) {\n        composer.mouseStart = e.clientY;\n        composer.heightStart = composer.$().height();\n        composer.handle = $(this);\n        $('body').css('cursor', 'row-resize');\n      });\n  }\n\n  /**\n   * Resize the composer according to mouse movement.\n   *\n   * @param {MouseEvent} e\n   */\n  onmousemove(e) {\n    if (!this.handle) return;\n\n    // Work out how much the mouse has been moved, and set the height\n    // relative to the old one based on that. Then update the content's\n    // height so that it fills the height of the composer, and update the\n    // body's padding.\n    const deltaPixels = this.mouseStart - e.clientY;\n    this.changeHeight(this.heightStart + deltaPixels);\n\n    // Update the body's padding-bottom so that no content on the page will ever\n    // get permanently hidden behind the composer. If the user is already\n    // scrolled to the bottom of the page, then we will keep them scrolled to\n    // the bottom after the padding has been updated.\n    const scrollTop = $(window).scrollTop();\n    const anchorToBottom = scrollTop > 0 && scrollTop + $(window).height() >= $(document).height();\n    this.updateBodyPadding(anchorToBottom);\n  }\n\n  /**\n   * Finish resizing the composer when the mouse is released.\n   */\n  onmouseup() {\n    if (!this.handle) return;\n\n    this.handle = null;\n    $('body').css('cursor', '');\n  }\n\n  /**\n   * Draw focus to the first focusable content element (the text editor).\n   */\n  focus() {\n    this.$('.Composer-content :input:enabled:visible, .TextEditor-editor').first().focus();\n  }\n\n  /**\n   * Update the DOM to reflect the composer's current height. This involves\n   * setting the height of the composer's root element, and adjusting the height\n   * of any flexible elements inside the composer's body.\n   */\n  updateHeight() {\n    const height = this.state.computedHeight();\n    const $flexible = this.$('.Composer-flexible');\n\n    this.$().height(height);\n\n    if ($flexible.length) {\n      const headerHeight = $flexible.offset().top - this.$().offset().top;\n      const paddingBottom = parseInt($flexible.css('padding-bottom'), 10);\n      const footerHeight = this.$('.Composer-footer').outerHeight(true);\n\n      $flexible.height(this.$().outerHeight() - headerHeight - paddingBottom - footerHeight);\n    }\n  }\n\n  /**\n   * Update the amount of padding-bottom on the body so that the page's\n   * content will still be visible above the composer when the page is\n   * scrolled right to the bottom.\n   */\n  updateBodyPadding() {\n    const visible =\n      this.state.position !== ComposerState.Position.HIDDEN && this.state.position !== ComposerState.Position.MINIMIZED && app.screen() !== 'phone';\n\n    const paddingBottom = visible ? this.state.computedHeight() - parseInt($('#app').css('padding-bottom'), 10) : 0;\n\n    $('#content').css({ paddingBottom });\n  }\n\n  /**\n   * Trigger the right animation depending on the desired new position.\n   */\n  animatePositionChange() {\n    // When exiting full-screen mode: focus content\n    if (this.prevPosition === ComposerState.Position.FULLSCREEN && this.state.position === ComposerState.Position.NORMAL) {\n      this.focus();\n      return;\n    }\n\n    switch (this.state.position) {\n      case ComposerState.Position.HIDDEN:\n        return this.hide();\n      case ComposerState.Position.MINIMIZED:\n        return this.minimize();\n      case ComposerState.Position.FULLSCREEN:\n        return this.focus();\n      case ComposerState.Position.NORMAL:\n        return this.show();\n    }\n  }\n\n  /**\n   * Animate the Composer into the new position by changing the height.\n   */\n  animateHeightChange() {\n    const $composer = this.$().stop(true);\n    const oldHeight = $composer.outerHeight();\n    const scrollTop = $(window).scrollTop();\n\n    $composer.show();\n    this.updateHeight();\n\n    const newHeight = $composer.outerHeight();\n\n    if (this.prevPosition === ComposerState.Position.HIDDEN) {\n      $composer.css({ bottom: -newHeight, height: newHeight });\n    } else {\n      $composer.css({ height: oldHeight });\n    }\n\n    const animation = $composer.animate({ bottom: 0, height: newHeight }, 'fast').promise();\n\n    this.updateBodyPadding();\n    $(window).scrollTop(scrollTop);\n    return animation;\n  }\n\n  /**\n   * Show the Composer backdrop.\n   */\n  showBackdrop() {\n    this.$backdrop = $('<div/>').addClass('composer-backdrop').appendTo('body');\n  }\n\n  /**\n   * Hide the Composer backdrop.\n   */\n  hideBackdrop() {\n    if (this.$backdrop) this.$backdrop.remove();\n  }\n\n  /**\n   * Animate the composer sliding up from the bottom to take its normal height.\n   *\n   * @private\n   */\n  show() {\n    this.animateHeightChange().then(() => this.focus());\n\n    if (app.screen() === 'phone') {\n      // On safari fixed position doesn't properly work on mobile,\n      // So we use absolute and set the top value.\n      // https://github.com/flarum/core/issues/2652\n\n      // Due to another safari bug, `scrollTop` is unreliable when\n      // at the very bottom of the page AND opening the composer.\n      // So we fallback to a calculated version of scrollTop.\n      // https://github.com/flarum/core/issues/2683\n      const scrollElement = document.documentElement;\n      const topOfViewport = Math.min(scrollElement.scrollTop, scrollElement.scrollHeight - scrollElement.clientHeight);\n      this.$().css('top', $('.App').is('.mobile-safari') ? topOfViewport : 0);\n      this.showBackdrop();\n    }\n  }\n\n  /**\n   * Animate closing the composer.\n   *\n   * @private\n   */\n  hide() {\n    const $composer = this.$();\n\n    // Animate the composer sliding down off the bottom edge of the viewport.\n    // Only when the animation is completed, update other elements on the page.\n    $composer.stop(true).animate({ bottom: -$composer.height() }, 'fast', () => {\n      $composer.hide();\n      this.hideBackdrop();\n      this.updateBodyPadding();\n    });\n  }\n\n  /**\n   * Shrink the composer until only its title is visible.\n   *\n   * @private\n   */\n  minimize() {\n    this.animateHeightChange();\n\n    this.$().css('top', 'auto');\n    this.hideBackdrop();\n  }\n\n  /**\n   * Build an item list for the composer's controls.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controlItems() {\n    const items = new ItemList();\n\n    if (this.state.position === ComposerState.Position.FULLSCREEN) {\n      items.add(\n        'exitFullScreen',\n        <ComposerButton\n          icon=\"fas fa-compress\"\n          title={app.translator.trans('core.forum.composer.exit_full_screen_tooltip')}\n          onclick={this.state.exitFullScreen.bind(this.state)}\n        />\n      );\n    } else {\n      if (this.state.position !== ComposerState.Position.MINIMIZED) {\n        items.add(\n          'minimize',\n          <ComposerButton\n            icon=\"fas fa-minus minimize\"\n            title={app.translator.trans('core.forum.composer.minimize_tooltip')}\n            onclick={this.state.minimize.bind(this.state)}\n            itemClassName=\"App-backControl\"\n          />\n        );\n\n        items.add(\n          'fullScreen',\n          <ComposerButton\n            icon=\"fas fa-expand\"\n            title={app.translator.trans('core.forum.composer.full_screen_tooltip')}\n            onclick={this.state.fullScreen.bind(this.state)}\n          />\n        );\n      }\n\n      items.add(\n        'close',\n        <ComposerButton\n          icon=\"fas fa-times\"\n          title={app.translator.trans('core.forum.composer.close_tooltip')}\n          onclick={this.state.close.bind(this.state)}\n        />\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Initialize default Composer height.\n   */\n  initializeHeight() {\n    this.state.height = localStorage.getItem('composerHeight');\n\n    if (!this.state.height) {\n      this.state.height = this.defaultHeight();\n    }\n  }\n\n  /**\n   * Default height of the Composer in case none is saved.\n   * @returns {number}\n   */\n  defaultHeight() {\n    return this.$().height();\n  }\n\n  /**\n   * Save a new Composer height and update the DOM.\n   * @param {number} height\n   */\n  changeHeight(height) {\n    this.state.height = height;\n    this.updateHeight();\n\n    localStorage.setItem('composerHeight', this.state.height);\n  }\n}\n","import app from '../../forum/app';\nimport type NotificationModel from '../../common/models/Notification';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport avatar from '../../common/helpers/avatar';\nimport icon from '../../common/helpers/icon';\nimport humanTime from '../../common/helpers/humanTime';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport classList from '../../common/utils/classList';\nimport type Mithril from 'mithril';\n\nexport interface INotificationAttrs extends ComponentAttrs {\n  notification: NotificationModel;\n}\n\n// TODO [Flarum 2.0]: Remove `?.` from abstract function calls.\n\n/**\n * The `Notification` component abstract displays a single notification.\n * Subclasses should implement the `icon`, `href`, and `content` methods.\n */\nexport default abstract class Notification<CustomAttrs extends INotificationAttrs = INotificationAttrs> extends Component<CustomAttrs> {\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    const notification = this.attrs.notification;\n    const href = this.href?.() ?? '';\n\n    const fromUser = notification.fromUser();\n\n    return (\n      <Link\n        className={classList('Notification', `Notification--${notification.contentType()}`, [!notification.isRead() && 'unread'])}\n        href={href}\n        external={href.includes('://')}\n        onclick={this.markAsRead.bind(this)}\n      >\n        {avatar(fromUser || null)}\n        {icon(this.icon?.(), { className: 'Notification-icon' })}\n        <span className=\"Notification-title\">\n          <span className=\"Notification-content\">{this.content?.()}</span>\n          <span className=\"Notification-title-spring\" />\n          {humanTime(notification.createdAt())}\n        </span>\n        {!notification.isRead() && (\n          <Button\n            className=\"Notification-action Button Button--link\"\n            icon=\"fas fa-check\"\n            title={app.translator.trans('core.forum.notifications.mark_as_read_tooltip')}\n            onclick={(e: Event) => {\n              e.preventDefault();\n              e.stopPropagation();\n\n              this.markAsRead();\n            }}\n          />\n        )}\n        <div className=\"Notification-excerpt\">{this.excerpt?.()}</div>\n      </Link>\n    );\n  }\n\n  /**\n   * Get the name of the icon that should be displayed in the notification.\n   */\n  abstract icon(): string;\n\n  /**\n   * Get the URL that the notification should link to.\n   */\n  abstract href(): string;\n\n  /**\n   * Get the content of the notification.\n   */\n  abstract content(): Mithril.Children;\n\n  /**\n   * Get the excerpt of the notification.\n   */\n  abstract excerpt(): Mithril.Children;\n\n  /**\n   * Mark the notification as read.\n   */\n  markAsRead() {\n    if (this.attrs.notification.isRead()) return;\n\n    app.session.user?.pushAttributes({ unreadNotificationCount: (app.session.user.unreadNotificationCount() ?? 1) - 1 });\n\n    this.attrs.notification.save({ isRead: true });\n  }\n}\n","import type Discussion from '../../common/models/Discussion';\nimport app from '../../forum/app';\nimport Notification from './Notification';\n\ninterface DiscussionRenamedContent {\n  postNumber: number;\n}\n\n/**\n * The `DiscussionRenamedNotification` component displays a notification which\n * indicates that a discussion has had its title changed.\n */\nexport default class DiscussionRenamedNotification extends Notification {\n  icon() {\n    return 'fas fa-pencil-alt';\n  }\n\n  href() {\n    const notification = this.attrs.notification;\n    const discussion = notification.subject();\n\n    if (!discussion) {\n      return '#';\n    }\n\n    return app.route.discussion(discussion as Discussion, notification.content<DiscussionRenamedContent>().postNumber);\n  }\n\n  content() {\n    return app.translator.trans('core.forum.notifications.discussion_renamed_text', { user: this.attrs.notification.fromUser() });\n  }\n\n  excerpt() {\n    return null;\n  }\n}\n","import app from '../../forum/app';\nimport ComposerBody from './ComposerBody';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport icon from '../../common/helpers/icon';\n\nfunction minimizeComposerIfFullScreen(e) {\n  if (app.composer.isFullScreen()) {\n    app.composer.minimize();\n    e.stopPropagation();\n  }\n}\n\n/**\n * The `EditPostComposer` component displays the composer content for editing a\n * post. It sets the initial content to the content of the post that is being\n * edited, and adds a header control to indicate which post is being edited.\n *\n * ### Attrs\n *\n * - All of the attrs for ComposerBody\n * - `post`\n */\nexport default class EditPostComposer extends ComposerBody {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.submitLabel = attrs.submitLabel || app.translator.trans('core.forum.composer_edit.submit_button');\n    attrs.confirmExit = attrs.confirmExit || app.translator.trans('core.forum.composer_edit.discard_confirmation');\n    attrs.originalContent = attrs.originalContent || attrs.post.content();\n    attrs.user = attrs.user || attrs.post.user();\n\n    attrs.post.editedContent = attrs.originalContent;\n  }\n\n  headerItems() {\n    const items = super.headerItems();\n    const post = this.attrs.post;\n\n    items.add(\n      'title',\n      <h3>\n        {icon('fas fa-pencil-alt')}{' '}\n        <Link href={app.route.discussion(post.discussion(), post.number())} onclick={minimizeComposerIfFullScreen}>\n          {app.translator.trans('core.forum.composer_edit.post_link', { number: post.number(), discussion: post.discussion().title() })}\n        </Link>\n      </h3>\n    );\n\n    return items;\n  }\n\n  /**\n   * Jump to the preview when triggered by the text editor.\n   */\n  jumpToPreview(e) {\n    minimizeComposerIfFullScreen(e);\n\n    m.route.set(app.route.post(this.attrs.post));\n  }\n\n  /**\n   * Get the data to submit to the server when the post is saved.\n   *\n   * @return {Record<string, unknown>}\n   */\n  data() {\n    return {\n      content: this.composer.fields.content(),\n    };\n  }\n\n  onsubmit() {\n    const discussion = this.attrs.post.discussion();\n\n    this.loading = true;\n\n    const data = this.data();\n\n    this.attrs.post.save(data).then((post) => {\n      // If we're currently viewing the discussion which this edit was made\n      // in, then we can scroll to the post.\n      if (app.viewingDiscussion(discussion)) {\n        app.current.get('stream').goToNumber(post.number());\n      } else {\n        // Otherwise, we'll create an alert message to inform the user that\n        // their edit has been made, containing a button which will\n        // transition to their edited post when clicked.\n        const alert = app.alerts.show(\n          {\n            type: 'success',\n            controls: [\n              <Button\n                className=\"Button Button--link\"\n                onclick={() => {\n                  m.route.set(app.route.post(post));\n                  app.alerts.dismiss(alert);\n                }}\n              >\n                {app.translator.trans('core.forum.composer_edit.view_button')}\n              </Button>,\n            ],\n          },\n          app.translator.trans('core.forum.composer_edit.edited_message')\n        );\n      }\n\n      this.composer.hide();\n    }, this.loaded.bind(this));\n  }\n}\n","import app from '../../forum/app';\nimport EditPostComposer from '../components/EditPostComposer';\nimport Button from '../../common/components/Button';\nimport Separator from '../../common/components/Separator';\nimport ItemList from '../../common/utils/ItemList';\nimport extractText from '../../common/utils/extractText';\n\n/**\n * The `PostControls` utility constructs a list of buttons for a post which\n * perform actions on it.\n */\nexport default {\n  /**\n   * Get a list of controls for a post.\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}')}\n   */\n  controls(post, context) {\n    const items = new ItemList();\n\n    ['user', 'moderation', 'destructive'].forEach((section) => {\n      const controls = this[section + 'Controls'](post, context).toArray();\n      if (controls.length) {\n        controls.forEach((item) => items.add(item.itemName, item));\n        items.add(section + 'Separator', <Separator />);\n      }\n    });\n\n    return items;\n  },\n\n  /**\n   * Get controls for a post pertaining to the current user (e.g. report).\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}')}\n   * @protected\n   */\n  userControls(post, context) {\n    return new ItemList();\n  },\n\n  /**\n   * Get controls for a post pertaining to moderation (e.g. edit).\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}')}\n   * @protected\n   */\n  moderationControls(post, context) {\n    const items = new ItemList();\n\n    if (post.contentType() === 'comment' && post.canEdit()) {\n      if (!post.isHidden()) {\n        items.add(\n          'edit',\n          <Button icon=\"fas fa-pencil-alt\" onclick={this.editAction.bind(post)}>\n            {app.translator.trans('core.forum.post_controls.edit_button')}\n          </Button>\n        );\n      }\n    }\n\n    return items;\n  },\n\n  /**\n   * Get controls for a post that are destructive (e.g. delete).\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}')}\n   * @protected\n   */\n  destructiveControls(post, context) {\n    const items = new ItemList();\n\n    if (post.contentType() === 'comment' && !post.isHidden()) {\n      if (post.canHide()) {\n        items.add(\n          'hide',\n          <Button icon=\"far fa-trash-alt\" onclick={this.hideAction.bind(post)}>\n            {app.translator.trans('core.forum.post_controls.delete_button')}\n          </Button>\n        );\n      }\n    } else {\n      if (post.contentType() === 'comment' && post.canHide()) {\n        items.add(\n          'restore',\n          <Button icon=\"fas fa-reply\" onclick={this.restoreAction.bind(post)}>\n            {app.translator.trans('core.forum.post_controls.restore_button')}\n          </Button>\n        );\n      }\n      if (post.canDelete()) {\n        items.add(\n          'delete',\n          <Button icon=\"fas fa-times\" onclick={this.deleteAction.bind(post, context)}>\n            {app.translator.trans('core.forum.post_controls.delete_forever_button')}\n          </Button>\n        );\n      }\n    }\n\n    return items;\n  },\n\n  /**\n   * Open the composer to edit a post.\n   *\n   * @return {Promise<void>}\n   */\n  editAction() {\n    return new Promise((resolve) => {\n      app.composer.load(EditPostComposer, { post: this });\n      app.composer.show();\n\n      return resolve();\n    });\n  },\n\n  /**\n   * Hide a post.\n   *\n   * @return {Promise<void>}\n   */\n  hideAction() {\n    if (!confirm(extractText(app.translator.trans('core.forum.post_controls.hide_confirmation')))) return;\n    this.pushData({ attributes: { hiddenAt: new Date() }, relationships: { hiddenUser: app.session.user } });\n\n    return this.save({ isHidden: true }).then(() => m.redraw());\n  },\n\n  /**\n   * Restore a post.\n   *\n   * @return {Promise<void>}\n   */\n  restoreAction() {\n    this.pushData({ attributes: { hiddenAt: null }, relationships: { hiddenUser: null } });\n\n    return this.save({ isHidden: false }).then(() => m.redraw());\n  },\n\n  /**\n   * Delete a post.\n   *\n   * @return {Promise<void>}\n   */\n  deleteAction(context) {\n    if (!confirm(extractText(app.translator.trans('core.forum.post_controls.delete_confirmation')))) return;\n    if (context) context.loading = true;\n\n    return this.delete()\n      .then(() => {\n        const discussion = this.discussion();\n\n        discussion.removePost(this.id());\n\n        // If this was the last post in the discussion, then we will assume that\n        // the whole discussion was deleted too.\n        if (!discussion.postIds().length) {\n          app.discussions.removeDiscussion(discussion);\n\n          if (app.viewingDiscussion(discussion)) {\n            app.history.back();\n          }\n        }\n      })\n      .catch(() => {})\n      .then(() => {\n        if (context) context.loading = false;\n        m.redraw();\n      });\n  },\n};\n","import app from '../../forum/app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport SubtreeRetainer from '../../common/utils/SubtreeRetainer';\nimport Dropdown from '../../common/components/Dropdown';\nimport PostControls from '../utils/PostControls';\nimport listItems, { ModdedChildrenWithItemName } from '../../common/helpers/listItems';\nimport ItemList from '../../common/utils/ItemList';\nimport type PostModel from '../../common/models/Post';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport type Mithril from 'mithril';\n\nexport interface IPostAttrs extends ComponentAttrs {\n  post: PostModel;\n}\n\n/**\n * The `Post` component displays a single post. The basic post template just\n * includes a controls dropdown; subclasses must implement `content` and `attrs`\n * methods.\n */\nexport default abstract class Post<CustomAttrs extends IPostAttrs = IPostAttrs> extends Component<CustomAttrs> {\n  /**\n   * May be set by subclasses.\n   */\n  loading = false;\n\n  /**\n   * Ensures that the post will not be redrawn\n   * unless new data comes in.\n   */\n  subtree!: SubtreeRetainer;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.loading = false;\n\n    this.subtree = new SubtreeRetainer(\n      () => this.loading,\n      () => this.attrs.post.freshness,\n      () => {\n        const user = this.attrs.post.user();\n        return user && user.freshness;\n      }\n    );\n  }\n\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    const attrs = this.elementAttrs();\n\n    attrs.className = this.classes(attrs.className as string | undefined).join(' ');\n\n    const controls = PostControls.controls(this.attrs.post, this).toArray();\n    const footerItems = this.footerItems().toArray();\n\n    return (\n      <article {...attrs}>\n        <div>{this.viewItems(controls, footerItems).toArray()}</div>\n      </article>\n    );\n  }\n\n  viewItems(controls: Mithril.Children[], footerItems: ModdedChildrenWithItemName[]): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('content', this.loading ? <LoadingIndicator /> : this.content(), 100);\n\n    items.add(\n      'actions',\n      <aside className=\"Post-actions\">\n        <ul>\n          {listItems(this.actionItems().toArray())}\n          {!!controls.length && (\n            <li>\n              <Dropdown\n                className=\"Post-controls\"\n                buttonClassName=\"Button Button--icon Button--flat\"\n                menuClassName=\"Dropdown-menu--right\"\n                icon=\"fas fa-ellipsis-h\"\n                onshow={() => this.$('.Post-controls').addClass('open')}\n                onhide={() => this.$('.Post-controls').removeClass('open')}\n                accessibleToggleLabel={app.translator.trans('core.forum.post_controls.toggle_dropdown_accessible_label')}\n              >\n                {controls}\n              </Dropdown>\n            </li>\n          )}\n        </ul>\n      </aside>,\n      90\n    );\n\n    items.add('footer', <footer className=\"Post-footer\">{footerItems.length > 0 ? <ul>{listItems(footerItems)}</ul> : null}</footer>, 80);\n\n    return items;\n  }\n\n  onbeforeupdate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onbeforeupdate(vnode);\n\n    return this.subtree.needsRebuild();\n  }\n\n  onupdate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onupdate(vnode);\n\n    const $actions = this.$('.Post-actions');\n    const $controls = this.$('.Post-controls');\n\n    $actions.toggleClass('openWithin', $controls.hasClass('open'));\n  }\n\n  /**\n   * Get attributes for the post element.\n   */\n  elementAttrs(): Record<string, unknown> {\n    return {};\n  }\n\n  /**\n   * Get the post's content.\n   */\n  content(): Mithril.Children {\n    // TODO: [Flarum 2.0] return `null`\n    return [];\n  }\n\n  /**\n   * Get the post's classes.\n   */\n  classes(existing?: string): string[] {\n    let classes = (existing || '').split(' ').concat(['Post']);\n\n    const user = this.attrs.post.user();\n    const discussion = this.attrs.post.discussion();\n\n    if (this.loading) {\n      classes.push('Post--loading');\n    }\n\n    if (user && user === app.session.user) {\n      classes.push('Post--by-actor');\n    }\n\n    if (user && user === discussion.user()) {\n      classes.push('Post--by-start-user');\n    }\n\n    return classes;\n  }\n\n  /**\n   * Build an item list for the post's actions.\n   */\n  actionItems(): ItemList<Mithril.Children> {\n    return new ItemList();\n  }\n\n  /**\n   * Build an item list for the post's footer.\n   */\n  footerItems(): ItemList<ModdedChildrenWithItemName> {\n    return new ItemList<ModdedChildrenWithItemName>();\n  }\n}\n","import Badge, { IBadgeAttrs } from './Badge';\nimport Group from '../models/Group';\n\nexport interface IGroupAttrs extends IBadgeAttrs {\n  group?: Group;\n}\n\nexport default class GroupBadge<CustomAttrs extends IGroupAttrs = IGroupAttrs> extends Badge<CustomAttrs> {\n  static initAttrs(attrs: IGroupAttrs): void {\n    super.initAttrs(attrs);\n\n    if (attrs.group) {\n      attrs.icon = attrs.group.icon() || '';\n      attrs.color = attrs.group.color() || '';\n      attrs.label = typeof attrs.label === 'undefined' ? attrs.group.nameSingular() : attrs.label;\n      attrs.type = 'group--' + attrs.group.id();\n\n      delete attrs.group;\n    }\n  }\n}\n","import Model from '../Model';\n\nexport default class Group extends Model {\n  static ADMINISTRATOR_ID = '1';\n  static GUEST_ID = '2';\n  static MEMBER_ID = '3';\n\n  nameSingular() {\n    return Model.attribute<string>('nameSingular').call(this);\n  }\n  namePlural() {\n    return Model.attribute<string>('namePlural').call(this);\n  }\n\n  color() {\n    return Model.attribute<string | null>('color').call(this);\n  }\n  icon() {\n    return Model.attribute<string | null>('icon').call(this);\n  }\n\n  isHidden() {\n    return Model.attribute<boolean>('isHidden').call(this);\n  }\n}\n","import app from '../../common/app';\nimport Modal, { IInternalModalAttrs } from './Modal';\nimport Button from './Button';\nimport GroupBadge from './GroupBadge';\nimport Group from '../models/Group';\nimport extractText from '../utils/extractText';\nimport ItemList from '../utils/ItemList';\nimport Stream from '../utils/Stream';\nimport type Mithril from 'mithril';\nimport type User from '../models/User';\nimport type { SaveAttributes, SaveRelationships } from '../Model';\n\nexport interface IEditUserModalAttrs extends IInternalModalAttrs {\n  user: User;\n}\n\nexport default class EditUserModal<CustomAttrs extends IEditUserModalAttrs = IEditUserModalAttrs> extends Modal<CustomAttrs> {\n  protected username!: Stream<string>;\n  protected email!: Stream<string>;\n  protected isEmailConfirmed!: Stream<boolean>;\n  protected setPassword!: Stream<boolean>;\n  protected password!: Stream<string>;\n  protected groups: Record<string, Stream<boolean>> = {};\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    const user = this.attrs.user;\n\n    this.username = Stream(user.username() || '');\n    this.email = Stream(user.email() || '');\n    this.isEmailConfirmed = Stream(user.isEmailConfirmed() || false);\n    this.setPassword = Stream(false as boolean);\n    this.password = Stream(user.password() || '');\n\n    const userGroups = user.groups() || [];\n\n    app.store\n      .all<Group>('groups')\n      .filter((group) => ![Group.GUEST_ID, Group.MEMBER_ID].includes(group.id()!))\n      .forEach((group) => (this.groups[group.id()!] = Stream(userGroups.includes(group))));\n  }\n\n  className() {\n    return 'EditUserModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.lib.edit_user.title');\n  }\n\n  content() {\n    const fields = this.fields().toArray();\n    return (\n      <div className=\"Modal-body\">\n        {fields.length > 1 ? <div className=\"Form\">{this.fields().toArray()}</div> : app.translator.trans('core.lib.edit_user.nothing_available')}\n      </div>\n    );\n  }\n\n  fields() {\n    const items = new ItemList();\n\n    if (this.attrs.user.canEditCredentials()) {\n      items.add(\n        'username',\n        <div className=\"Form-group\">\n          <label>{app.translator.trans('core.lib.edit_user.username_heading')}</label>\n          <input\n            className=\"FormControl\"\n            placeholder={extractText(app.translator.trans('core.lib.edit_user.username_label'))}\n            bidi={this.username}\n            disabled={this.nonAdminEditingAdmin()}\n          />\n        </div>,\n        40\n      );\n\n      if (app.session.user !== this.attrs.user) {\n        items.add(\n          'email',\n          <div className=\"Form-group\">\n            <label>{app.translator.trans('core.lib.edit_user.email_heading')}</label>\n            <div>\n              <input\n                className=\"FormControl\"\n                placeholder={extractText(app.translator.trans('core.lib.edit_user.email_label'))}\n                bidi={this.email}\n                disabled={this.nonAdminEditingAdmin()}\n              />\n            </div>\n            {!this.isEmailConfirmed() && this.userIsAdmin(app.session.user) && (\n              <div>\n                <Button className=\"Button Button--block\" loading={this.loading} onclick={this.activate.bind(this)}>\n                  {app.translator.trans('core.lib.edit_user.activate_button')}\n                </Button>\n              </div>\n            )}\n          </div>,\n          30\n        );\n\n        items.add(\n          'password',\n          <div className=\"Form-group\">\n            <label>{app.translator.trans('core.lib.edit_user.password_heading')}</label>\n            <div>\n              <label className=\"checkbox\">\n                <input\n                  type=\"checkbox\"\n                  onchange={(e: KeyboardEvent) => {\n                    const target = e.target as HTMLInputElement;\n                    this.setPassword(target.checked);\n                    m.redraw.sync();\n                    if (target.checked) this.$('[name=password]').select();\n                    e.redraw = false;\n                  }}\n                  disabled={this.nonAdminEditingAdmin()}\n                />\n                {app.translator.trans('core.lib.edit_user.set_password_label')}\n              </label>\n              {this.setPassword() && (\n                <input\n                  className=\"FormControl\"\n                  type=\"password\"\n                  name=\"password\"\n                  placeholder={extractText(app.translator.trans('core.lib.edit_user.password_label'))}\n                  bidi={this.password}\n                  disabled={this.nonAdminEditingAdmin()}\n                />\n              )}\n            </div>\n          </div>,\n          20\n        );\n      }\n    }\n\n    if (this.attrs.user.canEditGroups()) {\n      items.add(\n        'groups',\n        <div className=\"Form-group EditUserModal-groups\">\n          <label>{app.translator.trans('core.lib.edit_user.groups_heading')}</label>\n          <div>\n            {Object.keys(this.groups)\n              .map((id) => app.store.getById<Group>('groups', id))\n              .filter(Boolean)\n              .map(\n                (group) =>\n                  // Necessary because filter(Boolean) doesn't narrow out falsy values.\n                  group && (\n                    <label className=\"checkbox\">\n                      <input\n                        type=\"checkbox\"\n                        bidi={this.groups[group.id()!]}\n                        disabled={\n                          group.id() === Group.ADMINISTRATOR_ID && (this.attrs.user === app.session.user || !this.userIsAdmin(app.session.user))\n                        }\n                      />\n                      <GroupBadge group={group} label={null} /> {group.nameSingular()}\n                    </label>\n                  )\n              )}\n          </div>\n        </div>,\n        10\n      );\n    }\n\n    items.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.lib.edit_user.submit_button')}\n        </Button>\n      </div>,\n      -10\n    );\n\n    return items;\n  }\n\n  activate() {\n    this.loading = true;\n    const data = {\n      username: this.username(),\n      isEmailConfirmed: true,\n    };\n    this.attrs.user\n      .save(data, { errorHandler: this.onerror.bind(this) })\n      .then(() => {\n        this.isEmailConfirmed(true);\n        this.loading = false;\n        m.redraw();\n      })\n      .catch(() => {\n        this.loading = false;\n        m.redraw();\n      });\n  }\n\n  data() {\n    const data: SaveAttributes = {};\n    const relationships: SaveRelationships = {};\n\n    if (this.attrs.user.canEditCredentials() && !this.nonAdminEditingAdmin()) {\n      data.username = this.username();\n\n      if (app.session.user !== this.attrs.user) {\n        data.email = this.email();\n      }\n\n      if (this.setPassword()) {\n        data.password = this.password();\n      }\n    }\n\n    if (this.attrs.user.canEditGroups()) {\n      relationships.groups = Object.keys(this.groups)\n        .filter((id) => this.groups[id]())\n        .map((id) => app.store.getById<Group>('groups', id))\n        .filter((g): g is Group => g instanceof Group);\n    }\n\n    data.relationships = relationships;\n\n    return data;\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    this.attrs.user\n      .save(this.data(), { errorHandler: this.onerror.bind(this) })\n      .then(this.hide.bind(this))\n      .catch(() => {\n        this.loading = false;\n        m.redraw();\n      });\n  }\n\n  nonAdminEditingAdmin(): boolean {\n    return this.userIsAdmin(this.attrs.user) && !this.userIsAdmin(app.session.user);\n  }\n\n  /**\n   * @internal\n   */\n  protected userIsAdmin(user: User | null): boolean {\n    return !!(user?.groups() || []).some((g) => g?.id() === Group.ADMINISTRATOR_ID);\n  }\n}\n","import Component from '../../common/Component';\n\n/**\n * The `AffixedSidebar` component uses Bootstrap's \"affix\" plugin to keep a\n * sidebar navigation at the top of the viewport when scrolling.\n *\n * ### Children\n *\n * The component must wrap an element that itself wraps an <ul> element, which\n * will be \"affixed\".\n *\n * @see https://getbootstrap.com/docs/3.4/javascript/#affix\n */\nexport default class AffixedSidebar extends Component {\n  view(vnode) {\n    return vnode.children[0];\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    // Register the affix plugin to execute on every window resize (and trigger)\n    this.boundOnresize = this.onresize.bind(this);\n    $(window).on('resize', this.boundOnresize).resize();\n  }\n\n  onremove(vnode) {\n    super.onremove(vnode);\n\n    $(window).off('resize', this.boundOnresize);\n  }\n\n  onresize() {\n    const $sidebar = this.$();\n    const $header = $('#header');\n    const $footer = $('#footer');\n    const $affixElement = $sidebar.find('> ul');\n\n    $(window).off('.affix');\n    $affixElement.removeClass('affix affix-top affix-bottom').removeData('bs.affix');\n\n    // Don't affix the sidebar if it is taller than the viewport (otherwise\n    // there would be no way to scroll through its content).\n    if ($sidebar.outerHeight(true) > $(window).height() - $header.outerHeight(true)) return;\n\n    $affixElement.affix({\n      offset: {\n        top: () => $sidebar.offset().top - $header.outerHeight(true) - parseInt($sidebar.css('margin-top'), 10),\n        bottom: () => (this.bottom = $footer.outerHeight(true)),\n      },\n    });\n  }\n}\n","import app from '../../forum/app';\nimport Page, { IPageAttrs } from '../../common/components/Page';\nimport ItemList from '../../common/utils/ItemList';\nimport UserCard from './UserCard';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport SelectDropdown from '../../common/components/SelectDropdown';\nimport LinkButton from '../../common/components/LinkButton';\nimport Separator from '../../common/components/Separator';\nimport listItems from '../../common/helpers/listItems';\nimport AffixedSidebar from './AffixedSidebar';\nimport type User from '../../common/models/User';\nimport type Mithril from 'mithril';\n\nexport interface IUserPageAttrs extends IPageAttrs {}\n\n/**\n * The `UserPage` component shows a user's profile. It can be extended to show\n * content inside of the content area. See `ActivityPage` and `SettingsPage` for\n * examples.\n *\n * @abstract\n */\nexport default class UserPage<CustomAttrs extends IUserPageAttrs = IUserPageAttrs, CustomState = undefined> extends Page<CustomAttrs, CustomState> {\n  /**\n   * The user this page is for.\n   */\n  user: User | null = null;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.bodyClass = 'App--user';\n  }\n\n  /**\n   * Base view template for the user page.\n   */\n  view() {\n    return (\n      <div className=\"UserPage\">\n        {this.user\n          ? [\n              <UserCard\n                user={this.user}\n                className=\"Hero UserHero\"\n                editable={this.user.canEdit() || this.user === app.session.user}\n                controlsButtonClassName=\"Button\"\n              />,\n              <div className=\"container\">\n                <div className=\"sideNavContainer\">\n                  <AffixedSidebar>\n                    <nav className=\"sideNav UserPage-nav\">\n                      <ul>{listItems(this.sidebarItems().toArray())}</ul>\n                    </nav>\n                  </AffixedSidebar>\n                  <div className=\"sideNavOffset UserPage-content\">{this.content()}</div>\n                </div>\n              </div>,\n            ]\n          : [<LoadingIndicator display=\"block\" />]}\n      </div>\n    );\n  }\n\n  /**\n   * Get the content to display in the user page.\n   */\n  content(): Mithril.Children | void {}\n\n  /**\n   * Initialize the component with a user, and trigger the loading of their\n   * activity feed.\n   *\n   * @protected\n   */\n  show(user: User): void {\n    this.user = user;\n\n    app.current.set('user', user);\n\n    app.setTitle(user.displayName());\n\n    m.redraw();\n  }\n\n  /**\n   * Given a username, load the user's profile from the store, or make a request\n   * if we don't have it yet. Then initialize the profile page with that user.\n   */\n  loadUser(username: string) {\n    const lowercaseUsername = username.toLowerCase();\n\n    // Load the preloaded user object, if any, into the global app store\n    // We don't use the output of the method because it returns raw JSON\n    // instead of the parsed models\n    app.preloadedApiDocument();\n\n    app.store.all<User>('users').some((user) => {\n      if ((user.username().toLowerCase() === lowercaseUsername || user.id() === username) && user.joinTime()) {\n        this.show(user);\n        return true;\n      }\n\n      return false;\n    });\n\n    if (!this.user) {\n      app.store.find<User>('users', username, { bySlug: true }).then(this.show.bind(this));\n    }\n  }\n\n  /**\n   * Build an item list for the content of the sidebar.\n   */\n  sidebarItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'nav',\n      <SelectDropdown className=\"App-titleControl\" buttonClassName=\"Button\">\n        {this.navItems().toArray()}\n      </SelectDropdown>\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the navigation in the sidebar.\n   */\n  navItems() {\n    const items = new ItemList<Mithril.Children>();\n    const user = this.user!;\n    const isActor = app.session.user === user;\n\n    items.add(\n      'posts',\n      <LinkButton href={app.route('user.posts', { username: user.slug() })} icon=\"far fa-comment\">\n        {app.translator.trans('core.forum.user.posts_link')} <span className=\"Button-badge\">{user.commentCount()}</span>\n      </LinkButton>,\n      100\n    );\n\n    items.add(\n      'discussions',\n      <LinkButton href={app.route('user.discussions', { username: user.slug() })} icon=\"fas fa-bars\">\n        {app.translator.trans('core.forum.user.discussions_link')} <span className=\"Button-badge\">{user.discussionCount()}</span>\n      </LinkButton>,\n      90\n    );\n\n    if (isActor) {\n      items.add('separator', <Separator />, -90);\n      items.add(\n        'settings',\n        <LinkButton href={app.route('settings')} icon=\"fas fa-cog\">\n          {app.translator.trans('core.forum.user.settings_link')}\n        </LinkButton>,\n        -100\n      );\n    }\n\n    if (isActor || app.forum.attribute<boolean>('canModerateAccessTokens')) {\n      if (!isActor) {\n        items.add('security-separator', <Separator />, -90);\n      }\n\n      items.add(\n        'security',\n        <LinkButton href={app.route('user.security', { username: user.slug() })} icon=\"fas fa-shield-alt\">\n          {app.translator.trans('core.forum.user.security_link')}\n        </LinkButton>,\n        -100\n      );\n    }\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Button from '../../common/components/Button';\nimport Separator from '../../common/components/Separator';\nimport EditUserModal from '../../common/components/EditUserModal';\nimport UserPage from '../components/UserPage';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `UserControls` utility constructs a list of buttons for a user which\n * perform actions on it.\n */\nexport default {\n  /**\n   * Get a list of controls for a user.\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controls(user, context) {\n    const items = new ItemList();\n\n    ['user', 'moderation', 'destructive'].forEach((section) => {\n      const controls = this[section + 'Controls'](user, context).toArray();\n      if (controls.length) {\n        controls.forEach((item) => items.add(item.itemName, item));\n        items.add(section + 'Separator', <Separator />);\n      }\n    });\n\n    return items;\n  },\n\n  /**\n   * Get controls for a user pertaining to the current user (e.g. poke, follow).\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  userControls() {\n    return new ItemList();\n  },\n\n  /**\n   * Get controls for a user pertaining to moderation (e.g. suspend, edit).\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  moderationControls(user) {\n    const items = new ItemList();\n\n    if (user.canEdit() || user.canEditCredentials() || user.canEditGroups()) {\n      items.add(\n        'edit',\n        <Button icon=\"fas fa-pencil-alt\" onclick={this.editAction.bind(this, user)}>\n          {app.translator.trans('core.forum.user_controls.edit_button')}\n        </Button>\n      );\n    }\n\n    return items;\n  },\n\n  /**\n   * Get controls for a user which are destructive (e.g. delete).\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {import('../../common/Component').default<any, any>}  context The parent component under which the controls menu will be displayed.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   * @protected\n   */\n  destructiveControls(user) {\n    const items = new ItemList();\n\n    if (user.id() !== '1' && user.canDelete()) {\n      items.add(\n        'delete',\n        <Button icon=\"fas fa-times\" onclick={this.deleteAction.bind(this, user)}>\n          {app.translator.trans('core.forum.user_controls.delete_button')}\n        </Button>\n      );\n    }\n\n    return items;\n  },\n\n  /**\n   * Delete the user.\n   *\n   * @param {import('../../common/models/User').default} user\n   */\n  deleteAction(user) {\n    if (!confirm(app.translator.trans('core.forum.user_controls.delete_confirmation'))) {\n      return;\n    }\n\n    user\n      .delete()\n      .then(() => {\n        this.showDeletionAlert(user, 'success');\n        if (app.current.matches(UserPage, { user })) {\n          app.history.back();\n        } else {\n          window.location.reload();\n        }\n      })\n      .catch(() => this.showDeletionAlert(user, 'error'));\n  },\n\n  /**\n   * Show deletion alert of user.\n   *\n   * @param {import('../../common/models/User').default} user\n   * @param {string} type\n   */\n  showDeletionAlert(user, type) {\n    const message = {\n      success: 'core.forum.user_controls.delete_success_message',\n      error: 'core.forum.user_controls.delete_error_message',\n    }[type];\n\n    app.alerts.show(\n      { type },\n      app.translator.trans(message, {\n        user,\n        email: user.email(),\n      })\n    );\n  },\n\n  /**\n   * Edit the user.\n   *\n   * @param {import('../../common/models/User').default} user\n   */\n  editAction(user) {\n    app.modal.show(EditUserModal, { user });\n  },\n};\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport avatar from '../../common/helpers/avatar';\nimport icon from '../../common/helpers/icon';\nimport listItems from '../../common/helpers/listItems';\nimport ItemList from '../../common/utils/ItemList';\nimport classList from '../../common/utils/classList';\nimport Button from '../../common/components/Button';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\n\n/**\n * The `AvatarEditor` component displays a user's avatar along with a dropdown\n * menu which allows the user to upload/remove the avatar.\n *\n * ### Attrs\n *\n * - `className`\n * - `user`\n */\nexport default class AvatarEditor extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * Whether or not an avatar upload is in progress.\n     *\n     * @type {Boolean}\n     */\n    this.loading = false;\n\n    /**\n     * Whether or not an image has been dragged over the dropzone.\n     *\n     * @type {Boolean}\n     */\n    this.isDraggedOver = false;\n  }\n\n  view() {\n    const user = this.attrs.user;\n\n    return (\n      <div className={classList(['AvatarEditor', 'Dropdown', this.attrs.className, this.loading && 'loading', this.isDraggedOver && 'dragover'])}>\n        {avatar(user, { loading: 'eager' })}\n        <a\n          className={user.avatarUrl() ? 'Dropdown-toggle' : 'Dropdown-toggle AvatarEditor--noAvatar'}\n          title={app.translator.trans('core.forum.user.avatar_upload_tooltip')}\n          data-toggle=\"dropdown\"\n          onclick={this.quickUpload.bind(this)}\n          ondragover={this.enableDragover.bind(this)}\n          ondragenter={this.enableDragover.bind(this)}\n          ondragleave={this.disableDragover.bind(this)}\n          ondragend={this.disableDragover.bind(this)}\n          ondrop={this.dropUpload.bind(this)}\n        >\n          {this.loading ? (\n            <LoadingIndicator display=\"unset\" size=\"large\" />\n          ) : user.avatarUrl() ? (\n            icon('fas fa-pencil-alt')\n          ) : (\n            icon('fas fa-plus-circle')\n          )}\n        </a>\n        <ul className=\"Dropdown-menu Menu\">{listItems(this.controlItems().toArray())}</ul>\n      </div>\n    );\n  }\n\n  /**\n   * Get the items in the edit avatar dropdown menu.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  controlItems() {\n    const items = new ItemList();\n\n    items.add(\n      'upload',\n      <Button icon=\"fas fa-upload\" onclick={this.openPicker.bind(this)}>\n        {app.translator.trans('core.forum.user.avatar_upload_button')}\n      </Button>\n    );\n\n    items.add(\n      'remove',\n      <Button icon=\"fas fa-times\" onclick={this.remove.bind(this)}>\n        {app.translator.trans('core.forum.user.avatar_remove_button')}\n      </Button>\n    );\n\n    return items;\n  }\n\n  /**\n   * Enable dragover style\n   *\n   * @param {DragEvent} e\n   */\n  enableDragover(e) {\n    e.preventDefault();\n    e.stopPropagation();\n    this.isDraggedOver = true;\n  }\n\n  /**\n   * Disable dragover style\n   *\n   * @param {DragEvent} e\n   */\n  disableDragover(e) {\n    e.preventDefault();\n    e.stopPropagation();\n    this.isDraggedOver = false;\n  }\n\n  /**\n   * Upload avatar when file is dropped into dropzone.\n   *\n   * @param {DragEvent} e\n   */\n  dropUpload(e) {\n    e.preventDefault();\n    e.stopPropagation();\n    this.isDraggedOver = false;\n    this.upload(e.dataTransfer.files[0]);\n  }\n\n  /**\n   * If the user doesn't have an avatar, there's no point in showing the\n   * controls dropdown, because only one option would be viable: uploading.\n   * Thus, when the avatar editor's dropdown toggle button is clicked, we prompt\n   * the user to upload an avatar immediately.\n   *\n   * @param {MouseEvent} e\n   */\n  quickUpload(e) {\n    if (!this.attrs.user.avatarUrl()) {\n      e.preventDefault();\n      e.stopPropagation();\n      this.openPicker();\n    }\n  }\n\n  /**\n   * Upload avatar using file picker\n   */\n  openPicker() {\n    if (this.loading) return;\n\n    // Create a hidden HTML input element and click on it so the user can select\n    // an avatar file. Once they have, we will upload it via the API.\n    const $input = $('<input type=\"file\" accept=\".jpg, .jpeg, .png, .bmp, .gif\">');\n\n    $input\n      .appendTo('body')\n      .hide()\n      .click()\n      .on('input', (e) => {\n        this.upload($(e.target)[0].files[0]);\n      });\n  }\n\n  /**\n   * Upload avatar\n   *\n   * @param {File} file\n   */\n  upload(file) {\n    if (this.loading) return;\n\n    const user = this.attrs.user;\n    const data = new FormData();\n    data.append('avatar', file);\n\n    this.loading = true;\n    m.redraw();\n\n    app\n      .request({\n        method: 'POST',\n        url: `${app.forum.attribute('apiUrl')}/users/${user.id()}/avatar`,\n        serialize: (raw) => raw,\n        body: data,\n      })\n      .then(this.success.bind(this), this.failure.bind(this));\n  }\n\n  /**\n   * Remove the user's avatar.\n   */\n  remove() {\n    const user = this.attrs.user;\n\n    this.loading = true;\n    m.redraw();\n\n    app\n      .request({\n        method: 'DELETE',\n        url: `${app.forum.attribute('apiUrl')}/users/${user.id()}/avatar`,\n      })\n      .then(this.success.bind(this), this.failure.bind(this));\n  }\n\n  /**\n   * After a successful upload/removal, push the updated user data into the\n   * store, and force a re-computation of the user's avatar color.\n   *\n   * @param {object} response\n   * @protected\n   */\n  success(response) {\n    app.store.pushPayload(response);\n    delete this.attrs.user.avatarColor;\n\n    this.loading = false;\n    m.redraw();\n  }\n\n  /**\n   * If avatar upload/removal fails, stop loading.\n   *\n   * @param {object} response\n   * @protected\n   */\n  failure(response) {\n    this.loading = false;\n    m.redraw();\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport humanTime from '../../common/utils/humanTime';\nimport ItemList from '../../common/utils/ItemList';\nimport UserControls from '../utils/UserControls';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport icon from '../../common/helpers/icon';\nimport Dropdown from '../../common/components/Dropdown';\nimport Link from '../../common/components/Link';\nimport AvatarEditor from './AvatarEditor';\nimport listItems from '../../common/helpers/listItems';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `UserCard` component displays a user's profile card. This is used both on\n * the `UserPage` (in the hero) and in discussions, shown when hovering over a\n * post author.\n *\n * ### Attrs\n *\n * - `user`\n * - `className`\n * - `editable`\n * - `controlsButtonClassName`\n */\nexport default class UserCard extends Component {\n  view() {\n    const user = this.attrs.user;\n    const controls = UserControls.controls(user, this).toArray();\n    const color = user.color();\n    const badges = user.badges().toArray();\n\n    return (\n      <div className={classList('UserCard', this.attrs.className)} style={color && { '--usercard-bg': color }}>\n        <div className=\"darkenBackground\">\n          <div className=\"container\">\n            {!!controls.length && (\n              <Dropdown\n                className=\"UserCard-controls App-primaryControl\"\n                menuClassName=\"Dropdown-menu--right\"\n                buttonClassName={this.attrs.controlsButtonClassName}\n                label={app.translator.trans('core.forum.user_controls.button')}\n                accessibleToggleLabel={app.translator.trans('core.forum.user_controls.toggle_dropdown_accessible_label')}\n                icon=\"fas fa-ellipsis-v\"\n              >\n                {controls}\n              </Dropdown>\n            )}\n\n            <div className=\"UserCard-profile\">\n              <h1 className=\"UserCard-identity\">\n                {this.attrs.editable ? (\n                  <>\n                    <AvatarEditor user={user} className=\"UserCard-avatar\" /> {username(user)}\n                  </>\n                ) : (\n                  <Link href={app.route.user(user)}>\n                    <div className=\"UserCard-avatar\">{avatar(user, { loading: 'eager' })}</div>\n                    {username(user)}\n                  </Link>\n                )}\n              </h1>\n\n              {!!badges.length && <ul className=\"UserCard-badges badges\">{listItems(badges)}</ul>}\n\n              <ul className=\"UserCard-info\">{listItems(this.infoItems().toArray())}</ul>\n            </div>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  /**\n   * Build an item list of tidbits of info to show on this user's profile.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  infoItems() {\n    const items = new ItemList();\n    const user = this.attrs.user;\n    const lastSeenAt = user.lastSeenAt();\n\n    if (lastSeenAt) {\n      const online = user.isOnline();\n\n      items.add(\n        'lastSeen',\n        <span className={classList('UserCard-lastSeen', { online })}>\n          {online\n            ? [icon('fas fa-circle'), ' ', app.translator.trans('core.forum.user.online_text')]\n            : [icon('far fa-clock'), ' ', humanTime(lastSeenAt)]}\n        </span>,\n        100\n      );\n    }\n\n    items.add('joined', app.translator.trans('core.forum.user.joined_date_text', { ago: humanTime(user.joinTime()) }), 90);\n\n    return items;\n  }\n}\n","import type Mithril from 'mithril';\nimport User from '../models/User';\nimport icon from './icon';\n\n/**\n * The `useronline` helper displays a green circle if the user is online.\n */\nexport default function userOnline(user: User): Mithril.Vnode<{}, {}> | null {\n  if (user.lastSeenAt() && user.isOnline()) {\n    return <span className=\"UserOnline\">{icon('fas fa-circle')}</span>;\n  }\n\n  return null;\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport Link from '../../common/components/Link';\nimport UserCard from './UserCard';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport userOnline from '../../common/helpers/userOnline';\nimport listItems from '../../common/helpers/listItems';\n\n/**\n * The `PostUser` component shows the avatar and username of a post's author.\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class PostUser extends Component {\n  view() {\n    const post = this.attrs.post;\n    const user = post.user();\n\n    if (!user) {\n      return (\n        <div className=\"PostUser\">\n          <h3 className=\"PostUser-name\">\n            {avatar(user, { className: 'PostUser-avatar' })} {username(user)}\n          </h3>\n        </div>\n      );\n    }\n\n    return (\n      <div className=\"PostUser\">\n        <h3 className=\"PostUser-name\">\n          <Link href={app.route.user(user)}>\n            {avatar(user, { className: 'PostUser-avatar' })}\n            {userOnline(user)}\n            {username(user)}\n          </Link>\n        </h3>\n        <ul className=\"PostUser-badges badges\">{listItems(user.badges().toArray())}</ul>\n\n        {!post.isHidden() && this.attrs.cardVisible && (\n          <UserCard user={user} className=\"UserCard--popover\" controlsButtonClassName=\"Button Button--icon Button--flat\" />\n        )}\n      </div>\n    );\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    let timeout;\n\n    this.$()\n      .on('mouseover', '.PostUser-name a, .UserCard', () => {\n        clearTimeout(timeout);\n        timeout = setTimeout(this.showCard.bind(this), 500);\n      })\n      .on('mouseout', '.PostUser-name a, .UserCard', () => {\n        clearTimeout(timeout);\n        timeout = setTimeout(this.hideCard.bind(this), 250);\n      });\n  }\n\n  /**\n   * Show the user card.\n   */\n  showCard() {\n    this.attrs.oncardshow();\n\n    setTimeout(() => this.$('.UserCard').addClass('in'));\n  }\n\n  /**\n   * Hide the user card.\n   */\n  hideCard() {\n    this.$('.UserCard')\n      .removeClass('in')\n      .one('transitionend webkitTransitionEnd oTransitionEnd', () => {\n        this.attrs.oncardhide();\n      });\n  }\n}\n","import dayjs from 'dayjs';\nimport type Mithril from 'mithril';\n\n/**\n * The `fullTime` helper displays a formatted time string wrapped in a <time>\n * tag.\n */\nexport default function fullTime(time: Date): Mithril.Vnode {\n  const d = dayjs(time);\n\n  const datetime = d.format();\n  const full = d.format('LLLL');\n\n  return (\n    <time pubdate datetime={datetime}>\n      {full}\n    </time>\n  );\n}\n","import Component, { ComponentAttrs } from '../Component';\nimport type Mithril from 'mithril';\nimport ItemList from '../utils/ItemList';\n\nexport interface IIPAddressAttrs extends ComponentAttrs {\n  ip: string | undefined | null;\n}\n\n/**\n * A component to wrap an IP address for display.\n * Designed to be customizable for different use cases.\n *\n * @example\n * <IPAddress ip=\"127.0.0.1\" />\n * @example\n * <IPAddress ip={post.data.attributes.ipAddress} />\n */\nexport default class IPAddress<CustomAttrs extends IIPAddressAttrs = IIPAddressAttrs> extends Component<CustomAttrs> {\n  ip!: string;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.ip = this.attrs.ip || '';\n  }\n\n  view() {\n    return <span className=\"IPAddress\">{this.viewItems().toArray()}</span>;\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('ip', <span>{this.ip}</span>, 100);\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport humanTime from '../../common/helpers/humanTime';\nimport fullTime from '../../common/helpers/fullTime';\nimport ItemList from '../../common/utils/ItemList';\nimport IPAddress from '../../common/components/IPAddress';\n\n/**\n * The `PostMeta` component displays the time of a post, and when clicked, shows\n * a dropdown containing more information about the post (number, full time,\n * permalink).\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class PostMeta extends Component {\n  view() {\n    return <div className=\"Dropdown PostMeta\">{this.viewItems().toArray()}</div>;\n  }\n\n  /**\n   * Get the permalink for the given post.\n   *\n   * @param {import('../../common/models/Post').default} post\n   * @returns {string}\n   */\n  getPermalink(post) {\n    return app.forum.attribute('baseOrigin') + app.route.post(post);\n  }\n\n  /**\n   * When the dropdown menu is shown, select the contents of the permalink\n   * input so that the user can quickly copy the URL.\n   * @param {Event} e\n   */\n  selectPermalink(e) {\n    setTimeout(() => $(this.element).parent().find('.PostMeta-permalink').select());\n\n    e.redraw = false;\n  }\n\n  /**\n   * @returns {ItemList}\n   */\n  viewItems() {\n    const items = new ItemList();\n    const post = this.attrs.post;\n    const time = post.createdAt();\n\n    items.add(\n      'time',\n      <a className=\"Dropdown-toggle\" onclick={(e) => this.selectPermalink(e)} data-toggle=\"dropdown\">\n        {humanTime(time)}\n      </a>,\n      100\n    );\n\n    items.add('meta-dropdown', <div className=\"Dropdown-menu dropdown-menu\">{this.metaItems().toArray()}</div>, 90);\n\n    return items;\n  }\n\n  /**\n   * @returns {ItemList}\n   */\n  metaItems() {\n    const items = new ItemList();\n    const post = this.attrs.post;\n    const touch = 'ontouchstart' in document.documentElement;\n    const permalink = this.getPermalink(post);\n    const time = post.createdAt();\n\n    items.add(\n      'post-number',\n      <span className=\"PostMeta-number\">{app.translator.trans('core.forum.post.number_tooltip', { number: post.number() })} </span>,\n      100\n    );\n\n    items.add('post-time', <span className=\"PostMeta-time\">{fullTime(time)}</span>, 90);\n\n    items.add(\n      'post-ip',\n      <span className=\"PostMeta-ip\">\n        <IPAddress ip={post.data.attributes.ipAddress} />\n      </span>,\n      80\n    );\n\n    items.add(\n      'permalink',\n      touch ? (\n        <a className=\"Button PostMeta-permalink\" href={permalink}>\n          {permalink}\n        </a>\n      ) : (\n        <input className=\"FormControl PostMeta-permalink\" value={permalink} onclick={(e) => e.stopPropagation()} />\n      ),\n      0\n    );\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport humanTime from '../../common/utils/humanTime';\nimport Tooltip from '../../common/components/Tooltip';\n\n/**\n * The `PostEdited` component displays information about when and by whom a post\n * was edited.\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class PostEdited extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n  }\n\n  view() {\n    const post = this.attrs.post;\n    const editedUser = post.editedUser();\n    const editedInfo = app.translator.trans('core.forum.post.edited_tooltip', { user: editedUser, ago: humanTime(post.editedAt()) });\n\n    return (\n      <Tooltip text={editedInfo}>\n        <span className=\"PostEdited\">{app.translator.trans('core.forum.post.edited_text')}</span>\n      </Tooltip>\n    );\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n  }\n}\n","import app from '../../forum/app';\nimport Post from './Post';\nimport classList from '../../common/utils/classList';\nimport PostUser from './PostUser';\nimport PostMeta from './PostMeta';\nimport PostEdited from './PostEdited';\nimport EditPostComposer from './EditPostComposer';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\nimport Button from '../../common/components/Button';\nimport ComposerPostPreview from './ComposerPostPreview';\n\n/**\n * The `CommentPost` component displays a standard `comment`-typed post. This\n * includes a number of item lists (controls, header, and footer) surrounding\n * the post's HTML content.\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class CommentPost extends Post {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * If the post has been hidden, then this flag determines whether or not its\n     * content has been expanded.\n     *\n     * @type {Boolean}\n     */\n    this.revealContent = false;\n\n    /**\n     * Whether or not the user hover card inside of PostUser is visible.\n     * The property must be managed in CommentPost to be able to use it in the subtree check\n     *\n     * @type {Boolean}\n     */\n    this.cardVisible = false;\n\n    this.subtree.check(\n      () => this.cardVisible,\n      () => this.isEditing(),\n      () => this.revealContent\n    );\n  }\n\n  content() {\n    return super.content().concat(this.contentItems().toArray());\n  }\n\n  contentItems() {\n    const items = new ItemList();\n\n    items.add(\n      'header',\n      <header className=\"Post-header\">\n        <ul>{listItems(this.headerItems().toArray())}</ul>\n      </header>,\n      100\n    );\n\n    items.add('body', <div className=\"Post-body\">{this.bodyItems().toArray()}</div>, 90);\n\n    return items;\n  }\n\n  bodyItems() {\n    const items = new ItemList();\n\n    items.add(\n      'content',\n      this.isEditing() ? <ComposerPostPreview className=\"Post-preview\" composer={app.composer} /> : m.trust(this.attrs.post.contentHtml()),\n      100\n    );\n\n    return items;\n  }\n\n  refreshContent() {\n    const contentHtml = this.isEditing() ? '' : this.attrs.post.contentHtml();\n\n    // If the post content has changed since the last render, we'll run through\n    // all of the <script> tags in the content and evaluate them. This is\n    // necessary because TextFormatter outputs them for e.g. syntax highlighting.\n    if (this.contentHtml !== contentHtml) {\n      this.$('.Post-body script').each(function () {\n        const script = document.createElement('script');\n        script.textContent = this.textContent;\n        Array.from(this.attributes).forEach((attr) => script.setAttribute(attr.name, attr.value));\n        this.parentNode.replaceChild(script, this);\n      });\n    }\n\n    this.contentHtml = contentHtml;\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.refreshContent();\n  }\n\n  onupdate(vnode) {\n    super.onupdate(vnode);\n\n    this.refreshContent();\n  }\n\n  isEditing() {\n    return app.composer.bodyMatches(EditPostComposer, { post: this.attrs.post });\n  }\n\n  elementAttrs() {\n    const post = this.attrs.post;\n    const attrs = super.elementAttrs();\n\n    attrs.className = classList(attrs.className, 'CommentPost', {\n      'Post--renderFailed': post.renderFailed(),\n      'Post--hidden': post.isHidden(),\n      'Post--edited': post.isEdited(),\n      revealContent: this.revealContent,\n      editing: this.isEditing(),\n    });\n\n    if (this.isEditing()) attrs['aria-busy'] = 'true';\n\n    return attrs;\n  }\n\n  /**\n   * Toggle the visibility of a hidden post's content.\n   */\n  toggleContent() {\n    this.revealContent = !this.revealContent;\n  }\n\n  /**\n   * Build an item list for the post's header.\n   *\n   * @return {ItemList<import('mithril').Children>}\n   */\n  headerItems() {\n    const items = new ItemList();\n    const post = this.attrs.post;\n\n    items.add(\n      'user',\n      <PostUser\n        post={post}\n        cardVisible={this.cardVisible}\n        oncardshow={() => {\n          this.cardVisible = true;\n          m.redraw();\n        }}\n        oncardhide={() => {\n          this.cardVisible = false;\n          m.redraw();\n        }}\n      />,\n      100\n    );\n    items.add('meta', <PostMeta post={post} />);\n\n    if (post.isEdited() && !post.isHidden()) {\n      items.add('edited', <PostEdited post={post} />);\n    }\n\n    // If the post is hidden, add a button that allows toggling the visibility\n    // of the post's content.\n    if (post.isHidden()) {\n      items.add(\n        'toggle',\n        <Button className=\"Button Button--default Button--more\" icon=\"fas fa-ellipsis-h\" onclick={this.toggleContent.bind(this)} />\n      );\n    }\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Post from './Post';\nimport { ucfirst } from '../../common/utils/string';\nimport usernameHelper from '../../common/helpers/username';\nimport icon from '../../common/helpers/icon';\nimport Link from '../../common/components/Link';\nimport humanTime from '../../common/helpers/humanTime';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `EventPost` component displays a post which indicating a discussion\n * event, like a discussion being renamed or stickied. Subclasses must implement\n * the `icon` and `description` methods.\n *\n * ### Attrs\n *\n * - All of the attrs for `Post`\n *\n * @abstract\n */\nexport default class EventPost extends Post {\n  elementAttrs() {\n    const attrs = super.elementAttrs();\n\n    attrs.className = classList(attrs.className, 'EventPost', ucfirst(this.attrs.post.contentType()) + 'Post');\n\n    return attrs;\n  }\n\n  content() {\n    const user = this.attrs.post.user();\n    const username = usernameHelper(user);\n    const data = Object.assign(this.descriptionData(), {\n      user,\n      username: user ? (\n        <Link className=\"EventPost-user\" href={app.route.user(user)}>\n          {username}\n        </Link>\n      ) : (\n        username\n      ),\n      time: humanTime(this.attrs.post.createdAt()),\n    });\n\n    return super\n      .content()\n      .concat([icon(this.icon(), { className: 'EventPost-icon' }), <div className=\"EventPost-info\">{this.description(data)}</div>]);\n  }\n\n  /**\n   * Get the name of the event icon.\n   *\n   * @return {string}\n   */\n  icon() {\n    return '';\n  }\n\n  /**\n   * Get the description text for the event.\n   *\n   * @param {Record<string, unknown>} data\n   * @return {import('mithril').Children} The description to render in the DOM\n   */\n  description(data) {\n    return app.translator.trans(this.descriptionKey(), data);\n  }\n\n  /**\n   * Get the translation key for the description of the event.\n   *\n   * @return {string}\n   */\n  descriptionKey() {\n    return '';\n  }\n\n  /**\n   * Get the translation data for the description of the event.\n   *\n   * @return {Record<string, unknown>}\n   */\n  descriptionData() {\n    return {};\n  }\n}\n","import app from '../../forum/app';\nimport EventPost from './EventPost';\nimport extractText from '../../common/utils/extractText';\nimport Tooltip from '../../common/components/Tooltip';\n\n/**\n * The `DiscussionRenamedPost` component displays a discussion event post\n * indicating that the discussion has been renamed.\n *\n * ### Attrs\n *\n * - All of the attrs for EventPost\n */\nexport default class DiscussionRenamedPost extends EventPost {\n  icon() {\n    return 'fas fa-pencil-alt';\n  }\n\n  description(data) {\n    const renamed = app.translator.trans('core.forum.post_stream.discussion_renamed_text', data);\n\n    return <span>{renamed}</span>;\n  }\n\n  descriptionData() {\n    const post = this.attrs.post;\n    const oldTitle = post.content()[0];\n    const newTitle = post.content()[1];\n\n    return {\n      new: (\n        <Tooltip text={extractText(app.translator.trans('core.forum.post_stream.discussion_renamed_old_tooltip', { old: oldTitle }))}>\n          <strong className=\"DiscussionRenamedPost-new\">{newTitle}</strong>\n        </Tooltip>\n      ),\n    };\n  }\n}\n","import app from '../app';\nimport Component from '../../common/Component';\nimport Button from '../../common/components/Button';\nimport type Mithril from 'mithril';\nimport ItemList from '../../common/utils/ItemList';\n\nexport interface IWelcomeHeroAttrs {}\n\nconst LOCAL_STORAGE_KEY = 'welcomeHidden';\n\n/**\n * The `WelcomeHero` component displays a hero that welcomes the user to the\n * forum.\n */\nexport default class WelcomeHero extends Component<IWelcomeHeroAttrs> {\n  /**\n   * @deprecated Extend the `isHidden` method instead.\n   */\n  hidden: boolean = false;\n\n  oninit(vnode: Mithril.Vnode<IWelcomeHeroAttrs, this>) {\n    super.oninit(vnode);\n  }\n\n  view(vnode: Mithril.Vnode<IWelcomeHeroAttrs, this>) {\n    if (this.isHidden()) return null;\n\n    return (\n      <header className=\"Hero WelcomeHero\">\n        <div className=\"container\">{this.viewItems().toArray()}</div>\n      </header>\n    );\n  }\n\n  /**\n   * Hide the welcome hero.\n   */\n  hide() {\n    localStorage.setItem(LOCAL_STORAGE_KEY, 'true');\n  }\n\n  /**\n   * Determines whether the welcome hero should be hidden.\n   *\n   * @returns if the welcome hero is hidden.\n   */\n  isHidden(): boolean {\n    if (!app.forum.attribute<string>('welcomeTitle')?.trim()) return true;\n    if (localStorage.getItem(LOCAL_STORAGE_KEY)) return true;\n    if (this.hidden) return true;\n\n    return false;\n  }\n\n  viewItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    const slideUp = () => {\n      this.$().slideUp(this.hide.bind(this));\n    };\n\n    items.add(\n      'dismiss-button',\n      <Button\n        icon=\"fas fa-times\"\n        onclick={slideUp}\n        className=\"Hero-close Button Button--icon Button--link\"\n        aria-label={app.translator.trans('core.forum.welcome_hero.hide')}\n      />,\n      100\n    );\n\n    items.add('content', <div className=\"containerNarrow\">{this.contentItems().toArray()}</div>, 80);\n\n    return items;\n  }\n\n  contentItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('title', <h1 className=\"Hero-title\">{app.forum.attribute('welcomeTitle')}</h1>, 100);\n\n    items.add('subtitle', <div className=\"Hero-subtitle\">{m.trust(app.forum.attribute('welcomeMessage'))}</div>);\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport ComposerBody from './ComposerBody';\nimport extractText from '../../common/utils/extractText';\nimport Stream from '../../common/utils/Stream';\n\n/**\n * The `DiscussionComposer` component displays the composer content for starting\n * a new discussion. It adds a text field as a header control so the user can\n * enter the title of their discussion. It also overrides the `submit` and\n * `willExit` actions to account for the title.\n *\n * ### Attrs\n *\n * - All of the attrs for ComposerBody\n * - `titlePlaceholder`\n */\nexport default class DiscussionComposer extends ComposerBody {\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.placeholder = attrs.placeholder || extractText(app.translator.trans('core.forum.composer_discussion.body_placeholder'));\n    attrs.submitLabel = attrs.submitLabel || app.translator.trans('core.forum.composer_discussion.submit_button');\n    attrs.confirmExit = attrs.confirmExit || extractText(app.translator.trans('core.forum.composer_discussion.discard_confirmation'));\n    attrs.titlePlaceholder = attrs.titlePlaceholder || extractText(app.translator.trans('core.forum.composer_discussion.title_placeholder'));\n    attrs.className = 'ComposerBody--discussion';\n  }\n\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    this.composer.fields.title = this.composer.fields.title || Stream('');\n\n    /**\n     * The value of the title input.\n     *\n     * @type {Function}\n     */\n    this.title = this.composer.fields.title;\n  }\n\n  headerItems() {\n    const items = super.headerItems();\n\n    items.add('title', <h3>{app.translator.trans('core.forum.composer_discussion.title')}</h3>, 100);\n\n    items.add(\n      'discussionTitle',\n      <h3>\n        <input\n          className=\"FormControl\"\n          bidi={this.title}\n          placeholder={this.attrs.titlePlaceholder}\n          disabled={!!this.attrs.disabled}\n          onkeydown={this.onkeydown.bind(this)}\n        />\n      </h3>\n    );\n\n    return items;\n  }\n\n  /**\n   * Handle the title input's keydown event. When the return key is pressed,\n   * move the focus to the start of the text editor.\n   *\n   * @param {KeyboardEvent} e\n   */\n  onkeydown(e) {\n    if (e.which === 13) {\n      // Return\n      e.preventDefault();\n      this.composer.editor.moveCursorTo(0);\n    }\n\n    e.redraw = false;\n  }\n\n  hasChanges() {\n    return this.title() || this.composer.fields.content();\n  }\n\n  /**\n   * Get the data to submit to the server when the discussion is saved.\n   *\n   * @return {Record<string, unknown>}\n   */\n  data() {\n    return {\n      title: this.title(),\n      content: this.composer.fields.content(),\n    };\n  }\n\n  onsubmit() {\n    this.loading = true;\n\n    const data = this.data();\n\n    app.store\n      .createRecord('discussions')\n      .save(data)\n      .then((discussion) => {\n        this.composer.hide();\n        app.discussions.refresh();\n        m.route.set(app.route.discussion(discussion));\n      }, this.loaded.bind(this));\n  }\n}\n","import app from '../../forum/app';\nimport Page, { IPageAttrs } from '../../common/components/Page';\nimport ItemList from '../../common/utils/ItemList';\nimport listItems from '../../common/helpers/listItems';\nimport DiscussionList from './DiscussionList';\nimport WelcomeHero from './WelcomeHero';\nimport DiscussionComposer from './DiscussionComposer';\nimport LogInModal from './LogInModal';\nimport DiscussionPage from './DiscussionPage';\nimport Dropdown from '../../common/components/Dropdown';\nimport Button from '../../common/components/Button';\nimport LinkButton from '../../common/components/LinkButton';\nimport SelectDropdown from '../../common/components/SelectDropdown';\nimport extractText from '../../common/utils/extractText';\nimport type Mithril from 'mithril';\nimport type Discussion from '../../common/models/Discussion';\n\nexport interface IIndexPageAttrs extends IPageAttrs {}\n\n/**\n * The `IndexPage` component displays the index page, including the welcome\n * hero, the sidebar, and the discussion list.\n */\nexport default class IndexPage<CustomAttrs extends IIndexPageAttrs = IIndexPageAttrs, CustomState = {}> extends Page<CustomAttrs, CustomState> {\n  static providesInitialSearch = true;\n  lastDiscussion?: Discussion;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    // If the user is returning from a discussion page, then take note of which\n    // discussion they have just visited. After the view is rendered, we will\n    // scroll down so that this discussion is in view.\n    if (app.previous.matches(DiscussionPage)) {\n      this.lastDiscussion = app.previous.get('discussion');\n    }\n\n    // If the user is coming from the discussion list, then they have either\n    // just switched one of the parameters (filter, sort, search) or they\n    // probably want to refresh the results. We will clear the discussion list\n    // cache so that results are reloaded.\n    if (app.previous.matches(IndexPage)) {\n      app.discussions.clear();\n    }\n\n    app.discussions.refreshParams(app.search.params(), (m.route.param('page') && Number(m.route.param('page'))) || 1);\n\n    app.history.push('index', extractText(app.translator.trans('core.forum.header.back_to_index_tooltip')));\n\n    this.bodyClass = 'App--index';\n    this.scrollTopOnCreate = false;\n  }\n\n  view() {\n    return (\n      <div className=\"IndexPage\">\n        {this.hero()}\n        <div className=\"container\">\n          <div className=\"sideNavContainer\">\n            <nav className=\"IndexPage-nav sideNav\">\n              <ul>{listItems(this.sidebarItems().toArray())}</ul>\n            </nav>\n            <div className=\"IndexPage-results sideNavOffset\">{this.contentItems().toArray()}</div>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  contentItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('toolbar', <div className=\"IndexPage-toolbar\">{this.toolbarItems().toArray()}</div>, 100);\n    items.add('discussionList', <DiscussionList state={app.discussions} />, 90);\n\n    return items;\n  }\n\n  toolbarItems(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('view', <ul className=\"IndexPage-toolbar-view\">{listItems(this.viewItems().toArray())}</ul>, 100);\n    items.add('action', <ul className=\"IndexPage-toolbar-action\">{listItems(this.actionItems().toArray())}</ul>, 90);\n\n    return items;\n  }\n\n  setTitle() {\n    app.setTitle(extractText(app.translator.trans('core.forum.index.meta_title_text')));\n    app.setTitleCount(0);\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.oncreate(vnode);\n\n    this.setTitle();\n\n    // Work out the difference between the height of this hero and that of the\n    // previous hero. Maintain the same scroll position relative to the bottom\n    // of the hero so that the sidebar doesn't jump around.\n    const oldHeroHeight = app.cache.heroHeight as number;\n    const heroHeight = (app.cache.heroHeight = this.$('.Hero').outerHeight() || 0);\n    const scrollTop = app.cache.scrollTop as number;\n\n    $('#app').css('min-height', ($(window).height() || 0) + heroHeight);\n\n    // Let browser handle scrolling on page reload.\n    if (app.previous.type == null) return;\n\n    // Only retain scroll position if we're coming from a discussion page.\n    // Otherwise, we've just changed the filter, so we should go to the top of the page.\n    if (this.lastDiscussion) {\n      $(window).scrollTop(scrollTop - oldHeroHeight + heroHeight);\n    } else {\n      $(window).scrollTop(0);\n    }\n\n    // If we've just returned from a discussion page, then the constructor will\n    // have set the `lastDiscussion` property. If this is the case, we want to\n    // scroll down to that discussion so that it's in view.\n    if (this.lastDiscussion) {\n      const $discussion = this.$(`li[data-id=\"${this.lastDiscussion.id()}\"] .DiscussionListItem`);\n\n      if ($discussion.length) {\n        const indexTop = $('#header').outerHeight() || 0;\n        const indexBottom = $(window).height() || 0;\n        const discussionOffset = $discussion.offset();\n        const discussionTop = (discussionOffset && discussionOffset.top) || 0;\n        const discussionBottom = discussionTop + ($discussion.outerHeight() || 0);\n\n        if (discussionTop < scrollTop + indexTop || discussionBottom > scrollTop + indexBottom) {\n          $(window).scrollTop(discussionTop - indexTop);\n        }\n      }\n    }\n  }\n\n  onbeforeremove(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onbeforeremove(vnode);\n\n    // Save the scroll position so we can restore it when we return to the\n    // discussion list.\n    app.cache.scrollTop = $(window).scrollTop();\n  }\n\n  onremove(vnode: Mithril.VnodeDOM<CustomAttrs, this>) {\n    super.onremove(vnode);\n\n    $('#app').css('min-height', '');\n  }\n\n  /**\n   * Get the component to display as the hero.\n   */\n  hero() {\n    return <WelcomeHero />;\n  }\n\n  /**\n   * Build an item list for the sidebar of the index page. By default this is a\n   * \"New Discussion\" button, and then a DropdownSelect component containing a\n   * list of navigation items.\n   */\n  sidebarItems() {\n    const items = new ItemList<Mithril.Children>();\n    const canStartDiscussion = app.forum.attribute('canStartDiscussion') || !app.session.user;\n\n    items.add(\n      'newDiscussion',\n      <Button\n        icon=\"fas fa-edit\"\n        className=\"Button Button--primary IndexPage-newDiscussion\"\n        itemClassName=\"App-primaryControl\"\n        onclick={() => {\n          // If the user is not logged in, the promise rejects, and a login modal shows up.\n          // Since that's already handled, we dont need to show an error message in the console.\n          return this.newDiscussionAction().catch(() => {});\n        }}\n        disabled={!canStartDiscussion}\n      >\n        {app.translator.trans(`core.forum.index.${canStartDiscussion ? 'start_discussion_button' : 'cannot_start_discussion_button'}`)}\n      </Button>\n    );\n\n    items.add(\n      'nav',\n      <SelectDropdown\n        buttonClassName=\"Button\"\n        className=\"App-titleControl\"\n        accessibleToggleLabel={app.translator.trans('core.forum.index.toggle_sidenav_dropdown_accessible_label')}\n      >\n        {this.navItems().toArray()}\n      </SelectDropdown>\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the navigation in the sidebar of the index page. By\n   * default this is just the 'All Discussions' link.\n   */\n  navItems() {\n    const items = new ItemList<Mithril.Children>();\n    const params = app.search.stickyParams();\n\n    items.add(\n      'allDiscussions',\n      <LinkButton href={app.route('index', params)} icon=\"far fa-comments\">\n        {app.translator.trans('core.forum.index.all_discussions_link')}\n      </LinkButton>,\n      100\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the part of the toolbar which is concerned with how\n   * the results are displayed. By default this is just a select box to change\n   * the way discussions are sorted.\n   */\n  viewItems() {\n    const items = new ItemList<Mithril.Children>();\n    const sortMap = app.discussions.sortMap();\n\n    const sortOptions = Object.keys(sortMap).reduce((acc: any, sortId) => {\n      acc[sortId] = app.translator.trans(`core.forum.index_sort.${sortId}_button`);\n      return acc;\n    }, {});\n\n    items.add(\n      'sort',\n      <Dropdown\n        buttonClassName=\"Button\"\n        label={sortOptions[app.search.params().sort] || Object.keys(sortMap).map((key) => sortOptions[key])[0]}\n        accessibleToggleLabel={app.translator.trans('core.forum.index_sort.toggle_dropdown_accessible_label')}\n      >\n        {Object.keys(sortOptions).map((value) => {\n          const label = sortOptions[value];\n          const active = (app.search.params().sort || Object.keys(sortMap)[0]) === value;\n\n          return (\n            <Button icon={active ? 'fas fa-check' : true} onclick={app.search.changeSort.bind(app.search, value)} active={active}>\n              {label}\n            </Button>\n          );\n        })}\n      </Dropdown>\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the part of the toolbar which is about taking action\n   * on the results. By default this is just a \"mark all as read\" button.\n   */\n  actionItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'refresh',\n      <Button\n        title={app.translator.trans('core.forum.index.refresh_tooltip')}\n        icon=\"fas fa-sync\"\n        className=\"Button Button--icon\"\n        onclick={() => {\n          app.discussions.refresh();\n          if (app.session.user) {\n            app.store.find('users', app.session.user.id()!);\n            m.redraw();\n          }\n        }}\n      />\n    );\n\n    if (app.session.user) {\n      items.add(\n        'markAllAsRead',\n        <Button\n          title={app.translator.trans('core.forum.index.mark_all_as_read_tooltip')}\n          icon=\"fas fa-check\"\n          className=\"Button Button--icon\"\n          onclick={this.markAllAsRead.bind(this)}\n        />\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Open the composer for a new discussion or prompt the user to login.\n   */\n  newDiscussionAction(): Promise<unknown> {\n    return new Promise((resolve, reject) => {\n      if (app.session.user) {\n        app.composer.load(DiscussionComposer, { user: app.session.user });\n        app.composer.show();\n\n        return resolve(app.composer);\n      } else {\n        app.modal.show(LogInModal);\n\n        return reject();\n      }\n    });\n  }\n\n  /**\n   * Mark all discussions as read.\n   */\n  markAllAsRead() {\n    const confirmation = confirm(extractText(app.translator.trans('core.forum.index.mark_all_as_read_confirmation')));\n\n    if (confirmation) {\n      app.session.user?.save({ markedAllAsReadAt: new Date() });\n    }\n  }\n}\n","import app from '../../forum/app';\nimport UserPage, { IUserPageAttrs } from './UserPage';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport Button from '../../common/components/Button';\nimport Link from '../../common/components/Link';\nimport Placeholder from '../../common/components/Placeholder';\nimport CommentPost from './CommentPost';\nimport type Post from '../../common/models/Post';\nimport type Mithril from 'mithril';\nimport type User from '../../common/models/User';\n\n/**\n * The `PostsUserPage` component shows a user's activity feed inside of their\n * profile.\n */\nexport default class PostsUserPage extends UserPage {\n  /**\n   * Whether or not the activity feed is currently loading.\n   */\n  loading: boolean = true;\n\n  /**\n   * Whether or not there are any more activity items that can be loaded.\n   */\n  moreResults: boolean = false;\n\n  /**\n   * The Post models in the feed.\n   */\n  posts: Post[] = [];\n\n  /**\n   * The number of activity items to load per request.\n   */\n  loadLimit: number = 20;\n\n  oninit(vnode: Mithril.Vnode<IUserPageAttrs, this>) {\n    super.oninit(vnode);\n\n    this.loadUser(m.route.param('username'));\n  }\n\n  content() {\n    if (this.posts.length === 0 && !this.loading) {\n      return (\n        <div className=\"PostsUserPage\">\n          <Placeholder text={app.translator.trans('core.forum.user.posts_empty_text')} />\n        </div>\n      );\n    }\n\n    let footer;\n\n    if (this.loading) {\n      footer = <LoadingIndicator />;\n    } else if (this.moreResults) {\n      footer = (\n        <div className=\"PostsUserPage-loadMore\">\n          <Button className=\"Button\" onclick={this.loadMore.bind(this)}>\n            {app.translator.trans('core.forum.user.posts_load_more_button')}\n          </Button>\n        </div>\n      );\n    }\n\n    return (\n      <div className=\"PostsUserPage\">\n        <ul className=\"PostsUserPage-list\">\n          {this.posts.map((post) => (\n            <li>\n              <div className=\"PostsUserPage-discussion\">\n                {app.translator.trans('core.forum.user.in_discussion_text', {\n                  discussion: <Link href={app.route.post(post)}>{this.discussionTitle(post)}</Link>,\n                })}\n              </div>\n\n              <CommentPost post={post} />\n            </li>\n          ))}\n        </ul>\n        <div className=\"PostsUserPage-loadMore\">{footer}</div>\n      </div>\n    );\n  }\n\n  /**\n   * Initialize the component with a user, and trigger the loading of their\n   * activity feed.\n   */\n  show(user: User): void {\n    super.show(user);\n\n    this.refresh();\n  }\n\n  /**\n   * Clear and reload the user's activity feed.\n   */\n  refresh() {\n    this.loading = true;\n    this.posts = [];\n\n    m.redraw();\n\n    this.loadResults().then(this.parseResults.bind(this));\n  }\n\n  /**\n   * Load a new page of the user's activity feed.\n   *\n   * @protected\n   */\n  loadResults(offset = 0) {\n    return app.store.find<Post[]>('posts', {\n      filter: {\n        author: this.user!.username(),\n        type: 'comment',\n      },\n      page: { offset, limit: this.loadLimit },\n      sort: '-createdAt',\n    });\n  }\n\n  /**\n   * Load the next page of results.\n   */\n  loadMore() {\n    this.loading = true;\n    this.loadResults(this.posts.length).then(this.parseResults.bind(this));\n  }\n\n  /**\n   * Parse results and append them to the activity feed.\n   */\n  parseResults(results: Post[]): Post[] {\n    this.loading = false;\n\n    this.posts.push(...results);\n\n    this.moreResults = results.length >= this.loadLimit;\n    m.redraw();\n\n    return results;\n  }\n\n  discussionTitle(post: Post): string {\n    return post.discussion().title();\n  }\n}\n","import app from '../../common/app';\nimport Model from '../Model';\nimport { ApiQueryParamsPlural, ApiResponsePlural } from '../Store';\n\nexport interface Page<TModel> {\n  number: number;\n  items: TModel[];\n\n  hasPrev?: boolean;\n  hasNext?: boolean;\n}\n\nexport interface PaginationLocation {\n  page: number;\n  startIndex?: number;\n  endIndex?: number;\n}\n\nexport interface PaginatedListParams {\n  [key: string]: any;\n}\n\nexport interface PaginatedListRequestParams extends Omit<ApiQueryParamsPlural, 'include'> {\n  include?: string | string[];\n}\n\nexport default abstract class PaginatedListState<T extends Model, P extends PaginatedListParams = PaginatedListParams> {\n  protected location!: PaginationLocation;\n  protected pageSize: number;\n\n  protected pages: Page<T>[] = [];\n  protected params: P = {} as P;\n\n  protected initialLoading: boolean = false;\n  protected loadingPrev: boolean = false;\n  protected loadingNext: boolean = false;\n\n  protected constructor(params: P = {} as P, page: number = 1, pageSize: number = 20) {\n    this.params = params;\n\n    this.location = { page };\n    this.pageSize = pageSize;\n  }\n\n  abstract get type(): string;\n\n  public clear(): void {\n    this.pages = [];\n\n    m.redraw();\n  }\n\n  public loadPrev(): Promise<void> {\n    if (this.loadingPrev || this.getLocation().page === 1) return Promise.resolve();\n\n    this.loadingPrev = true;\n\n    const page: number = this.getPrevPageNumber();\n\n    return this.loadPage(page)\n      .then(this.parseResults.bind(this, page))\n      .finally(() => (this.loadingPrev = false));\n  }\n\n  public loadNext(): Promise<void> {\n    if (this.loadingNext) return Promise.resolve();\n\n    this.loadingNext = true;\n\n    const page: number = this.getNextPageNumber();\n\n    return this.loadPage(page)\n      .then(this.parseResults.bind(this, page))\n      .finally(() => (this.loadingNext = false));\n  }\n\n  protected parseResults(pg: number, results: ApiResponsePlural<T>): void {\n    const pageNum = Number(pg);\n\n    const links = results.payload?.links;\n    const page = {\n      number: pageNum,\n      items: results,\n      hasNext: !!links?.next,\n      hasPrev: !!links?.prev,\n    };\n\n    if (this.isEmpty() || pageNum > this.getNextPageNumber() - 1) {\n      this.pages.push(page);\n    } else {\n      this.pages.unshift(page);\n    }\n\n    this.location = { page: pageNum };\n\n    m.redraw();\n  }\n\n  /**\n   * Load a new page of results.\n   */\n  protected loadPage(page = 1): Promise<ApiResponsePlural<T>> {\n    const reqParams = this.requestParams();\n\n    const include = Array.isArray(reqParams.include) ? reqParams.include.join(',') : reqParams.include;\n\n    const params: ApiQueryParamsPlural = {\n      ...reqParams,\n      page: {\n        ...reqParams.page,\n        offset: this.pageSize * (page - 1),\n      },\n      include,\n    };\n\n    return app.store.find<T[]>(this.type, params);\n  }\n\n  /**\n   * Get the parameters that should be passed in the API request.\n   * Do not include page offset unless subclass overrides loadPage.\n   *\n   * @abstract\n   * @see loadPage\n   */\n  protected requestParams(): PaginatedListRequestParams {\n    return this.params;\n  }\n\n  /**\n   * Update the `this.params` object, calling `refresh` if they have changed.\n   * Use `requestParams` for converting `this.params` into API parameters\n   *\n   * @param newParams\n   * @param page\n   * @see requestParams\n   */\n  public refreshParams(newParams: P, page: number): Promise<void> {\n    if (this.isEmpty() || this.paramsChanged(newParams)) {\n      this.params = newParams;\n\n      return this.refresh(page);\n    }\n\n    return Promise.resolve();\n  }\n\n  public refresh(page: number = 1): Promise<void> {\n    this.initialLoading = true;\n    this.loadingPrev = false;\n    this.loadingNext = false;\n\n    this.clear();\n\n    this.location = { page };\n\n    return this.loadPage()\n      .then((results) => {\n        this.pages = [];\n        this.parseResults(this.location.page, results);\n      })\n      .finally(() => (this.initialLoading = false));\n  }\n\n  public getPages(): Page<T>[] {\n    return this.pages;\n  }\n  public getLocation(): PaginationLocation {\n    return this.location;\n  }\n\n  public isLoading(): boolean {\n    return this.initialLoading || this.loadingNext || this.loadingPrev;\n  }\n  public isInitialLoading(): boolean {\n    return this.initialLoading;\n  }\n  public isLoadingPrev(): boolean {\n    return this.loadingPrev;\n  }\n  public isLoadingNext(): boolean {\n    return this.loadingNext;\n  }\n\n  /**\n   * Returns true when the number of items across all loaded pages is not 0.\n   *\n   * @see isEmpty\n   */\n  public hasItems(): boolean {\n    return !!this.getAllItems().length;\n  }\n\n  /**\n   * Returns true when there aren't any items *and* the state has already done its initial loading.\n   * If you want to know whether there are items regardless of load state, use `hasItems()` instead\n   *\n   * @see hasItems\n   */\n  public isEmpty(): boolean {\n    return !this.isInitialLoading() && !this.hasItems();\n  }\n\n  public hasPrev(): boolean {\n    return !!this.pages[0]?.hasPrev;\n  }\n  public hasNext(): boolean {\n    return !!this.pages[this.pages.length - 1]?.hasNext;\n  }\n\n  /**\n   * Stored state parameters.\n   */\n  public getParams(): P {\n    return this.params;\n  }\n\n  protected getNextPageNumber(): number {\n    const pg = this.pages[this.pages.length - 1]?.number;\n\n    if (pg && !isNaN(pg)) {\n      return pg + 1;\n    } else {\n      return this.location.page;\n    }\n  }\n  protected getPrevPageNumber(): number {\n    const pg = this.pages[0]?.number;\n\n    if (pg && !isNaN(pg)) {\n      // If the calculated page number is less than 1,\n      // return 1 as the prev page (first possible page number)\n      return Math.max(pg - 1, 1);\n    } else {\n      return this.location.page;\n    }\n  }\n\n  protected paramsChanged(newParams: P): boolean {\n    return Object.keys(newParams).some((key) => this.getParams()[key] !== newParams[key]);\n  }\n\n  protected getAllItems(): T[] {\n    return this.getPages()\n      .map((pg) => pg.items)\n      .flat();\n  }\n}\n","export default class EventEmitter {\n  protected events: any = {};\n\n  public constructor() {\n    this.events = {};\n  }\n\n  public on(event: string, listener: Function): EventEmitter {\n    if (!this.events[event]) {\n      this.events[event] = [];\n    }\n\n    this.events[event].push(listener);\n\n    return this;\n  }\n\n  public emit(event: string, ...args: any[]): void {\n    if (this.events[event]) {\n      this.events[event].forEach((listener: Function) => listener(...args));\n    }\n  }\n}\n","import app from '../../forum/app';\nimport PaginatedListState, { Page, PaginatedListParams, PaginatedListRequestParams } from '../../common/states/PaginatedListState';\nimport Discussion from '../../common/models/Discussion';\nimport { ApiResponsePlural } from '../../common/Store';\nimport EventEmitter from '../../common/utils/EventEmitter';\n\nexport interface DiscussionListParams extends PaginatedListParams {\n  sort?: string;\n}\n\nconst globalEventEmitter = new EventEmitter();\n\nexport default class DiscussionListState<P extends DiscussionListParams = DiscussionListParams> extends PaginatedListState<Discussion, P> {\n  protected extraDiscussions: Discussion[] = [];\n  protected eventEmitter: EventEmitter;\n\n  constructor(params: P, page: number = 1) {\n    super(params, page, 20);\n\n    this.eventEmitter = globalEventEmitter.on('discussion.deleted', this.deleteDiscussion.bind(this));\n  }\n\n  get type(): string {\n    return 'discussions';\n  }\n\n  requestParams(): PaginatedListRequestParams {\n    const params = {\n      include: ['user', 'lastPostedUser'],\n      filter: this.params.filter || {},\n      sort: this.sortMap()[this.params.sort ?? ''],\n    };\n\n    if (this.params.q) {\n      params.filter.q = this.params.q;\n      params.include.push('mostRelevantPost', 'mostRelevantPost.user');\n    }\n\n    return params;\n  }\n\n  protected loadPage(page: number = 1): Promise<ApiResponsePlural<Discussion>> {\n    const preloadedDiscussions = app.preloadedApiDocument<Discussion[]>();\n\n    if (preloadedDiscussions) {\n      this.initialLoading = false;\n\n      return Promise.resolve(preloadedDiscussions);\n    }\n\n    return super.loadPage(page);\n  }\n\n  clear(): void {\n    super.clear();\n\n    this.extraDiscussions = [];\n  }\n\n  /**\n   * Get a map of sort keys (which appear in the URL, and are used for\n   * translation) to the API sort value that they represent.\n   */\n  sortMap() {\n    const map: any = {};\n\n    if (this.params.q) {\n      map.relevance = '';\n    }\n    map.latest = '-lastPostedAt';\n    map.top = '-commentCount';\n    map.newest = '-createdAt';\n    map.oldest = 'createdAt';\n\n    return map;\n  }\n\n  /**\n   * In the last request, has the user searched for a discussion?\n   */\n  isSearchResults(): boolean {\n    return !!this.params.q;\n  }\n\n  removeDiscussion(discussion: Discussion): void {\n    this.eventEmitter.emit('discussion.deleted', discussion);\n  }\n\n  deleteDiscussion(discussion: Discussion): void {\n    for (const page of this.pages) {\n      const index = page.items.indexOf(discussion);\n\n      if (index !== -1) {\n        page.items.splice(index, 1);\n        break;\n      }\n    }\n\n    const index = this.extraDiscussions.indexOf(discussion);\n\n    if (index !== -1) {\n      this.extraDiscussions.splice(index);\n    }\n\n    m.redraw();\n  }\n\n  /**\n   * Add a discussion to the top of the list.\n   */\n  addDiscussion(discussion: Discussion): void {\n    this.removeDiscussion(discussion);\n    this.extraDiscussions.unshift(discussion);\n\n    m.redraw();\n  }\n\n  protected getAllItems(): Discussion[] {\n    return this.extraDiscussions.concat(super.getAllItems());\n  }\n\n  public getPages(): Page<Discussion>[] {\n    const pages = super.getPages();\n\n    if (this.extraDiscussions.length) {\n      return [\n        {\n          number: -1,\n          items: this.extraDiscussions,\n        },\n        ...pages,\n      ];\n    }\n\n    return pages;\n  }\n}\n","import UserPage, { IUserPageAttrs } from './UserPage';\nimport DiscussionList from './DiscussionList';\nimport DiscussionListState from '../states/DiscussionListState';\nimport type Mithril from 'mithril';\nimport type User from '../../common/models/User';\n\n/**\n * The `DiscussionsUserPage` component shows a discussion list inside of a user\n * page.\n */\nexport default class DiscussionsUserPage extends UserPage<IUserPageAttrs, DiscussionListState> {\n  oninit(vnode: Mithril.Vnode<IUserPageAttrs, this>) {\n    super.oninit(vnode);\n\n    this.loadUser(m.route.param('username'));\n  }\n\n  show(user: User): void {\n    super.show(user);\n\n    this.state = new DiscussionListState({\n      filter: { author: user.username() },\n      sort: 'newest',\n    });\n\n    this.state.refresh();\n  }\n\n  content() {\n    return (\n      <div className=\"DiscussionsUserPage\">\n        <DiscussionList state={this.state} />\n      </div>\n    );\n  }\n}\n","/**\n * An event handler factory that makes it simpler to implement data binding\n * for component event listeners.\n *\n * The handler created by this factory passes the DOM element's attribute\n * identified by the first argument to the callback (usually a bidirectional\n * Mithril stream: https://mithril.js.org/stream.html#bidirectional-bindings).\n *\n * Replaces m.withAttr for Mithril 2.0.\n * @see https://mithril.js.org/archive/v0.2.5/mithril.withAttr.html\n */\nexport default (key: string, cb: Function) =>\n  function (this: Element) {\n    cb(this.getAttribute(key) || (this as any)[key]);\n  };\n","import Component, { ComponentAttrs } from '../Component';\nimport LoadingIndicator from './LoadingIndicator';\nimport icon from '../helpers/icon';\nimport classList from '../utils/classList';\nimport withAttr from '../utils/withAttr';\nimport type Mithril from 'mithril';\n\nexport interface ICheckboxAttrs extends ComponentAttrs {\n  state?: boolean;\n  loading?: boolean;\n  disabled?: boolean;\n  onchange: (checked: boolean, component: Checkbox<this>) => void;\n}\n\n/**\n * The `Checkbox` component defines a checkbox input.\n *\n * ### Attrs\n *\n * - `state` Whether or not the checkbox is checked.\n * - `className` The class name for the root element.\n * - `disabled` Whether or not the checkbox is disabled.\n * - `loading` Whether or not the checkbox is loading.\n * - `onchange` A callback to run when the checkbox is checked/unchecked.\n * - `children` A text label to display next to the checkbox.\n */\nexport default class Checkbox<CustomAttrs extends ICheckboxAttrs = ICheckboxAttrs> extends Component<CustomAttrs> {\n  view(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    const className = classList([\n      'Checkbox',\n      this.attrs.state ? 'on' : 'off',\n      this.attrs.className,\n      this.attrs.loading && 'loading',\n      this.attrs.disabled && 'disabled',\n    ]);\n\n    return (\n      <label className={className}>\n        <input type=\"checkbox\" checked={this.attrs.state} disabled={this.attrs.disabled} onchange={withAttr('checked', this.onchange.bind(this))} />\n        <div className=\"Checkbox-display\" aria-hidden=\"true\">\n          {this.getDisplay()}\n        </div>\n        {vnode.children}\n      </label>\n    );\n  }\n\n  /**\n   * Get the template for the checkbox's display (tick/cross icon).\n   */\n  protected getDisplay(): Mithril.Children {\n    return this.attrs.loading ? <LoadingIndicator display=\"unset\" size=\"small\" /> : icon(this.attrs.state ? 'fas fa-check' : 'fas fa-times');\n  }\n\n  /**\n   * Run a callback when the state of the checkbox is changed.\n   */\n  protected onchange(checked: boolean): void {\n    if (this.attrs.onchange) this.attrs.onchange(checked, this);\n  }\n}\n","import classList from '../utils/classList';\nimport Checkbox, { ICheckboxAttrs } from './Checkbox';\n\n/**\n * The `Switch` component is a `Checkbox`, but with a switch display instead of\n * a tick/cross one.\n */\nexport default class Switch extends Checkbox {\n  static initAttrs(attrs: ICheckboxAttrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = classList(attrs.className, 'Checkbox--switch');\n  }\n\n  getDisplay() {\n    return !!this.attrs.loading && super.getDisplay();\n  }\n}\n","import Component from '../Component';\nimport listItems from '../helpers/listItems';\n\n/**\n * The `FieldSet` component defines a collection of fields, displayed in a list\n * underneath a title. Accepted properties are:\n *\n * - `className` The class name for the fieldset.\n * - `label` The title of this group of fields.\n *\n * The children should be an array of items to show in the fieldset.\n */\nexport default class FieldSet extends Component {\n  view(vnode) {\n    return (\n      <fieldset className={this.attrs.className}>\n        <legend>{this.attrs.label}</legend>\n        <ul>{listItems(vnode.children)}</ul>\n      </fieldset>\n    );\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport Checkbox from '../../common/components/Checkbox';\nimport icon from '../../common/helpers/icon';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `NotificationGrid` component displays a table of notification types and\n * methods, allowing the user to toggle each combination.\n *\n * ### Attrs\n *\n * - `user`\n */\nexport default class NotificationGrid extends Component {\n  oninit(vnode) {\n    super.oninit(vnode);\n\n    /**\n     * Information about the available notification methods.\n     *\n     * @type {({ name: string, icon: string, label: import('mithril').Children })[]}\n     */\n    this.methods = this.notificationMethods().toArray();\n\n    /**\n     * A map of which notification checkboxes are loading.\n     *\n     * @type {Record<string, boolean>}\n     */\n    this.loading = {};\n\n    /**\n     * Information about the available notification types.\n     *\n     * @type {({ name: string, icon: string, label: import('mithril').Children })[]}\n     */\n    this.types = this.notificationTypes().toArray();\n  }\n\n  view() {\n    const preferences = this.attrs.user.preferences();\n\n    return (\n      <table className=\"NotificationGrid\">\n        <thead>\n          <tr>\n            <td />\n            {this.methods.map((method) => (\n              <th className=\"NotificationGrid-groupToggle\" onclick={this.toggleMethod.bind(this, method.name)}>\n                {icon(method.icon)} {method.label}\n              </th>\n            ))}\n          </tr>\n        </thead>\n\n        <tbody>\n          {this.types.map((type) => (\n            <tr>\n              <td className=\"NotificationGrid-groupToggle\" onclick={this.toggleType.bind(this, type.name)}>\n                {icon(type.icon)} {type.label}\n              </td>\n              {this.methods.map((method) => {\n                const key = this.preferenceKey(type.name, method.name);\n\n                return (\n                  <td className=\"NotificationGrid-checkbox\">\n                    <Checkbox\n                      state={!!preferences[key]}\n                      loading={this.loading[key]}\n                      disabled={!(key in preferences)}\n                      onchange={this.toggle.bind(this, [key])}\n                    >\n                      <span className=\"sr-only\">\n                        {app.translator.trans('core.forum.settings.notification_checkbox_a11y_label_template', {\n                          description: type.label,\n                          method: method.label,\n                        })}\n                      </span>\n                    </Checkbox>\n                  </td>\n                );\n              })}\n            </tr>\n          ))}\n        </tbody>\n      </table>\n    );\n  }\n\n  oncreate(vnode) {\n    super.oncreate(vnode);\n\n    this.$('thead .NotificationGrid-groupToggle').bind('mouseenter mouseleave', function (e) {\n      const i = parseInt($(this).index(), 10) + 1;\n      $(this)\n        .parents('table')\n        .find('td:nth-child(' + i + ')')\n        .toggleClass('highlighted', e.type === 'mouseenter');\n    });\n\n    this.$('tbody .NotificationGrid-groupToggle').bind('mouseenter mouseleave', function (e) {\n      $(this)\n        .parent()\n        .find('td')\n        .toggleClass('highlighted', e.type === 'mouseenter');\n    });\n  }\n\n  /**\n   * Toggle the state of the given preferences, based on the value of the first\n   * one.\n   *\n   * @param {string[]} keys\n   */\n  toggle(keys) {\n    const user = this.attrs.user;\n    const preferences = user.preferences();\n    const enabled = !preferences[keys[0]];\n\n    keys.forEach((key) => {\n      this.loading[key] = true;\n      preferences[key] = enabled;\n    });\n\n    m.redraw();\n\n    user.save({ preferences }).then(() => {\n      keys.forEach((key) => (this.loading[key] = false));\n\n      m.redraw();\n    });\n  }\n\n  /**\n   * Toggle all notification types for the given method.\n   *\n   * @param {string} method\n   */\n  toggleMethod(method) {\n    const keys = this.types.map((type) => this.preferenceKey(type.name, method)).filter((key) => key in this.attrs.user.preferences());\n\n    this.toggle(keys);\n  }\n\n  /**\n   * Toggle all notification methods for the given type.\n   *\n   * @param {string} type\n   */\n  toggleType(type) {\n    const keys = this.methods.map((method) => this.preferenceKey(type, method.name)).filter((key) => key in this.attrs.user.preferences());\n\n    this.toggle(keys);\n  }\n\n  /**\n   * Get the name of the preference key for the given notification type-method\n   * combination.\n   *\n   * @param {string} type\n   * @param {string} method\n   * @return {string}\n   */\n  preferenceKey(type, method) {\n    return 'notify_' + type + '_' + method;\n  }\n\n  /**\n   * Build an item list for the notification methods to display in the grid.\n   *\n   * Each notification method is an object which has the following properties:\n   *\n   * - `name` The name of the notification method.\n   * - `icon` The icon to display in the column header.\n   * - `label` The label to display in the column header.\n   *\n   * @return {ItemList<{ name: string, icon: string, label: import('mithril').Children }>}\n   */\n  notificationMethods() {\n    const items = new ItemList();\n\n    items.add('alert', {\n      name: 'alert',\n      icon: 'fas fa-bell',\n      label: app.translator.trans('core.forum.settings.notify_by_web_heading'),\n    });\n\n    items.add('email', {\n      name: 'email',\n      icon: 'far fa-envelope',\n      label: app.translator.trans('core.forum.settings.notify_by_email_heading'),\n    });\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the notification types to display in the grid.\n   *\n   * Each notification type is an object which has the following properties:\n   *\n   * - `name` The name of the notification type.\n   * - `icon` The icon to display in the notification grid row.\n   * - `label` The label to display in the notification grid row.\n   *\n   * @return {ItemList<{ name: string, icon: string, label: import('mithril').Children}>}\n   */\n  notificationTypes() {\n    const items = new ItemList();\n\n    items.add('discussionRenamed', {\n      name: 'discussionRenamed',\n      icon: 'fas fa-pencil-alt',\n      label: app.translator.trans('core.forum.settings.notify_discussion_renamed_label'),\n    });\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport Mithril from 'mithril';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `ChangePasswordModal` component shows a modal dialog which allows the\n * user to send themself a password reset email.\n */\nexport default class ChangePasswordModal<CustomAttrs extends IInternalModalAttrs = IInternalModalAttrs> extends Modal<CustomAttrs> {\n  className() {\n    return 'ChangePasswordModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.change_password.title');\n  }\n\n  content() {\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">{this.fields().toArray()}</div>\n      </div>\n    );\n  }\n\n  fields() {\n    const fields = new ItemList<Mithril.Children>();\n\n    fields.add('help', <p className=\"helpText\">{app.translator.trans('core.forum.change_password.text')}</p>);\n\n    fields.add(\n      'submit',\n      <div className=\"Form-group\">\n        <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n          {app.translator.trans('core.forum.change_password.send_button')}\n        </Button>\n      </div>\n    );\n\n    return fields;\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    this.loading = true;\n\n    app\n      .request({\n        method: 'POST',\n        url: app.forum.attribute('apiUrl') + '/forgot',\n        body: this.requestBody(),\n      })\n      .then(this.hide.bind(this), this.loaded.bind(this));\n  }\n\n  requestBody() {\n    return { email: app.session.user!.email() };\n  }\n}\n","import app from '../../forum/app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport Stream from '../../common/utils/Stream';\nimport type Mithril from 'mithril';\nimport RequestError from '../../common/utils/RequestError';\nimport ItemList from '../../common/utils/ItemList';\n\n/**\n * The `ChangeEmailModal` component shows a modal dialog which allows the user\n * to change their email address.\n */\nexport default class ChangeEmailModal<CustomAttrs extends IInternalModalAttrs = IInternalModalAttrs> extends Modal<CustomAttrs> {\n  /**\n   * The value of the email input.\n   */\n  email!: Stream<string>;\n\n  /**\n   * The value of the password input.\n   */\n  password!: Stream<string>;\n\n  /**\n   * Whether or not the email has been changed successfully.\n   */\n  success: boolean = false;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.email = Stream(app.session.user!.email() || '');\n    this.password = Stream('');\n  }\n\n  className() {\n    return 'ChangeEmailModal Modal--small';\n  }\n\n  title() {\n    return app.translator.trans('core.forum.change_email.title');\n  }\n\n  content() {\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">{this.fields().toArray()}</div>\n      </div>\n    );\n  }\n\n  fields(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.success) {\n      items.add(\n        'help',\n        <p className=\"helpText\">\n          {app.translator.trans('core.forum.change_email.confirmation_message', {\n            email: <strong>{this.email()}</strong>,\n          })}\n        </p>\n      );\n\n      items.add(\n        'dismiss',\n        <div className=\"Form-group\">\n          <Button className=\"Button Button--primary Button--block\" onclick={this.hide.bind(this)}>\n            {app.translator.trans('core.forum.change_email.dismiss_button')}\n          </Button>\n        </div>\n      );\n    } else {\n      items.add(\n        'email',\n        <div className=\"Form-group\">\n          <input\n            type=\"email\"\n            name=\"email\"\n            className=\"FormControl\"\n            placeholder={app.session.user!.email()}\n            bidi={this.email}\n            disabled={this.loading}\n          />\n        </div>\n      );\n\n      items.add(\n        'password',\n        <div className=\"Form-group\">\n          <input\n            type=\"password\"\n            name=\"password\"\n            className=\"FormControl\"\n            autocomplete=\"current-password\"\n            placeholder={app.translator.trans('core.forum.change_email.confirm_password_placeholder')}\n            bidi={this.password}\n            disabled={this.loading}\n          />\n        </div>\n      );\n\n      items.add(\n        'submit',\n        <div className=\"Form-group\">\n          <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n            {app.translator.trans('core.forum.change_email.submit_button')}\n          </Button>\n        </div>\n      );\n    }\n\n    return items;\n  }\n\n  onsubmit(e: SubmitEvent) {\n    e.preventDefault();\n\n    // If the user hasn't actually entered a different email address, we don't\n    // need to do anything. Woot!\n    if (this.email() === app.session.user!.email()) {\n      this.hide();\n      return;\n    }\n\n    this.loading = true;\n    this.alertAttrs = null;\n\n    app.session\n      .user!.save(this.requestAttributes(), {\n        errorHandler: this.onerror.bind(this),\n        meta: { password: this.password() },\n      })\n      .then(() => {\n        this.success = true;\n      })\n      .catch(() => {})\n      .then(this.loaded.bind(this));\n  }\n\n  requestAttributes() {\n    return { email: this.email() };\n  }\n\n  onerror(error: RequestError) {\n    if (error.status === 401 && error.alert) {\n      error.alert.content = app.translator.trans('core.forum.change_email.incorrect_password_message');\n    }\n\n    super.onerror(error);\n  }\n}\n","import app from '../../forum/app';\nimport UserPage, { IUserPageAttrs } from './UserPage';\nimport ItemList from '../../common/utils/ItemList';\nimport Switch from '../../common/components/Switch';\nimport Button from '../../common/components/Button';\nimport FieldSet from '../../common/components/FieldSet';\nimport NotificationGrid from './NotificationGrid';\nimport ChangePasswordModal from './ChangePasswordModal';\nimport ChangeEmailModal from './ChangeEmailModal';\nimport listItems from '../../common/helpers/listItems';\nimport extractText from '../../common/utils/extractText';\nimport type Mithril from 'mithril';\n\n/**\n * The `SettingsPage` component displays the user's settings control panel, in\n * the context of their user profile.\n */\nexport default class SettingsPage<CustomAttrs extends IUserPageAttrs = IUserPageAttrs> extends UserPage<CustomAttrs> {\n  discloseOnlineLoading?: boolean;\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.show(app.session.user!);\n\n    app.setTitle(extractText(app.translator.trans('core.forum.settings.title')));\n  }\n\n  content() {\n    return (\n      <div className=\"SettingsPage\">\n        <ul>{listItems(this.settingsItems().toArray())}</ul>\n      </div>\n    );\n  }\n\n  /**\n   * Build an item list for the user's settings controls.\n   */\n  settingsItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    ['account', 'notifications', 'privacy'].forEach((section, index) => {\n      const sectionItems = `${section}Items` as 'accountItems' | 'notificationsItems' | 'privacyItems';\n\n      items.add(\n        section,\n        <FieldSet className={`Settings-${section}`} label={app.translator.trans(`core.forum.settings.${section}_heading`)}>\n          {this[sectionItems]().toArray()}\n        </FieldSet>,\n        100 - index * 10\n      );\n    });\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's account settings.\n   */\n  accountItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'changePassword',\n      <Button className=\"Button\" onclick={() => app.modal.show(ChangePasswordModal)}>\n        {app.translator.trans('core.forum.settings.change_password_button')}\n      </Button>,\n      100\n    );\n\n    items.add(\n      'changeEmail',\n      <Button className=\"Button\" onclick={() => app.modal.show(ChangeEmailModal)}>\n        {app.translator.trans('core.forum.settings.change_email_button')}\n      </Button>,\n      90\n    );\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's notification settings.\n   */\n  notificationsItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('notificationGrid', <NotificationGrid user={this.user} />, 100);\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's privacy settings.\n   */\n  privacyItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'discloseOnline',\n      <Switch\n        state={this.user!.preferences()?.discloseOnline}\n        onchange={(value: boolean) => {\n          this.discloseOnlineLoading = true;\n\n          this.user!.savePreferences({ discloseOnline: value }).then(() => {\n            this.discloseOnlineLoading = false;\n            m.redraw();\n          });\n        }}\n        loading={this.discloseOnlineLoading}\n      >\n        {app.translator.trans('core.forum.settings.privacy_disclose_online_label')}\n      </Switch>,\n      100\n    );\n\n    return items;\n  }\n}\n","import app from '../../forum/app';\nimport Page, { IPageAttrs } from '../../common/components/Page';\nimport NotificationList from './NotificationList';\nimport type Mithril from 'mithril';\nimport extractText from '../../common/utils/extractText';\n\n/**\n * The `NotificationsPage` component shows the notifications list. It is only\n * used on mobile devices where the notifications dropdown is within the drawer.\n */\nexport default class NotificationsPage<CustomAttrs extends IPageAttrs = IPageAttrs> extends Page<CustomAttrs> {\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    app.history.push('notifications', extractText(app.translator.trans('core.forum.notifications.title')));\n\n    app.notifications.load();\n\n    this.bodyClass = 'App--notifications';\n  }\n\n  view() {\n    return (\n      <div className=\"NotificationsPage\">\n        <NotificationList state={app.notifications}></NotificationList>\n      </div>\n    );\n  }\n}\n","import type Mithril from 'mithril';\nimport type { RouteResolver } from '../Application';\nimport type { default as Component, ComponentAttrs } from '../Component';\n\n/**\n * Generates a route resolver for a given component.\n *\n * In addition to regular route resolver functionality:\n * - It provide the current route name as an attr\n * - It sets a key on the component so a rerender will be triggered on route change.\n */\nexport default class DefaultResolver<\n  Attrs extends ComponentAttrs,\n  Comp extends Component<Attrs & { routeName: string }>,\n  RouteArgs extends Record<string, unknown> = {}\n> implements RouteResolver<Attrs, Comp, RouteArgs>\n{\n  component: new () => Comp;\n  routeName: string;\n\n  constructor(component: new () => Comp, routeName: string) {\n    this.component = component;\n    this.routeName = routeName;\n  }\n\n  /**\n   * When a route change results in a changed key, a full page\n   * rerender occurs. This method can be overriden in subclasses\n   * to prevent rerenders on some route changes.\n   */\n  makeKey(): string {\n    return this.routeName + JSON.stringify(m.route.param());\n  }\n\n  makeAttrs(vnode: Mithril.Vnode<Attrs, Comp>): Attrs & { routeName: string } {\n    return {\n      ...vnode.attrs,\n      routeName: this.routeName,\n    };\n  }\n\n  onmatch(args: RouteArgs, requestedPath: string, route: string): { new (): Comp } {\n    return this.component;\n  }\n\n  render(vnode: Mithril.Vnode<Attrs, Comp>): Mithril.Children {\n    return [{ ...vnode, attrs: this.makeAttrs(vnode), key: this.makeKey() }];\n  }\n}\n","import type Mithril from 'mithril';\n\nimport app from '../../forum/app';\nimport DefaultResolver from '../../common/resolvers/DefaultResolver';\nimport DiscussionPage, { IDiscussionPageAttrs } from '../components/DiscussionPage';\n\n/**\n * A custom route resolver for DiscussionPage that generates the same key to all posts\n * on the same discussion. It triggers a scroll when going from one post to another\n * in the same discussion.\n */\nexport default class DiscussionPageResolver<\n  Attrs extends IDiscussionPageAttrs = IDiscussionPageAttrs,\n  RouteArgs extends Record<string, unknown> = {}\n> extends DefaultResolver<Attrs, DiscussionPage<Attrs>, RouteArgs> {\n  static scrollToPostNumber: number | null = null;\n\n  /**\n   * Remove optional parts of a discussion's slug to keep the substring\n   * that bijectively maps to a discussion object. By default this just\n   * extracts the numerical ID from the slug. If a custom discussion\n   * slugging driver is used, this may need to be overriden.\n   * @param slug\n   */\n  canonicalizeDiscussionSlug(slug: string | undefined) {\n    if (!slug) return;\n    return slug.split('-')[0];\n  }\n\n  /**\n   * @inheritdoc\n   */\n  makeKey() {\n    const params = { ...m.route.param() };\n    if ('near' in params) {\n      delete params.near;\n    }\n    params.id = this.canonicalizeDiscussionSlug(params.id);\n    return this.routeName.replace('.near', '') + JSON.stringify(params);\n  }\n\n  onmatch(args: Attrs & RouteArgs, requestedPath: string, route: string) {\n    if (app.current.matches(DiscussionPage) && this.canonicalizeDiscussionSlug(args.id) === this.canonicalizeDiscussionSlug(m.route.param('id'))) {\n      // By default, the first post number of any discussion is 1\n      DiscussionPageResolver.scrollToPostNumber = args.near || 1;\n    }\n\n    return super.onmatch(args, requestedPath, route);\n  }\n\n  render(vnode: Mithril.Vnode<Attrs, DiscussionPage<Attrs>>) {\n    if (DiscussionPageResolver.scrollToPostNumber !== null) {\n      const number = DiscussionPageResolver.scrollToPostNumber;\n      // Scroll after a timeout to avoid clashes with the render.\n      setTimeout(() => app.current.get('stream').goToNumber(number));\n      DiscussionPageResolver.scrollToPostNumber = null;\n    }\n\n    return super.render(vnode);\n  }\n}\n","import Component, { ComponentAttrs } from '../Component';\nimport type Mithril from 'mithril';\nimport app from '../app';\n\nexport interface ILabelValueAttrs extends ComponentAttrs {\n  label: Mithril.Children;\n  value: Mithril.Children;\n}\n\n/**\n * A generic component for displaying a label and value inline.\n * Created to avoid reinventing the wheel.\n *\n * `label: value`\n */\nexport default class LabelValue<CustomAttrs extends ILabelValueAttrs = ILabelValueAttrs> extends Component<CustomAttrs> {\n  view(vnode: Mithril.Vnode<CustomAttrs, this>): Mithril.Children {\n    return (\n      <div className=\"LabelValue\">\n        <div className=\"LabelValue-label\">\n          {app.translator.trans('core.lib.data_segment.label', {\n            label: this.attrs.label,\n          })}\n        </div>\n        <div className=\"LabelValue-value\">{this.attrs.value}</div>\n      </div>\n    );\n  }\n}\n","import app from '../app';\nimport Component, { ComponentAttrs } from '../../common/Component';\nimport icon from '../../common/helpers/icon';\nimport Button from '../../common/components/Button';\nimport humanTime from '../../common/helpers/humanTime';\nimport ItemList from '../../common/utils/ItemList';\nimport LabelValue from '../../common/components/LabelValue';\nimport extractText from '../../common/utils/extractText';\nimport classList from '../../common/utils/classList';\nimport Tooltip from '../../common/components/Tooltip';\nimport type Mithril from 'mithril';\nimport type AccessToken from '../../common/models/AccessToken';\nimport { NestedStringArray } from '@askvortsov/rich-icu-message-formatter';\nimport IPAddress from '../../common/components/IPAddress';\n\nexport interface IAccessTokensListAttrs extends ComponentAttrs {\n  tokens: AccessToken[];\n  type: 'session' | 'developer_token';\n  hideTokens?: boolean;\n  icon?: string;\n  ondelete?: (token: AccessToken) => void;\n}\n\nexport default class AccessTokensList<CustomAttrs extends IAccessTokensListAttrs = IAccessTokensListAttrs> extends Component<CustomAttrs> {\n  protected loading: Record<string, boolean | undefined> = {};\n  protected showingTokens: Record<string, boolean | undefined> = {};\n\n  view(vnode: Mithril.Vnode<CustomAttrs, this>): Mithril.Children {\n    return (\n      <div className=\"AccessTokensList\">\n        {this.attrs.tokens.length ? (\n          this.attrs.tokens.map(this.tokenView.bind(this))\n        ) : (\n          <div className=\"AccessTokensList--empty\">{app.translator.trans('core.forum.security.empty_text')}</div>\n        )}\n      </div>\n    );\n  }\n\n  tokenView(token: AccessToken): Mithril.Children {\n    return (\n      <div\n        className={classList('AccessTokensList-item', {\n          'AccessTokensList-item--active': token.isCurrent(),\n        })}\n        key={token.id()!}\n      >\n        {this.tokenViewItems(token).toArray()}\n      </div>\n    );\n  }\n\n  tokenViewItems(token: AccessToken): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add('icon', <div className=\"AccessTokensList-item-icon\">{icon(this.attrs.icon || 'fas fa-key')}</div>, 50);\n\n    items.add('info', <div className=\"AccessTokensList-item-info\">{this.tokenInfoItems(token).toArray()}</div>, 40);\n\n    items.add('actions', <div className=\"AccessTokensList-item-actions\">{this.tokenActionItems(token).toArray()}</div>, 30);\n\n    return items;\n  }\n\n  tokenInfoItems(token: AccessToken) {\n    const items = new ItemList<Mithril.Children>();\n\n    if (this.attrs.type === 'session') {\n      items.add(\n        'title',\n        <div className=\"AccessTokensList-item-title\">\n          <span className=\"AccessTokensList-item-title-main\">{token.device()}</span>\n          {token.isCurrent() && [\n            ' — ',\n            <span className=\"AccessTokensList-item-title-sub\">{app.translator.trans('core.forum.security.current_active_session')}</span>,\n          ]}\n        </div>\n      );\n    } else {\n      items.add(\n        'title',\n        <div className=\"AccessTokensList-item-title\">\n          <span className=\"AccessTokensList-item-title-main\">{this.generateTokenTitle(token)}</span>\n        </div>\n      );\n    }\n\n    items.add(\n      'createdAt',\n      <div className=\"AccessTokensList-item-createdAt\">\n        <LabelValue label={app.translator.trans('core.forum.security.created')} value={humanTime(token.createdAt())} />\n      </div>\n    );\n\n    items.add(\n      'lastActivityAt',\n      <div className=\"AccessTokensList-item-lastActivityAt\">\n        <LabelValue\n          label={app.translator.trans('core.forum.security.last_activity')}\n          value={\n            token.lastActivityAt() ? (\n              <>\n                {humanTime(token.lastActivityAt())}\n                {token.lastIpAddress() && (\n                  <span>\n                    {' '}\n                    — <IPAddress ip={token.lastIpAddress()} />\n                  </span>\n                )}\n                {this.attrs.type === 'developer_token' && token.device() && (\n                  <>\n                    {' '}\n                    — <span className=\"AccessTokensList-item-title-sub\">{token.device()}</span>\n                  </>\n                )}\n              </>\n            ) : (\n              app.translator.trans('core.forum.security.never')\n            )\n          }\n        />\n      </div>\n    );\n\n    return items;\n  }\n\n  tokenActionItems(token: AccessToken) {\n    const items = new ItemList<Mithril.Children>();\n\n    const deleteKey = {\n      session: 'terminate_session',\n      developer_token: 'revoke_access_token',\n    }[this.attrs.type];\n\n    if (this.attrs.type === 'developer_token') {\n      const isHidden = !this.showingTokens[token.id()!];\n      const displayKey = isHidden ? 'show_access_token' : 'hide_access_token';\n\n      items.add(\n        'toggleDisplay',\n        <Button\n          className=\"Button Button--inverted\"\n          icon={isHidden ? 'fas fa-eye' : 'fas fa-eye-slash'}\n          onclick={() => {\n            this.showingTokens[token.id()!] = isHidden;\n            m.redraw();\n          }}\n        >\n          {app.translator.trans(`core.forum.security.${displayKey}`)}\n        </Button>\n      );\n    }\n\n    let revokeButton = (\n      <Button className=\"Button Button--danger\" disabled={token.isCurrent()} loading={!!this.loading[token.id()!]} onclick={() => this.revoke(token)}>\n        {app.translator.trans(`core.forum.security.${deleteKey}`)}\n      </Button>\n    );\n\n    if (token.isCurrent()) {\n      revokeButton = (\n        <Tooltip text={app.translator.trans('core.forum.security.cannot_terminate_current_session')}>\n          <div tabindex=\"0\">{revokeButton}</div>\n        </Tooltip>\n      );\n    }\n\n    items.add('revoke', revokeButton);\n\n    return items;\n  }\n\n  async revoke(token: AccessToken) {\n    if (!confirm(extractText(app.translator.trans('core.forum.security.revoke_access_token_confirmation')))) return;\n\n    this.loading[token.id()!] = true;\n\n    await token.delete();\n\n    this.loading[token.id()!] = false;\n    this.attrs.ondelete?.(token);\n\n    const key = this.attrs.type === 'session' ? 'session_terminated' : 'token_revoked';\n\n    app.alerts.show({ type: 'success' }, app.translator.trans(`core.forum.security.${key}`, { count: 1 }));\n    m.redraw();\n  }\n\n  generateTokenTitle(token: AccessToken): NestedStringArray {\n    const name = token.title() || app.translator.trans('core.forum.security.token_title_placeholder');\n    const value = this.tokenValueDisplay(token);\n\n    return app.translator.trans('core.forum.security.token_item_title', { title: name, token: value });\n  }\n\n  tokenValueDisplay(token: AccessToken): Mithril.Children {\n    const obfuscatedName = Array(12).fill('*').join('');\n    const value = this.showingTokens[token.id()!] ? token.token() : obfuscatedName;\n\n    return <code className=\"AccessTokensList-item-token\">{value}</code>;\n  }\n}\n","import app from '../app';\nimport Modal, { IInternalModalAttrs } from '../../common/components/Modal';\nimport Button from '../../common/components/Button';\nimport Stream from '../../common/utils/Stream';\nimport type AccessToken from '../../common/models/AccessToken';\nimport type { SaveAttributes } from '../../common/Model';\nimport type Mithril from 'mithril';\n\nexport interface INewAccessTokenModalAttrs extends IInternalModalAttrs {\n  onsuccess: (token: AccessToken) => void;\n}\n\nexport default class NewAccessTokenModal<CustomAttrs extends INewAccessTokenModalAttrs = INewAccessTokenModalAttrs> extends Modal<CustomAttrs> {\n  protected titleInput = Stream('');\n\n  className(): string {\n    return 'Modal--small NewAccessTokenModal';\n  }\n\n  title(): Mithril.Children {\n    return app.translator.trans('core.forum.security.new_access_token_modal.title');\n  }\n\n  content(): Mithril.Children {\n    const titleLabel = app.translator.trans('core.forum.security.new_access_token_modal.title_placeholder');\n\n    return (\n      <div className=\"Modal-body\">\n        <div className=\"Form Form--centered\">\n          <div className=\"Form-group\">\n            <input type=\"text\" className=\"FormControl\" bidi={this.titleInput} placeholder={titleLabel} aria-label={titleLabel} />\n          </div>\n          <div className=\"Form-group\">\n            <Button className=\"Button Button--primary Button--block\" type=\"submit\" loading={this.loading}>\n              {app.translator.trans('core.forum.security.new_access_token_modal.submit_button')}\n            </Button>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n  submitData(): SaveAttributes {\n    return {\n      title: this.titleInput(),\n    };\n  }\n\n  onsubmit(e: SubmitEvent) {\n    super.onsubmit(e);\n    e.preventDefault();\n\n    this.loading = true;\n\n    app.store\n      .createRecord<AccessToken>('access-tokens')\n      .save(this.submitData())\n      .then((token) => {\n        this.attrs.onsuccess(token);\n        app.modal.close();\n      })\n      .finally(this.loaded.bind(this));\n  }\n}\n","import AccessToken from '../../common/models/AccessToken';\n\nexport default class UserSecurityPageState {\n  protected tokens: AccessToken[] | null = null;\n  public loadingTerminateSessions: boolean = false;\n  public loadingGlobalLogout: boolean = false;\n\n  public hasLoadedTokens(): boolean {\n    return this.tokens !== null;\n  }\n\n  public getTokens(): AccessToken[] | null {\n    return this.tokens;\n  }\n\n  public setTokens(tokens: AccessToken[]): void {\n    this.tokens = tokens;\n  }\n\n  public pushToken(token: AccessToken): void {\n    this.tokens?.push(token);\n  }\n\n  public removeToken(token: AccessToken): void {\n    this.tokens = this.tokens!.filter((t) => t !== token);\n  }\n\n  public getSessionTokens(): AccessToken[] {\n    return this.tokens?.filter((token) => token.isSessionToken()).sort((a, b) => (b.isCurrent() ? 1 : -1)) || [];\n  }\n\n  public getDeveloperTokens(): AccessToken[] | null {\n    return this.tokens?.filter((token) => !token.isSessionToken()) || null;\n  }\n\n  /**\n   * Look up session tokens other than the current one.\n   */\n  public getOtherSessionTokens(): AccessToken[] {\n    return this.tokens?.filter((token) => token.isSessionToken() && !token.isCurrent()) || [];\n  }\n\n  public hasOtherActiveSessions(): boolean {\n    return (this.getOtherSessionTokens() || []).length > 0;\n  }\n\n  public removeOtherSessionTokens() {\n    this.tokens = this.tokens!.filter((token) => !token.isSessionToken() || token.isCurrent());\n  }\n}\n","import app from '../../forum/app';\nimport UserPage, { IUserPageAttrs } from './UserPage';\nimport ItemList from '../../common/utils/ItemList';\nimport FieldSet from '../../common/components/FieldSet';\nimport listItems from '../../common/helpers/listItems';\nimport extractText from '../../common/utils/extractText';\nimport AccessTokensList from './AccessTokensList';\nimport LoadingIndicator from '../../common/components/LoadingIndicator';\nimport Button from '../../common/components/Button';\nimport NewAccessTokenModal from './NewAccessTokenModal';\nimport { camelCaseToSnakeCase } from '../../common/utils/string';\nimport type AccessToken from '../../common/models/AccessToken';\nimport type Mithril from 'mithril';\nimport Tooltip from '../../common/components/Tooltip';\nimport UserSecurityPageState from '../states/UserSecurityPageState';\n\n/**\n * The `UserSecurityPage` component displays the user's security control panel, in\n * the context of their user profile.\n */\nexport default class UserSecurityPage<CustomAttrs extends IUserPageAttrs = IUserPageAttrs> extends UserPage<CustomAttrs, UserSecurityPageState> {\n  state = new UserSecurityPageState();\n\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    const routeUsername = m.route.param('username');\n\n    if (routeUsername !== app.session.user?.slug() && !app.forum.attribute<boolean>('canModerateAccessTokens')) {\n      m.route.set('/');\n    }\n\n    this.loadUser(routeUsername);\n\n    app.setTitle(extractText(app.translator.trans('core.forum.security.title')));\n\n    this.loadTokens();\n  }\n\n  content() {\n    return (\n      <div className=\"UserSecurityPage\">\n        <ul>{listItems(this.settingsItems().toArray())}</ul>\n      </div>\n    );\n  }\n\n  /**\n   * Build an item list for the user's settings controls.\n   */\n  settingsItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    if (\n      app.forum.attribute('canCreateAccessToken') ||\n      app.forum.attribute('canModerateAccessTokens') ||\n      (this.state.hasLoadedTokens() && this.state.getDeveloperTokens()?.length)\n    ) {\n      items.add(\n        'developerTokens',\n        <FieldSet className=\"UserSecurityPage-developerTokens\" label={app.translator.trans(`core.forum.security.developer_tokens_heading`)}>\n          {this.developerTokensItems().toArray()}\n        </FieldSet>\n      );\n    } else if (!this.state.hasLoadedTokens()) {\n      items.add('developerTokens', <LoadingIndicator />);\n    }\n\n    items.add(\n      'sessions',\n      <FieldSet className=\"UserSecurityPage-sessions\" label={app.translator.trans(`core.forum.security.sessions_heading`)}>\n        {this.sessionsItems().toArray()}\n      </FieldSet>\n    );\n\n    if (this.user!.id() === app.session.user!.id()) {\n      items.add(\n        'globalLogout',\n        <FieldSet className=\"UserSecurityPage-globalLogout\" label={app.translator.trans('core.forum.security.global_logout.heading')}>\n          <span className=\"helpText\">{app.translator.trans('core.forum.security.global_logout.help_text')}</span>\n          <Button\n            className=\"Button\"\n            icon=\"fas fa-sign-out-alt\"\n            onclick={this.globalLogout.bind(this)}\n            loading={this.state.loadingGlobalLogout}\n            disabled={this.state.loadingTerminateSessions}\n          >\n            {app.translator.trans('core.forum.security.global_logout.log_out_button')}\n          </Button>\n        </FieldSet>\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's access accessToken settings.\n   */\n  developerTokensItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'accessTokenList',\n      !this.state.hasLoadedTokens() ? (\n        <LoadingIndicator />\n      ) : (\n        <AccessTokensList\n          type=\"developer_token\"\n          ondelete={(token: AccessToken) => {\n            this.state.removeToken(token);\n            m.redraw();\n          }}\n          tokens={this.state.getDeveloperTokens()}\n          icon=\"fas fa-key\"\n          hideTokens={false}\n        />\n      )\n    );\n\n    if (this.user!.id() === app.session.user!.id()) {\n      items.add(\n        'newAccessToken',\n        <Button\n          className=\"Button\"\n          disabled={!app.forum.attribute<boolean>('canCreateAccessToken')}\n          onclick={() =>\n            app.modal.show(NewAccessTokenModal, {\n              onsuccess: (token: AccessToken) => {\n                this.state.pushToken(token);\n                m.redraw();\n              },\n            })\n          }\n        >\n          {app.translator.trans('core.forum.security.new_access_token_button')}\n        </Button>\n      );\n    }\n\n    return items;\n  }\n\n  /**\n   * Build an item list for the user's access accessToken settings.\n   */\n  sessionsItems() {\n    const items = new ItemList<Mithril.Children>();\n\n    items.add(\n      'sessionsList',\n      !this.state.hasLoadedTokens() ? (\n        <LoadingIndicator />\n      ) : (\n        <AccessTokensList\n          type=\"session\"\n          ondelete={(token: AccessToken) => {\n            this.state.removeToken(token);\n            m.redraw();\n          }}\n          tokens={this.state.getSessionTokens()}\n          icon=\"fas fa-laptop\"\n          hideTokens={true}\n        />\n      )\n    );\n\n    if (this.user!.id() === app.session.user!.id()) {\n      const isDisabled = !this.state.hasOtherActiveSessions();\n\n      let terminateAllOthersButton = (\n        <Button\n          className=\"Button\"\n          onclick={this.terminateAllOtherSessions.bind(this)}\n          loading={this.state.loadingTerminateSessions}\n          disabled={this.state.loadingGlobalLogout || isDisabled}\n        >\n          {app.translator.trans('core.forum.security.terminate_all_other_sessions')}\n        </Button>\n      );\n\n      if (isDisabled) {\n        terminateAllOthersButton = (\n          <Tooltip text={app.translator.trans('core.forum.security.cannot_terminate_current_session')}>\n            <span tabindex=\"0\">{terminateAllOthersButton}</span>\n          </Tooltip>\n        );\n      }\n\n      items.add('terminateAllOtherSessions', terminateAllOthersButton);\n    }\n\n    return items;\n  }\n\n  loadTokens() {\n    return app.store\n      .find<AccessToken[]>('access-tokens', {\n        filter: { user: this.user!.id()! },\n      })\n      .then((tokens) => {\n        this.state.setTokens(tokens);\n        m.redraw();\n      });\n  }\n\n  terminateAllOtherSessions() {\n    if (!confirm(extractText(app.translator.trans('core.forum.security.terminate_all_other_sessions_confirmation')))) return;\n\n    this.state.loadingTerminateSessions = true;\n\n    return app\n      .request({\n        method: 'DELETE',\n        url: app.forum.attribute('apiUrl') + '/sessions',\n      })\n      .then(() => {\n        // Count terminated sessions first.\n        const count = this.state.getOtherSessionTokens().length;\n\n        this.state.removeOtherSessionTokens();\n\n        app.alerts.show({ type: 'success' }, app.translator.trans('core.forum.security.session_terminated', { count }));\n      })\n      .catch(() => {\n        app.alerts.show({ type: 'error' }, app.translator.trans('core.forum.security.session_termination_failed'));\n      })\n      .finally(() => {\n        this.state.loadingTerminateSessions = false;\n        m.redraw();\n      });\n  }\n\n  globalLogout() {\n    this.state.loadingGlobalLogout = true;\n\n    return app\n      .request({\n        method: 'POST',\n        url: app.forum.attribute<string>('baseUrl') + '/global-logout',\n      })\n      .then(() => window.location.reload())\n      .finally(() => {\n        this.state.loadingGlobalLogout = false;\n        m.redraw();\n      });\n  }\n}\n","import ForumApplication from './ForumApplication';\nimport IndexPage from './components/IndexPage';\nimport DiscussionPage from './components/DiscussionPage';\nimport PostsUserPage from './components/PostsUserPage';\nimport DiscussionsUserPage from './components/DiscussionsUserPage';\nimport SettingsPage from './components/SettingsPage';\nimport NotificationsPage from './components/NotificationsPage';\nimport DiscussionPageResolver from './resolvers/DiscussionPageResolver';\nimport Discussion from '../common/models/Discussion';\nimport type Post from '../common/models/Post';\nimport type User from '../common/models/User';\nimport UserSecurityPage from './components/UserSecurityPage';\n\n/**\n * Helper functions to generate URLs to form pages.\n */\nexport interface ForumRoutes {\n  discussion: (discussion: Discussion, near?: number) => string;\n  post: (post: Post) => string;\n  user: (user: User) => string;\n}\n\n/**\n * The `routes` initializer defines the forum app's routes.\n */\nexport default function (app: ForumApplication) {\n  app.routes = {\n    index: { path: '/all', component: IndexPage },\n\n    discussion: { path: '/d/:id', component: DiscussionPage, resolverClass: DiscussionPageResolver },\n    'discussion.near': { path: '/d/:id/:near', component: DiscussionPage, resolverClass: DiscussionPageResolver },\n\n    user: { path: '/u/:username', component: PostsUserPage },\n    'user.posts': { path: '/u/:username', component: PostsUserPage },\n    'user.discussions': { path: '/u/:username/discussions', component: DiscussionsUserPage },\n\n    settings: { path: '/settings', component: SettingsPage },\n    'user.security': { path: '/u/:username/security', component: UserSecurityPage },\n    notifications: { path: '/notifications', component: NotificationsPage },\n  };\n}\n\nexport function makeRouteHelpers(app: ForumApplication) {\n  return {\n    /**\n     * Generate a URL to a discussion.\n     */\n    discussion: (discussion: Discussion, near?: number) => {\n      return app.route(near && near !== 1 ? 'discussion.near' : 'discussion', {\n        id: discussion.slug(),\n        near: near && near !== 1 ? near : undefined,\n      });\n    },\n\n    /**\n     * Generate a URL to a post.\n     */\n    post: (post: Post) => {\n      return app.route.discussion(post.discussion(), post.number());\n    },\n\n    /**\n     * Generate a URL to a user.\n     */\n    user: (user: User) => {\n      return app.route('user', {\n        username: user.slug(),\n      });\n    },\n  };\n}\n","import Alert from '../../common/components/Alert';\nimport Button from '../../common/components/Button';\nimport icon from '../../common/helpers/icon';\nimport Component from '../../common/Component';\n\n/**\n * Shows an alert if the user has not yet confirmed their email address.\n *\n * @param {import('../ForumApplication').default} app\n */\nexport default function alertEmailConfirmation(app) {\n  const user = app.session.user;\n\n  if (!user || user.isEmailConfirmed()) return;\n\n  class ResendButton extends Component {\n    oninit(vnode) {\n      super.oninit(vnode);\n\n      this.loading = false;\n      this.sent = false;\n    }\n\n    view() {\n      return (\n        <Button className=\"Button Button--link\" onclick={this.onclick.bind(this)} loading={this.loading} disabled={this.sent}>\n          {this.sent\n            ? [icon('fas fa-check'), ' ', app.translator.trans('core.forum.user_email_confirmation.sent_message')]\n            : app.translator.trans('core.forum.user_email_confirmation.resend_button')}\n        </Button>\n      );\n    }\n\n    onclick() {\n      this.loading = true;\n      m.redraw();\n\n      app\n        .request({\n          method: 'POST',\n          url: app.forum.attribute('apiUrl') + '/users/' + user.id() + '/send-confirmation',\n        })\n        .then(() => {\n          this.loading = false;\n          this.sent = true;\n          m.redraw();\n        })\n        .catch(() => {\n          this.loading = false;\n          m.redraw();\n        });\n    }\n  }\n\n  class ContainedAlert extends Alert {\n    view(vnode) {\n      const vdom = super.view(vnode);\n      return { ...vdom, children: [<div className=\"container\">{vdom.children}</div>] };\n    }\n  }\n\n  m.mount($('<div className=\"App-notices\"/>').insertBefore('#content')[0], {\n    view: () => (\n      <ContainedAlert dismissible={false} controls={[<ResendButton />]} className=\"Alert--emailConfirmation\">\n        {app.translator.trans('core.forum.user_email_confirmation.alert_message', { email: <strong>{user.email()}</strong> })}\n      </ContainedAlert>\n    ),\n  });\n}\n","const candidateSelectors = [\n  'input',\n  'select',\n  'textarea',\n  'a[href]',\n  'button',\n  '[tabindex]:not(slot)',\n  'audio[controls]',\n  'video[controls]',\n  '[contenteditable]:not([contenteditable=\"false\"])',\n  'details>summary:first-of-type',\n  'details',\n];\nconst candidateSelector = /* #__PURE__ */ candidateSelectors.join(',');\n\nconst NoElement = typeof Element === 'undefined';\n\nconst matches = NoElement\n  ? function () {}\n  : Element.prototype.matches ||\n    Element.prototype.msMatchesSelector ||\n    Element.prototype.webkitMatchesSelector;\n\nconst getRootNode =\n  !NoElement && Element.prototype.getRootNode\n    ? (element) => element.getRootNode()\n    : (element) => element.ownerDocument;\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nconst getCandidates = function (el, includeContainer, filter) {\n  let candidates = Array.prototype.slice.apply(\n    el.querySelectorAll(candidateSelector)\n  );\n  if (includeContainer && matches.call(el, candidateSelector)) {\n    candidates.unshift(el);\n  }\n  candidates = candidates.filter(filter);\n  return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidatesScope\n * @property {Element} scope contains inner candidates\n * @property {Element[]} candidates\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n *  if a function, implies shadow support is enabled and either returns the shadow root of an element\n *  or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidatesScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.<Element|CandidatesScope>}\n */\nconst getCandidatesIteratively = function (\n  elements,\n  includeContainer,\n  options\n) {\n  const candidates = [];\n  const elementsToCheck = Array.from(elements);\n  while (elementsToCheck.length) {\n    const element = elementsToCheck.shift();\n    if (element.tagName === 'SLOT') {\n      // add shadow dom slot scope (slot itself cannot be focusable)\n      const assigned = element.assignedElements();\n      const content = assigned.length ? assigned : element.children;\n      const nestedCandidates = getCandidatesIteratively(content, true, options);\n      if (options.flatten) {\n        candidates.push(...nestedCandidates);\n      } else {\n        candidates.push({\n          scope: element,\n          candidates: nestedCandidates,\n        });\n      }\n    } else {\n      // check candidate element\n      const validCandidate = matches.call(element, candidateSelector);\n      if (\n        validCandidate &&\n        options.filter(element) &&\n        (includeContainer || !elements.includes(element))\n      ) {\n        candidates.push(element);\n      }\n\n      // iterate over shadow content if possible\n      const shadowRoot =\n        element.shadowRoot ||\n        // check for an undisclosed shadow\n        (typeof options.getShadowRoot === 'function' &&\n          options.getShadowRoot(element));\n\n      const validShadowRoot =\n        !options.shadowRootFilter || options.shadowRootFilter(element);\n\n      if (shadowRoot && validShadowRoot) {\n        // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n        //  shadow exists, so look at light dom children as fallback BUT create a scope for any\n        //  child candidates found because they're likely slotted elements (elements that are\n        //  children of the web component element (which has the shadow), in the light dom, but\n        //  slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n        //  _after_ we return from this recursive call\n        const nestedCandidates = getCandidatesIteratively(\n          shadowRoot === true ? element.children : shadowRoot.children,\n          true,\n          options\n        );\n\n        if (options.flatten) {\n          candidates.push(...nestedCandidates);\n        } else {\n          candidates.push({\n            scope: element,\n            candidates: nestedCandidates,\n          });\n        }\n      } else {\n        // there's not shadow so just dig into the element's (light dom) children\n        //  __without__ giving the element special scope treatment\n        elementsToCheck.unshift(...element.children);\n      }\n    }\n  }\n  return candidates;\n};\n\nconst getTabindex = function (node, isScope) {\n  if (node.tabIndex < 0) {\n    // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n    // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n    // yet they are still part of the regular tab order; in FF, they get a default\n    // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n    // order, consider their tab index to be 0.\n    // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n    // so if they don't have a tabindex attribute specifically set, assume it's 0.\n    //\n    // isScope is positive for custom element with shadow root or slot that by default\n    // have tabIndex -1, but need to be sorted by document order in order for their\n    // content to be inserted in the correct position\n    if (\n      (isScope ||\n        /^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) ||\n        node.isContentEditable) &&\n      isNaN(parseInt(node.getAttribute('tabindex'), 10))\n    ) {\n      return 0;\n    }\n  }\n\n  return node.tabIndex;\n};\n\nconst sortOrderedTabbables = function (a, b) {\n  return a.tabIndex === b.tabIndex\n    ? a.documentOrder - b.documentOrder\n    : a.tabIndex - b.tabIndex;\n};\n\nconst isInput = function (node) {\n  return node.tagName === 'INPUT';\n};\n\nconst isHiddenInput = function (node) {\n  return isInput(node) && node.type === 'hidden';\n};\n\nconst isDetailsWithSummary = function (node) {\n  const r =\n    node.tagName === 'DETAILS' &&\n    Array.prototype.slice\n      .apply(node.children)\n      .some((child) => child.tagName === 'SUMMARY');\n  return r;\n};\n\nconst getCheckedRadio = function (nodes, form) {\n  for (let i = 0; i < nodes.length; i++) {\n    if (nodes[i].checked && nodes[i].form === form) {\n      return nodes[i];\n    }\n  }\n};\n\nconst isTabbableRadio = function (node) {\n  if (!node.name) {\n    return true;\n  }\n  const radioScope = node.form || getRootNode(node);\n  const queryRadios = function (name) {\n    return radioScope.querySelectorAll(\n      'input[type=\"radio\"][name=\"' + name + '\"]'\n    );\n  };\n\n  let radioSet;\n  if (\n    typeof window !== 'undefined' &&\n    typeof window.CSS !== 'undefined' &&\n    typeof window.CSS.escape === 'function'\n  ) {\n    radioSet = queryRadios(window.CSS.escape(node.name));\n  } else {\n    try {\n      radioSet = queryRadios(node.name);\n    } catch (err) {\n      // eslint-disable-next-line no-console\n      console.error(\n        'Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s',\n        err.message\n      );\n      return false;\n    }\n  }\n\n  const checked = getCheckedRadio(radioSet, node.form);\n  return !checked || checked === node;\n};\n\nconst isRadio = function (node) {\n  return isInput(node) && node.type === 'radio';\n};\n\nconst isNonTabbableRadio = function (node) {\n  return isRadio(node) && !isTabbableRadio(node);\n};\n\nconst isZeroArea = function (node) {\n  const { width, height } = node.getBoundingClientRect();\n  return width === 0 && height === 0;\n};\nconst isHidden = function (node, { displayCheck, getShadowRoot }) {\n  // NOTE: visibility will be `undefined` if node is detached from the document\n  //  (see notes about this further down), which means we will consider it visible\n  //  (this is legacy behavior from a very long way back)\n  // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n  //  _visibility_ check, not a _display_ check\n  if (getComputedStyle(node).visibility === 'hidden') {\n    return true;\n  }\n\n  const isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n  const nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n  if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n    return true;\n  }\n\n  // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n  //  (but NOT _the_ document; see second 'If' comment below for more).\n  // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n  //  is attached, and the one we need to check if it's in the document or not (because the\n  //  shadow, and all nodes it contains, is never considered in the document since shadows\n  //  behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n  //  is hidden, or is not in the document itself but is detached, it will affect the shadow's\n  //  visibility, including all the nodes it contains). The host could be any normal node,\n  //  or a custom element (i.e. web component). Either way, that's the one that is considered\n  //  part of the document, not the shadow root, nor any of its children (i.e. the node being\n  //  tested).\n  // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n  //  document (per the docs) and while it's a Document-type object, that document does not\n  //  appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n  //  to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n  //  using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n  //  node is actually detached.\n  const nodeRootHost = getRootNode(node).host;\n  const nodeIsAttached =\n    nodeRootHost?.ownerDocument.contains(nodeRootHost) ||\n    node.ownerDocument.contains(node);\n\n  if (!displayCheck || displayCheck === 'full') {\n    if (typeof getShadowRoot === 'function') {\n      // figure out if we should consider the node to be in an undisclosed shadow and use the\n      //  'non-zero-area' fallback\n      const originalNode = node;\n      while (node) {\n        const parentElement = node.parentElement;\n        const rootNode = getRootNode(node);\n        if (\n          parentElement &&\n          !parentElement.shadowRoot &&\n          getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n        ) {\n          // node has an undisclosed shadow which means we can only treat it as a black box, so we\n          //  fall back to a non-zero-area test\n          return isZeroArea(node);\n        } else if (node.assignedSlot) {\n          // iterate up slot\n          node = node.assignedSlot;\n        } else if (!parentElement && rootNode !== node.ownerDocument) {\n          // cross shadow boundary\n          node = rootNode.host;\n        } else {\n          // iterate up normal dom\n          node = parentElement;\n        }\n      }\n\n      node = originalNode;\n    }\n    // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n    //  (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n    //  it might be a falsy value, which means shadow DOM support is disabled\n\n    // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n    //  now we can just test to see if it would normally be visible or not, provided it's\n    //  attached to the main document.\n    // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n    //  `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n    if (nodeIsAttached) {\n      // this works wherever the node is: if there's at least one client rect, it's\n      //  somehow displayed; it also covers the CSS 'display: contents' case where the\n      //  node itself is hidden in place of its contents; and there's no need to search\n      //  up the hierarchy either\n      return !node.getClientRects().length;\n    }\n\n    // Else, the node isn't attached to the document, which means the `getClientRects()`\n    //  API will __always__ return zero rects (this can happen, for example, if React\n    //  is used to render nodes onto a detached tree, as confirmed in this thread:\n    //  https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n    //\n    // It also means that even window.getComputedStyle(node).display will return `undefined`\n    //  because styles are only computed for nodes that are in the document.\n    //\n    // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n    //  somehow. Though it was never stated officially, anyone who has ever used tabbable\n    //  APIs on nodes in detached containers has actually implicitly used tabbable in what\n    //  was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n    //  considering __everything__ to be visible because of the innability to determine styles.\n  } else if (displayCheck === 'non-zero-area') {\n    // NOTE: Even though this tests that the node's client rect is non-zero to determine\n    //  whether it's displayed, and that a detached node will __always__ have a zero-area\n    //  client rect, we don't special-case for whether the node is attached or not. In\n    //  this mode, we do want to consider nodes that have a zero area to be hidden at all\n    //  times, and that includes attached or not.\n    return isZeroArea(node);\n  }\n\n  // visible, as far as we can tell, or per current `displayCheck` mode\n  return false;\n};\n\n// form fields (nested) inside a disabled fieldset are not focusable/tabbable\n//  unless they are in the _first_ <legend> element of the top-most disabled\n//  fieldset\nconst isDisabledFromFieldset = function (node) {\n  if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n    let parentNode = node.parentElement;\n    // check if `node` is contained in a disabled <fieldset>\n    while (parentNode) {\n      if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n        // look for the first <legend> among the children of the disabled <fieldset>\n        for (let i = 0; i < parentNode.children.length; i++) {\n          const child = parentNode.children.item(i);\n          // when the first <legend> (in document order) is found\n          if (child.tagName === 'LEGEND') {\n            // if its parent <fieldset> is not nested in another disabled <fieldset>,\n            // return whether `node` is a descendant of its first <legend>\n            return matches.call(parentNode, 'fieldset[disabled] *')\n              ? true\n              : !child.contains(node);\n          }\n        }\n        // the disabled <fieldset> containing `node` has no <legend>\n        return true;\n      }\n      parentNode = parentNode.parentElement;\n    }\n  }\n\n  // else, node's tabbable/focusable state should not be affected by a fieldset's\n  //  enabled/disabled state\n  return false;\n};\n\nconst isNodeMatchingSelectorFocusable = function (options, node) {\n  if (\n    node.disabled ||\n    isHiddenInput(node) ||\n    isHidden(node, options) ||\n    // For a details element with a summary, the summary element gets the focus\n    isDetailsWithSummary(node) ||\n    isDisabledFromFieldset(node)\n  ) {\n    return false;\n  }\n  return true;\n};\n\nconst isNodeMatchingSelectorTabbable = function (options, node) {\n  if (\n    isNonTabbableRadio(node) ||\n    getTabindex(node) < 0 ||\n    !isNodeMatchingSelectorFocusable(options, node)\n  ) {\n    return false;\n  }\n  return true;\n};\n\nconst isValidShadowRootTabbable = function (shadowHostNode) {\n  const tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n  if (isNaN(tabIndex) || tabIndex >= 0) {\n    return true;\n  }\n  // If a custom element has an explicit negative tabindex,\n  // browsers will not allow tab targeting said element's children.\n  return false;\n};\n\n/**\n * @param {Array.<Element|CandidatesScope>} candidates\n * @returns Element[]\n */\nconst sortByOrder = function (candidates) {\n  const regularTabbables = [];\n  const orderedTabbables = [];\n  candidates.forEach(function (item, i) {\n    const isScope = !!item.scope;\n    const element = isScope ? item.scope : item;\n    const candidateTabindex = getTabindex(element, isScope);\n    const elements = isScope ? sortByOrder(item.candidates) : element;\n    if (candidateTabindex === 0) {\n      isScope\n        ? regularTabbables.push(...elements)\n        : regularTabbables.push(element);\n    } else {\n      orderedTabbables.push({\n        documentOrder: i,\n        tabIndex: candidateTabindex,\n        item: item,\n        isScope: isScope,\n        content: elements,\n      });\n    }\n  });\n\n  return orderedTabbables\n    .sort(sortOrderedTabbables)\n    .reduce((acc, sortable) => {\n      sortable.isScope\n        ? acc.push(...sortable.content)\n        : acc.push(sortable.content);\n      return acc;\n    }, [])\n    .concat(regularTabbables);\n};\n\nconst tabbable = function (el, options) {\n  options = options || {};\n\n  let candidates;\n  if (options.getShadowRoot) {\n    candidates = getCandidatesIteratively([el], options.includeContainer, {\n      filter: isNodeMatchingSelectorTabbable.bind(null, options),\n      flatten: false,\n      getShadowRoot: options.getShadowRoot,\n      shadowRootFilter: isValidShadowRootTabbable,\n    });\n  } else {\n    candidates = getCandidates(\n      el,\n      options.includeContainer,\n      isNodeMatchingSelectorTabbable.bind(null, options)\n    );\n  }\n  return sortByOrder(candidates);\n};\n\nconst focusable = function (el, options) {\n  options = options || {};\n\n  let candidates;\n  if (options.getShadowRoot) {\n    candidates = getCandidatesIteratively([el], options.includeContainer, {\n      filter: isNodeMatchingSelectorFocusable.bind(null, options),\n      flatten: true,\n      getShadowRoot: options.getShadowRoot,\n    });\n  } else {\n    candidates = getCandidates(\n      el,\n      options.includeContainer,\n      isNodeMatchingSelectorFocusable.bind(null, options)\n    );\n  }\n\n  return candidates;\n};\n\nconst isTabbable = function (node, options) {\n  options = options || {};\n  if (!node) {\n    throw new Error('No node provided');\n  }\n  if (matches.call(node, candidateSelector) === false) {\n    return false;\n  }\n  return isNodeMatchingSelectorTabbable(options, node);\n};\n\nconst focusableCandidateSelector = /* #__PURE__ */ candidateSelectors\n  .concat('iframe')\n  .join(',');\n\nconst isFocusable = function (node, options) {\n  options = options || {};\n  if (!node) {\n    throw new Error('No node provided');\n  }\n  if (matches.call(node, focusableCandidateSelector) === false) {\n    return false;\n  }\n  return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { tabbable, focusable, isTabbable, isFocusable };\n","import { tabbable, focusable, isFocusable, isTabbable } from 'tabbable';\n\nconst activeFocusTraps = (function () {\n  const trapQueue = [];\n  return {\n    activateTrap(trap) {\n      if (trapQueue.length > 0) {\n        const activeTrap = trapQueue[trapQueue.length - 1];\n        if (activeTrap !== trap) {\n          activeTrap.pause();\n        }\n      }\n\n      const trapIndex = trapQueue.indexOf(trap);\n      if (trapIndex === -1) {\n        trapQueue.push(trap);\n      } else {\n        // move this existing trap to the front of the queue\n        trapQueue.splice(trapIndex, 1);\n        trapQueue.push(trap);\n      }\n    },\n\n    deactivateTrap(trap) {\n      const trapIndex = trapQueue.indexOf(trap);\n      if (trapIndex !== -1) {\n        trapQueue.splice(trapIndex, 1);\n      }\n\n      if (trapQueue.length > 0) {\n        trapQueue[trapQueue.length - 1].unpause();\n      }\n    },\n  };\n})();\n\nconst isSelectableInput = function (node) {\n  return (\n    node.tagName &&\n    node.tagName.toLowerCase() === 'input' &&\n    typeof node.select === 'function'\n  );\n};\n\nconst isEscapeEvent = function (e) {\n  return e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27;\n};\n\nconst isTabEvent = function (e) {\n  return e.key === 'Tab' || e.keyCode === 9;\n};\n\nconst delay = function (fn) {\n  return setTimeout(fn, 0);\n};\n\n// Array.find/findIndex() are not supported on IE; this replicates enough\n//  of Array.findIndex() for our needs\nconst findIndex = function (arr, fn) {\n  let idx = -1;\n\n  arr.every(function (value, i) {\n    if (fn(value)) {\n      idx = i;\n      return false; // break\n    }\n\n    return true; // next\n  });\n\n  return idx;\n};\n\n/**\n * Get an option's value when it could be a plain value, or a handler that provides\n *  the value.\n * @param {*} value Option's value to check.\n * @param {...*} [params] Any parameters to pass to the handler, if `value` is a function.\n * @returns {*} The `value`, or the handler's returned value.\n */\nconst valueOrHandler = function (value, ...params) {\n  return typeof value === 'function' ? value(...params) : value;\n};\n\nconst getActualTarget = function (event) {\n  // NOTE: If the trap is _inside_ a shadow DOM, event.target will always be the\n  //  shadow host. However, event.target.composedPath() will be an array of\n  //  nodes \"clicked\" from inner-most (the actual element inside the shadow) to\n  //  outer-most (the host HTML document). If we have access to composedPath(),\n  //  then use its first element; otherwise, fall back to event.target (and\n  //  this only works for an _open_ shadow DOM; otherwise,\n  //  composedPath()[0] === event.target always).\n  return event.target.shadowRoot && typeof event.composedPath === 'function'\n    ? event.composedPath()[0]\n    : event.target;\n};\n\nconst createFocusTrap = function (elements, userOptions) {\n  // SSR: a live trap shouldn't be created in this type of environment so this\n  //  should be safe code to execute if the `document` option isn't specified\n  const doc = userOptions?.document || document;\n\n  const config = {\n    returnFocusOnDeactivate: true,\n    escapeDeactivates: true,\n    delayInitialFocus: true,\n    ...userOptions,\n  };\n\n  const state = {\n    // containers given to createFocusTrap()\n    // @type {Array<HTMLElement>}\n    containers: [],\n\n    // list of objects identifying tabbable nodes in `containers` in the trap\n    // NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap\n    //  is active, but the trap should never get to a state where there isn't at least one group\n    //  with at least one tabbable node in it (that would lead to an error condition that would\n    //  result in an error being thrown)\n    // @type {Array<{\n    //   container: HTMLElement,\n    //   tabbableNodes: Array<HTMLElement>, // empty if none\n    //   focusableNodes: Array<HTMLElement>, // empty if none\n    //   firstTabbableNode: HTMLElement|null,\n    //   lastTabbableNode: HTMLElement|null,\n    //   nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined\n    // }>}\n    containerGroups: [], // same order/length as `containers` list\n\n    // references to objects in `containerGroups`, but only those that actually have\n    //  tabbable nodes in them\n    // NOTE: same order as `containers` and `containerGroups`, but __not necessarily__\n    //  the same length\n    tabbableGroups: [],\n\n    nodeFocusedBeforeActivation: null,\n    mostRecentlyFocusedNode: null,\n    active: false,\n    paused: false,\n\n    // timer ID for when delayInitialFocus is true and initial focus in this trap\n    //  has been delayed during activation\n    delayInitialFocusTimer: undefined,\n  };\n\n  let trap; // eslint-disable-line prefer-const -- some private functions reference it, and its methods reference private functions, so we must declare here and define later\n\n  /**\n   * Gets a configuration option value.\n   * @param {Object|undefined} configOverrideOptions If true, and option is defined in this set,\n   *  value will be taken from this object. Otherwise, value will be taken from base configuration.\n   * @param {string} optionName Name of the option whose value is sought.\n   * @param {string|undefined} [configOptionName] Name of option to use __instead of__ `optionName`\n   *  IIF `configOverrideOptions` is not defined. Otherwise, `optionName` is used.\n   */\n  const getOption = (configOverrideOptions, optionName, configOptionName) => {\n    return configOverrideOptions &&\n      configOverrideOptions[optionName] !== undefined\n      ? configOverrideOptions[optionName]\n      : config[configOptionName || optionName];\n  };\n\n  /**\n   * Finds the index of the container that contains the element.\n   * @param {HTMLElement} element\n   * @returns {number} Index of the container in either `state.containers` or\n   *  `state.containerGroups` (the order/length of these lists are the same); -1\n   *  if the element isn't found.\n   */\n  const findContainerIndex = function (element) {\n    // NOTE: search `containerGroups` because it's possible a group contains no tabbable\n    //  nodes, but still contains focusable nodes (e.g. if they all have `tabindex=-1`)\n    //  and we still need to find the element in there\n    return state.containerGroups.findIndex(\n      ({ container, tabbableNodes }) =>\n        container.contains(element) ||\n        // fall back to explicit tabbable search which will take into consideration any\n        //  web components if the `tabbableOptions.getShadowRoot` option was used for\n        //  the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't\n        //  look inside web components even if open)\n        tabbableNodes.find((node) => node === element)\n    );\n  };\n\n  /**\n   * Gets the node for the given option, which is expected to be an option that\n   *  can be either a DOM node, a string that is a selector to get a node, `false`\n   *  (if a node is explicitly NOT given), or a function that returns any of these\n   *  values.\n   * @param {string} optionName\n   * @returns {undefined | false | HTMLElement | SVGElement} Returns\n   *  `undefined` if the option is not specified; `false` if the option\n   *  resolved to `false` (node explicitly not given); otherwise, the resolved\n   *  DOM node.\n   * @throws {Error} If the option is set, not `false`, and is not, or does not\n   *  resolve to a node.\n   */\n  const getNodeForOption = function (optionName, ...params) {\n    let optionValue = config[optionName];\n\n    if (typeof optionValue === 'function') {\n      optionValue = optionValue(...params);\n    }\n\n    if (optionValue === true) {\n      optionValue = undefined; // use default value\n    }\n\n    if (!optionValue) {\n      if (optionValue === undefined || optionValue === false) {\n        return optionValue;\n      }\n      // else, empty string (invalid), null (invalid), 0 (invalid)\n\n      throw new Error(\n        `\\`${optionName}\\` was specified but was not a node, or did not return a node`\n      );\n    }\n\n    let node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point\n\n    if (typeof optionValue === 'string') {\n      node = doc.querySelector(optionValue); // resolve to node, or null if fails\n      if (!node) {\n        throw new Error(\n          `\\`${optionName}\\` as selector refers to no known node`\n        );\n      }\n    }\n\n    return node;\n  };\n\n  const getInitialFocusNode = function () {\n    let node = getNodeForOption('initialFocus');\n\n    // false explicitly indicates we want no initialFocus at all\n    if (node === false) {\n      return false;\n    }\n\n    if (node === undefined) {\n      // option not specified: use fallback options\n      if (findContainerIndex(doc.activeElement) >= 0) {\n        node = doc.activeElement;\n      } else {\n        const firstTabbableGroup = state.tabbableGroups[0];\n        const firstTabbableNode =\n          firstTabbableGroup && firstTabbableGroup.firstTabbableNode;\n\n        // NOTE: `fallbackFocus` option function cannot return `false` (not supported)\n        node = firstTabbableNode || getNodeForOption('fallbackFocus');\n      }\n    }\n\n    if (!node) {\n      throw new Error(\n        'Your focus-trap needs to have at least one focusable element'\n      );\n    }\n\n    return node;\n  };\n\n  const updateTabbableNodes = function () {\n    state.containerGroups = state.containers.map((container) => {\n      const tabbableNodes = tabbable(container, config.tabbableOptions);\n\n      // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes\n      //  are a superset of tabbable nodes\n      const focusableNodes = focusable(container, config.tabbableOptions);\n\n      return {\n        container,\n        tabbableNodes,\n        focusableNodes,\n        firstTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[0] : null,\n        lastTabbableNode:\n          tabbableNodes.length > 0\n            ? tabbableNodes[tabbableNodes.length - 1]\n            : null,\n\n        /**\n         * Finds the __tabbable__ node that follows the given node in the specified direction,\n         *  in this container, if any.\n         * @param {HTMLElement} node\n         * @param {boolean} [forward] True if going in forward tab order; false if going\n         *  in reverse.\n         * @returns {HTMLElement|undefined} The next tabbable node, if any.\n         */\n        nextTabbableNode(node, forward = true) {\n          // NOTE: If tabindex is positive (in order to manipulate the tab order separate\n          //  from the DOM order), this __will not work__ because the list of focusableNodes,\n          //  while it contains tabbable nodes, does not sort its nodes in any order other\n          //  than DOM order, because it can't: Where would you place focusable (but not\n          //  tabbable) nodes in that order? They have no order, because they aren't tabbale...\n          // Support for positive tabindex is already broken and hard to manage (possibly\n          //  not supportable, TBD), so this isn't going to make things worse than they\n          //  already are, and at least makes things better for the majority of cases where\n          //  tabindex is either 0/unset or negative.\n          // FYI, positive tabindex issue: https://github.com/focus-trap/focus-trap/issues/375\n          const nodeIdx = focusableNodes.findIndex((n) => n === node);\n          if (nodeIdx < 0) {\n            return undefined;\n          }\n\n          if (forward) {\n            return focusableNodes\n              .slice(nodeIdx + 1)\n              .find((n) => isTabbable(n, config.tabbableOptions));\n          }\n\n          return focusableNodes\n            .slice(0, nodeIdx)\n            .reverse()\n            .find((n) => isTabbable(n, config.tabbableOptions));\n        },\n      };\n    });\n\n    state.tabbableGroups = state.containerGroups.filter(\n      (group) => group.tabbableNodes.length > 0\n    );\n\n    // throw if no groups have tabbable nodes and we don't have a fallback focus node either\n    if (\n      state.tabbableGroups.length <= 0 &&\n      !getNodeForOption('fallbackFocus') // returning false not supported for this option\n    ) {\n      throw new Error(\n        'Your focus-trap must have at least one container with at least one tabbable node in it at all times'\n      );\n    }\n  };\n\n  const tryFocus = function (node) {\n    if (node === false) {\n      return;\n    }\n\n    if (node === doc.activeElement) {\n      return;\n    }\n\n    if (!node || !node.focus) {\n      tryFocus(getInitialFocusNode());\n      return;\n    }\n\n    node.focus({ preventScroll: !!config.preventScroll });\n    state.mostRecentlyFocusedNode = node;\n\n    if (isSelectableInput(node)) {\n      node.select();\n    }\n  };\n\n  const getReturnFocusNode = function (previousActiveElement) {\n    const node = getNodeForOption('setReturnFocus', previousActiveElement);\n    return node ? node : node === false ? false : previousActiveElement;\n  };\n\n  // This needs to be done on mousedown and touchstart instead of click\n  // so that it precedes the focus event.\n  const checkPointerDown = function (e) {\n    const target = getActualTarget(e);\n\n    if (findContainerIndex(target) >= 0) {\n      // allow the click since it ocurred inside the trap\n      return;\n    }\n\n    if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n      // immediately deactivate the trap\n      trap.deactivate({\n        // if, on deactivation, we should return focus to the node originally-focused\n        //  when the trap was activated (or the configured `setReturnFocus` node),\n        //  then assume it's also OK to return focus to the outside node that was\n        //  just clicked, causing deactivation, as long as that node is focusable;\n        //  if it isn't focusable, then return focus to the original node focused\n        //  on activation (or the configured `setReturnFocus` node)\n        // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,\n        //  which will result in the outside click setting focus to the node\n        //  that was clicked, whether it's focusable or not; by setting\n        //  `returnFocus: true`, we'll attempt to re-focus the node originally-focused\n        //  on activation (or the configured `setReturnFocus` node)\n        returnFocus:\n          config.returnFocusOnDeactivate &&\n          !isFocusable(target, config.tabbableOptions),\n      });\n      return;\n    }\n\n    // This is needed for mobile devices.\n    // (If we'll only let `click` events through,\n    // then on mobile they will be blocked anyways if `touchstart` is blocked.)\n    if (valueOrHandler(config.allowOutsideClick, e)) {\n      // allow the click outside the trap to take place\n      return;\n    }\n\n    // otherwise, prevent the click\n    e.preventDefault();\n  };\n\n  // In case focus escapes the trap for some strange reason, pull it back in.\n  const checkFocusIn = function (e) {\n    const target = getActualTarget(e);\n    const targetContained = findContainerIndex(target) >= 0;\n\n    // In Firefox when you Tab out of an iframe the Document is briefly focused.\n    if (targetContained || target instanceof Document) {\n      if (targetContained) {\n        state.mostRecentlyFocusedNode = target;\n      }\n    } else {\n      // escaped! pull it back in to where it just left\n      e.stopImmediatePropagation();\n      tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());\n    }\n  };\n\n  // Hijack Tab events on the first and last focusable nodes of the trap,\n  // in order to prevent focus from escaping. If it escapes for even a\n  // moment it can end up scrolling the page and causing confusion so we\n  // kind of need to capture the action at the keydown phase.\n  const checkTab = function (e) {\n    const target = getActualTarget(e);\n    updateTabbableNodes();\n\n    let destinationNode = null;\n\n    if (state.tabbableGroups.length > 0) {\n      // make sure the target is actually contained in a group\n      // NOTE: the target may also be the container itself if it's focusable\n      //  with tabIndex='-1' and was given initial focus\n      const containerIndex = findContainerIndex(target);\n      const containerGroup =\n        containerIndex >= 0 ? state.containerGroups[containerIndex] : undefined;\n\n      if (containerIndex < 0) {\n        // target not found in any group: quite possible focus has escaped the trap,\n        //  so bring it back in to...\n        if (e.shiftKey) {\n          // ...the last node in the last group\n          destinationNode =\n            state.tabbableGroups[state.tabbableGroups.length - 1]\n              .lastTabbableNode;\n        } else {\n          // ...the first node in the first group\n          destinationNode = state.tabbableGroups[0].firstTabbableNode;\n        }\n      } else if (e.shiftKey) {\n        // REVERSE\n\n        // is the target the first tabbable node in a group?\n        let startOfGroupIndex = findIndex(\n          state.tabbableGroups,\n          ({ firstTabbableNode }) => target === firstTabbableNode\n        );\n\n        if (\n          startOfGroupIndex < 0 &&\n          (containerGroup.container === target ||\n            (isFocusable(target, config.tabbableOptions) &&\n              !isTabbable(target, config.tabbableOptions) &&\n              !containerGroup.nextTabbableNode(target, false)))\n        ) {\n          // an exception case where the target is either the container itself, or\n          //  a non-tabbable node that was given focus (i.e. tabindex is negative\n          //  and user clicked on it or node was programmatically given focus)\n          //  and is not followed by any other tabbable node, in which\n          //  case, we should handle shift+tab as if focus were on the container's\n          //  first tabbable node, and go to the last tabbable node of the LAST group\n          startOfGroupIndex = containerIndex;\n        }\n\n        if (startOfGroupIndex >= 0) {\n          // YES: then shift+tab should go to the last tabbable node in the\n          //  previous group (and wrap around to the last tabbable node of\n          //  the LAST group if it's the first tabbable node of the FIRST group)\n          const destinationGroupIndex =\n            startOfGroupIndex === 0\n              ? state.tabbableGroups.length - 1\n              : startOfGroupIndex - 1;\n\n          const destinationGroup = state.tabbableGroups[destinationGroupIndex];\n          destinationNode = destinationGroup.lastTabbableNode;\n        }\n      } else {\n        // FORWARD\n\n        // is the target the last tabbable node in a group?\n        let lastOfGroupIndex = findIndex(\n          state.tabbableGroups,\n          ({ lastTabbableNode }) => target === lastTabbableNode\n        );\n\n        if (\n          lastOfGroupIndex < 0 &&\n          (containerGroup.container === target ||\n            (isFocusable(target, config.tabbableOptions) &&\n              !isTabbable(target, config.tabbableOptions) &&\n              !containerGroup.nextTabbableNode(target)))\n        ) {\n          // an exception case where the target is the container itself, or\n          //  a non-tabbable node that was given focus (i.e. tabindex is negative\n          //  and user clicked on it or node was programmatically given focus)\n          //  and is not followed by any other tabbable node, in which\n          //  case, we should handle tab as if focus were on the container's\n          //  last tabbable node, and go to the first tabbable node of the FIRST group\n          lastOfGroupIndex = containerIndex;\n        }\n\n        if (lastOfGroupIndex >= 0) {\n          // YES: then tab should go to the first tabbable node in the next\n          //  group (and wrap around to the first tabbable node of the FIRST\n          //  group if it's the last tabbable node of the LAST group)\n          const destinationGroupIndex =\n            lastOfGroupIndex === state.tabbableGroups.length - 1\n              ? 0\n              : lastOfGroupIndex + 1;\n\n          const destinationGroup = state.tabbableGroups[destinationGroupIndex];\n          destinationNode = destinationGroup.firstTabbableNode;\n        }\n      }\n    } else {\n      // NOTE: the fallbackFocus option does not support returning false to opt-out\n      destinationNode = getNodeForOption('fallbackFocus');\n    }\n\n    if (destinationNode) {\n      e.preventDefault();\n      tryFocus(destinationNode);\n    }\n    // else, let the browser take care of [shift+]tab and move the focus\n  };\n\n  const checkKey = function (e) {\n    if (\n      isEscapeEvent(e) &&\n      valueOrHandler(config.escapeDeactivates, e) !== false\n    ) {\n      e.preventDefault();\n      trap.deactivate();\n      return;\n    }\n\n    if (isTabEvent(e)) {\n      checkTab(e);\n      return;\n    }\n  };\n\n  const checkClick = function (e) {\n    const target = getActualTarget(e);\n\n    if (findContainerIndex(target) >= 0) {\n      return;\n    }\n\n    if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n      return;\n    }\n\n    if (valueOrHandler(config.allowOutsideClick, e)) {\n      return;\n    }\n\n    e.preventDefault();\n    e.stopImmediatePropagation();\n  };\n\n  //\n  // EVENT LISTENERS\n  //\n\n  const addListeners = function () {\n    if (!state.active) {\n      return;\n    }\n\n    // There can be only one listening focus trap at a time\n    activeFocusTraps.activateTrap(trap);\n\n    // Delay ensures that the focused element doesn't capture the event\n    // that caused the focus trap activation.\n    state.delayInitialFocusTimer = config.delayInitialFocus\n      ? delay(function () {\n          tryFocus(getInitialFocusNode());\n        })\n      : tryFocus(getInitialFocusNode());\n\n    doc.addEventListener('focusin', checkFocusIn, true);\n    doc.addEventListener('mousedown', checkPointerDown, {\n      capture: true,\n      passive: false,\n    });\n    doc.addEventListener('touchstart', checkPointerDown, {\n      capture: true,\n      passive: false,\n    });\n    doc.addEventListener('click', checkClick, {\n      capture: true,\n      passive: false,\n    });\n    doc.addEventListener('keydown', checkKey, {\n      capture: true,\n      passive: false,\n    });\n\n    return trap;\n  };\n\n  const removeListeners = function () {\n    if (!state.active) {\n      return;\n    }\n\n    doc.removeEventListener('focusin', checkFocusIn, true);\n    doc.removeEventListener('mousedown', checkPointerDown, true);\n    doc.removeEventListener('touchstart', checkPointerDown, true);\n    doc.removeEventListener('click', checkClick, true);\n    doc.removeEventListener('keydown', checkKey, true);\n\n    return trap;\n  };\n\n  //\n  // TRAP DEFINITION\n  //\n\n  trap = {\n    get active() {\n      return state.active;\n    },\n\n    get paused() {\n      return state.paused;\n    },\n\n    activate(activateOptions) {\n      if (state.active) {\n        return this;\n      }\n\n      const onActivate = getOption(activateOptions, 'onActivate');\n      const onPostActivate = getOption(activateOptions, 'onPostActivate');\n      const checkCanFocusTrap = getOption(activateOptions, 'checkCanFocusTrap');\n\n      if (!checkCanFocusTrap) {\n        updateTabbableNodes();\n      }\n\n      state.active = true;\n      state.paused = false;\n      state.nodeFocusedBeforeActivation = doc.activeElement;\n\n      if (onActivate) {\n        onActivate();\n      }\n\n      const finishActivation = () => {\n        if (checkCanFocusTrap) {\n          updateTabbableNodes();\n        }\n        addListeners();\n        if (onPostActivate) {\n          onPostActivate();\n        }\n      };\n\n      if (checkCanFocusTrap) {\n        checkCanFocusTrap(state.containers.concat()).then(\n          finishActivation,\n          finishActivation\n        );\n        return this;\n      }\n\n      finishActivation();\n      return this;\n    },\n\n    deactivate(deactivateOptions) {\n      if (!state.active) {\n        return this;\n      }\n\n      const options = {\n        onDeactivate: config.onDeactivate,\n        onPostDeactivate: config.onPostDeactivate,\n        checkCanReturnFocus: config.checkCanReturnFocus,\n        ...deactivateOptions,\n      };\n\n      clearTimeout(state.delayInitialFocusTimer); // noop if undefined\n      state.delayInitialFocusTimer = undefined;\n\n      removeListeners();\n      state.active = false;\n      state.paused = false;\n\n      activeFocusTraps.deactivateTrap(trap);\n\n      const onDeactivate = getOption(options, 'onDeactivate');\n      const onPostDeactivate = getOption(options, 'onPostDeactivate');\n      const checkCanReturnFocus = getOption(options, 'checkCanReturnFocus');\n      const returnFocus = getOption(\n        options,\n        'returnFocus',\n        'returnFocusOnDeactivate'\n      );\n\n      if (onDeactivate) {\n        onDeactivate();\n      }\n\n      const finishDeactivation = () => {\n        delay(() => {\n          if (returnFocus) {\n            tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));\n          }\n          if (onPostDeactivate) {\n            onPostDeactivate();\n          }\n        });\n      };\n\n      if (returnFocus && checkCanReturnFocus) {\n        checkCanReturnFocus(\n          getReturnFocusNode(state.nodeFocusedBeforeActivation)\n        ).then(finishDeactivation, finishDeactivation);\n        return this;\n      }\n\n      finishDeactivation();\n      return this;\n    },\n\n    pause() {\n      if (state.paused || !state.active) {\n        return this;\n      }\n\n      state.paused = true;\n      removeListeners();\n\n      return this;\n    },\n\n    unpause() {\n      if (!state.paused || !state.active) {\n        return this;\n      }\n\n      state.paused = false;\n      updateTabbableNodes();\n      addListeners();\n\n      return this;\n    },\n\n    updateContainerElements(containerElements) {\n      const elementsAsArray = [].concat(containerElements).filter(Boolean);\n\n      state.containers = elementsAsArray.map((element) =>\n        typeof element === 'string' ? doc.querySelector(element) : element\n      );\n\n      if (state.active) {\n        updateTabbableNodes();\n      }\n\n      return this;\n    },\n  };\n\n  // initialize container elements\n  trap.updateContainerElements(elements);\n\n  return trap;\n};\n\nexport { createFocusTrap };\n","import { createFocusTrap as _createFocusTrap } from 'focus-trap';\n\n/**\n * Creates a focus trap for the given element with the given options.\n * \n * This function applies some default options that are different to the library.\n * Your own options still override these custom defaults:\n * \n * ```json\n * {\n     escapeDeactivates: false,\n * }\n * ```\n * \n * @param element The element to be the focus trap, or a selector that will be used to find the element.\n * \n * @see https://github.com/focus-trap/focus-trap#readme - Library documentation\n */\nfunction createFocusTrap(...args: Parameters<typeof _createFocusTrap>): ReturnType<typeof _createFocusTrap> {\n  args[1] = {\n    escapeDeactivates: false,\n    ...args[1],\n  };\n\n  return _createFocusTrap(...args);\n}\n\nexport * from 'focus-trap';\nexport { createFocusTrap };\n","function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n// Older browsers don't support event options, feature detect it.\n\n// Adopted and modified solution from Bohdan Didukh (2017)\n// https://stackoverflow.com/questions/41594997/ios-10-safari-prevent-scrolling-behind-a-fixed-overlay-and-maintain-scroll-posi\n\nvar hasPassiveEvents = false;\nif (typeof window !== 'undefined') {\n  var passiveTestOptions = {\n    get passive() {\n      hasPassiveEvents = true;\n      return undefined;\n    }\n  };\n  window.addEventListener('testPassive', null, passiveTestOptions);\n  window.removeEventListener('testPassive', null, passiveTestOptions);\n}\n\nvar isIosDevice = typeof window !== 'undefined' && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === 'MacIntel' && window.navigator.maxTouchPoints > 1);\n\n\nvar locks = [];\nvar documentListenerAdded = false;\nvar initialClientY = -1;\nvar previousBodyOverflowSetting = void 0;\nvar previousBodyPosition = void 0;\nvar previousBodyPaddingRight = void 0;\n\n// returns true if `el` should be allowed to receive touchmove events.\nvar allowTouchMove = function allowTouchMove(el) {\n  return locks.some(function (lock) {\n    if (lock.options.allowTouchMove && lock.options.allowTouchMove(el)) {\n      return true;\n    }\n\n    return false;\n  });\n};\n\nvar preventDefault = function preventDefault(rawEvent) {\n  var e = rawEvent || window.event;\n\n  // For the case whereby consumers adds a touchmove event listener to document.\n  // Recall that we do document.addEventListener('touchmove', preventDefault, { passive: false })\n  // in disableBodyScroll - so if we provide this opportunity to allowTouchMove, then\n  // the touchmove event on document will break.\n  if (allowTouchMove(e.target)) {\n    return true;\n  }\n\n  // Do not prevent if the event has more than one touch (usually meaning this is a multi touch gesture like pinch to zoom).\n  if (e.touches.length > 1) return true;\n\n  if (e.preventDefault) e.preventDefault();\n\n  return false;\n};\n\nvar setOverflowHidden = function setOverflowHidden(options) {\n  // If previousBodyPaddingRight is already set, don't set it again.\n  if (previousBodyPaddingRight === undefined) {\n    var _reserveScrollBarGap = !!options && options.reserveScrollBarGap === true;\n    var scrollBarGap = window.innerWidth - document.documentElement.clientWidth;\n\n    if (_reserveScrollBarGap && scrollBarGap > 0) {\n      var computedBodyPaddingRight = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'), 10);\n      previousBodyPaddingRight = document.body.style.paddingRight;\n      document.body.style.paddingRight = computedBodyPaddingRight + scrollBarGap + 'px';\n    }\n  }\n\n  // If previousBodyOverflowSetting is already set, don't set it again.\n  if (previousBodyOverflowSetting === undefined) {\n    previousBodyOverflowSetting = document.body.style.overflow;\n    document.body.style.overflow = 'hidden';\n  }\n};\n\nvar restoreOverflowSetting = function restoreOverflowSetting() {\n  if (previousBodyPaddingRight !== undefined) {\n    document.body.style.paddingRight = previousBodyPaddingRight;\n\n    // Restore previousBodyPaddingRight to undefined so setOverflowHidden knows it\n    // can be set again.\n    previousBodyPaddingRight = undefined;\n  }\n\n  if (previousBodyOverflowSetting !== undefined) {\n    document.body.style.overflow = previousBodyOverflowSetting;\n\n    // Restore previousBodyOverflowSetting to undefined\n    // so setOverflowHidden knows it can be set again.\n    previousBodyOverflowSetting = undefined;\n  }\n};\n\nvar setPositionFixed = function setPositionFixed() {\n  return window.requestAnimationFrame(function () {\n    // If previousBodyPosition is already set, don't set it again.\n    if (previousBodyPosition === undefined) {\n      previousBodyPosition = {\n        position: document.body.style.position,\n        top: document.body.style.top,\n        left: document.body.style.left\n      };\n\n      // Update the dom inside an animation frame \n      var _window = window,\n          scrollY = _window.scrollY,\n          scrollX = _window.scrollX,\n          innerHeight = _window.innerHeight;\n\n      document.body.style.position = 'fixed';\n      document.body.style.top = -scrollY;\n      document.body.style.left = -scrollX;\n\n      setTimeout(function () {\n        return window.requestAnimationFrame(function () {\n          // Attempt to check if the bottom bar appeared due to the position change\n          var bottomBarHeight = innerHeight - window.innerHeight;\n          if (bottomBarHeight && scrollY >= innerHeight) {\n            // Move the content further up so that the bottom bar doesn't hide it\n            document.body.style.top = -(scrollY + bottomBarHeight);\n          }\n        });\n      }, 300);\n    }\n  });\n};\n\nvar restorePositionSetting = function restorePositionSetting() {\n  if (previousBodyPosition !== undefined) {\n    // Convert the position from \"px\" to Int\n    var y = -parseInt(document.body.style.top, 10);\n    var x = -parseInt(document.body.style.left, 10);\n\n    // Restore styles\n    document.body.style.position = previousBodyPosition.position;\n    document.body.style.top = previousBodyPosition.top;\n    document.body.style.left = previousBodyPosition.left;\n\n    // Restore scroll\n    window.scrollTo(x, y);\n\n    previousBodyPosition = undefined;\n  }\n};\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#Problems_and_solutions\nvar isTargetElementTotallyScrolled = function isTargetElementTotallyScrolled(targetElement) {\n  return targetElement ? targetElement.scrollHeight - targetElement.scrollTop <= targetElement.clientHeight : false;\n};\n\nvar handleScroll = function handleScroll(event, targetElement) {\n  var clientY = event.targetTouches[0].clientY - initialClientY;\n\n  if (allowTouchMove(event.target)) {\n    return false;\n  }\n\n  if (targetElement && targetElement.scrollTop === 0 && clientY > 0) {\n    // element is at the top of its scroll.\n    return preventDefault(event);\n  }\n\n  if (isTargetElementTotallyScrolled(targetElement) && clientY < 0) {\n    // element is at the bottom of its scroll.\n    return preventDefault(event);\n  }\n\n  event.stopPropagation();\n  return true;\n};\n\nexport var disableBodyScroll = function disableBodyScroll(targetElement, options) {\n  // targetElement must be provided\n  if (!targetElement) {\n    // eslint-disable-next-line no-console\n    console.error('disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.');\n    return;\n  }\n\n  // disableBodyScroll must not have been called on this targetElement before\n  if (locks.some(function (lock) {\n    return lock.targetElement === targetElement;\n  })) {\n    return;\n  }\n\n  var lock = {\n    targetElement: targetElement,\n    options: options || {}\n  };\n\n  locks = [].concat(_toConsumableArray(locks), [lock]);\n\n  if (isIosDevice) {\n    setPositionFixed();\n  } else {\n    setOverflowHidden(options);\n  }\n\n  if (isIosDevice) {\n    targetElement.ontouchstart = function (event) {\n      if (event.targetTouches.length === 1) {\n        // detect single touch.\n        initialClientY = event.targetTouches[0].clientY;\n      }\n    };\n    targetElement.ontouchmove = function (event) {\n      if (event.targetTouches.length === 1) {\n        // detect single touch.\n        handleScroll(event, targetElement);\n      }\n    };\n\n    if (!documentListenerAdded) {\n      document.addEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);\n      documentListenerAdded = true;\n    }\n  }\n};\n\nexport var clearAllBodyScrollLocks = function clearAllBodyScrollLocks() {\n  if (isIosDevice) {\n    // Clear all locks ontouchstart/ontouchmove handlers, and the references.\n    locks.forEach(function (lock) {\n      lock.targetElement.ontouchstart = null;\n      lock.targetElement.ontouchmove = null;\n    });\n\n    if (documentListenerAdded) {\n      document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);\n      documentListenerAdded = false;\n    }\n\n    // Reset initial clientY.\n    initialClientY = -1;\n  }\n\n  if (isIosDevice) {\n    restorePositionSetting();\n  } else {\n    restoreOverflowSetting();\n  }\n\n  locks = [];\n};\n\nexport var enableBodyScroll = function enableBodyScroll(targetElement) {\n  if (!targetElement) {\n    // eslint-disable-next-line no-console\n    console.error('enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.');\n    return;\n  }\n\n  locks = locks.filter(function (lock) {\n    return lock.targetElement !== targetElement;\n  });\n\n  if (isIosDevice) {\n    targetElement.ontouchstart = null;\n    targetElement.ontouchmove = null;\n\n    if (documentListenerAdded && locks.length === 0) {\n      document.removeEventListener('touchmove', preventDefault, hasPassiveEvents ? { passive: false } : undefined);\n      documentListenerAdded = false;\n    }\n  }\n\n  if (isIosDevice) {\n    restorePositionSetting();\n  } else {\n    restoreOverflowSetting();\n  }\n};\n\n","/* \n * Copyright 2019, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {parseCases} from './utilities.js';\n\nlet pluralFormatter;\n\nlet keyCounter = 0;\n\n// All the special keywords that can be used in `plural` blocks for the various branches\nconst ONE   = 'one';\nconst OTHER = 'other';\n\n/**\n * @private\n * @param {String} caseBody\n * @param {Number} value\n * @return {Object} {caseBody: string, numberValues: object}\n */\nfunction replaceNumberSign(caseBody, value) {\n\tlet i = 0;\n\tlet output = '';\n\tlet numBraces = 0;\n\tconst numberValues = {};\n\n\twhile (i < caseBody.length) {\n\t\tif (caseBody[i] === '#' && !numBraces) {\n\t\t\tlet keyParam = `__hashToken${keyCounter++}`;\n\t\t\toutput += `{${keyParam}, number}`;\n\t\t\tnumberValues[keyParam] = value;\n\t\t}\n\t\telse {\n\t\t\toutput += caseBody[i];\n\t\t}\n\n\t\tif (caseBody[i] === '{') {\n\t\t\tnumBraces++;\n\t\t}\n\t\telse if (caseBody[i] === '}') {\n\t\t\tnumBraces--;\n\t\t}\n\n\t\ti++;\n\t}\n\n\treturn {\n\t\tcaseBody: output,\n\t\tnumberValues\n\t};\n}\n\n/**\n * Handler for `plural` statements within ICU message syntax strings.  Returns\n * a formatted string for the branch that closely matches the current value.\n * \n * See https://formatjs.io/docs/core-concepts/icu-syntax#plural-format for more\n * details on how the `plural` statement works.\n * \n * @param {String} value\n * @param {String} matches\n * @param {String} locale\n * @param {String} values\n * @param {Function} format\n * @return {String}\n */\nexport default function pluralTypeHandler(value, matches = '', locale, values, format) {\n\tconst { args, cases } = parseCases(matches);\n\n\tlet intValue = parseInt(value);\n\n\targs.forEach((arg) => {\n\t\tif (arg.startsWith('offset:')) {\n\t\t\tintValue -= parseInt(arg.slice('offset:'.length));\n\t\t}\n\t});\n\n\tconst keywordPossibilities = [];\n\n\tif ('PluralRules' in Intl) {\n\t\t// Effectively memoize because instantiation of `Int.*` objects is expensive.\n\t\tif (pluralFormatter === undefined || pluralFormatter.resolvedOptions().locale !== locale) {\n\t\t\tpluralFormatter = new Intl.PluralRules(locale);\n\t\t}\n\n\t\tconst pluralKeyword = pluralFormatter.select(intValue);\n\n\t\t// Other is always added last with least priority, so we don't want to add it here.\n\t\tif (pluralKeyword !== OTHER) {\n\t\t\tkeywordPossibilities.push(pluralKeyword);\n\t\t}\n\t}\n\tif (intValue === 1) {\n\t\tkeywordPossibilities.push(ONE);\n\t}\n\tkeywordPossibilities.push(`=${intValue}`, OTHER);\n\n\tfor (let i = 0; i < keywordPossibilities.length; i++) {\n\t\tconst keyword = keywordPossibilities[i];\n\t\tif (keyword in cases) {\n\t\t\tconst { caseBody, numberValues } = replaceNumberSign(cases[keyword], intValue);\n\t\t\treturn format(caseBody, {\n\t\t\t\t...values,\n\t\t\t\t...numberValues\n\t\t\t});\n\t\t}\n\t}\n\n\treturn value;\n}\n","import Component from '../Component';\n\nimport { createFocusTrap, FocusTrap } from '../utils/focusTrap';\n\nimport { disableBodyScroll, clearAllBodyScrollLocks } from 'body-scroll-lock';\n\nimport type ModalManagerState from '../states/ModalManagerState';\nimport type Mithril from 'mithril';\n\ninterface IModalManagerAttrs {\n  state: ModalManagerState;\n}\n\n/**\n * The `ModalManager` component manages one or more modal dialogs. Stacking modals\n * is supported. Multiple dialogs can be shown at once; loading a new component\n * into the ModalManager will overwrite the previous one.\n */\nexport default class ModalManager extends Component<IModalManagerAttrs> {\n  // Current focus trap\n  protected focusTrap: FocusTrap | undefined;\n\n  // Keep track of the last set focus trap\n  protected lastSetFocusTrap: number | undefined;\n\n  // Keep track if there's an modal closing\n  protected modalClosing: boolean = false;\n\n  protected keyUpListener: null | ((e: KeyboardEvent) => void) = null;\n\n  view(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): Mithril.Children {\n    return (\n      <>\n        {this.attrs.state.modalList.map((modal, i) => {\n          const Tag = modal?.componentClass;\n\n          return (\n            <div\n              key={modal.key}\n              className=\"ModalManager modal\"\n              data-modal-key={modal.key}\n              data-modal-number={i}\n              role=\"dialog\"\n              aria-modal=\"true\"\n              style={{ '--modal-number': i }}\n              aria-hidden={this.attrs.state.modal !== modal && 'true'}\n            >\n              {!!Tag && [\n                <Tag\n                  key={modal.key}\n                  {...modal.attrs}\n                  animateShow={this.animateShow.bind(this)}\n                  animateHide={this.animateHide.bind(this)}\n                  state={this.attrs.state}\n                />,\n                /* This backdrop is invisible and used for outside clicks to close the modal. */\n                <div key={modal.key} className=\"ModalManager-invisibleBackdrop\" onclick={this.handlePossibleBackdropClick.bind(this)} />,\n              ]}\n            </div>\n          );\n        })}\n\n        {this.attrs.state.backdropShown && (\n          <div\n            className=\"Modal-backdrop backdrop\"\n            ontransitionend={this.onBackdropTransitionEnd.bind(this)}\n            data-showing={!!this.attrs.state.modalList.length}\n            style={{ '--modal-count': this.attrs.state.modalList.length }}\n          />\n        )}\n      </>\n    );\n  }\n\n  oncreate(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): void {\n    super.oncreate(vnode);\n\n    this.keyUpListener = this.handleEscPress.bind(this);\n    document.body.addEventListener('keyup', this.keyUpListener);\n  }\n\n  onbeforeremove(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): void {\n    super.onbeforeremove(vnode);\n\n    this.keyUpListener && document.body.removeEventListener('keyup', this.keyUpListener);\n    this.keyUpListener = null;\n  }\n\n  onupdate(vnode: Mithril.VnodeDOM<IModalManagerAttrs, this>): void {\n    super.onupdate(vnode);\n\n    requestAnimationFrame(() => {\n      try {\n        // Main content should gain or lose `aria-hidden` when modals are shown/removed\n        // See: http://web-accessibility.carnegiemuseums.org/code/dialogs/\n\n        if (!this.attrs.state.isModalOpen()) {\n          document.getElementById('app')?.setAttribute('aria-hidden', 'false');\n          this.focusTrap!.deactivate?.();\n          clearAllBodyScrollLocks();\n\n          return;\n        }\n\n        document.getElementById('app')?.setAttribute('aria-hidden', 'true');\n\n        // Get current dialog key\n        const dialogKey = this.attrs.state.modal!.key;\n\n        // Deactivate focus trap if there's a new dialog/closed\n        if (this.focusTrap && this.lastSetFocusTrap !== dialogKey) {\n          this.focusTrap!.deactivate?.();\n\n          clearAllBodyScrollLocks();\n        }\n\n        // Activate focus trap if there's a new dialog which is not trapped yet\n        if (this.activeDialogElement && this.lastSetFocusTrap !== dialogKey) {\n          this.focusTrap = createFocusTrap(this.activeDialogElement as HTMLElement, { allowOutsideClick: true });\n          this.focusTrap!.activate?.();\n\n          disableBodyScroll(this.activeDialogManagerElement!, { reserveScrollBarGap: true });\n        }\n\n        // Update key of current opened modal\n        this.lastSetFocusTrap = dialogKey;\n      } catch {\n        // We can expect errors to occur here due to the nature of mithril rendering\n      }\n    });\n  }\n\n  /**\n   * Get current active dialog\n   */\n  private get activeDialogElement(): HTMLElement {\n    return document.body.querySelector(`.ModalManager[data-modal-key=\"${this.attrs.state.modal?.key}\"] .Modal`) as HTMLElement;\n  }\n\n  /**\n   * Get current active dialog\n   */\n  private get activeDialogManagerElement(): HTMLElement {\n    return document.body.querySelector(`.ModalManager[data-modal-key=\"${this.attrs.state.modal?.key}\"]`) as HTMLElement;\n  }\n\n  animateShow(readyCallback: () => void = () => {}): void {\n    if (!this.attrs.state.modal) return;\n\n    this.activeDialogElement.addEventListener(\n      'transitionend',\n      () => {\n        readyCallback();\n      },\n      { once: true }\n    );\n\n    requestAnimationFrame(() => {\n      this.activeDialogElement.classList.add('in');\n    });\n  }\n\n  animateHide(closedCallback: () => void = () => {}): void {\n    if (this.modalClosing) return;\n    this.modalClosing = true;\n\n    const afterModalClosedCallback = () => {\n      this.modalClosing = false;\n\n      // Close the dialog\n      this.attrs.state.close();\n\n      closedCallback();\n    };\n\n    this.activeDialogElement.addEventListener('transitionend', afterModalClosedCallback, { once: true });\n\n    this.activeDialogElement.classList.remove('in');\n    this.activeDialogElement.classList.add('out');\n  }\n\n  protected handleEscPress(e: KeyboardEvent): void {\n    if (!this.attrs.state.modal) return;\n\n    const dismissibleState = this.attrs.state.modal.componentClass.dismissibleOptions;\n\n    // Close the dialog if the escape key was pressed\n    // Check if closing via escape key is enabled\n    if (e.key === 'Escape' && dismissibleState.viaEscKey) {\n      e.preventDefault();\n\n      this.animateHide();\n    }\n  }\n\n  protected handlePossibleBackdropClick(e: MouseEvent): void {\n    if (!this.attrs.state.modal || !this.attrs.state.modal.componentClass.dismissibleOptions.viaBackdropClick) return;\n\n    this.animateHide();\n  }\n\n  protected onBackdropTransitionEnd(e: TransitionEvent) {\n    if (e.propertyName === 'opacity') {\n      const backdrop = e.currentTarget as HTMLDivElement;\n\n      if (backdrop.getAttribute('data-showing') === null) {\n        // Backdrop is fading out\n        this.attrs.state.backdropShown = false;\n        m.redraw();\n      }\n    }\n  }\n}\n","import Component, { ComponentAttrs } from '../Component';\nimport AlertManagerState from '../states/AlertManagerState';\nimport type Mithril from 'mithril';\n\nexport interface IAlertManagerAttrs extends ComponentAttrs {\n  state: AlertManagerState;\n}\n\n/**\n * The `AlertManager` component provides an area in which `Alert` components can\n * be shown and dismissed.\n */\nexport default class AlertManager<CustomAttrs extends IAlertManagerAttrs = IAlertManagerAttrs> extends Component<CustomAttrs, AlertManagerState> {\n  oninit(vnode: Mithril.Vnode<CustomAttrs, this>) {\n    super.oninit(vnode);\n\n    this.state = this.attrs.state;\n  }\n\n  view() {\n    const activeAlerts = this.state.getActiveAlerts();\n\n    return (\n      <div className=\"AlertManager\">\n        {Object.keys(activeAlerts)\n          .map(Number)\n          .map((key) => {\n            const alert = activeAlerts[key];\n            const urgent = alert.attrs.type === 'error';\n\n            return (\n              <div className=\"AlertManager-alert\" role=\"alert\" aria-live={urgent ? 'assertive' : 'polite'}>\n                <alert.componentClass {...alert.attrs} ondismiss={this.state.dismiss.bind(this.state, key)}>\n                  {alert.children}\n                </alert.componentClass>\n              </div>\n            );\n          })}\n      </div>\n    );\n  }\n}\n","import type RequestError from '../utils/RequestError';\nimport Modal, { IInternalModalAttrs } from './Modal';\n\nexport interface IRequestErrorModalAttrs extends IInternalModalAttrs {\n  error: RequestError;\n  formattedError: string[];\n}\n\nexport default class RequestErrorModal<CustomAttrs extends IRequestErrorModalAttrs = IRequestErrorModalAttrs> extends Modal<CustomAttrs> {\n  className() {\n    return 'RequestErrorModal Modal--large';\n  }\n\n  title() {\n    return !!this.attrs.error.xhr && `${this.attrs.error.xhr.status} ${this.attrs.error.xhr.statusText}`;\n  }\n\n  content() {\n    const { error, formattedError } = this.attrs;\n\n    let responseText;\n\n    // If the error is already formatted, just add line endings;\n    // else try to parse it as JSON and stringify it with indentation\n    if (formattedError.length) {\n      responseText = formattedError.join('\\n\\n');\n    } else if (error.response) {\n      responseText = JSON.stringify(error.response, null, 2);\n    } else {\n      responseText = error.responseText;\n    }\n\n    return (\n      <div className=\"Modal-body\">\n        <pre>\n          {this.attrs.error.options.method} {this.attrs.error.options.url}\n          <br />\n          <br />\n          {responseText}\n        </pre>\n      </div>\n    );\n  }\n}\n","/* \n * Copyright 2017, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Flattens an array of arrays of infinite depth into a single-dimension array.\n * \n * > This is now natively in JavaScript as the `flat` method on an Array\n * > instance.  [Check MDN for which browsers have access to this feature](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flat).\n * > If you can't use `flat`, then this method will do the job 🙂\n * \n * @param {Array} array\n * @return {Array} Flattened array.\n */\nexport function flatten(array) {\n\n\treturn array.reduce((accumulator, value) => {\n\t\treturn accumulator.concat(Array.isArray(value) ? flatten(value) : value);\n\t}, []);\n}\n\n/**\n * Creates an array of numbers from the starting value (inclusive) to the end\n * (exclusive), with an optional step (the gap between values).\n * \n * @param {Number} start\n *   The value to start at, the first item in the returned array.\n * @param {Number} end\n *   The value to end with, the last item in the returned array.\n * @param {Number} [step=1]\n *   The increment/gap between values, defaults to 1.\n * @return {Array} An array encompassing the given range.\n */\nexport function range(start, end, step = 1) {\n\n\treturn Array.apply(0, Array(Math.ceil((end - start) / step))).map((empty, index) => index * step + start);\n}\n\n/**\n * Remove and return the first item from `array` that matches the predicate\n * function.\n * \n * @param {Array} array\n * @param {Function} predicate\n *   Invoked with the array item.\n * @return {Object} The matching item, or `null` if no match was found.\n */\nexport function remove(array, predicate) {\n\n\treturn array.find((item, index) => {\n\t\tif (predicate(item)) {\n\t\t\tarray.splice(index, 1);\n\t\t\treturn item;\n\t\t}\n\t});\n}\n","/**\n * A higher-order function to apply [memoization](https://en.wikipedia.org/wiki/Memoization).\n * \n * If memoizing a recursive function, then memoize and define the function at\n * the same time so you can make a call to the memoized function, eg:\n * \n * ```javascript\n * const myFunction = memoize(() => myFunction());\n * ```\n * \n * @param {Function} func\n * @return {Function} \n */\nexport function memoize(func) {\n\tconst cache = {};\n\treturn function(...args) {\n\t\tlet key = args.length ? args\n\t\t\t.map(arg =>\n\t\t\t\targ === null ? 'null' :\n\t\t\t\targ === undefined ? 'undefined' :\n\t\t\t\ttypeof arg === 'function' ? arg.toString() :\n\t\t\t\targ instanceof Date ? arg.toISOString() :\n\t\t\t\tJSON.stringify(arg)\n\t\t\t)\n\t\t\t.join('|') :\n\t\t\t'_(no-args)_';\n\t\tif (Object.prototype.hasOwnProperty.call(cache, key)) {\n\t\t\treturn cache[key];\n\t\t}\n\t\tlet result = func(...args);\n\t\tcache[key] = result;\n\t\treturn result;\n\t};\n}\n","/* \n * Copyright 2019, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Most branch-based type handlers are based around \"cases\".\n * For example, `select` and `plural` compare compare a value\n * to \"case keys\" to choose a subtranslation.\n * \n * This util splits \"matches\" portions provided to the aforementioned\n * handlers into case strings, and extracts any prepended arguments\n * (for example, `plural` supports an `offset:n` argument used for\n * populating the magic `#` variable).\n * \n * @param {String} string\n * @return {Object} The `cases` key points to a map of all cases.\n *                  The `arguments` key points to a list of prepended arguments.\n */\nexport function parseCases(string) {\n\tconst isWhitespace = ch => /\\s/.test(ch);\n\n\tconst args = [];\n\tconst cases = {};\n\n\tlet currTermStart = 0;\n\tlet latestTerm = null;\n\tlet inTerm = false;\n\n\tlet i = 0;\n\twhile (i < string.length) {\n\t\t// Term ended\n\t\tif (inTerm && (isWhitespace(string[i]) || string[i] === '{')) {\n\t\t\tinTerm = false;\n\t\t\tlatestTerm = string.slice(currTermStart, i);\n\n\t\t\t// We want to process the opening char again so the case will be properly registered.\n\t\t\tif (string[i] === '{') {\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\n\t\t// New term\n\t\telse if (!inTerm && !isWhitespace(string[i])) {\n\t\t\tconst caseBody = string[i] === '{';\n\n\t\t\t// If there's a previous term, we can either handle a whole\n\t\t\t// case, or add that as an argument.\n\t\t\tif (latestTerm && caseBody) {\n\t\t\t\tconst branchEndIndex = findClosingBracket(string, i);\n\n\t\t\t\tif (branchEndIndex === -1) {\n\t\t\t\t\tthrow new Error(`Unbalanced curly braces in string: \"${string}\"`);\n\t\t\t\t}\n\n\t\t\t\tcases[latestTerm] = string.slice(i + 1, branchEndIndex);  // Don't include the braces\n\n\t\t\t\ti = branchEndIndex; // Will be moved up where needed at end of loop.\n\t\t\t\tlatestTerm = null;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (latestTerm) {\n\t\t\t\t\targs.push(latestTerm);\n\t\t\t\t\tlatestTerm = null;\n\t\t\t\t}\n\n\t\t\t\tinTerm = true;\n\t\t\t\tcurrTermStart = i;\n\t\t\t}\n\t\t}\n\t\ti++;\n\t}\n\n\tif (inTerm) {\n\t\tlatestTerm = string.slice(currTermStart);\n\t}\n\n\tif (latestTerm) {\n\t\targs.push(latestTerm);\n\t}\n\n\treturn {\n\t\targs,\n\t\tcases\n\t};\n}\n\n/**\n * Finds the index of the matching closing curly bracket, including through\n * strings that could have nested brackets.\n * \n * @param {String} string\n * @param {Number} fromIndex\n * @return {Number} The index of the matching closing bracket, or -1 if no\n *   closing bracket could be found.\n */\nexport function findClosingBracket(string, fromIndex) {\n\tlet depth = 0;\n\tfor (let i = fromIndex + 1; i < string.length; i++) {\n\t\tlet char = string.charAt(i);\n\t\tif (char === '}') {\n\t\t\tif (depth === 0) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t\tdepth--;\n\t\t}\n\t\telse if (char === '{') {\n\t\t\tdepth++;\n\t\t}\n\t}\n\treturn -1;\n}\n\n/**\n * Split a `{key, type, format}` block into those 3 parts, taking into account\n * nested message syntax that can exist in the `format` part.\n * \n * @param {String} block\n * @return {Array}\n *   An array with `key`, `type`, and `format` items in that order, if present\n *   in the formatted argument block.\n */\nexport function splitFormattedArgument(block) {\n\treturn split(block.slice(1, -1), ',', 3);\n}\n\n/**\n * Like `String.prototype.split()` but where the limit parameter causes the\n * remainder of the string to be grouped together in a final entry.\n * \n * @private\n * @param {String} string\n * @param {String} separator\n * @param {Number} limit\n * @param {Array} [accumulator=[]]\n * @return {Array}\n */\nfunction split(string, separator, limit, accumulator = []) {\n\tif (!string) {\n\t\treturn accumulator;\n\t}\n\tif (limit === 1) {\n\t\taccumulator.push(string);\n\t\treturn accumulator;\n\t}\n\tlet indexOfDelimiter = string.indexOf(separator);\n\tif (indexOfDelimiter === -1) {\n\t\taccumulator.push(string);\n\t\treturn accumulator;\n\t}\n\tlet head = string.substring(0, indexOfDelimiter).trim();\n\tlet tail = string.substring(indexOfDelimiter + separator.length + 1).trim();\n\taccumulator.push(head);\n\treturn split(tail, separator, limit - 1, accumulator);\n}\n","/* \n * Copyright 2019, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {parseCases} from './utilities.js';\n\nconst OTHER = 'other';\n\n/**\n * Handler for `select` statements within ICU message syntax strings.  Returns\n * a formatted string for the branch that closely matches the current value.\n * \n * See https://formatjs.io/docs/core-concepts/icu-syntax#select-format for more\n * details on how the `select` statement works.\n * \n * @param {String} value\n * @param {String} matches\n * @param {String} locale\n * @param {String} values\n * @param {Function} format\n * @return {String}\n */\nexport default function selectTypeHandler(value, matches = '', locale, values, format) {\n\tconst { cases } = parseCases(matches);\n\n\tif (value in cases) {\n\t\treturn format(cases[value], values);\n\t}\n\telse if (OTHER in cases) {\n\t\treturn format(cases[OTHER], values);\n\t}\n\n\treturn value;\n}\n","import { unEscapeHtml } from './utilities';\n\nexport default function defaultRichHandler(tag, values, contents) {\n\treturn `<${tag}>${unEscapeHtml(contents)}</${tag}>`;\n}\n","import { MessageFormatter } from '@ultraq/icu-message-formatter';\nimport { flatten } from '@ultraq/array-utils';\n\nimport defaultRichHandler from './defaultRichHandler';\nimport { replaceRichTags, sanitizeValues } from './utilities';\n\nexport default class RichMessageFormatter extends MessageFormatter {\n\tconstructor(locale, typeHandlers = {}, richHandler = null) {\n\t\tsuper(locale, typeHandlers);\n\t\tthis.richHandler = richHandler ? richHandler : defaultRichHandler;\n\t}\n\n\trich(message, values = {}) {\n\t\tconst cleanedValues = sanitizeValues(values);\n\n\t\tconst formatted = flatten(this.process(message, cleanedValues));\n\n\t\t// TODO\n\t\t// Should be a symbol but isn't because of conversion issues.\n\t\t// We use a random string instead. \n\t\tlet sym = Math.random().toString(36) + Math.random().toString(36) + Math.random().toString(36);\n\t\tconst fakeValues = Object.fromEntries(Object.entries(values).map(([key, _value]) => [key, sym]));\n\t\tconst formattedFake = flatten(this.process(message, fakeValues));\n\t\tconst replaceFake = replaceRichTags(formattedFake, fakeValues, () => sym);\n\t\tconst originalTemplateSegmentIndices = replaceFake.map((v, i) => v === sym ? null: i).filter(i => i !== null);\n\n\t\treturn replaceRichTags(formatted, cleanedValues, this.richHandler, originalTemplateSegmentIndices);\n\t}\n}\n","/* \n * Copyright 2019, Emanuel Rabina (http://www.ultraq.net.nz/)\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n *     http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {findClosingBracket, splitFormattedArgument} from './utilities.js';\n\nimport {flatten} from '@ultraq/array-utils';\nimport {memoize} from '@ultraq/function-utils';\n\n/**\n * The main class for formatting messages.\n * \n * @author Emanuel Rabina\n */\nexport default class MessageFormatter {\n\n\t/**\n\t * Creates a new formatter that can work using any of the custom type handlers\n\t * you register.\n\t * \n\t * @param {String} locale\n\t * @param {Object} [typeHandlers={}]\n\t *   Optional object where the keys are the names of the types to register,\n\t *   their values being the functions that will return a nicely formatted\n\t *   string for the data and locale they are given.\n\t */\n\tconstructor(locale, typeHandlers = {}) {\n\n\t\tthis.locale = locale;\n\t\tthis.typeHandlers = typeHandlers;\n\t}\n\n\t/**\n\t * Formats an ICU message syntax string using `values` for placeholder data\n\t * and any currently-registered type handlers.\n\t * \n\t * @param {String} message\n\t * @param {Object} [values={}]\n\t * @return {String}\n\t */\n\tformat = memoize((message, values = {}) => {\n\n\t\treturn flatten(this.process(message, values)).join('');\n\t})\n\n\t/**\n\t * Process an ICU message syntax string using `values` for placeholder data\n\t * and any currently-registered type handlers.  The result of this method is\n\t * an array of the component parts after they have been processed in turn by\n\t * their own type handlers.  This raw output is useful for other renderers,\n\t * eg: React where components can be used instead of being forced to return\n\t * raw strings.\n\t * \n\t * This method is used by {@link MessageFormatter#format} where it acts as a\n\t * string renderer.\n\t * \n\t * @param {String} message\n\t * @param {Object} [values={}]\n\t * @return {Array}\n\t */\n\tprocess(message, values = {}) {\n\n\t\tif (!message) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet blockStartIndex = message.indexOf('{');\n\t\tif (blockStartIndex !== -1) {\n\t\t\tlet blockEndIndex = findClosingBracket(message, blockStartIndex);\n\t\t\tif (blockEndIndex !== -1) {\n\t\t\t\tlet block = message.substring(blockStartIndex, blockEndIndex + 1);\n\t\t\t\tif (block) {\n\t\t\t\t\tlet result = [];\n\t\t\t\t\tlet head = message.substring(0, blockStartIndex);\n\t\t\t\t\tif (head) {\n\t\t\t\t\t\tresult.push(head);\n\t\t\t\t\t}\n\t\t\t\t\tlet [key, type, format] = splitFormattedArgument(block);\n\t\t\t\t\tlet body = values[key];\n\t\t\t\t\tif (body === null || body === undefined) {\n\t\t\t\t\t\tbody = '';\n\t\t\t\t\t}\n\t\t\t\t\tlet typeHandler = type && this.typeHandlers[type];\n\t\t\t\t\tresult.push(typeHandler ?\n\t\t\t\t\t\ttypeHandler(body, format, this.locale, values, this.process.bind(this)) :\n\t\t\t\t\t\tbody);\n\t\t\t\t\tlet tail = message.substring(blockEndIndex + 1);\n\t\t\t\t\tif (tail) {\n\t\t\t\t\t\tresult.push(this.process(tail, values));\n\t\t\t\t\t}\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new Error(`Unbalanced curly braces in string: \"${message}\"`);\n\t\t\t}\n\t\t}\n\t\treturn [message];\n\t}\n}\n","import { unEscapeHtml } from './utilities';\n\nexport default function mithrilRichHandler(tag, values, contents) {\n\tconst vnode = values[tag] || m(tag);\n\tlet children = unEscapeHtml(m.fragment(contents).children);\n\treturn { ...vnode, children };\n}\n","import { RichMessageFormatter, mithrilRichHandler } from '@askvortsov/rich-icu-message-formatter';\nimport { pluralTypeHandler, selectTypeHandler } from '@ultraq/icu-message-formatter';\nimport username from './helpers/username';\nimport User from './models/User';\nimport extract from './utils/extract';\n\ntype Translations = Record<string, string>;\ntype TranslatorParameters = Record<string, unknown>;\n\nexport default class Translator {\n  /**\n   * A map of translation keys to their translated values.\n   */\n  translations: Translations = {};\n\n  /**\n   * The underlying ICU MessageFormatter util.\n   */\n  protected formatter = new RichMessageFormatter(null, this.formatterTypeHandlers(), mithrilRichHandler);\n\n  /**\n   * Sets the formatter's locale to the provided value.\n   */\n  setLocale(locale: string) {\n    this.formatter.locale = locale;\n  }\n\n  /**\n   * Returns the formatter's current locale.\n   */\n  getLocale() {\n    return this.formatter.locale;\n  }\n\n  addTranslations(translations: Translations) {\n    Object.assign(this.translations, translations);\n  }\n\n  /**\n   * An extensible entrypoint for extenders to register type handlers for translations.\n   */\n  protected formatterTypeHandlers() {\n    return {\n      plural: pluralTypeHandler,\n      select: selectTypeHandler,\n    };\n  }\n\n  /**\n   * A temporary system to preprocess parameters.\n   * Should not be used by extensions.\n   * TODO: An extender will be added in v1.x.\n   *\n   * @internal\n   */\n  protected preprocessParameters(parameters: TranslatorParameters) {\n    // If we've been given a user model as one of the input parameters, then\n    // we'll extract the username and use that for the translation. In the\n    // future there should be a hook here to inspect the user and change the\n    // translation key. This will allow a gender property to determine which\n    // translation key is used.\n\n    if ('user' in parameters) {\n      const user = extract(parameters, 'user') as User;\n\n      if (!parameters.username) parameters.username = username(user);\n    }\n\n    return parameters;\n  }\n\n  trans(id: string, parameters: TranslatorParameters = {}) {\n    const translation = this.translations[id];\n\n    if (translation) {\n      parameters = this.preprocessParameters(parameters);\n      return this.formatter.rich(translation, parameters);\n    }\n\n    return id;\n  }\n}\n","import app from '../common/app';\nimport { FlarumRequestOptions } from './Application';\nimport { fireDeprecationWarning } from './helpers/fireDebugWarning';\nimport Model, { ModelData, SavedModelData } from './Model';\n\nexport interface MetaInformation {\n  [key: string]: any;\n}\n\nexport interface ApiQueryParamsSingle {\n  fields?: string[];\n  include?: string;\n  bySlug?: boolean;\n  meta?: MetaInformation;\n}\n\nexport interface ApiQueryParamsPlural {\n  fields?: string[];\n  include?: string;\n  filter?:\n    | {\n        q: string;\n      }\n    | Record<string, string>;\n  page?: {\n    near?: number;\n    offset?: number;\n    number?: number;\n    limit?: number;\n    size?: number;\n  };\n  sort?: string;\n  meta?: MetaInformation;\n}\n\nexport type ApiQueryParams = ApiQueryParamsPlural | ApiQueryParamsSingle;\n\nexport interface ApiPayloadSingle {\n  data: SavedModelData;\n  included?: SavedModelData[];\n  meta?: MetaInformation;\n}\n\nexport interface ApiPayloadPlural {\n  data: SavedModelData[];\n  included?: SavedModelData[];\n  links?: {\n    first: string;\n    next?: string;\n    prev?: string;\n  };\n  meta?: MetaInformation;\n}\n\nexport type ApiPayload = ApiPayloadSingle | ApiPayloadPlural;\n\nexport type ApiResponseSingle<M extends Model> = M & { payload: ApiPayloadSingle };\nexport type ApiResponsePlural<M extends Model> = M[] & { payload: ApiPayloadPlural };\nexport type ApiResponse<M extends Model> = ApiResponseSingle<M> | ApiResponsePlural<M>;\n\ninterface ApiQueryRequestOptions<ResponseType> extends Omit<FlarumRequestOptions<ResponseType>, 'url'> {}\n\ninterface StoreData {\n  [type: string]: Partial<Record<string, Model>>;\n}\n\nexport function payloadIsPlural(payload: ApiPayload): payload is ApiPayloadPlural {\n  return Array.isArray((payload as ApiPayloadPlural).data);\n}\n\n/**\n * The `Store` class defines a local data store, and provides methods to\n * retrieve data from the API.\n */\nexport default class Store {\n  /**\n   * The local data store. A tree of resource types to IDs, such that\n   * accessing data[type][id] will return the model for that type/ID.\n   */\n  protected data: StoreData = {};\n\n  /**\n   * The model registry. A map of resource types to the model class that\n   * should be used to represent resources of that type.\n   */\n  models: Record<string, { new (): Model }>;\n\n  constructor(models: Record<string, { new (): Model }>) {\n    this.models = models;\n  }\n\n  /**\n   * Push resources contained within an API payload into the store.\n   *\n   * @return The model(s) representing the resource(s) contained\n   *     within the 'data' key of the payload.\n   */\n  pushPayload<M extends Model>(payload: ApiPayloadSingle): ApiResponseSingle<M>;\n  pushPayload<Ms extends Model[]>(payload: ApiPayloadPlural): ApiResponsePlural<Ms[number]>;\n  pushPayload<M extends Model | Model[]>(payload: ApiPayload): ApiResponse<FlatArray<M, 1>> {\n    if (payload.included) payload.included.map(this.pushObject.bind(this));\n\n    const models = payload.data instanceof Array ? payload.data.map((o) => this.pushObject(o, false)) : this.pushObject(payload.data, false);\n    const result = models as ApiResponse<FlatArray<M, 1>>;\n\n    // Attach the original payload to the model that we give back. This is\n    // useful to consumers as it allows them to access meta information\n    // associated with their request.\n    result.payload = payload;\n\n    return result;\n  }\n\n  /**\n   * Create a model to represent a resource object (or update an existing one),\n   * and push it into the store.\n   *\n   * @param data The resource object\n   * @return The model, or null if no model class has been\n   *     registered for this resource type.\n   */\n  pushObject<M extends Model>(data: SavedModelData): M | null;\n  pushObject<M extends Model>(data: SavedModelData, allowUnregistered: false): M;\n  pushObject<M extends Model>(data: SavedModelData, allowUnregistered = true): M | null {\n    if (!this.models[data.type]) {\n      if (!allowUnregistered) {\n        setTimeout(() =>\n          fireDeprecationWarning(`Pushing object of type \\`${data.type}\\` not allowed, as type not yet registered in the store.`, '3206')\n        );\n      }\n\n      return null;\n    }\n\n    const type = (this.data[data.type] = this.data[data.type] || {});\n\n    // Necessary for TS to narrow correctly.\n    const curr = type[data.id] as M;\n    const instance = curr ? curr.pushData(data) : this.createRecord<M>(data.type, data);\n\n    type[data.id] = instance;\n    instance.exists = true;\n\n    return instance;\n  }\n\n  /**\n   * Make a request to the API to find record(s) of a specific type.\n   */\n  async find<M extends Model>(type: string, params?: ApiQueryParamsSingle): Promise<ApiResponseSingle<M>>;\n  async find<Ms extends Model[]>(type: string, params?: ApiQueryParamsPlural): Promise<ApiResponsePlural<Ms[number]>>;\n  async find<M extends Model>(\n    type: string,\n    id: string,\n    params?: ApiQueryParamsSingle,\n    options?: ApiQueryRequestOptions<ApiPayloadSingle>\n  ): Promise<ApiResponseSingle<M>>;\n  async find<Ms extends Model[]>(\n    type: string,\n    ids: string[],\n    params?: ApiQueryParamsPlural,\n    options?: ApiQueryRequestOptions<ApiPayloadPlural>\n  ): Promise<ApiResponsePlural<Ms[number]>>;\n  async find<M extends Model | Model[]>(\n    type: string,\n    idOrParams: undefined | string | string[] | ApiQueryParams,\n    query: ApiQueryParams = {},\n    options: ApiQueryRequestOptions<M extends Array<infer _T> ? ApiPayloadPlural : ApiPayloadSingle> = {}\n  ): Promise<ApiResponse<FlatArray<M, 1>>> {\n    let params = query;\n    let url = app.forum.attribute('apiUrl') + '/' + type;\n\n    if (idOrParams instanceof Array) {\n      url += '?filter[id]=' + idOrParams.join(',');\n    } else if (typeof idOrParams === 'object') {\n      params = idOrParams;\n    } else if (idOrParams) {\n      url += '/' + idOrParams;\n    }\n\n    return app\n      .request<M extends Array<infer _T> ? ApiPayloadPlural : ApiPayloadSingle>({\n        method: 'GET',\n        url,\n        params,\n        ...options,\n      })\n      .then((payload) => {\n        if (payloadIsPlural(payload)) {\n          return this.pushPayload<FlatArray<M, 1>[]>(payload);\n        } else {\n          return this.pushPayload<FlatArray<M, 1>>(payload);\n        }\n      });\n  }\n\n  /**\n   * Get a record from the store by ID.\n   */\n  getById<M extends Model>(type: string, id: string): M | undefined {\n    return this.data?.[type]?.[id] as M;\n  }\n\n  /**\n   * Get a record from the store by the value of a model attribute.\n   *\n   * @param type The resource type.\n   * @param key The name of the method on the model.\n   * @param value The value of the model attribute.\n   */\n  getBy<M extends Model, T = unknown>(type: string, key: keyof M, value: T): M | undefined {\n    // @ts-expect-error No way to do this safely, unfortunately.\n    return this.all(type).filter((model) => model[key]() === value)[0] as M;\n  }\n\n  /**\n   * Get all loaded records of a specific type.\n   */\n  all<M extends Model>(type: string): M[] {\n    const records = this.data[type];\n\n    return records ? (Object.values(records) as M[]) : [];\n  }\n\n  /**\n   * Remove the given model from the store.\n   */\n  remove(model: Model): void {\n    delete this.data[model.data.type as string][model.id() as string];\n  }\n\n  /**\n   * Create a new record of the given type.\n   *\n   * @param type The resource type\n   * @param data Any data to initialize the model with\n   */\n  createRecord<M extends Model>(type: string, data: ModelData = {}): M {\n    data.type = data.type || type;\n\n    // @ts-expect-error this will complain about initializing abstract models,\n    // but we can safely assume that all models registered with the store are\n    // not abstract.\n    return new this.models[type](data, this);\n  }\n}\n","import app from '../common/app';\nimport User from './models/User';\nimport { FlarumRequestOptions } from './Application';\n\nexport type LoginParams = {\n  /**\n   * The username/email\n   */\n  identification: string;\n  password: string;\n  remember: boolean;\n};\n\n/**\n * The `Session` class defines the current user session. It stores a reference\n * to the current authenticated user, and provides methods to log in/out.\n */\nexport default class Session {\n  /**\n   * The current authenticated user.\n   */\n  user: User | null;\n\n  /**\n   * The CSRF token.\n   */\n  csrfToken: string;\n\n  constructor(user: User | null, csrfToken: string) {\n    this.user = user;\n    this.csrfToken = csrfToken;\n  }\n\n  /**\n   * Attempt to log in a user.\n   */\n  login(body: LoginParams, options: Omit<FlarumRequestOptions<any>, 'url' | 'body' | 'method'> = {}) {\n    return app.request({\n      method: 'POST',\n      url: `${app.forum.attribute('baseUrl')}/login`,\n      body,\n      ...options,\n    });\n  }\n\n  /**\n   * Log the user out.\n   */\n  logout() {\n    window.location.href = `${app.forum.attribute('baseUrl')}/logout?token=${this.csrfToken}`;\n  }\n}\n","import { createFocusTrap } from './focusTrap';\n\n/**\n * The `Drawer` class controls the page's drawer. The drawer is the area the\n * slides out from the left on mobile devices; it contains the header and the\n * footer.\n */\nexport default class Drawer {\n  /**\n   * @type {import('./focusTrap').FocusTrap}\n   */\n  focusTrap;\n\n  /**\n   * @type {HTMLDivElement}\n   */\n  appElement;\n\n  constructor() {\n    // Set up an event handler so that whenever the content area is tapped,\n    // the drawer will close.\n    document.getElementById('content').addEventListener('click', (e) => {\n      if (this.isOpen()) {\n        e.preventDefault();\n        this.hide();\n      }\n    });\n\n    this.appElement = document.getElementById('app');\n    // Despite the `focus-trap` documentation, both `clickOutsideDeactivates`\n    // and `allowOutsideClick` are necessary so that inputs in modals triggered\n    // from the drawer's nav components can be interacted with.\n    this.focusTrap = createFocusTrap('#drawer', { allowOutsideClick: true, clickOutsideDeactivates: true });\n    this.drawerAvailableMediaQuery = window.matchMedia(\n      `(max-width: ${getComputedStyle(document.documentElement).getPropertyValue('--screen-phone-max')})`\n    );\n  }\n\n  /**\n   * Handler for the `resize` event on `window`.\n   *\n   * This is used to close the drawer when the viewport is widened past the `phone` size.\n   * At this point, the drawer turns into the standard header that we see on desktop, but\n   * the drawer is still registered as 'open' internally.\n   *\n   * This causes issues with the focus trap, resulting in focus becoming trapped within\n   * the header on desktop viewports.\n   *\n   * @internal\n   */\n  resizeHandler = ((e) => {\n    if (!e.matches && this.isOpen()) {\n      // Drawer is open but we've made window bigger, so hide it.\n      this.hide();\n    }\n  }).bind(this);\n\n  /**\n   * @internal\n   * @type {MediaQueryList}\n   */\n  drawerAvailableMediaQuery;\n\n  /**\n   * Check whether or not the drawer is currently open.\n   *\n   * @return {boolean}\n   */\n  isOpen() {\n    return this.appElement.classList.contains('drawerOpen');\n  }\n\n  /**\n   * Hide the drawer.\n   */\n  hide() {\n    /**\n     * As part of hiding the drawer, this function also ensures that the drawer\n     * correctly animates out, while ensuring it is not part of the navigation\n     * tree while off-screen.\n     *\n     * More info: https://github.com/flarum/core/pull/2666#discussion_r595381014\n     */\n\n    this.focusTrap.deactivate();\n    this.drawerAvailableMediaQuery.removeListener(this.resizeHandler);\n\n    if (!this.isOpen()) return;\n\n    const $drawer = $('#drawer');\n\n    // Used to prevent `visibility: hidden` from breaking the exit animation\n    $drawer.css('visibility', 'visible').one('transitionend', () => $drawer.css('visibility', ''));\n\n    this.appElement.classList.remove('drawerOpen');\n\n    this.$backdrop?.remove?.();\n  }\n\n  /**\n   * Show the drawer.\n   */\n  show() {\n    this.appElement.classList.add('drawerOpen');\n\n    this.drawerAvailableMediaQuery.addListener(this.resizeHandler);\n\n    this.$backdrop = $('<div/>').addClass('drawer-backdrop fade').appendTo('body').on('click', this.hide.bind(this));\n\n    requestAnimationFrame(() => {\n      this.$backdrop.addClass('in');\n\n      this.focusTrap.activate();\n    });\n  }\n}\n","import type { FlarumGenericRoute, RouteResolver } from '../Application';\nimport type Component from '../Component';\nimport DefaultResolver from '../resolvers/DefaultResolver';\n\n/**\n * The `mapRoutes` utility converts a map of named application routes into a\n * format that can be understood by Mithril, and wraps them in route resolvers\n * to provide each route with the current route name.\n *\n * @see https://mithril.js.org/route.html#signature\n */\nexport default function mapRoutes(routes: Record<string, FlarumGenericRoute>, basePath: string = '') {\n  const map: Record<\n    string,\n    RouteResolver<Record<string, unknown>, Component<{ routeName: string; [key: string]: unknown }>, Record<string, unknown>>\n  > = {};\n\n  for (const routeName in routes) {\n    const route = routes[routeName];\n\n    if ('resolver' in route) {\n      map[basePath + route.path] = route.resolver;\n    } else if ('component' in route) {\n      const resolverClass = 'resolverClass' in route ? route.resolverClass! : DefaultResolver;\n      map[basePath + route.path] = new resolverClass(route.component, routeName);\n    } else {\n      throw new Error(`Either a resolver or a component must be provided for the route [${routeName}]`);\n    }\n  }\n\n  return map;\n}\n","import type Mithril from 'mithril';\nimport type { AlertAttrs } from '../components/Alert';\n\nexport type InternalFlarumRequestOptions<ResponseType> = Mithril.RequestOptions<ResponseType> & {\n  url: string;\n};\n\nexport default class RequestError<ResponseType = string> {\n  status: number;\n  options: InternalFlarumRequestOptions<ResponseType>;\n  xhr: XMLHttpRequest;\n\n  responseText: string | null;\n  response: {\n    [key: string]: unknown;\n    errors?: {\n      detail?: string;\n      code?: string;\n      [key: string]: unknown;\n    }[];\n  } | null;\n\n  alert: AlertAttrs | null;\n\n  constructor(status: number, responseText: string | null, options: InternalFlarumRequestOptions<ResponseType>, xhr: XMLHttpRequest) {\n    this.status = status;\n    this.responseText = responseText;\n    this.options = options;\n    this.xhr = xhr;\n\n    try {\n      this.response = JSON.parse(responseText ?? 'null');\n    } catch (e) {\n      this.response = null;\n    }\n\n    this.alert = null;\n  }\n}\n","import humanTime from './humanTime';\n\nfunction updateHumanTimes() {\n  $('[data-humantime]').each(function () {\n    const $this = $(this);\n    const ago = humanTime($this.attr('datetime'));\n\n    $this.html(ago);\n  });\n}\n\n/**\n * The `liveHumanTimes` initializer sets up a loop every 1 second to update\n * timestamps rendered with the `humanTime` helper.\n */\nexport default function liveHumanTimes() {\n  setInterval(updateHumanTimes, 10000);\n}\n","/**\n * Extend an object's method by running its output through a mutating callback\n * every time it is called.\n *\n * The callback accepts the method's return value and should perform any\n * mutations directly on this value. For this reason, this function will not be\n * effective on methods which return scalar values (numbers, strings, booleans).\n *\n * Care should be taken to extend the correct object – in most cases, a class'\n * prototype will be the desired target of extension, not the class itself.\n *\n * @example <caption>Example usage of extending one method.</caption>\n * extend(Discussion.prototype, 'badges', function(badges) {\n *   // do something with `badges`\n * });\n *\n * @example <caption>Example usage of extending multiple methods.</caption>\n * extend(IndexPage.prototype, ['oncreate', 'onupdate'], function(vnode) {\n *   // something that needs to be run on creation and update\n * });\n *\n * @param object The object that owns the method\n * @param methods The name or names of the method(s) to extend\n * @param callback A callback which mutates the method's output\n */\nexport function extend<T extends Record<string, any>, K extends KeyOfType<T, Function>>(\n  object: T,\n  methods: K | K[],\n  callback: (this: T, val: ReturnType<T[K]>, ...args: Parameters<T[K]>) => void\n) {\n  const allMethods = Array.isArray(methods) ? methods : [methods];\n\n  allMethods.forEach((method: K) => {\n    const original: Function | undefined = object[method];\n\n    object[method] = function (this: T, ...args: Parameters<T[K]>) {\n      const value = original ? original.apply(this, args) : undefined;\n\n      callback.apply(this, [value, ...args]);\n\n      return value;\n    } as T[K];\n\n    Object.assign(object[method], original);\n  });\n}\n\n/**\n * Override an object's method by replacing it with a new function, so that the\n * new function will be run every time the object's method is called.\n *\n * The replacement function accepts the original method as its first argument,\n * which is like a call to `super`. Any arguments passed to the original method\n * are also passed to the replacement.\n *\n * Care should be taken to extend the correct object – in most cases, a class'\n * prototype will be the desired target of extension, not the class itself.\n *\n * @example <caption>Example usage of overriding one method.</caption>\n * override(Discussion.prototype, 'badges', function(original) {\n *   const badges = original();\n *   // do something with badges\n *   return badges;\n * });\n *\n * @example <caption>Example usage of overriding multiple methods.</caption>\n * extend(Discussion.prototype, ['oncreate', 'onupdate'], function(original, vnode) {\n *   // something that needs to be run on creation and update\n * });\n *\n * @param object The object that owns the method\n * @param methods The name or names of the method(s) to override\n * @param newMethod The method to replace it with\n */\nexport function override<T extends Record<any, any>, K extends KeyOfType<T, Function>>(\n  object: T,\n  methods: K | K[],\n  newMethod: (this: T, orig: T[K], ...args: Parameters<T[K]>) => void\n) {\n  const allMethods = Array.isArray(methods) ? methods : [methods];\n\n  allMethods.forEach((method) => {\n    const original: Function = object[method];\n\n    object[method] = function (this: T, ...args: Parameters<T[K]>) {\n      return newMethod.apply(this, [original.bind(this), ...args]);\n    } as T[K];\n\n    Object.assign(object[method], original);\n  });\n}\n","import Model from '../Model';\n\nexport default class Forum extends Model {\n  apiEndpoint() {\n    return '/';\n  }\n}\n","type RGB = { r: number; g: number; b: number };\n\nfunction hsvToRgb(h: number, s: number, v: number): RGB {\n  let r!: number;\n  let g!: number;\n  let b!: number;\n\n  const i = Math.floor(h * 6);\n  const f = h * 6 - i;\n  const p = v * (1 - s);\n  const q = v * (1 - f * s);\n  const t = v * (1 - (1 - f) * s);\n\n  switch (i % 6) {\n    case 0:\n      r = v;\n      g = t;\n      b = p;\n      break;\n    case 1:\n      r = q;\n      g = v;\n      b = p;\n      break;\n    case 2:\n      r = p;\n      g = v;\n      b = t;\n      break;\n    case 3:\n      r = p;\n      g = q;\n      b = v;\n      break;\n    case 4:\n      r = t;\n      g = p;\n      b = v;\n      break;\n    case 5:\n      r = v;\n      g = p;\n      b = q;\n      break;\n  }\n\n  return {\n    r: Math.floor(r * 255),\n    g: Math.floor(g * 255),\n    b: Math.floor(b * 255),\n  };\n}\n\n/**\n * Convert the given string to a unique color.\n */\nexport default function stringToColor(string: string): string {\n  let num = 0;\n\n  // Convert the username into a number based on the ASCII value of each\n  // character.\n  for (let i = 0; i < string.length; i++) {\n    num += string.charCodeAt(i);\n  }\n\n  // Construct a color using the remainder of that number divided by 360, and\n  // some predefined saturation and value values.\n  const hue = num % 360;\n  const rgb = hsvToRgb(hue / 360, 0.3, 0.9);\n\n  return '' + rgb.r.toString(16) + rgb.g.toString(16) + rgb.b.toString(16);\n}\n","import ColorThief, { Color } from 'color-thief-browser';\n\nimport Model from '../Model';\nimport stringToColor from '../utils/stringToColor';\nimport ItemList from '../utils/ItemList';\nimport computed from '../utils/computed';\nimport GroupBadge from '../components/GroupBadge';\nimport Mithril from 'mithril';\nimport Group from './Group';\n\nexport default class User extends Model {\n  username() {\n    return Model.attribute<string>('username').call(this);\n  }\n  slug() {\n    return Model.attribute<string>('slug').call(this);\n  }\n  displayName() {\n    return Model.attribute<string>('displayName').call(this);\n  }\n\n  email() {\n    return Model.attribute<string | undefined>('email').call(this);\n  }\n  isEmailConfirmed() {\n    return Model.attribute<boolean | undefined>('isEmailConfirmed').call(this);\n  }\n\n  password() {\n    return Model.attribute<string | undefined>('password').call(this);\n  }\n\n  avatarUrl() {\n    return Model.attribute<string | null>('avatarUrl').call(this);\n  }\n\n  preferences() {\n    return Model.attribute<Record<string, any> | null | undefined>('preferences').call(this);\n  }\n\n  groups() {\n    return Model.hasMany<Group>('groups').call(this);\n  }\n\n  isAdmin() {\n    return Model.attribute<boolean | undefined>('isAdmin').call(this);\n  }\n\n  joinTime() {\n    return Model.attribute('joinTime', Model.transformDate).call(this);\n  }\n\n  lastSeenAt() {\n    return Model.attribute('lastSeenAt', Model.transformDate).call(this);\n  }\n\n  markedAllAsReadAt() {\n    return Model.attribute('markedAllAsReadAt', Model.transformDate).call(this);\n  }\n\n  unreadNotificationCount() {\n    return Model.attribute<number | undefined>('unreadNotificationCount').call(this);\n  }\n  newNotificationCount() {\n    return Model.attribute<number | undefined>('newNotificationCount').call(this);\n  }\n\n  discussionCount() {\n    return Model.attribute<number | undefined>('discussionCount').call(this);\n  }\n  commentCount() {\n    return Model.attribute<number | undefined>('commentCount').call(this);\n  }\n\n  canEdit() {\n    return Model.attribute<boolean | undefined>('canEdit').call(this);\n  }\n  canEditCredentials() {\n    return Model.attribute<boolean | undefined>('canEditCredentials').call(this);\n  }\n  canEditGroups() {\n    return Model.attribute<boolean | undefined>('canEditGroups').call(this);\n  }\n  canDelete() {\n    return Model.attribute<boolean | undefined>('canDelete').call(this);\n  }\n\n  color() {\n    return computed<string, User>('displayName', 'avatarUrl', 'avatarColor', (displayName, avatarUrl, avatarColor) => {\n      // If we've already calculated and cached the dominant color of the user's\n      // avatar, then we can return that in RGB format. If we haven't, we'll want\n      // to calculate it. Unless the user doesn't have an avatar, in which case\n      // we generate a color from their display name.\n      if (avatarColor) {\n        return `rgb(${(avatarColor as Color).join(', ')})`;\n      } else if (avatarUrl) {\n        this.calculateAvatarColor();\n        return '';\n      }\n\n      return '#' + stringToColor(displayName as string);\n    }).call(this);\n  }\n\n  protected avatarColor: Color | null = null;\n\n  /**\n   * Check whether or not the user has been seen in the last 5 minutes.\n   */\n  isOnline(): boolean {\n    return dayjs().subtract(5, 'minutes').isBefore(this.lastSeenAt());\n  }\n\n  /**\n   * Get the Badge components that apply to this user.\n   */\n  badges(): ItemList<Mithril.Children> {\n    const items = new ItemList<Mithril.Children>();\n    const groups = this.groups();\n\n    if (groups) {\n      groups.forEach((group) => {\n        items.add(`group${group?.id()}`, <GroupBadge group={group} />);\n      });\n    }\n\n    return items;\n  }\n\n  /**\n   * Calculate the dominant color of the user's avatar. The dominant color will\n   * be set to the `avatarColor` property once it has been calculated.\n   */\n  protected calculateAvatarColor() {\n    const image = new Image();\n    const user = this;\n\n    image.addEventListener('load', function (this: HTMLImageElement) {\n      try {\n        const colorThief = new ColorThief();\n        user.avatarColor = colorThief.getColor(this);\n      } catch (e) {\n        // Completely white avatars throw errors due to a glitch in color thief\n        // See https://github.com/lokesh/color-thief/issues/40\n        if (e instanceof TypeError) {\n          user.avatarColor = [255, 255, 255];\n        } else {\n          throw e;\n        }\n      }\n      user.freshness = new Date();\n      m.redraw();\n    });\n    image.crossOrigin = 'anonymous';\n    image.src = this.avatarUrl() ?? '';\n  }\n\n  /**\n   * Update the user's preferences.\n   */\n  savePreferences(newPreferences: Record<string, unknown>): Promise<this> {\n    const preferences = this.preferences();\n\n    Object.assign(preferences ?? {}, newPreferences);\n\n    return this.save({ preferences });\n  }\n}\n","import Model from '../Model';\nimport computed from '../utils/computed';\nimport { getPlainContent } from '../utils/string';\nimport Discussion from './Discussion';\nimport User from './User';\n\nexport default class Post extends Model {\n  number() {\n    return Model.attribute<number>('number').call(this);\n  }\n  discussion() {\n    return Model.hasOne<Discussion>('discussion').call(this) as Discussion;\n  }\n\n  createdAt() {\n    return Model.attribute<Date, string>('createdAt', Model.transformDate).call(this);\n  }\n  user() {\n    return Model.hasOne<User>('user').call(this);\n  }\n\n  contentType() {\n    return Model.attribute<string | null>('contentType').call(this);\n  }\n  content() {\n    return Model.attribute<string | null | undefined>('content').call(this);\n  }\n  contentHtml() {\n    return Model.attribute<string | null | undefined>('contentHtml').call(this);\n  }\n  renderFailed() {\n    return Model.attribute<boolean | undefined>('renderFailed').call(this);\n  }\n  contentPlain() {\n    return computed<string | null | undefined>('contentHtml', (content) => {\n      if (typeof content === 'string') {\n        return getPlainContent(content);\n      }\n\n      return content as null | undefined;\n    }).call(this);\n  }\n\n  editedAt() {\n    return Model.attribute('editedAt', Model.transformDate).call(this);\n  }\n  editedUser() {\n    return Model.hasOne<User | null>('editedUser').call(this);\n  }\n  isEdited() {\n    return computed<boolean>('editedAt', (editedAt) => !!editedAt).call(this);\n  }\n\n  hiddenAt() {\n    return Model.attribute('hiddenAt', Model.transformDate).call(this);\n  }\n  hiddenUser() {\n    return Model.hasOne<User | null>('hiddenUser').call(this);\n  }\n  isHidden() {\n    return computed<boolean>('hiddenAt', (hiddenAt) => !!hiddenAt).call(this);\n  }\n\n  canEdit() {\n    return Model.attribute<boolean | undefined>('canEdit').call(this);\n  }\n  canHide() {\n    return Model.attribute<boolean | undefined>('canHide').call(this);\n  }\n  canDelete() {\n    return Model.attribute<boolean | undefined>('canDelete').call(this);\n  }\n}\n","import Model from '../Model';\nimport User from './User';\n\nexport default class Notification extends Model {\n  contentType() {\n    return Model.attribute<string>('contentType').call(this);\n  }\n  content<T = unknown>() {\n    return Model.attribute<T>('content').call(this);\n  }\n  createdAt() {\n    return Model.attribute<Date, string>('createdAt', Model.transformDate).call(this);\n  }\n\n  isRead() {\n    return Model.attribute<boolean>('isRead').call(this);\n  }\n\n  user() {\n    return Model.hasOne<User>('user').call(this);\n  }\n  fromUser() {\n    return Model.hasOne<User | null>('fromUser').call(this);\n  }\n  subject() {\n    return Model.hasOne<Model | null>('subject').call(this);\n  }\n}\n","import type Component from '../Component';\nimport Modal, { IDismissibleOptions } from '../components/Modal';\n\n/**\n * Ideally, `show` would take a higher-kinded generic, ala:\n *  `show<Attrs, C>(componentClass: C<Attrs>, attrs: Attrs): void`\n * Unfortunately, TypeScript does not support this:\n * https://github.com/Microsoft/TypeScript/issues/1213\n * Therefore, we have to use this ugly, messy workaround.\n */\ntype UnsafeModalClass = ComponentClass<any, Modal> & { get dismissibleOptions(): IDismissibleOptions; component: typeof Component.component };\n\ntype ModalItem = {\n  componentClass: UnsafeModalClass;\n  attrs?: Record<string, unknown>;\n  key: number;\n};\n\n/**\n * Class used to manage modal state.\n *\n * Accessible on the `app` object via `app.modal` property.\n */\nexport default class ModalManagerState {\n  /**\n   * @internal\n   */\n  modal: ModalItem | null = null;\n\n  /**\n   * @internal\n   */\n  modalList: ModalItem[] = [];\n\n  /**\n   * @internal\n   */\n  backdropShown: boolean = false;\n\n  /**\n   * Used to force re-initialization of modals if a modal\n   * is replaced by another of the same type.\n   */\n  private key = 0;\n\n  /**\n   * Shows a modal dialog.\n   *\n   * If `stackModal` is `true`, the modal will be shown on top of the current modal.\n   *\n   * If a value for `stackModal` is not provided, opening a new modal will close\n   * any others currently being shown for backwards compatibility.\n   *\n   * @example <caption>Show a modal</caption>\n   * app.modal.show(MyCoolModal, { attr: 'value' });\n   *\n   * @example <caption>Show a modal from a lifecycle method (`oncreate`, `view`, etc.)</caption>\n   * // This \"hack\" is needed due to quirks with nested redraws in Mithril.\n   * setTimeout(() => app.modal.show(MyCoolModal, { attr: 'value' }), 0);\n   *\n   * @example <caption>Stacking modals</caption>\n   * app.modal.show(MyCoolStackedModal, { attr: 'value' }, true);\n   */\n  show(componentClass: UnsafeModalClass, attrs: Record<string, unknown> = {}, stackModal: boolean = false): void {\n    if (!(componentClass.prototype instanceof Modal)) {\n      // This is duplicated so that if the error is caught, an error message still shows up in the debug console.\n      const invalidModalWarning = 'The ModalManager can only show Modals.';\n      console.error(invalidModalWarning);\n      throw new Error(invalidModalWarning);\n    }\n\n    this.backdropShown = true;\n    m.redraw.sync();\n\n    // We use requestAnimationFrame here, since we need to wait for the backdrop to be added\n    // to the DOM before actually adding the modal to the modal list.\n    //\n    // This is because we use RAF inside the ModalManager onupdate lifecycle hook, and if we\n    // skip this RAF call, the hook will attempt to add a focus trap as well as lock scroll\n    // onto the newly added modal before it's in the DOM, creating an extra scrollbar.\n    requestAnimationFrame(() => {\n      // Set current modal\n      this.modal = { componentClass, attrs, key: this.key++ };\n\n      // We want to stack this modal\n      if (stackModal) {\n        // Remember previously opened modal and add new modal to the modal list\n        this.modalList.push(this.modal);\n      } else {\n        // Override last modals\n        this.modalList = [this.modal];\n      }\n\n      m.redraw();\n    });\n  }\n\n  /**\n   * Closes the topmost currently open dialog, if one is open.\n   */\n  close(): void {\n    if (!this.modal) return;\n\n    // If there are two modals, remove the most recent one\n    if (this.modalList.length > 1) {\n      // Remove last modal from list\n      this.modalList.pop();\n\n      // Open last modal from list\n      this.modal = this.modalList[this.modalList.length - 1];\n    } else {\n      // Reset state\n      this.modal = null;\n      this.modalList = [];\n    }\n\n    m.redraw();\n  }\n\n  /**\n   * Checks if a modal is currently open.\n   *\n   * @return `true` if a modal dialog is currently open, otherwise `false`.\n   */\n  isModalOpen(): boolean {\n    return !!this.modal;\n  }\n}\n","import type Mithril from 'mithril';\nimport Alert, { AlertAttrs } from '../components/Alert';\n\n/**\n * Returned by `AlertManagerState.show`. Used to dismiss alerts.\n */\nexport type AlertIdentifier = number;\n\nexport type AlertArray = { [id: AlertIdentifier]: AlertState };\n\nexport interface AlertState {\n  componentClass: typeof Alert;\n  attrs: AlertAttrs;\n  children: Mithril.Children;\n}\n\nexport default class AlertManagerState {\n  protected activeAlerts: AlertArray = {};\n  protected alertId: AlertIdentifier = 0;\n\n  getActiveAlerts() {\n    return this.activeAlerts;\n  }\n\n  /**\n   * Show an Alert in the alerts area.\n   *\n   * @return The alert's ID, which can be used to dismiss the alert.\n   */\n  show(children: Mithril.Children): AlertIdentifier;\n  show(attrs: AlertAttrs, children: Mithril.Children): AlertIdentifier;\n  show(componentClass: typeof Alert, attrs: AlertAttrs, children: Mithril.Children): AlertIdentifier;\n\n  show(arg1: any, arg2?: any, arg3?: any) {\n    // Assigns variables as per the above signatures\n    let componentClass = Alert;\n    let attrs: AlertAttrs = {};\n    let children: Mithril.Children;\n\n    if (arguments.length == 1) {\n      children = arg1 as Mithril.Children;\n    } else if (arguments.length == 2) {\n      attrs = arg1 as AlertAttrs;\n      children = arg2 as Mithril.Children;\n    } else if (arguments.length == 3) {\n      componentClass = arg1 as typeof Alert;\n      attrs = arg2 as AlertAttrs;\n      children = arg3;\n    }\n\n    this.activeAlerts[++this.alertId] = { children, attrs, componentClass };\n    m.redraw();\n\n    return this.alertId;\n  }\n\n  /**\n   * Dismiss an alert.\n   */\n  dismiss(key: AlertIdentifier | null): void {\n    if (!key || !(key in this.activeAlerts)) return;\n\n    delete this.activeAlerts[key];\n    m.redraw();\n  }\n\n  /**\n   * Clear all alerts.\n   */\n  clear(): void {\n    this.activeAlerts = {};\n    m.redraw();\n  }\n}\n","import app from '../app';\n\n/**\n * Fire a Flarum error which is shown in the JS console for everyone and in an alert for the admin.\n *\n * @param userTitle: a user friendly title of the error, should be localized.\n * @param consoleTitle: an error title that goes in the console, doesn't have to be localized.\n * @param error: the error.\n */\nexport default function fireApplicationError(userTitle: string, consoleTitle: string, error: any) {\n  console.group(`%c${consoleTitle}`, 'background-color: #d83e3e; color: #ffffff; font-weight: bold;');\n  console.error(error);\n  console.groupEnd();\n\n  if (app.session?.user?.isAdmin()) {\n    app.alerts.show({ type: 'error' }, `${userTitle}`);\n  }\n}\n","import Model from '../Model';\n\nexport default class AccessToken extends Model {\n  token() {\n    return Model.attribute<string | undefined>('token').call(this);\n  }\n  userId() {\n    return Model.attribute<string>('userId').call(this);\n  }\n  title() {\n    return Model.attribute<string | null>('title').call(this);\n  }\n  type() {\n    return Model.attribute<string>('type').call(this);\n  }\n  createdAt() {\n    return Model.attribute<Date, string>('createdAt', Model.transformDate).call(this);\n  }\n  lastActivityAt() {\n    return Model.attribute<Date, string>('lastActivityAt', Model.transformDate).call(this);\n  }\n  lastIpAddress() {\n    return Model.attribute<string>('lastIpAddress').call(this);\n  }\n  device() {\n    return Model.attribute<string>('device').call(this);\n  }\n  isCurrent() {\n    return Model.attribute<boolean>('isCurrent').call(this);\n  }\n  isSessionToken() {\n    return Model.attribute<boolean>('isSessionToken').call(this);\n  }\n}\n","import app from '../common/app';\n\nimport ItemList from './utils/ItemList';\nimport Button from './components/Button';\nimport ModalManager from './components/ModalManager';\nimport AlertManager from './components/AlertManager';\nimport RequestErrorModal from './components/RequestErrorModal';\nimport Translator from './Translator';\nimport Store, { ApiPayload, ApiResponse, ApiResponsePlural, ApiResponseSingle, payloadIsPlural } from './Store';\nimport Session from './Session';\nimport extract from './utils/extract';\nimport extractText from './utils/extractText';\nimport Drawer from './utils/Drawer';\nimport mapRoutes from './utils/mapRoutes';\nimport RequestError, { InternalFlarumRequestOptions } from './utils/RequestError';\nimport ScrollListener from './utils/ScrollListener';\nimport liveHumanTimes from './utils/liveHumanTimes';\n// @ts-expect-error We need to explicitly use the prefix to distinguish between the extend folder.\nimport { extend } from './extend.ts';\n\nimport Forum from './models/Forum';\nimport User from './models/User';\nimport Discussion from './models/Discussion';\nimport Post from './models/Post';\nimport Group from './models/Group';\nimport Notification from './models/Notification';\nimport PageState from './states/PageState';\nimport ModalManagerState from './states/ModalManagerState';\nimport AlertManagerState from './states/AlertManagerState';\n\nimport type DefaultResolver from './resolvers/DefaultResolver';\nimport type Mithril from 'mithril';\nimport type Component from './Component';\nimport type { ComponentAttrs } from './Component';\nimport Model, { SavedModelData } from './Model';\nimport fireApplicationError from './helpers/fireApplicationError';\nimport IHistory from './IHistory';\nimport IExtender from './extenders/IExtender';\nimport AccessToken from './models/AccessToken';\n\nexport type FlarumScreens = 'phone' | 'tablet' | 'desktop' | 'desktop-hd';\n\nexport type FlarumGenericRoute = RouteItem<any, any, any>;\n\nexport interface FlarumRequestOptions<ResponseType> extends Omit<Mithril.RequestOptions<ResponseType>, 'extract'> {\n  errorHandler?: (error: RequestError) => void;\n  url: string;\n  // TODO: [Flarum 2.0] Remove deprecated option\n  /**\n   * Manipulate the response text before it is parsed into JSON.\n   *\n   * @deprecated Please use `modifyText` instead.\n   */\n  extract?: (responseText: string) => string;\n  /**\n   * Manipulate the response text before it is parsed into JSON.\n   *\n   * This overrides any `extract` method provided.\n   */\n  modifyText?: (responseText: string) => string;\n}\n\n/**\n * A valid route definition.\n */\nexport type RouteItem<\n  Attrs extends ComponentAttrs,\n  Comp extends Component<Attrs & { routeName: string }>,\n  RouteArgs extends Record<string, unknown> = {}\n> = {\n  /**\n   * The path for your route.\n   *\n   * This might be a specific URL path (e.g.,`/myPage`), or it might\n   * contain a variable used by a resolver (e.g., `/myPage/:id`).\n   *\n   * @see https://docs.flarum.org/extend/frontend-pages.html#route-resolvers-advanced\n   */\n  path: `/${string}`;\n} & (\n  | {\n      /**\n       * The component to render when this route matches.\n       */\n      component: new () => Comp;\n      /**\n       * A custom resolver class.\n       *\n       * This should be the class itself, and **not** an instance of the\n       * class.\n       */\n      resolverClass?: new (component: new () => Comp, routeName: string) => DefaultResolver<Attrs, Comp, RouteArgs>;\n    }\n  | {\n      /**\n       * An instance of a route resolver.\n       */\n      resolver: RouteResolver<Attrs, Comp, RouteArgs>;\n    }\n);\n\nexport interface RouteResolver<\n  Attrs extends ComponentAttrs,\n  Comp extends Component<Attrs & { routeName: string }>,\n  RouteArgs extends Record<string, unknown> = {}\n> {\n  /**\n   * A method which selects which component to render based on\n   * conditional logic.\n   *\n   * Returns the component class, and **not** a Vnode or JSX\n   * expression.\n   *\n   * @see https://mithril.js.org/route.html#routeresolveronmatch\n   */\n  onmatch(this: this, args: RouteArgs, requestedPath: string, route: string): { new (): Comp };\n  /**\n   * A function which renders the provided component.\n   *\n   * If not specified, the route will default to rendering the\n   * component on its own, inside of a fragment.\n   *\n   * Returns a Mithril Vnode or other children.\n   *\n   * @see https://mithril.js.org/route.html#routeresolverrender\n   */\n  render?(this: this, vnode: Mithril.Vnode<Attrs, Comp>): Mithril.Children;\n}\n\nexport interface ApplicationData {\n  apiDocument: ApiPayload | null;\n  locale: string;\n  locales: Record<string, string>;\n  resources: SavedModelData[];\n  session: { userId: number; csrfToken: string };\n  [key: string]: unknown;\n}\n\n/**\n * The `App` class provides a container for an application, as well as various\n * utilities for the rest of the app to use.\n */\nexport default class Application {\n  /**\n   * The forum model for this application.\n   */\n  forum!: Forum;\n\n  /**\n   * A map of routes, keyed by a unique route name. Each route is an object\n   * containing the following properties:\n   *\n   * - `path` The path that the route is accessed at.\n   * - `component` The Mithril component to render when this route is active.\n   *\n   * @example\n   * app.routes.discussion = { path: '/d/:id', component: DiscussionPage };\n   */\n  routes: Record<string, FlarumGenericRoute> = {};\n\n  /**\n   * An ordered list of initializers to bootstrap the application.\n   */\n  initializers: ItemList<(app: this) => void> = new ItemList();\n\n  /**\n   * The app's session.\n   *\n   * Stores info about the current user.\n   */\n  session!: Session;\n\n  /**\n   * The app's translator.\n   */\n  translator: Translator = new Translator();\n\n  /**\n   * The app's data store.\n   */\n  store: Store = new Store({\n    'access-tokens': AccessToken,\n    forums: Forum,\n    users: User,\n    discussions: Discussion,\n    posts: Post,\n    groups: Group,\n    notifications: Notification,\n  });\n\n  /**\n   * A local cache that can be used to store data at the application level, so\n   * that is persists between different routes.\n   */\n  cache: Record<string, unknown> = {};\n\n  /**\n   * Whether or not the app has been booted.\n   */\n  booted: boolean = false;\n\n  /**\n   * The page the app is currently on.\n   *\n   * This object holds information about the type of page we are currently\n   * visiting, and sometimes additional arbitrary page state that may be\n   * relevant to lower-level components.\n   */\n  current: PageState = new PageState(null);\n\n  /**\n   * The page the app was on before the current page.\n   *\n   * Once the application navigates to another page, the object previously\n   * assigned to this.current will be moved to this.previous, while this.current\n   * is re-initialized.\n   */\n  previous: PageState = new PageState(null);\n\n  /**\n   * An object that manages modal state.\n   */\n  modal: ModalManagerState = new ModalManagerState();\n\n  /**\n   * An object that manages the state of active alerts.\n   */\n  alerts: AlertManagerState = new AlertManagerState();\n\n  /**\n   * An object that manages the state of the navigation drawer.\n   */\n  drawer!: Drawer;\n\n  history: IHistory | null = null;\n  pane: any = null;\n\n  data!: ApplicationData;\n\n  refs: Record<string, string> = {\n    fontawesome: 'https://fontawesome.com/v5/search?o=r&m=free',\n  };\n\n  private _title: string = '';\n  private _titleCount: number = 0;\n\n  private set title(val: string) {\n    this._title = val;\n  }\n\n  get title() {\n    return this._title;\n  }\n\n  private set titleCount(val: number) {\n    this._titleCount = val;\n  }\n\n  get titleCount() {\n    return this._titleCount;\n  }\n\n  /**\n   * The key for an Alert that was shown as a result of an AJAX request error.\n   * If present, it will be dismissed on the next successful request.\n   */\n  private requestErrorAlert: number | null = null;\n\n  initialRoute!: string;\n\n  public load(payload: Application['data']) {\n    this.data = payload;\n    this.translator.setLocale(payload.locale);\n  }\n\n  public boot() {\n    const caughtInitializationErrors: CallableFunction[] = [];\n\n    this.initializers.toArray().forEach((initializer) => {\n      try {\n        initializer(this);\n      } catch (e) {\n        const extension = initializer.itemName.includes('/')\n          ? initializer.itemName.replace(/(\\/flarum-ext-)|(\\/flarum-)/g, '-')\n          : initializer.itemName;\n\n        caughtInitializationErrors.push(() =>\n          fireApplicationError(\n            extractText(app.translator.trans('core.lib.error.extension_initialiation_failed_message', { extension })),\n            `${extension} failed to initialize`,\n            e\n          )\n        );\n      }\n    });\n\n    this.store.pushPayload({ data: this.data.resources });\n\n    this.forum = this.store.getById('forums', '1')!;\n\n    this.session = new Session(this.store.getById<User>('users', String(this.data.session.userId)) ?? null, this.data.session.csrfToken);\n\n    this.mount();\n\n    this.initialRoute = window.location.href;\n\n    caughtInitializationErrors.forEach((handler) => handler());\n  }\n\n  public bootExtensions(extensions: Record<string, { extend?: IExtender[] }>) {\n    Object.keys(extensions).forEach((name) => {\n      const extension = extensions[name];\n\n      // If an extension doesn't define extenders, there's nothing more to do here.\n      if (!extension.extend) return;\n\n      const extenders = extension.extend.flat(Infinity);\n\n      for (const extender of extenders) {\n        extender.extend(this, { name, exports: extension });\n      }\n    });\n  }\n\n  protected mount(basePath: string = '') {\n    // An object with a callable view property is used in order to pass arguments to the component; see https://mithril.js.org/mount.html\n    m.mount(document.getElementById('modal')!, { view: () => <ModalManager state={this.modal} /> });\n    m.mount(document.getElementById('alerts')!, { view: () => <AlertManager state={this.alerts} /> });\n\n    this.drawer = new Drawer();\n\n    m.route(document.getElementById('content')!, basePath + '/', mapRoutes(this.routes, basePath));\n\n    const appEl = document.getElementById('app')!;\n    const appHeaderEl = document.querySelector('.App-header')!;\n\n    // Add a class to the body which indicates that the page has been scrolled\n    // down. When this happens, we'll add classes to the header and app body\n    // which will set the navbar's position to fixed. We don't want to always\n    // have it fixed, as that could overlap with custom headers.\n    const scrollListener = new ScrollListener((top: number) => {\n      const offset = appEl.getBoundingClientRect().top + document.body.scrollTop;\n\n      appEl.classList.toggle('affix', top >= offset);\n      appEl.classList.toggle('scrolled', top > offset);\n\n      appHeaderEl.classList.toggle('navbar-fixed-top', top >= offset);\n    });\n\n    scrollListener.start();\n    scrollListener.update();\n\n    document.body.classList.add('ontouchstart' in window ? 'touch' : 'no-touch');\n\n    liveHumanTimes();\n  }\n\n  /**\n   * Get the API response document that has been preloaded into the application.\n   */\n  preloadedApiDocument<M extends Model>(): ApiResponseSingle<M> | null;\n  preloadedApiDocument<Ms extends Model[]>(): ApiResponsePlural<Ms[number]> | null;\n  preloadedApiDocument<M extends Model | Model[]>(): ApiResponse<FlatArray<M, 1>> | null {\n    // If the URL has changed, the preloaded Api document is invalid.\n    if (this.data.apiDocument && window.location.href === this.initialRoute) {\n      const results = payloadIsPlural(this.data.apiDocument)\n        ? this.store.pushPayload<FlatArray<M, 1>[]>(this.data.apiDocument)\n        : this.store.pushPayload<FlatArray<M, 1>>(this.data.apiDocument);\n\n      this.data.apiDocument = null;\n\n      return results;\n    }\n\n    return null;\n  }\n\n  /**\n   * Determine the current screen mode, based on our media queries.\n   */\n  screen(): FlarumScreens {\n    const styles = getComputedStyle(document.documentElement);\n    return styles.getPropertyValue('--flarum-screen') as ReturnType<Application['screen']>;\n  }\n\n  /**\n   * Set the `<title>` of the page.\n   *\n   * @param title New page title\n   */\n  setTitle(title: string): void {\n    this.title = title;\n    this.updateTitle();\n  }\n\n  /**\n   * Set a number to display in the `<title>` of the page.\n   *\n   * @param count Number to display in title\n   */\n  setTitleCount(count: number): void {\n    this.titleCount = count;\n    this.updateTitle();\n  }\n\n  updateTitle(): void {\n    const count = this.titleCount ? `(${this.titleCount}) ` : '';\n    const onHomepage = m.route.get() === this.forum.attribute('basePath') + '/';\n\n    const params = {\n      pageTitle: this.title,\n      forumName: this.forum.attribute('title'),\n      // Until we add page numbers to the frontend, this is constant at 1\n      // so that the page number portion doesn't show up in the URL.\n      pageNumber: 1,\n    };\n\n    let title =\n      onHomepage || !this.title\n        ? extractText(app.translator.trans('core.lib.meta_titles.without_page_title', params))\n        : extractText(app.translator.trans('core.lib.meta_titles.with_page_title', params));\n\n    title = count + title;\n\n    // We pass the title through a DOMParser to allow HTML entities\n    // to be rendered correctly, while still preventing XSS attacks\n    // from user input by using a script-disabled environment.\n    // https://github.com/flarum/framework/issues/3514\n    // https://github.com/flarum/framework/pull/3684\n    // This is only a temporary solution for 1.x,\n    // and the actual source of the issue will be fixed in 2.x\n    // Actual source of the issue: https://github.com/flarum/framework/issues/3685\n    const parser = new DOMParser();\n    document.title = parser.parseFromString(title, 'text/html').body.innerText;\n  }\n\n  protected transformRequestOptions<ResponseType>(flarumOptions: FlarumRequestOptions<ResponseType>): InternalFlarumRequestOptions<ResponseType> {\n    const { background, deserialize, extract, modifyText, ...tmpOptions } = { ...flarumOptions };\n\n    // Unless specified otherwise, requests should run asynchronously in the\n    // background, so that they don't prevent redraws from occurring.\n    const defaultBackground = true;\n\n    // When we deserialize JSON data, if for some reason the server has provided\n    // a dud response, we don't want the application to crash. We'll show an\n    // error message to the user instead.\n\n    const defaultDeserialize = (response: string) => response as ResponseType;\n\n    // When extracting the data from the response, we can check the server\n    // response code and show an error message to the user if something's gone\n    // awry.\n    const originalExtract = modifyText || extract;\n\n    const options: InternalFlarumRequestOptions<ResponseType> = {\n      background: background ?? defaultBackground,\n      deserialize: deserialize ?? defaultDeserialize,\n      ...tmpOptions,\n    };\n\n    extend(options, 'config', (_: undefined, xhr: XMLHttpRequest) => {\n      xhr.setRequestHeader('X-CSRF-Token', this.session.csrfToken!);\n    });\n\n    // If the method is something like PATCH or DELETE, which not all servers\n    // and clients support, then we'll send it as a POST request with the\n    // intended method specified in the X-HTTP-Method-Override header.\n    if (options.method && !['GET', 'POST'].includes(options.method)) {\n      const method = options.method;\n\n      extend(options, 'config', (_: undefined, xhr: XMLHttpRequest) => {\n        xhr.setRequestHeader('X-HTTP-Method-Override', method);\n      });\n\n      options.method = 'POST';\n    }\n\n    options.extract = (xhr: XMLHttpRequest) => {\n      let responseText;\n\n      if (originalExtract) {\n        responseText = originalExtract(xhr.responseText);\n      } else {\n        responseText = xhr.responseText;\n      }\n\n      const status = xhr.status;\n\n      if (status < 200 || status > 299) {\n        throw new RequestError<ResponseType>(status, `${responseText}`, options, xhr);\n      }\n\n      if (xhr.getResponseHeader) {\n        const csrfToken = xhr.getResponseHeader('X-CSRF-Token');\n        if (csrfToken) app.session.csrfToken = csrfToken;\n      }\n\n      try {\n        if (responseText === '') {\n          return null;\n        }\n\n        return JSON.parse(responseText);\n      } catch (e) {\n        throw new RequestError<ResponseType>(500, `${responseText}`, options, xhr);\n      }\n    };\n\n    return options;\n  }\n\n  /**\n   * Make an AJAX request, handling any low-level errors that may occur.\n   *\n   * @see https://mithril.js.org/request.html\n   */\n  request<ResponseType>(originalOptions: FlarumRequestOptions<ResponseType>): Promise<ResponseType> {\n    const options = this.transformRequestOptions(originalOptions);\n\n    if (this.requestErrorAlert) this.alerts.dismiss(this.requestErrorAlert);\n\n    return m.request(options).catch((e) => this.requestErrorCatch(e, originalOptions.errorHandler));\n  }\n\n  /**\n   * By default, show an error alert, and log the error to the console.\n   */\n  protected requestErrorCatch<ResponseType>(error: RequestError, customErrorHandler: FlarumRequestOptions<ResponseType>['errorHandler']) {\n    // the details property is decoded to transform escaped characters such as '\\n'\n    const formattedErrors = error.response?.errors?.map((e) => decodeURI(e.detail ?? '')) ?? [];\n\n    let content;\n    switch (error.status) {\n      case 422:\n        content = formattedErrors\n          .map((detail) => [detail, <br />])\n          .flat()\n          .slice(0, -1);\n        break;\n\n      case 401:\n      case 403:\n        content = app.translator.trans('core.lib.error.permission_denied_message');\n        break;\n\n      case 404:\n      case 410:\n        content = app.translator.trans('core.lib.error.not_found_message');\n        break;\n\n      case 413:\n        content = app.translator.trans('core.lib.error.payload_too_large_message');\n        break;\n\n      case 429:\n        content = app.translator.trans('core.lib.error.rate_limit_exceeded_message');\n        break;\n\n      default:\n        if (this.requestWasCrossOrigin(error)) {\n          content = app.translator.trans('core.lib.error.generic_cross_origin_message');\n        } else {\n          content = app.translator.trans('core.lib.error.generic_message');\n        }\n    }\n\n    const isDebug: boolean = app.forum.attribute('debug');\n\n    error.alert = {\n      type: 'error',\n      content,\n      controls: isDebug && [\n        <Button className=\"Button Button--link\" onclick={this.showDebug.bind(this, error, formattedErrors)}>\n          {app.translator.trans('core.lib.debug_button')}\n        </Button>,\n      ],\n    };\n\n    if (customErrorHandler) {\n      customErrorHandler(error);\n    } else {\n      this.requestErrorDefaultHandler(error, isDebug, formattedErrors);\n    }\n\n    return Promise.reject(error);\n  }\n\n  /**\n   * Used to modify the error message shown on the page to help troubleshooting.\n   * While not certain, a failing cross-origin request likely indicates a missing redirect to Flarum canonical URL.\n   * Because XHR errors do not expose CORS information, we can only compare the requested URL origin to the page origin.\n   *\n   * @param error\n   * @protected\n   */\n  protected requestWasCrossOrigin(error: RequestError): boolean {\n    return new URL(error.options.url, document.baseURI).origin !== window.location.origin;\n  }\n\n  protected requestErrorDefaultHandler(e: unknown, isDebug: boolean, formattedErrors: string[]): void {\n    if (e instanceof RequestError) {\n      if (isDebug && e.xhr) {\n        const { method, url } = e.options;\n        const { status = '' } = e.xhr;\n\n        console.group(`${method} ${url} ${status}`);\n\n        if (formattedErrors.length) {\n          console.error(...formattedErrors);\n        } else {\n          console.error(e);\n        }\n\n        console.groupEnd();\n      }\n\n      if (e.alert) {\n        this.requestErrorAlert = this.alerts.show(e.alert, e.alert.content);\n      }\n    } else {\n      throw e;\n    }\n  }\n\n  private showDebug(error: RequestError, formattedError: string[]) {\n    if (this.requestErrorAlert !== null) this.alerts.dismiss(this.requestErrorAlert);\n\n    this.modal.show(RequestErrorModal, { error, formattedError });\n  }\n\n  /**\n   * Construct a URL to the route with the given name.\n   */\n  route(name: string, params: Record<string, unknown> = {}): string {\n    const route = this.routes[name];\n\n    if (!route) throw new Error(`Route '${name}' does not exist`);\n\n    const url = route.path.replace(/:([^\\/]+)/g, (m, key) => `${extract(params, key)}`);\n\n    // Remove falsy values in params to avoid having urls like '/?sort&q'\n    for (const key in params) {\n      if (params.hasOwnProperty(key) && !params[key]) delete params[key];\n    }\n\n    const queryString = m.buildQueryString(params as any);\n    const prefix = m.route.prefix === '' ? this.forum.attribute('basePath') : '';\n\n    return prefix + url + (queryString ? '?' + queryString : '');\n  }\n}\n","import app from '../../common/app';\nimport Component from '../Component';\nimport Button from './Button';\nimport LinkButton from './LinkButton';\nimport type Mithril from 'mithril';\nimport classList from '../utils/classList';\n\n/**\n * The `Navigation` component displays a set of navigation buttons. Typically\n * this is just a back button which pops the app's History. If the user is on\n * the root page and there is no history to pop, then in some instances it may\n * show a button that toggles the app's drawer.\n *\n * If the app has a pane, it will also include a 'pin' button which toggles the\n * pinned state of the pane.\n *\n * Accepts the following attrs:\n *\n * - `className` The name of a class to set on the root element.\n * - `drawer` Whether or not to show a button to toggle the app's drawer if\n *   there is no more history to pop.\n */\nexport default class Navigation extends Component {\n  view() {\n    const { history, pane } = app;\n\n    return (\n      <div\n        className={classList('Navigation ButtonGroup', this.attrs.className)}\n        onmouseenter={pane && pane.show.bind(pane)}\n        onmouseleave={pane && pane.onmouseleave.bind(pane)}\n      >\n        {history?.canGoBack() ? [this.getBackButton(), this.getPaneButton()] : this.getDrawerButton()}\n      </div>\n    );\n  }\n\n  /**\n   * Get the back button.\n   */\n  protected getBackButton(): Mithril.Children {\n    const { history } = app;\n    const previous = history?.getPrevious();\n\n    return (\n      <LinkButton\n        className=\"Button Navigation-back Button--icon\"\n        href={history?.backUrl()}\n        icon=\"fas fa-chevron-left\"\n        aria-label={previous?.title}\n        onclick={(e: MouseEvent) => {\n          if (e.shiftKey || e.ctrlKey || e.metaKey || e.which === 2) return;\n          e.preventDefault();\n          history?.back();\n        }}\n      />\n    );\n  }\n\n  /**\n   * Get the pane pinned toggle button.\n   */\n  protected getPaneButton(): Mithril.Children {\n    const { pane } = app;\n\n    if (!pane || !pane.active) return null;\n\n    return (\n      <Button\n        className={classList('Button Button--icon Navigation-pin', { active: pane.pinned })}\n        onclick={pane.togglePinned.bind(pane)}\n        icon=\"fas fa-thumbtack\"\n      />\n    );\n  }\n\n  /**\n   * Get the drawer toggle button.\n   */\n  protected getDrawerButton(): Mithril.Children {\n    if (!this.attrs.drawer) return null;\n\n    const { drawer } = app;\n    const user = app.session.user;\n\n    return (\n      <Button\n        className={classList('Button Button--icon Navigation-drawer', { new: user?.newNotificationCount() })}\n        onclick={(e: MouseEvent) => {\n          e.stopPropagation();\n          drawer.show();\n        }}\n        icon=\"fas fa-bars\"\n        aria-label={app.translator.trans('core.lib.nav.drawer_button')}\n      />\n    );\n  }\n}\n","import app from '../../forum/app';\nimport PaginatedListState from '../../common/states/PaginatedListState';\nimport Notification from '../../common/models/Notification';\n\nexport default class NotificationListState extends PaginatedListState<Notification> {\n  constructor() {\n    super({}, 1, 20);\n  }\n\n  get type(): string {\n    return 'notifications';\n  }\n\n  /**\n   * Load the next page of notification results.\n   */\n  load(): Promise<void> {\n    if (app.session.user?.newNotificationCount()) {\n      this.pages = [];\n      this.location = { page: 1 };\n    }\n\n    if (this.pages.length > 0) {\n      return Promise.resolve();\n    }\n\n    app.session.user?.pushAttributes({ newNotificationCount: 0 });\n\n    return super.loadNext();\n  }\n\n  /**\n   * Mark all of the notifications as read.\n   */\n  markAllAsRead() {\n    if (this.pages.length === 0) return;\n\n    app.session.user?.pushAttributes({ unreadNotificationCount: 0 });\n\n    this.pages.forEach((page) => {\n      page.items.forEach((notification) => notification.pushAttributes({ isRead: true }));\n    });\n\n    return app.request({\n      url: app.forum.attribute('apiUrl') + '/notifications/read',\n      method: 'POST',\n    });\n  }\n\n  /**\n   * Delete all of the notifications for this user.\n   */\n  deleteAll() {\n    if (this.pages.length === 0) return;\n\n    app.session.user?.pushAttributes({ unreadNotificationCount: 0 });\n\n    this.pages = [];\n\n    return app.request({\n      url: app.forum.attribute('apiUrl') + '/notifications',\n      method: 'DELETE',\n    });\n  }\n}\n","export default class SearchState {\n  protected cachedSearches: Set<string>;\n  protected value: string = '';\n\n  constructor(cachedSearches: string[] = []) {\n    this.cachedSearches = new Set(cachedSearches);\n  }\n\n  /**\n   * If we are displaying the full results of a search (not just a preview),\n   * this value should return the query that prompted that search.\n   *\n   * In this generic class, full page searching is not supported.\n   * This method should be implemented by subclasses that do support it.\n   *\n   * @see Search\n   */\n  getInitialSearch(): string {\n    return '';\n  }\n\n  getValue(): string {\n    return this.value;\n  }\n\n  setValue(value: string) {\n    this.value = value;\n  }\n\n  /**\n   * Clear the search value.\n   */\n  clear() {\n    this.setValue('');\n  }\n\n  /**\n   * Mark that we have already searched for this query so that we don't\n   * have to ping the endpoint again.\n   */\n  cache(query: string) {\n    this.cachedSearches.add(query);\n  }\n\n  /**\n   * Check if this query has been searched before.\n   */\n  isCached(query: string): boolean {\n    return this.cachedSearches.has(query);\n  }\n}\n","import app from '../../forum/app';\nimport setRouteWithForcedRefresh from '../../common/utils/setRouteWithForcedRefresh';\nimport SearchState from './SearchState';\n\ntype SearchParams = Record<string, string>;\n\nexport default class GlobalSearchState extends SearchState {\n  private initialValueSet = false;\n\n  constructor(cachedSearches = []) {\n    super(cachedSearches);\n  }\n\n  getValue(): string {\n    // If we are on a search results page, we should initialize the value\n    // from the current search, if one is present.\n    // We can't do this in the constructor, as this class is instantiated\n    // before pages are rendered, and we need app.current.\n    if (!this.initialValueSet && this.currPageProvidesSearch()) {\n      this.intializeValue();\n    }\n\n    return super.getValue();\n  }\n\n  protected intializeValue() {\n    this.setValue(this.getInitialSearch());\n    this.initialValueSet = true;\n  }\n\n  protected currPageProvidesSearch(): boolean {\n    return app.current.type && app.current.type.providesInitialSearch;\n  }\n\n  /**\n   * @inheritdoc\n   */\n  getInitialSearch(): string {\n    return this.currPageProvidesSearch() ? this.params().q : '';\n  }\n\n  /**\n   * Clear the search input and the current controller's active search.\n   */\n  clear() {\n    super.clear();\n\n    if (this.getInitialSearch()) {\n      this.clearInitialSearch();\n    } else {\n      m.redraw();\n    }\n  }\n\n  /**\n   * Redirect to the index page without a search filter. This is called when the\n   * 'x' is clicked in the search box in the header.\n   */\n  protected clearInitialSearch() {\n    const { q, ...params } = this.params();\n\n    setRouteWithForcedRefresh(app.route(app.current.get('routeName'), params));\n  }\n\n  /**\n   * Get URL parameters that stick between filter changes.\n   *\n   * This can be used to generate a link that clears filters.\n   */\n  stickyParams(): SearchParams {\n    return {\n      sort: m.route.param('sort'),\n      q: m.route.param('q'),\n    };\n  }\n\n  /**\n   * Get parameters to be used in the current page.\n   */\n  params(): SearchParams {\n    const params = this.stickyParams();\n\n    params.filter = m.route.param('filter');\n\n    return params;\n  }\n\n  /**\n   * Redirect to the index page using the given sort parameter.\n   */\n  changeSort(sort: string) {\n    const params = this.params();\n\n    if (sort === Object.keys(app.discussions.sortMap())[0]) {\n      delete params.sort;\n    } else {\n      params.sort = sort;\n    }\n\n    setRouteWithForcedRefresh(app.route(app.current.get('routeName'), params));\n  }\n}\n","/**\n * @see https://stackoverflow.com/a/31732310\n */\nexport default function isSafariMobile(): boolean {\n  return (\n    'ontouchstart' in window &&\n    navigator.vendor != null &&\n    navigator.vendor.includes('Apple') &&\n    navigator.userAgent != null &&\n    !navigator.userAgent.includes('CriOS') &&\n    !navigator.userAgent.includes('FxiOS')\n  );\n}\n","import app from './app';\n\nimport History from './utils/History';\nimport Pane from './utils/Pane';\nimport DiscussionPage from './components/DiscussionPage';\nimport SignUpModal from './components/SignUpModal';\nimport HeaderPrimary from './components/HeaderPrimary';\nimport HeaderSecondary from './components/HeaderSecondary';\nimport Composer from './components/Composer';\nimport DiscussionRenamedNotification from './components/DiscussionRenamedNotification';\nimport CommentPost from './components/CommentPost';\nimport DiscussionRenamedPost from './components/DiscussionRenamedPost';\nimport routes, { ForumRoutes, makeRouteHelpers } from './routes';\nimport alertEmailConfirmation from './utils/alertEmailConfirmation';\nimport Application, { ApplicationData } from '../common/Application';\nimport Navigation from '../common/components/Navigation';\nimport NotificationListState from './states/NotificationListState';\nimport GlobalSearchState from './states/GlobalSearchState';\nimport DiscussionListState from './states/DiscussionListState';\nimport ComposerState from './states/ComposerState';\nimport isSafariMobile from './utils/isSafariMobile';\n\nimport type Notification from './components/Notification';\nimport type Post from './components/Post';\nimport type Discussion from '../common/models/Discussion';\nimport type NotificationModel from '../common/models/Notification';\nimport type PostModel from '../common/models/Post';\nimport extractText from '../common/utils/extractText';\n\nexport interface ForumApplicationData extends ApplicationData {}\n\nexport default class ForumApplication extends Application {\n  /**\n   * A map of notification types to their components.\n   */\n  notificationComponents: Record<string, ComponentClass<{ notification: NotificationModel }, Notification<{ notification: NotificationModel }>>> = {\n    discussionRenamed: DiscussionRenamedNotification,\n  };\n\n  /**\n   * A map of post types to their components.\n   */\n  postComponents: Record<string, ComponentClass<{ post: PostModel }, Post<{ post: PostModel }>>> = {\n    comment: CommentPost,\n    discussionRenamed: DiscussionRenamedPost,\n  };\n\n  /**\n   * An object which controls the state of the page's side pane.\n   */\n  pane: Pane | null = null;\n\n  /**\n   * The app's history stack, which keeps track of which routes the user visits\n   * so that they can easily navigate back to the previous route.\n   */\n  history: History = new History();\n\n  /**\n   * An object which controls the state of the user's notifications.\n   */\n  notifications: NotificationListState = new NotificationListState();\n\n  /**\n   * An object which stores previously searched queries and provides convenient\n   * tools for retrieving and managing search values.\n   */\n  search: GlobalSearchState = new GlobalSearchState();\n\n  /**\n   * An object which controls the state of the composer.\n   */\n  composer: ComposerState = new ComposerState();\n\n  /**\n   * An object which controls the state of the cached discussion list, which\n   * is used in the index page and the slideout pane.\n   */\n  discussions: DiscussionListState = new DiscussionListState({});\n\n  route: typeof Application.prototype.route & ForumRoutes;\n\n  data!: ForumApplicationData;\n\n  constructor() {\n    super();\n\n    routes(this);\n\n    this.route = Object.assign((Object.getPrototypeOf(Object.getPrototypeOf(this)) as Application).route.bind(this), makeRouteHelpers(this));\n  }\n\n  /**\n   * @inheritdoc\n   */\n  mount() {\n    // Get the configured default route and update that route's path to be '/'.\n    // Push the homepage as the first route, so that the user will always be\n    // able to click on the 'back' button to go home, regardless of which page\n    // they started on.\n    const defaultRoute = this.forum.attribute('defaultRoute');\n    let defaultAction = 'index';\n\n    for (const i in this.routes) {\n      if (this.routes[i].path === defaultRoute) defaultAction = i;\n    }\n\n    this.routes[defaultAction].path = '/';\n    this.history.push(defaultAction, extractText(this.translator.trans('core.forum.header.back_to_index_tooltip')), '/');\n\n    this.pane = new Pane(document.getElementById('app'));\n\n    m.route.prefix = '';\n    super.mount(this.forum.attribute('basePath'));\n\n    // We mount navigation and header components after the page, so components\n    // like the back button can access the updated state when rendering.\n    m.mount(document.getElementById('app-navigation')!, { view: () => <Navigation className=\"App-backControl\" drawer /> });\n    m.mount(document.getElementById('header-navigation')!, Navigation);\n    m.mount(document.getElementById('header-primary')!, HeaderPrimary);\n    m.mount(document.getElementById('header-secondary')!, HeaderSecondary);\n    m.mount(document.getElementById('composer')!, { view: () => <Composer state={this.composer} /> });\n\n    alertEmailConfirmation(this);\n\n    // Route the home link back home when clicked. We do not want it to register\n    // if the user is opening it in a new tab, however.\n    document.getElementById('home-link')!.addEventListener('click', (e) => {\n      if (e.ctrlKey || e.metaKey || e.button === 1) return;\n      e.preventDefault();\n      app.history.home();\n\n      // Reload the current user so that their unread notification count is refreshed.\n      const userId = app.session.user?.id();\n      if (userId) {\n        app.store.find('users', userId);\n        m.redraw();\n      }\n    });\n\n    if (isSafariMobile()) {\n      $(() => {\n        $('.App').addClass('mobile-safari');\n      });\n    }\n  }\n\n  /**\n   * Check whether or not the user is currently viewing a discussion.\n   */\n  public viewingDiscussion(discussion: Discussion): boolean {\n    return this.current.matches(DiscussionPage, { discussion });\n  }\n\n  /**\n   * Callback for when an external authenticator (social login) action has\n   * completed.\n   *\n   * If the payload indicates that the user has been logged in, then the page\n   * will be reloaded. Otherwise, a SignUpModal will be opened, prefilled\n   * with the provided details.\n   */\n  public authenticationComplete(payload: Record<string, unknown>): void {\n    if (payload.loggedIn) {\n      window.location.reload();\n    } else {\n      this.modal.show(SignUpModal, payload);\n    }\n  }\n}\n","import Forum from './ForumApplication';\n\nconst app = new Forum();\n\n// @ts-expect-error We need to do this for backwards compatibility purposes.\nwindow.app = app;\n\nexport default app;\n","import IExtender, { IExtensionModule } from './IExtender';\nimport Application from '../Application';\nimport ActualModel from '../Model';\n\nexport default class Model implements IExtender {\n  private readonly model: { new (): ActualModel };\n  private callbacks: Array<() => void> = [];\n\n  public constructor(model: { new (): ActualModel }) {\n    this.model = model;\n  }\n\n  public attribute<T, O = unknown>(name: string, transform: ((attr: O) => T) | null = null): Model {\n    this.callbacks.push(() => {\n      this.model.prototype[name] = transform ? ActualModel.attribute<T, O>(name, transform) : ActualModel.attribute<T>(name);\n    });\n\n    return this;\n  }\n\n  public hasOne<M extends ActualModel>(name: string): Model {\n    this.callbacks.push(() => {\n      this.model.prototype[name] = ActualModel.hasOne<M>(name);\n    });\n\n    return this;\n  }\n\n  public hasMany<M extends ActualModel>(name: string): Model {\n    this.callbacks.push(() => {\n      this.model.prototype[name] = ActualModel.hasMany<M>(name);\n    });\n\n    return this;\n  }\n\n  extend(app: Application, extension: IExtensionModule): void {\n    for (const callback of this.callbacks) {\n      callback.call(this);\n    }\n  }\n}\n","import IExtender, { IExtensionModule } from './IExtender';\nimport Application from '../Application';\nimport ForumApplication from '../../forum/ForumApplication';\n\nexport default class PostTypes implements IExtender {\n  private postComponents: Record<string, any> = {};\n\n  /**\n   * Register a new post component type.\n   * Usually used for event posts.\n   *\n   * @param name The name of the post type.\n   * @param component The component class to render the post.\n   */\n  add(name: string, component: any): PostTypes {\n    this.postComponents[name] = component;\n\n    return this;\n  }\n\n  extend(app: Application, extension: IExtensionModule): void {\n    Object.assign((app as unknown as ForumApplication).postComponents, this.postComponents);\n  }\n}\n","import Application, { FlarumGenericRoute } from '../Application';\nimport IExtender, { IExtensionModule } from './IExtender';\n\ntype HelperRoute = (...args: any) => string;\n\nexport default class Routes implements IExtender {\n  private routes: Record<string, FlarumGenericRoute> = {};\n  private helpers: Record<string, HelperRoute> = {};\n\n  /**\n   * Add a mithril route to the application.\n   *\n   * @param name The name of the route.\n   * @param path The path of the route.\n   * @param component must extend `Page` component.\n   */\n  add(name: string, path: `/${string}`, component: any): Routes {\n    this.routes[name] = { path, component };\n\n    return this;\n  }\n\n  helper(name: string, callback: HelperRoute): Routes {\n    this.helpers[name] = callback;\n\n    return this;\n  }\n\n  extend(app: Application, extension: IExtensionModule) {\n    Object.assign(app.routes, this.routes);\n    Object.assign(app.route, this.helpers);\n  }\n}\n","import Application from '../Application';\nimport IExtender, { IExtensionModule } from './IExtender';\nimport Model from '../Model';\n\nexport default class Store implements IExtender {\n  private readonly models: { [type: string]: { new (): Model } } = {};\n\n  public add(type: string, model: { new (): Model }): Store {\n    this.models[type] = model;\n\n    return this;\n  }\n\n  extend(app: Application, extension: IExtensionModule): void {\n    for (const type in this.models) {\n      if (app.store.models[type]) {\n        throw new Error(`The model type \"${type}\" has already been registered with the class \"${app.store.models[type].name}\".`);\n      }\n\n      app.store.models[type] = this.models[type];\n    }\n  }\n}\n","import Model from './Model';\nimport PostTypes from './PostTypes';\nimport Routes from './Routes';\nimport Store from './Store';\n\nexport default {\n  Model,\n  PostTypes,\n  Routes,\n  Store,\n};\n","import { fireDeprecationWarning } from '../helpers/fireDebugWarning';\n\nconst deprecatedNotice = 'The `evented` util is deprecated and no longer supported.';\nconst deprecationIssueId = '2547';\n\n/**\n * The `evented` mixin provides methods allowing an object to trigger events,\n * running externally registered event handlers.\n *\n * @deprecated v1.2, to be removed in v2.0\n */\nexport default {\n  /**\n   * Arrays of registered event handlers, grouped by the event name.\n   *\n   * @type {Record<string, unknown>}\n   * @protected\n   *\n   * @deprecated\n   */\n  handlers: null,\n\n  /**\n   * Get all of the registered handlers for an event.\n   *\n   * @param {string} event The name of the event.\n   * @return {Function[]}\n   * @protected\n   *\n   * @deprecated\n   */\n  getHandlers(event) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    this.handlers = this.handlers || {};\n\n    this.handlers[event] = this.handlers[event] || [];\n\n    return this.handlers[event];\n  },\n\n  /**\n   * Trigger an event.\n   *\n   * @param {string} event The name of the event.\n   * @param {any[]} args Arguments to pass to event handlers.\n   *\n   * @deprecated\n   */\n  trigger(event, ...args) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    this.getHandlers(event).forEach((handler) => handler.apply(this, args));\n  },\n\n  /**\n   * Register an event handler.\n   *\n   * @param {string} event The name of the event.\n   * @param {Function} handler The function to handle the event.\n   *\n   * @deprecated\n   */\n  on(event, handler) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    this.getHandlers(event).push(handler);\n  },\n\n  /**\n   * Register an event handler so that it will run only once, and then\n   * unregister itself.\n   *\n   * @param {string} event The name of the event.\n   * @param {Function} handler The function to handle the event.\n   *\n   * @deprecated\n   */\n  one(event, handler) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    const wrapper = function () {\n      handler.apply(this, arguments);\n\n      this.off(event, wrapper);\n    };\n\n    this.getHandlers(event).push(wrapper);\n  },\n\n  /**\n   * Unregister an event handler.\n   *\n   * @param {string} event The name of the event.\n   * @param {Function} handler The function that handles the event.\n   *\n   * @deprecated\n   */\n  off(event, handler) {\n    fireDeprecationWarning(deprecatedNotice, deprecationIssueId);\n\n    const handlers = this.getHandlers(event);\n    const index = handlers.indexOf(handler);\n\n    if (index !== -1) {\n      handlers.splice(index, 1);\n    }\n  },\n};\n","/*\n * Original Copyright GitHub, Inc. Licensed under the MIT License.\n * See license text at https://github.com/github/markdown-toolbar-element/blob/master/LICENSE.\n */\n\nimport insertText, { SelectionRange } from './insertText';\n\ninterface StyleArgs {\n  prefix: string;\n  suffix: string;\n  blockPrefix: string;\n  blockSuffix: string;\n  multiline: boolean;\n  replaceNext: string;\n  prefixSpace: boolean;\n  scanFor: string;\n  surroundWithNewlines: boolean;\n  orderedList: boolean;\n  unorderedList: boolean;\n  trimFirst: boolean;\n}\n\nconst defaults: StyleArgs = {\n  prefix: '',\n  suffix: '',\n  blockPrefix: '',\n  blockSuffix: '',\n  multiline: false,\n  replaceNext: '',\n  prefixSpace: false,\n  scanFor: '',\n  surroundWithNewlines: false,\n  orderedList: false,\n  unorderedList: false,\n  trimFirst: false,\n};\n\nexport default function styleSelectedText(textarea: HTMLTextAreaElement, styleArgs: StyleArgs) {\n  // Next 2 lines are added\n  textarea.focus();\n  styleArgs = Object.assign({}, defaults, styleArgs);\n  // Prev 2 lines are added\n  const text = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n\n  let result;\n  if (styleArgs.orderedList || styleArgs.unorderedList) {\n    result = listStyle(textarea, styleArgs);\n  } else if (styleArgs.multiline && isMultipleLines(text)) {\n    result = multilineStyle(textarea, styleArgs);\n  } else {\n    result = blockStyle(textarea, styleArgs);\n  }\n\n  insertText(textarea, result);\n}\n\nfunction isMultipleLines(string: string): boolean {\n  return string.trim().split('\\n').length > 1;\n}\n\nfunction repeat(string: string, n: number): string {\n  return Array(n + 1).join(string);\n}\n\nfunction wordSelectionStart(text: string, i: number): number {\n  let index = i;\n  while (text[index] && text[index - 1] != null && !text[index - 1].match(/\\s/)) {\n    index--;\n  }\n  return index;\n}\n\nfunction wordSelectionEnd(text: string, i: number, multiline: boolean): number {\n  let index = i;\n  const breakpoint = multiline ? /\\n/ : /\\s/;\n  while (text[index] && !text[index].match(breakpoint)) {\n    index++;\n  }\n  return index;\n}\n\nfunction expandSelectionToLine(textarea: HTMLTextAreaElement) {\n  const lines = textarea.value.split('\\n');\n  let counter = 0;\n  for (let index = 0; index < lines.length; index++) {\n    const lineLength = lines[index].length + 1;\n    if (textarea.selectionStart >= counter && textarea.selectionStart < counter + lineLength) {\n      textarea.selectionStart = counter;\n    }\n    if (textarea.selectionEnd >= counter && textarea.selectionEnd < counter + lineLength) {\n      textarea.selectionEnd = counter + lineLength - 1;\n    }\n    counter += lineLength;\n  }\n}\n\nfunction expandSelectedText(textarea: HTMLTextAreaElement, prefixToUse: string, suffixToUse: string, multiline = false): string {\n  if (textarea.selectionStart === textarea.selectionEnd) {\n    textarea.selectionStart = wordSelectionStart(textarea.value, textarea.selectionStart);\n    textarea.selectionEnd = wordSelectionEnd(textarea.value, textarea.selectionEnd, multiline);\n  } else {\n    const expandedSelectionStart = textarea.selectionStart - prefixToUse.length;\n    const expandedSelectionEnd = textarea.selectionEnd + suffixToUse.length;\n    const beginsWithPrefix = textarea.value.slice(expandedSelectionStart, textarea.selectionStart) === prefixToUse;\n    const endsWithSuffix = textarea.value.slice(textarea.selectionEnd, expandedSelectionEnd) === suffixToUse;\n    if (beginsWithPrefix && endsWithSuffix) {\n      textarea.selectionStart = expandedSelectionStart;\n      textarea.selectionEnd = expandedSelectionEnd;\n    }\n  }\n  return textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n}\n\ninterface Newlines {\n  newlinesToAppend: string;\n  newlinesToPrepend: string;\n}\n\nfunction newlinesToSurroundSelectedText(textarea: HTMLTextAreaElement): Newlines {\n  const beforeSelection = textarea.value.slice(0, textarea.selectionStart);\n  const afterSelection = textarea.value.slice(textarea.selectionEnd);\n\n  const breaksBefore = beforeSelection.match(/\\n*$/);\n  const breaksAfter = afterSelection.match(/^\\n*/);\n  const newlinesBeforeSelection = breaksBefore ? breaksBefore[0].length : 0;\n  const newlinesAfterSelection = breaksAfter ? breaksAfter[0].length : 0;\n\n  let newlinesToAppend;\n  let newlinesToPrepend;\n\n  if (beforeSelection.match(/\\S/) && newlinesBeforeSelection < 2) {\n    newlinesToAppend = repeat('\\n', 2 - newlinesBeforeSelection);\n  }\n\n  if (afterSelection.match(/\\S/) && newlinesAfterSelection < 2) {\n    newlinesToPrepend = repeat('\\n', 2 - newlinesAfterSelection);\n  }\n\n  if (newlinesToAppend == null) {\n    newlinesToAppend = '';\n  }\n\n  if (newlinesToPrepend == null) {\n    newlinesToPrepend = '';\n  }\n\n  return { newlinesToAppend, newlinesToPrepend };\n}\n\nfunction blockStyle(textarea: HTMLTextAreaElement, arg: StyleArgs): SelectionRange {\n  let newlinesToAppend;\n  let newlinesToPrepend;\n\n  const { prefix, suffix, blockPrefix, blockSuffix, replaceNext, prefixSpace, scanFor, surroundWithNewlines } = arg;\n  const originalSelectionStart = textarea.selectionStart;\n  const originalSelectionEnd = textarea.selectionEnd;\n\n  let selectedText = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n  let prefixToUse = isMultipleLines(selectedText) && blockPrefix.length > 0 ? `${blockPrefix}\\n` : prefix;\n  // CHANGED\n  let suffixToUse = isMultipleLines(selectedText) && blockSuffix.length > 0 ? `\\n${blockSuffix}` : prefixToUse === prefix ? suffix : '';\n  // END CHANGED\n\n  if (prefixSpace) {\n    const beforeSelection = textarea.value[textarea.selectionStart - 1];\n    if (textarea.selectionStart !== 0 && beforeSelection != null && !beforeSelection.match(/\\s/)) {\n      prefixToUse = ` ${prefixToUse}`;\n    }\n  }\n  selectedText = expandSelectedText(textarea, prefixToUse, suffixToUse, arg.multiline);\n  let selectionStart = textarea.selectionStart;\n  let selectionEnd = textarea.selectionEnd;\n  const hasReplaceNext = replaceNext.length > 0 && suffixToUse.indexOf(replaceNext) > -1 && selectedText.length > 0;\n  if (surroundWithNewlines) {\n    const ref = newlinesToSurroundSelectedText(textarea);\n    newlinesToAppend = ref.newlinesToAppend;\n    newlinesToPrepend = ref.newlinesToPrepend;\n    prefixToUse = newlinesToAppend + prefix;\n    suffixToUse += newlinesToPrepend;\n  }\n\n  if (selectedText.startsWith(prefixToUse) && selectedText.endsWith(suffixToUse)) {\n    const replacementText = selectedText.slice(prefixToUse.length, selectedText.length - suffixToUse.length);\n    if (originalSelectionStart === originalSelectionEnd) {\n      let position = originalSelectionStart - prefixToUse.length;\n      position = Math.max(position, selectionStart);\n      position = Math.min(position, selectionStart + replacementText.length);\n      selectionStart = selectionEnd = position;\n    } else {\n      selectionEnd = selectionStart + replacementText.length;\n    }\n    return { text: replacementText, selectionStart, selectionEnd };\n  } else if (!hasReplaceNext) {\n    let replacementText = prefixToUse + selectedText + suffixToUse;\n    selectionStart = originalSelectionStart + prefixToUse.length;\n    selectionEnd = originalSelectionEnd + prefixToUse.length;\n    const whitespaceEdges = selectedText.match(/^\\s*|\\s*$/g);\n    if (arg.trimFirst && whitespaceEdges) {\n      const leadingWhitespace = whitespaceEdges[0] || '';\n      const trailingWhitespace = whitespaceEdges[1] || '';\n      replacementText = leadingWhitespace + prefixToUse + selectedText.trim() + suffixToUse + trailingWhitespace;\n      selectionStart += leadingWhitespace.length;\n      selectionEnd -= trailingWhitespace.length;\n    }\n    return { text: replacementText, selectionStart, selectionEnd };\n  } else if (scanFor.length > 0 && selectedText.match(scanFor)) {\n    suffixToUse = suffixToUse.replace(replaceNext, selectedText);\n    const replacementText = prefixToUse + suffixToUse;\n    selectionStart = selectionEnd = selectionStart + prefixToUse.length;\n    return { text: replacementText, selectionStart, selectionEnd };\n  } else {\n    const replacementText = prefixToUse + selectedText + suffixToUse;\n    selectionStart = selectionStart + prefixToUse.length + selectedText.length + suffixToUse.indexOf(replaceNext);\n    selectionEnd = selectionStart + replaceNext.length;\n    return { text: replacementText, selectionStart, selectionEnd };\n  }\n}\n\nfunction multilineStyle(textarea: HTMLTextAreaElement, arg: StyleArgs) {\n  const { prefix, suffix, blockPrefix, blockSuffix, surroundWithNewlines } = arg;\n  let text = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n  let selectionStart = textarea.selectionStart;\n  let selectionEnd = textarea.selectionEnd;\n  const lines = text.split('\\n');\n  // CHANGED\n  let prefixToUse = blockPrefix.length > 0 ? blockPrefix : prefix;\n  let suffixToUse = blockSuffix.length > 0 ? blockSuffix : prefixToUse == prefix ? suffix : '';\n  const undoStyle = lines.every((line) => line.startsWith(prefixToUse) && line.endsWith(suffixToUse));\n  // END CHANGED\n\n  if (undoStyle) {\n    text = lines.map((line) => line.slice(prefixToUse.length, line.length - suffixToUse.length)).join('\\n');\n    selectionEnd = selectionStart + text.length;\n  } else {\n    // CHANGED\n    text = lines.map((line) => prefixToUse + line + suffixToUse).join('\\n');\n    if (surroundWithNewlines || suffixToUse === '') {\n      // END CHANGED\n      const { newlinesToAppend, newlinesToPrepend } = newlinesToSurroundSelectedText(textarea);\n      selectionStart += newlinesToAppend.length;\n      selectionEnd = selectionStart + text.length;\n      text = newlinesToAppend + text + newlinesToPrepend;\n    }\n  }\n\n  return { text, selectionStart, selectionEnd };\n}\n\ninterface UndoResult {\n  text: string;\n  processed: boolean;\n}\nfunction undoOrderedListStyle(text: string): UndoResult {\n  const lines = text.split('\\n');\n  const orderedListRegex = /^\\d+\\.\\s+/;\n  const shouldUndoOrderedList = lines.every((line) => orderedListRegex.test(line));\n  let result = lines;\n  if (shouldUndoOrderedList) {\n    result = lines.map((line) => line.replace(orderedListRegex, ''));\n  }\n\n  return {\n    text: result.join('\\n'),\n    processed: shouldUndoOrderedList,\n  };\n}\n\nfunction undoUnorderedListStyle(text: string): UndoResult {\n  const lines = text.split('\\n');\n  const unorderedListPrefix = '- ';\n  const shouldUndoUnorderedList = lines.every((line) => line.startsWith(unorderedListPrefix));\n  let result = lines;\n  if (shouldUndoUnorderedList) {\n    result = lines.map((line) => line.slice(unorderedListPrefix.length, line.length));\n  }\n\n  return {\n    text: result.join('\\n'),\n    processed: shouldUndoUnorderedList,\n  };\n}\n\nfunction makePrefix(index: number, unorderedList: boolean): string {\n  if (unorderedList) {\n    return '- ';\n  } else {\n    return `${index + 1}. `;\n  }\n}\n\nfunction clearExistingListStyle(style: StyleArgs, selectedText: string): [UndoResult, UndoResult, string] {\n  let undoResultOpositeList: UndoResult;\n  let undoResult: UndoResult;\n  let pristineText;\n  if (style.orderedList) {\n    undoResult = undoOrderedListStyle(selectedText);\n    undoResultOpositeList = undoUnorderedListStyle(undoResult.text);\n    pristineText = undoResultOpositeList.text;\n  } else {\n    undoResult = undoUnorderedListStyle(selectedText);\n    undoResultOpositeList = undoOrderedListStyle(undoResult.text);\n    pristineText = undoResultOpositeList.text;\n  }\n  return [undoResult, undoResultOpositeList, pristineText];\n}\n\nfunction listStyle(textarea: HTMLTextAreaElement, style: StyleArgs): SelectionRange {\n  const noInitialSelection = textarea.selectionStart === textarea.selectionEnd;\n  let selectionStart = textarea.selectionStart;\n  let selectionEnd = textarea.selectionEnd;\n\n  // Select whole line\n  expandSelectionToLine(textarea);\n\n  const selectedText = textarea.value.slice(textarea.selectionStart, textarea.selectionEnd);\n\n  // If the user intent was to do an undo, we will stop after this.\n  // Otherwise, we will still undo to other list type to prevent list stacking\n  const [undoResult, undoResultOpositeList, pristineText] = clearExistingListStyle(style, selectedText);\n\n  const prefixedLines = pristineText.split('\\n').map((value, index) => {\n    return `${makePrefix(index, style.unorderedList)}${value}`;\n  });\n\n  const totalPrefixLength = prefixedLines.reduce((previousValue, _currentValue, currentIndex) => {\n    return previousValue + makePrefix(currentIndex, style.unorderedList).length;\n  }, 0);\n\n  const totalPrefixLengthOpositeList = prefixedLines.reduce((previousValue, _currentValue, currentIndex) => {\n    return previousValue + makePrefix(currentIndex, !style.unorderedList).length;\n  }, 0);\n\n  if (undoResult.processed) {\n    if (noInitialSelection) {\n      selectionStart = Math.max(selectionStart - makePrefix(0, style.unorderedList).length, 0);\n      selectionEnd = selectionStart;\n    } else {\n      selectionStart = textarea.selectionStart;\n      selectionEnd = textarea.selectionEnd - totalPrefixLength;\n    }\n    return { text: pristineText, selectionStart, selectionEnd };\n  }\n\n  const { newlinesToAppend, newlinesToPrepend } = newlinesToSurroundSelectedText(textarea);\n  const text = newlinesToAppend + prefixedLines.join('\\n') + newlinesToPrepend;\n\n  if (noInitialSelection) {\n    selectionStart = Math.max(selectionStart + makePrefix(0, style.unorderedList).length + newlinesToAppend.length, 0);\n    selectionEnd = selectionStart;\n  } else {\n    if (undoResultOpositeList.processed) {\n      selectionStart = Math.max(textarea.selectionStart + newlinesToAppend.length, 0);\n      selectionEnd = textarea.selectionEnd + newlinesToAppend.length + totalPrefixLength - totalPrefixLengthOpositeList;\n    } else {\n      selectionStart = Math.max(textarea.selectionStart + newlinesToAppend.length, 0);\n      selectionEnd = textarea.selectionEnd + newlinesToAppend.length + totalPrefixLength;\n    }\n  }\n\n  return { text, selectionStart, selectionEnd };\n}\n","export default function proxifyCompat(compat: Record<string, unknown>, namespace: string) {\n  // regex to replace common/ and NAMESPACE/ for core & core extensions\n  // and remove .js, .ts and .tsx extensions\n  // e.g. admin/utils/extract --> utils/extract\n  // e.g. tags/common/utils/sortTags --> tags/utils/sortTags\n  const regex = new RegExp(String.raw`(\\w+\\/)?(${namespace}|common)\\/`);\n  const fileExt = /(\\.js|\\.tsx?)$/;\n\n  return new Proxy(compat, {\n    get: (obj, prop: string) => obj[prop] || obj[prop.replace(regex, '$1').replace(fileExt, '')],\n  });\n}\n","export default function _taggedTemplateLiteralLoose(strings, raw) {\n  if (!raw) {\n    raw = strings.slice(0);\n  }\n  strings.raw = raw;\n  return strings;\n}","import Component from '../Component';\nimport icon from '../helpers/icon';\nimport withAttr from '../utils/withAttr';\nimport classList from '../utils/classList';\n\n/**\n * The `Select` component displays a <select> input, surrounded with some extra\n * elements for styling. It accepts the following attrs:\n *\n * - `options` A map of option values to labels.\n * - `onchange` A callback to run when the selected value is changed.\n * - `value` The value of the selected option.\n * - `disabled` Disabled state for the input.\n * - `wrapperAttrs` A map of attrs to be passed to the DOM element wrapping the `<select>`\n *\n * Other attributes are passed directly to the `<select>` element rendered to the DOM.\n */\nexport default class Select extends Component {\n  view() {\n    const {\n      options,\n      onchange,\n      value,\n      disabled,\n      className,\n      class: _class,\n\n      // Destructure the `wrapperAttrs` object to extract the `className` for passing to `classList()`\n      // `= {}` prevents errors when `wrapperAttrs` is undefined\n      wrapperAttrs: { className: wrapperClassName, class: wrapperClass, ...wrapperAttrs } = {},\n\n      ...domAttrs\n    } = this.attrs;\n\n    return (\n      <span className={classList('Select', wrapperClassName, wrapperClass)} {...wrapperAttrs}>\n        <select\n          className={classList('Select-input FormControl', className, _class)}\n          onchange={onchange ? withAttr('value', onchange.bind(this)) : undefined}\n          value={value}\n          disabled={disabled}\n          {...domAttrs}\n        >\n          {Object.keys(options).map((key) => (\n            <option value={key}>{options[key]}</option>\n          ))}\n        </select>\n        {icon('fas fa-sort', { className: 'Select-caret' })}\n      </span>\n    );\n  }\n}\n","import type Mithril from 'mithril';\n\nimport Component, { ComponentAttrs } from '../Component';\nimport classList from '../utils/classList';\nimport icon from '../helpers/icon';\n\nexport default class ColorPreviewInput extends Component {\n  view(vnode: Mithril.Vnode<ComponentAttrs, this>) {\n    const { className, id, ...attrs } = this.attrs;\n\n    attrs.type ||= 'text';\n\n    // If the input is a 3 digit hex code, convert it to 6 digits.\n    if (attrs.value.length === 4) {\n      attrs.value = attrs.value.replace(/#([a-f0-9])([a-f0-9])([a-f0-9])/, '#$1$1$2$2$3$3');\n    }\n\n    return (\n      <div className=\"ColorInput\">\n        <input className={classList('FormControl', className)} id={id} {...attrs} />\n\n        <span className=\"ColorInput-icon\" role=\"presentation\">\n          {icon('fas fa-exclamation-circle')}\n        </span>\n\n        <input className=\"ColorInput-preview\" {...attrs} type=\"color\" />\n      </div>\n    );\n  }\n}\n","import extractText from '../utils/extractText';\nimport Button from './Button';\nimport Tooltip from './Tooltip';\n\n/**\n * The `TextEditorButton` component displays a button suitable for the text\n * editor toolbar.\n *\n * Automatically creates tooltips using the Tooltip component and provided text.\n *\n * ## Attrs\n * - `title` - Tooltip for the button\n */\nexport default class TextEditorButton extends Button {\n  view(vnode) {\n    const originalView = super.view(vnode);\n\n    return <Tooltip text={this.attrs.tooltipText || extractText(vnode.children)}>{originalView}</Tooltip>;\n  }\n\n  static initAttrs(attrs) {\n    super.initAttrs(attrs);\n\n    attrs.className = attrs.className || 'Button Button--icon Button--link';\n    attrs.tooltipText = attrs.title;\n  }\n}\n","import * as extend from './extend';\nimport extenders from './extenders';\nimport Session from './Session';\nimport Store from './Store';\nimport BasicEditorDriver from './utils/BasicEditorDriver';\nimport bidi from './utils/bidi';\nimport evented from './utils/evented';\nimport EventEmitter from './utils/EventEmitter';\nimport KeyboardNavigatable from './utils/KeyboardNavigatable';\nimport liveHumanTimes from './utils/liveHumanTimes';\nimport ItemList from './utils/ItemList';\nimport mixin from './utils/mixin';\nimport humanTime from './utils/humanTime';\nimport computed from './utils/computed';\nimport insertText from './utils/insertText';\nimport styleSelectedText from './utils/styleSelectedText';\nimport Drawer from './utils/Drawer';\nimport * as EditorDriverInterface from './utils/EditorDriverInterface';\nimport anchorScroll from './utils/anchorScroll';\nimport RequestError from './utils/RequestError';\nimport abbreviateNumber from './utils/abbreviateNumber';\nimport escapeRegExp from './utils/escapeRegExp';\nimport * as string from './utils/string';\nimport * as ThrottleDebounce from './utils/throttleDebounce';\nimport Stream from './utils/Stream';\nimport SubtreeRetainer from './utils/SubtreeRetainer';\nimport setRouteWithForcedRefresh from './utils/setRouteWithForcedRefresh';\nimport extract from './utils/extract';\nimport ScrollListener from './utils/ScrollListener';\nimport stringToColor from './utils/stringToColor';\nimport subclassOf from './utils/subclassOf';\nimport patchMithril from './utils/patchMithril';\nimport proxifyCompat from './utils/proxifyCompat';\nimport classList from './utils/classList';\nimport extractText from './utils/extractText';\nimport formatNumber from './utils/formatNumber';\nimport mapRoutes from './utils/mapRoutes';\nimport withAttr from './utils/withAttr';\nimport * as FocusTrap from './utils/focusTrap';\nimport isDark from './utils/isDark';\nimport AccessToken from './models/AccessToken';\nimport Notification from './models/Notification';\nimport User from './models/User';\nimport Post from './models/Post';\nimport Discussion from './models/Discussion';\nimport Group from './models/Group';\nimport Forum from './models/Forum';\nimport Component from './Component';\nimport Translator from './Translator';\nimport AlertManager from './components/AlertManager';\nimport Page from './components/Page';\nimport Switch from './components/Switch';\nimport Badge from './components/Badge';\nimport LoadingIndicator from './components/LoadingIndicator';\nimport Placeholder from './components/Placeholder';\nimport Separator from './components/Separator';\nimport Dropdown from './components/Dropdown';\nimport SplitDropdown from './components/SplitDropdown';\nimport RequestErrorModal from './components/RequestErrorModal';\nimport FieldSet from './components/FieldSet';\nimport Select from './components/Select';\nimport Navigation from './components/Navigation';\nimport Alert from './components/Alert';\nimport Link from './components/Link';\nimport LinkButton from './components/LinkButton';\nimport Checkbox from './components/Checkbox';\nimport ColorPreviewInput from './components/ColorPreviewInput';\nimport ConfirmDocumentUnload from './components/ConfirmDocumentUnload';\nimport SelectDropdown from './components/SelectDropdown';\nimport ModalManager from './components/ModalManager';\nimport Button from './components/Button';\nimport Modal from './components/Modal';\nimport GroupBadge from './components/GroupBadge';\nimport TextEditor from './components/TextEditor';\nimport TextEditorButton from './components/TextEditorButton';\nimport EditUserModal from './components/EditUserModal';\nimport Tooltip from './components/Tooltip';\nimport Model from './Model';\nimport Application from './Application';\nimport fullTime from './helpers/fullTime';\nimport avatar from './helpers/avatar';\nimport fireApplicationError from './helpers/fireApplicationError';\nimport * as fireDebugWarning from './helpers/fireDebugWarning';\nimport icon from './helpers/icon';\nimport humanTimeHelper from './helpers/humanTime';\nimport punctuateSeries from './helpers/punctuateSeries';\nimport highlight from './helpers/highlight';\nimport username from './helpers/username';\nimport userOnline from './helpers/userOnline';\nimport listItems from './helpers/listItems';\nimport textContrastClass from './helpers/textContrastClass';\nimport Fragment from './Fragment';\nimport DefaultResolver from './resolvers/DefaultResolver';\nimport PaginatedListState from './states/PaginatedListState';\nimport isObject from './utils/isObject';\nimport AlertManagerState from './states/AlertManagerState';\nimport ModalManagerState from './states/ModalManagerState';\nimport PageState from './states/PageState';\nimport LabelValue from './components/LabelValue';\nimport IPAddress from './components/IPAddress';\n\nexport default {\n  extenders,\n  extend: extend,\n  Session: Session,\n  Store: Store,\n  'utils/BasicEditorDriver': BasicEditorDriver,\n  'utils/bidi': bidi,\n  'utils/evented': evented,\n  'utils/EventEmitter': EventEmitter,\n  'utils/KeyboardNavigatable': KeyboardNavigatable,\n  'utils/liveHumanTimes': liveHumanTimes,\n  'utils/ItemList': ItemList,\n  'utils/mixin': mixin,\n  'utils/humanTime': humanTime,\n  'utils/computed': computed,\n  'utils/insertText': insertText,\n  'utils/styleSelectedText': styleSelectedText,\n  'utils/Drawer': Drawer,\n  'utils/EditorDriverInterface': EditorDriverInterface,\n  'utils/anchorScroll': anchorScroll,\n  'utils/RequestError': RequestError,\n  'utils/abbreviateNumber': abbreviateNumber,\n  'utils/string': string,\n  'utils/SubtreeRetainer': SubtreeRetainer,\n  'utils/escapeRegExp': escapeRegExp,\n  'utils/extract': extract,\n  'utils/ScrollListener': ScrollListener,\n  'utils/stringToColor': stringToColor,\n  'utils/Stream': Stream,\n  'utils/subclassOf': subclassOf,\n  'utils/setRouteWithForcedRefresh': setRouteWithForcedRefresh,\n  'utils/patchMithril': patchMithril,\n  'utils/proxifyCompat': proxifyCompat,\n  'utils/classList': classList,\n  'utils/extractText': extractText,\n  'utils/formatNumber': formatNumber,\n  'utils/mapRoutes': mapRoutes,\n  'utils/withAttr': withAttr,\n  'utils/throttleDebounce': ThrottleDebounce,\n  'utils/isObject': isObject,\n  'utils/focusTrap': FocusTrap,\n  'utils/isDark': isDark,\n  'models/AccessToken': AccessToken,\n  'models/Notification': Notification,\n  'models/User': User,\n  'models/Post': Post,\n  'models/Discussion': Discussion,\n  'models/Group': Group,\n  'models/Forum': Forum,\n  Component: Component,\n  Fragment: Fragment,\n  Translator: Translator,\n  'components/AlertManager': AlertManager,\n  'components/Page': Page,\n  'components/Switch': Switch,\n  'components/Badge': Badge,\n  'components/LoadingIndicator': LoadingIndicator,\n  'components/Placeholder': Placeholder,\n  'components/Separator': Separator,\n  'components/Dropdown': Dropdown,\n  'components/SplitDropdown': SplitDropdown,\n  'components/RequestErrorModal': RequestErrorModal,\n  'components/FieldSet': FieldSet,\n  'components/Select': Select,\n  'components/Navigation': Navigation,\n  'components/Alert': Alert,\n  'components/Link': Link,\n  'components/LinkButton': LinkButton,\n  'components/Checkbox': Checkbox,\n  'components/ColorPreviewInput': ColorPreviewInput,\n  'components/ConfirmDocumentUnload': ConfirmDocumentUnload,\n  'components/SelectDropdown': SelectDropdown,\n  'components/ModalManager': ModalManager,\n  'components/Button': Button,\n  'components/Modal': Modal,\n  'components/GroupBadge': GroupBadge,\n  'components/TextEditor': TextEditor,\n  'components/TextEditorButton': TextEditorButton,\n  'components/Tooltip': Tooltip,\n  'components/EditUserModal': EditUserModal,\n  'components/LabelValue': LabelValue,\n  'components/IPAddress': IPAddress,\n  Model: Model,\n  Application: Application,\n  'helpers/fullTime': fullTime,\n  'helpers/avatar': avatar,\n  'helpers/fireApplicationError': fireApplicationError,\n  'helpers/fireDebugWarning': fireDebugWarning,\n  'helpers/icon': icon,\n  'helpers/humanTime': humanTimeHelper,\n  'helpers/punctuateSeries': punctuateSeries,\n  'helpers/highlight': highlight,\n  'helpers/username': username,\n  'helpers/userOnline': userOnline,\n  'helpers/listItems': listItems,\n  'helpers/textContrastClass': textContrastClass,\n  'resolvers/DefaultResolver': DefaultResolver,\n  'states/PaginatedListState': PaginatedListState,\n  'states/AlertManagerState': AlertManagerState,\n  'states/ModalManagerState': ModalManagerState,\n  'states/PageState': PageState,\n};\n","/**\n * The `mixin` utility assigns the properties of a set of 'mixin' objects to\n * the prototype of a parent object.\n *\n * @example\n * class MyClass extends mixin(ExistingClass, evented, etc) {}\n *\n * @param {object} Parent The class to extend the new class from.\n * @param {Record<string, any>[]} mixins The objects to mix in.\n * @return {object} A new class that extends Parent and contains the mixins.\n */\nexport default function mixin(Parent, ...mixins) {\n  class Mixed extends Parent {}\n\n  mixins.forEach((object) => {\n    Object.assign(Mixed.prototype, object);\n  });\n\n  return Mixed;\n}\n","import type Mithril from 'mithril';\n\n/**\n * The `Fragment` class represents a chunk of DOM that is rendered once with Mithril and then takes\n * over control of its own DOM and lifecycle.\n *\n * This is very similar to the `Component` wrapper class, but is used for more fine-grained control over\n * the rendering and display of some significant chunks of the DOM. In contrast to components, fragments\n * do not offer Mithril's lifecycle hooks.\n *\n * Use this when you want to enjoy the benefits of JSX / VDOM for initial rendering, combined with\n * small helper methods that then make updates to that DOM directly, instead of fully redrawing\n * everything through Mithril.\n *\n * This should only be used when necessary, and only with `m.render`. If you are unsure whether you need\n * this or `Component, you probably need `Component`.\n */\nexport default abstract class Fragment {\n  /**\n   * The root DOM element for the fragment.\n   */\n  protected element!: Element;\n\n  /**\n   * Returns a jQuery object for this fragment's element. If you pass in a\n   * selector string, this method will return a jQuery object, using the current\n   * element as its buffer.\n   *\n   * For example, calling `fragment.$('li')` will return a jQuery object\n   * containing all of the `li` elements inside the DOM element of this\n   * fragment.\n   *\n   * @param [selector] a jQuery-compatible selector string\n   * @returns the jQuery object for the DOM node\n   * @final\n   */\n  public $(selector?: string): JQuery {\n    const $element = $(this.element) as JQuery<HTMLElement>;\n\n    return selector ? $element.find(selector) : $element;\n  }\n\n  /**\n   * Get the renderable virtual DOM that represents the fragment's view.\n   *\n   * This should NOT be overridden by subclasses. Subclasses wishing to define\n   * their virtual DOM should override Fragment#view instead.\n   *\n   * @example\n   * const fragment = new MyFragment();\n   * m.render(document.body, fragment.render());\n   *\n   * @final\n   */\n  public render(): Mithril.Vnode<Mithril.Attributes, this> {\n    const vdom = this.view();\n\n    vdom.attrs = vdom.attrs || {};\n\n    const originalOnCreate = vdom.attrs.oncreate;\n\n    vdom.attrs.oncreate = (vnode) => {\n      this.element = vnode.dom;\n      if (originalOnCreate) originalOnCreate.apply(this, [vnode]);\n    };\n\n    return vdom;\n  }\n\n  /**\n   * Creates a view out of virtual elements.\n   */\n  abstract view(): Mithril.Vnode<Mithril.Attributes, this>;\n}\n","import app from '../../common/app';\n\n/**\n * The `punctuateSeries` helper formats a list of strings (e.g. names) to read\n * fluently in the application's locale.\n *\n * ```js\n * punctuateSeries(['Toby', 'Franz', 'Dominion']) // Toby, Franz, and Dominion\n * ```\n *\n * @param {import('mithril').Children[]} items\n * @return {import('mithril').Children}')}\n */\nexport default function punctuateSeries(items) {\n  if (items.length === 2) {\n    return app.translator.trans('core.lib.series.two_text', {\n      first: items[0],\n      second: items[1],\n    });\n  } else if (items.length >= 3) {\n    // If there are three or more items, we will join all but the first and\n    // last items with the equivalent of a comma, and then we will feed that\n    // into the translator along with the first and last item.\n    const second = items\n      .slice(1, items.length - 1)\n      .reduce((list, item) => list.concat([item, app.translator.trans('core.lib.series.glue_text')]), [])\n      .slice(0, -1);\n\n    return app.translator.trans('core.lib.series.three_text', {\n      first: items[0],\n      second,\n      third: items[items.length - 1],\n    });\n  }\n\n  return items;\n}\n","import app from '../../forum/app';\nimport Button from '../../common/components/Button';\nimport classList from '../../common/utils/classList';\n\n/**\n * The `LogInButton` component displays a social login button which will open\n * a popup window containing the specified path.\n *\n * ### Attrs\n *\n * - `path`\n */\nexport default class LogInButton extends Button {\n  static initAttrs(attrs) {\n    attrs.className = classList(attrs.className, 'LogInButton');\n\n    attrs.onclick = function () {\n      const width = 580;\n      const height = 400;\n      const $window = $(window);\n\n      window.open(\n        app.forum.attribute('baseUrl') + attrs.path,\n        'logInPopup',\n        `width=${width},` +\n          `height=${height},` +\n          `top=${$window.height() / 2 - height / 2},` +\n          `left=${$window.width() / 2 - width / 2},` +\n          'status=no,scrollbars=yes,resizable=no'\n      );\n    };\n\n    super.initAttrs(attrs);\n  }\n}\n","import app from '../../forum/app';\nimport Component from '../../common/Component';\nimport Link from '../../common/components/Link';\nimport avatar from '../../common/helpers/avatar';\nimport username from '../../common/helpers/username';\nimport highlight from '../../common/helpers/highlight';\n\n/**\n * The `PostPreview` component shows a link to a post containing the avatar and\n * username of the author, and a short excerpt of the post's content.\n *\n * ### Attrs\n *\n * - `post`\n */\nexport default class PostPreview extends Component {\n  view() {\n    const post = this.attrs.post;\n    const user = post.user();\n\n    return (\n      <Link className=\"PostPreview\" href={app.route.post(post)} onclick={this.attrs.onclick}>\n        <span className=\"PostPreview-content\">\n          {avatar(user)}\n          {username(user)} <span className=\"PostPreview-excerpt\">{this.excerpt()}</span>\n        </span>\n      </Link>\n    );\n  }\n\n  /**\n   * @returns {string|undefined|null}\n   */\n  content() {\n    return this.attrs.post.contentType() === 'comment' && this.attrs.post.contentPlain();\n  }\n\n  /**\n   * @returns {string}\n   */\n  excerpt() {\n    return this.content() ? highlight(this.content(), this.attrs.highlight, 300) : '';\n  }\n}\n","import compat from '../common/compat';\n\nimport PostControls from './utils/PostControls';\nimport KeyboardNavigatable from '../common/utils/KeyboardNavigatable';\nimport slidable from './utils/slidable';\nimport History from './utils/History';\nimport DiscussionControls from './utils/DiscussionControls';\nimport alertEmailConfirmation from './utils/alertEmailConfirmation';\nimport UserControls from './utils/UserControls';\nimport Pane from './utils/Pane';\nimport ComposerState from './states/ComposerState';\nimport DiscussionListState from './states/DiscussionListState';\nimport GlobalSearchState from './states/GlobalSearchState';\nimport NotificationListState from './states/NotificationListState';\nimport PostStreamState from './states/PostStreamState';\nimport SearchState from './states/SearchState';\nimport UserSecurityPageState from './states/UserSecurityPageState';\nimport AffixedSidebar from './components/AffixedSidebar';\nimport DiscussionPage from './components/DiscussionPage';\nimport DiscussionListPane from './components/DiscussionListPane';\nimport LogInModal from './components/LogInModal';\nimport NewAccessTokenModal from './components/NewAccessTokenModal';\nimport ComposerBody from './components/ComposerBody';\nimport ForgotPasswordModal from './components/ForgotPasswordModal';\nimport Notification from './components/Notification';\nimport LogInButton from './components/LogInButton';\nimport DiscussionsUserPage from './components/DiscussionsUserPage';\nimport Composer from './components/Composer';\nimport SessionDropdown from './components/SessionDropdown';\nimport HeaderPrimary from './components/HeaderPrimary';\nimport PostEdited from './components/PostEdited';\nimport PostStream from './components/PostStream';\nimport ChangePasswordModal from './components/ChangePasswordModal';\nimport IndexPage from './components/IndexPage';\nimport DiscussionRenamedNotification from './components/DiscussionRenamedNotification';\nimport DiscussionsSearchSource from './components/DiscussionsSearchSource';\nimport HeaderSecondary from './components/HeaderSecondary';\nimport ComposerButton from './components/ComposerButton';\nimport DiscussionList from './components/DiscussionList';\nimport ReplyPlaceholder from './components/ReplyPlaceholder';\nimport AvatarEditor from './components/AvatarEditor';\nimport Post from './components/Post';\nimport SettingsPage from './components/SettingsPage';\nimport TerminalPost from './components/TerminalPost';\nimport ChangeEmailModal from './components/ChangeEmailModal';\nimport NotificationsDropdown from './components/NotificationsDropdown';\nimport UserPage from './components/UserPage';\nimport PostUser from './components/PostUser';\nimport UserCard from './components/UserCard';\nimport UsersSearchSource from './components/UsersSearchSource';\nimport UserSecurityPage from './components/UserSecurityPage';\nimport NotificationGrid from './components/NotificationGrid';\nimport PostPreview from './components/PostPreview';\nimport EventPost from './components/EventPost';\nimport DiscussionHero from './components/DiscussionHero';\nimport PostMeta from './components/PostMeta';\nimport DiscussionRenamedPost from './components/DiscussionRenamedPost';\nimport DiscussionComposer from './components/DiscussionComposer';\nimport LogInButtons from './components/LogInButtons';\nimport NotificationList from './components/NotificationList';\nimport WelcomeHero from './components/WelcomeHero';\nimport SignUpModal from './components/SignUpModal';\nimport CommentPost from './components/CommentPost';\nimport ComposerPostPreview from './components/ComposerPostPreview';\nimport ReplyComposer from './components/ReplyComposer';\nimport NotificationsPage from './components/NotificationsPage';\nimport PostStreamScrubber from './components/PostStreamScrubber';\nimport EditPostComposer from './components/EditPostComposer';\nimport RenameDiscussionModal from './components/RenameDiscussionModal';\nimport Search from './components/Search';\nimport DiscussionListItem from './components/DiscussionListItem';\nimport LoadingPost from './components/LoadingPost';\nimport PostsUserPage from './components/PostsUserPage';\nimport DiscussionPageResolver from './resolvers/DiscussionPageResolver';\nimport BasicEditorDriver from '../common/utils/BasicEditorDriver';\nimport routes from './routes';\nimport ForumApplication from './ForumApplication';\nimport isSafariMobile from './utils/isSafariMobile';\nimport AccessTokensList from './components/AccessTokensList';\nimport DiscussionsSearchItem from './components/DiscussionsSearchItem';\n\nexport default Object.assign(compat, {\n  'utils/PostControls': PostControls,\n  // @deprecated import from 'flarum/common/utils/KeyboardNavigatable' instead\n  'utils/KeyboardNavigatable': KeyboardNavigatable,\n  'utils/slidable': slidable,\n  'utils/History': History,\n  'utils/DiscussionControls': DiscussionControls,\n  'utils/alertEmailConfirmation': alertEmailConfirmation,\n  'utils/UserControls': UserControls,\n  'utils/Pane': Pane,\n  'utils/BasicEditorDriver': BasicEditorDriver,\n  'utils/isSafariMobile': isSafariMobile,\n  'states/ComposerState': ComposerState,\n  'states/DiscussionListState': DiscussionListState,\n  'states/GlobalSearchState': GlobalSearchState,\n  'states/NotificationListState': NotificationListState,\n  'states/PostStreamState': PostStreamState,\n  'states/SearchState': SearchState,\n  'states/UserSecurityPageState': UserSecurityPageState,\n  'components/AffixedSidebar': AffixedSidebar,\n  'components/DiscussionPage': DiscussionPage,\n  'components/DiscussionListPane': DiscussionListPane,\n  'components/LogInModal': LogInModal,\n  'components/NewAccessTokenModal': NewAccessTokenModal,\n  'components/ComposerBody': ComposerBody,\n  'components/ForgotPasswordModal': ForgotPasswordModal,\n  'components/Notification': Notification,\n  'components/LogInButton': LogInButton,\n  'components/DiscussionsUserPage': DiscussionsUserPage,\n  'components/Composer': Composer,\n  'components/SessionDropdown': SessionDropdown,\n  'components/HeaderPrimary': HeaderPrimary,\n  'components/PostEdited': PostEdited,\n  'components/PostStream': PostStream,\n  'components/ChangePasswordModal': ChangePasswordModal,\n  'components/IndexPage': IndexPage,\n  'components/DiscussionRenamedNotification': DiscussionRenamedNotification,\n  'components/DiscussionsSearchSource': DiscussionsSearchSource,\n  'components/DiscussionsSearchItem': DiscussionsSearchItem,\n  'components/HeaderSecondary': HeaderSecondary,\n  'components/ComposerButton': ComposerButton,\n  'components/DiscussionList': DiscussionList,\n  'components/ReplyPlaceholder': ReplyPlaceholder,\n  'components/AvatarEditor': AvatarEditor,\n  'components/Post': Post,\n  'components/SettingsPage': SettingsPage,\n  'components/TerminalPost': TerminalPost,\n  'components/ChangeEmailModal': ChangeEmailModal,\n  'components/NotificationsDropdown': NotificationsDropdown,\n  'components/UserPage': UserPage,\n  'components/PostUser': PostUser,\n  'components/UserCard': UserCard,\n  'components/UsersSearchSource': UsersSearchSource,\n  'components/UserSecurityPage': UserSecurityPage,\n  'components/NotificationGrid': NotificationGrid,\n  'components/PostPreview': PostPreview,\n  'components/EventPost': EventPost,\n  'components/DiscussionHero': DiscussionHero,\n  'components/PostMeta': PostMeta,\n  'components/DiscussionRenamedPost': DiscussionRenamedPost,\n  'components/DiscussionComposer': DiscussionComposer,\n  'components/LogInButtons': LogInButtons,\n  'components/NotificationList': NotificationList,\n  'components/WelcomeHero': WelcomeHero,\n  'components/SignUpModal': SignUpModal,\n  'components/CommentPost': CommentPost,\n  'components/ComposerPostPreview': ComposerPostPreview,\n  'components/ReplyComposer': ReplyComposer,\n  'components/NotificationsPage': NotificationsPage,\n  'components/PostStreamScrubber': PostStreamScrubber,\n  'components/EditPostComposer': EditPostComposer,\n  'components/RenameDiscussionModal': RenameDiscussionModal,\n  'components/Search': Search,\n  'components/DiscussionListItem': DiscussionListItem,\n  'components/LoadingPost': LoadingPost,\n  'components/PostsUserPage': PostsUserPage,\n  'components/AccessTokensList': AccessTokensList,\n  'resolvers/DiscussionPageResolver': DiscussionPageResolver,\n  routes: routes,\n  ForumApplication: ForumApplication,\n});\n","// Expose punycode and ColorThief to the window browser object\nimport 'expose-loader?exposes=punycode!punycode';\nimport 'expose-loader?exposes=ColorThief!color-thief-browser';\n\nimport app from './app';\n\nexport { app };\n\n// Export compat API\nimport compatObj from './compat';\nimport proxifyCompat from '../common/utils/proxifyCompat';\n\n// @ts-ignore\ncompatObj.app = app;\n\nexport const compat = proxifyCompat(compatObj, 'forum');\n"],"names":["Array","prototype","flat","depth","reduce","call","this","acc","val","concat","isArray","$","Affix","element","options","extend","DEFAULTS","target","document","find","$target","on","proxy","checkPosition","checkPositionWithEventLoop","$element","affixed","unpin","pinnedOffset","Plugin","option","each","$this","data","VERSION","RESET","offset","window","getState","scrollHeight","height","offsetTop","offsetBottom","scrollTop","position","targetHeight","top","initializing","colliderTop","getPinnedOffset","removeClass","addClass","setTimeout","is","bottom","Math","max","body","affix","css","affixType","e","Event","trigger","isDefaultPrevented","replace","old","fn","Constructor","noConflict","$spy","jQuery","toggle","Dropdown","getParent","selector","attr","test","$parent","length","parent","clearMenus","which","remove","relatedTarget","hasClass","type","tagName","contains","isActive","documentElement","closest","createElement","insertAfter","toggleClass","keydown","preventDefault","stopPropagation","$items","index","eq","dropdown","DISALLOWED_ATTRIBUTES","uriAttrs","SAFE_URL_PATTERN","DATA_URL_PATTERN","allowedAttribute","allowedAttributeList","attrName","nodeName","toLowerCase","inArray","Boolean","nodeValue","match","regExp","filter","value","RegExp","i","l","sanitizeHtml","unsafeHtml","whiteList","sanitizeFn","implementation","createHTMLDocument","createdDocument","innerHTML","whitelistKeys","map","el","elements","len","elName","attributeList","attributes","whitelistedAttributes","j","len2","removeAttribute","parentNode","removeChild","Tooltip","enabled","timeout","hoverState","inState","init","TRANSITION_DURATION","animation","placement","template","title","delay","html","container","viewport","padding","sanitize","a","area","b","br","col","code","div","em","hr","h1","h2","h3","h4","h5","h6","img","li","ol","p","pre","s","small","span","sub","sup","strong","u","ul","getOptions","$viewport","isFunction","click","hover","focus","constructor","Error","triggers","split","eventIn","eventOut","enter","leave","_options","fixTitle","getDefaults","dataAttributes","dataAttr","hasOwnProperty","show","hide","getDelegateOptions","defaults","key","obj","self","currentTarget","tip","clearTimeout","isInStateTrue","hasContent","inDom","ownerDocument","that","$tip","tipId","getUID","setContent","autoToken","autoPlace","detach","left","display","appendTo","pos","getPosition","actualWidth","offsetWidth","actualHeight","offsetHeight","orgPlacement","viewportDim","right","width","calculatedOffset","getCalculatedOffset","applyPlacement","complete","prevHoverState","support","transition","one","emulateTransitionEnd","marginTop","parseInt","marginLeft","isNaN","setOffset","using","props","round","delta","getViewportAdjustedDelta","isVertical","arrowDelta","arrowOffsetPosition","replaceArrow","dimension","arrow","getTitle","text","callback","removeAttr","$e","isBody","elRect","getBoundingClientRect","isSvg","SVGElement","elOffset","scroll","outerDims","viewportPadding","viewportDimensions","topEdgeOffset","bottomEdgeOffset","leftEdgeOffset","rightEdgeOffset","o","prefix","random","getElementById","$arrow","enable","disable","toggleEnabled","destroy","off","removeData","tooltip","duration","called","$el","end","transEndEventNames","WebkitTransition","MozTransition","OTransition","name","undefined","style","transitionEnd","event","special","bsTransitionEnd","bindType","delegateType","handle","handleObj","handler","apply","arguments","CanvasImage","canvas","context","getContext","appendChild","drawImage","clear","clearRect","update","putImageData","getPixelCount","getImageData","removeCanvas","ColorThief","getColor","getPalette","c","d","f","g","k","m","n","push","MMCQ","quantize","palette","pv","slice","naturalOrder","sum","sort","peek","pop","size","debug","h","r1","r2","g1","g2","b1","b2","histo","vboxes","vbox","count","volume","forEach","copy","min","_volume","_count_set","_count","avg","_avg","gval","bval","color","nearest","sqrt","pow","forcebw","module","exports","r","y","M","weekdays","months","ordinal","t","String","join","v","z","utcOffset","abs","floor","date","year","month","clone","add","ceil","w","D","ms","Q","_","S","args","O","locale","$L","utc","$u","x","$x","$offset","parse","$d","Date","NaN","substring","UTC","$y","getFullYear","$M","getMonth","$D","getDate","$W","getDay","$H","getHours","$m","getMinutes","$s","getSeconds","$ms","getMilliseconds","$utils","isValid","toString","isSame","startOf","endOf","isAfter","isBefore","$g","set","unix","valueOf","getTime","toDate","$locale","weekStart","$set","daysInMonth","get","Number","subtract","format","invalidDate","meridiem","YY","YYYY","MM","MMM","monthsShort","MMMM","DD","dd","weekdaysMin","ddd","weekdaysShort","dddd","H","HH","hh","A","mm","ss","SSS","Z","getTimezoneOffset","diff","toJSON","toISOString","toUTCString","T","$i","isDayjs","en","Ls","LTS","LT","L","LL","LLL","LLLL","formats","toUpperCase","future","past","yy","fromToBase","relativeTime","thresholds","rounding","to","from","toNow","fromNow","globalThis","Function","global","keyHandler","keys","origHandler","hotkeys","filterInputAcceptingElements","textInputTypes","filterContentEditable","filterTextInputs","textAcceptingInputTypes","specialKeys","character","fromCharCode","modif","possible","specialKey","metaKey","ctrlKey","indexOf","shiftNums","version","factory","noGlobal","arr","getProto","Object","getPrototypeOf","array","class2type","hasOwn","fnToString","ObjectFunctionString","nodeType","item","isWindow","preservedScriptAttributes","src","nonce","noModule","DOMEval","node","doc","script","getAttribute","setAttribute","head","toType","isArrayLike","jquery","toArray","num","pushStack","elems","ret","merge","prevObject","elem","first","last","even","grep","_elem","odd","splice","copyIsArray","deep","isPlainObject","expando","isReady","error","msg","noop","proto","Ctor","isEmptyObject","globalEval","makeArray","results","second","invert","matches","callbackExpect","arg","guid","Symbol","iterator","_i","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","nonnativeSelectorCache","sortOrder","pushNative","list","booleans","whitespace","identifier","pseudos","rwhitespace","rtrim","rcomma","rcombinators","rdescend","rpseudo","ridentifier","matchExpr","rhtml","rinputs","rheader","rnative","rquickExpr","rsibling","runescape","funescape","escape","nonHex","high","rcssescape","fcssescape","ch","asCodePoint","charCodeAt","unloadHandler","inDisabledFieldset","addCombinator","disabled","dir","next","childNodes","els","seed","nid","groups","newSelector","newContext","exec","id","getElementsByTagName","getElementsByClassName","qsa","testContext","scope","toSelector","querySelectorAll","qsaError","cache","cacheLength","shift","markFunction","assert","addHandle","attrs","attrHandle","siblingCheck","cur","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createDisabledPseudo","isDisabled","createPositionalPseudo","argument","matchIndexes","namespace","namespaceURI","hasCompare","subWindow","defaultView","addEventListener","attachEvent","className","createComment","getById","getElementsByName","attrId","getAttributeNode","tag","tmp","input","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","specified","sel","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","selectors","createPseudo","relative","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","_argument","simple","forward","ofType","_context","xml","uniqueCache","outerCache","nodeIndex","start","useCache","lastChild","uniqueID","pseudo","setFilters","idx","matched","matcher","unmatched","lang","elemLang","hash","location","activeElement","hasFocus","href","tabIndex","checked","selected","selectedIndex","_matchIndexes","radio","checkbox","file","password","image","submit","reset","tokens","combinator","base","skip","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","contexts","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","filters","parseOnly","soFar","preFilters","cached","setMatchers","elementMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","matcherFromGroupMatchers","token","compiled","_name","defaultValue","unique","isXMLDoc","escapeSelector","until","truncate","siblings","rneedsContext","needsContext","rsingleTag","winnow","qualifier","not","rootjQuery","root","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","prev","sibling","has","targets","prevAll","addBack","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","content","reverse","rnothtmlwhite","Identity","Thrower","ex","adoptValue","resolve","reject","noValue","method","promise","fail","then","Callbacks","object","flag","createOptions","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","empty","lock","fireWith","Deferred","func","tuples","state","always","deferred","pipe","fns","newDefer","tuple","returned","progress","notify","onFulfilled","onRejected","onProgress","maxDepth","mightThrow","TypeError","notifyWith","resolveWith","process","exceptionHook","stackTrace","rejectWith","getStackHook","stateString","when","singleValue","remaining","resolveContexts","resolveValues","primary","updateFunc","rerrorNames","stack","console","warn","message","readyException","readyList","completed","removeEventListener","readyWait","wait","readyState","doScroll","access","chainable","emptyGet","raw","bulk","_key","rmsPrefix","rdashAlpha","fcamelCase","_all","letter","camelCase","string","acceptData","owner","Data","uid","defineProperty","configurable","prop","hasData","dataPriv","dataUser","rbrace","rmultiDash","JSON","getData","_data","_removeData","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","defer","pnum","source","rcssNum","cssExpand","isAttached","composed","getRootNode","isHiddenWithinTree","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","initial","unit","cssNumber","initialInUnit","defaultDisplayMap","getDefaultDisplay","showHide","values","rcheckableType","rtagName","rscriptType","createDocumentFragment","checkClone","cloneNode","noCloneChecked","wrapMap","thead","tr","td","_default","getAll","setGlobalEval","refElements","tbody","tfoot","colgroup","caption","th","optgroup","buildFragment","scripts","selection","ignored","wrap","attached","fragment","nodes","htmlPrefilter","createTextNode","rtypenamespace","returnTrue","returnFalse","expectSync","err","safeActiveElement","types","origFn","leverageNative","notAsync","saved","isTrigger","stopImmediatePropagation","handleObjIn","eventHandle","events","handlers","namespaces","origType","elemData","create","triggered","dispatch","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","nativeEvent","handlerQueue","fix","delegateTarget","preDispatch","isPropagationStopped","isImmediatePropagationStopped","rnamespace","postDispatch","matchedHandlers","matchedSelectors","button","addProp","hook","enumerable","originalEvent","writable","load","noBubble","beforeunload","returnValue","defaultPrevented","timeStamp","now","isSimulated","altKey","bubbles","cancelable","changedTouches","detail","eventPhase","pageX","pageY","shiftKey","view","charCode","keyCode","buttons","clientX","clientY","offsetX","offsetY","pointerId","pointerType","screenX","screenY","targetTouches","toElement","touches","blur","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","rnoInnerhtml","rchecked","rcleanScript","manipulationTarget","disableScript","restoreScript","cloneCopyEvent","dest","udataOld","udataCur","fixInput","domManip","collection","hasScripts","iNoClone","valueIsFunction","_evalUrl","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","append","prepend","insertBefore","before","after","replaceWith","replaceChild","prependTo","replaceAll","original","insert","rnumnonpx","rcustomProp","getStyles","opener","getComputedStyle","swap","rboxStyle","rtrimCSS","curCSS","computed","minWidth","maxWidth","isCustomProp","getPropertyValue","pixelBoxStyles","addGetHookIf","conditionFn","hookFn","computeStyleTests","cssText","divStyle","pixelPositionVal","reliableMarginLeftVal","roundPixelMeasures","pixelBoxStylesVal","boxSizingReliableVal","scrollboxSizeVal","measure","parseFloat","reliableTrDimensionsVal","backgroundClip","clearCloneStyle","boxSizingReliable","pixelPosition","reliableMarginLeft","scrollboxSize","reliableTrDimensions","table","trChild","trStyle","borderTopWidth","borderBottomWidth","cssPrefixes","emptyStyle","vendorProps","finalPropName","cssProps","capName","vendorPropName","rdisplayswap","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","setPositiveNumber","boxModelAdjustment","box","isBorderBox","styles","computedVal","extra","getWidthOrHeight","valueIsBorderBox","offsetProp","getClientRects","Tween","easing","cssHooks","opacity","origName","setProperty","isFinite","scrollboxSizeBuggy","margin","border","suffix","expand","expanded","parts","propHooks","run","percent","eased","step","fx","scrollLeft","linear","swing","cos","PI","fxNow","inProgress","rfxtypes","rrun","schedule","hidden","requestAnimationFrame","interval","tick","createFxNow","genFx","includeWidth","createTween","Animation","tweeners","properties","stopped","prefilters","currentTime","startTime","tweens","opts","specialEasing","originalProperties","originalOptions","gotoEnd","propFilter","bind","timer","anim","tweener","oldfire","propTween","restoreDisplay","isBox","dataShow","unqueued","overflow","overflowX","overflowY","prefilter","speed","opt","speeds","fadeTo","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","slow","fast","time","checkOn","optSelected","radioValue","boolHook","nType","attrHooks","bool","attrNames","getter","lowercaseName","rfocusable","rclickable","stripAndCollapse","getClass","classesToArray","removeProp","propFix","tabindex","classNames","curValue","finalValue","stateVal","isValidValue","rreturn","valHooks","optionSet","focusin","rfocusMorph","stopPropagationCallback","onlyHandlers","bubbleType","ontype","lastElement","eventPath","parentWindow","simulate","triggerHandler","attaches","rquery","parseXML","parserErrorElem","DOMParser","parseFromString","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","traditional","param","valueOrFunction","encodeURIComponent","serialize","serializeArray","r20","rhash","rantiCache","rheaders","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","active","lastModified","etag","url","isLocal","protocol","processData","async","contentType","accepts","json","responseFields","converters","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","urlAnchor","fireGlobals","uncached","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getResponseHeader","getAllResponseHeaders","setRequestHeader","overrideMimeType","mimeType","status","abort","statusText","finalText","crossDomain","host","ifModified","headers","beforeSend","success","send","nativeStatusText","responses","isSuccess","response","modified","ct","finalDataType","firstDataType","ajaxHandleResponses","conv2","current","conv","dataFilter","ajaxConvert","getJSON","getScript","wrapAll","firstElementChild","wrapInner","htmlIsFunction","unwrap","visible","xhr","XMLHttpRequest","xhrSuccessStatus","xhrSupported","cors","errorCallback","open","username","xhrFields","onload","onerror","onabort","ontimeout","onreadystatechange","responseType","responseText","binary","scriptAttrs","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","keepScripts","parsed","params","animated","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","curElem","rect","win","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","defaultExtra","funcName","unbind","delegate","undelegate","fnOver","fnOut","holdReady","hold","parseJSON","isNumeric","trim","_jQuery","_$","Vnode","require","render","subscriptions","rendering","pending","sync","redraw","mount","component","Promise","buildPathname","parsePathname","compileTemplate","assign","sentinel","$window","mountRedraw","fireAsync","setPath","path","history","replaceState","route","pushState","currentPath","lastUpdate","currentResolver","SKIP","defaultRoute","routes","onremove","SyntaxError","callAsync","setImmediate","scheduled","defaultData","some","ReferenceError","resolveRoute","search","pathname","decodeURIComponent","loop","payload","matchedRoute","localComp","comp","onmatch","onbeforeupdate","oncreate","vnode","Link","onclick","oninit","onupdate","onbeforeremove","child","handleEvent","hyperscript","trust","request","parseQueryString","buildQueryString","PromisePolyfill","queryIndex","hashIndex","queryEnd","pathEnd","query","resolved","variadic","newQueryIndex","newHashIndex","newQueryEnd","newPathEnd","querystring","templateData","templateKeys","regexp","executor","resolvers","rejectors","resolveCurrent","rejectCurrent","instance","_instance","shouldAbsorb","execute","retry","executeOnce","runs","onRejection","resolveNext","rejectNext","reason","all","total","consume","race","destructure","charAt","entries","counters","entry","levels","cursor","level","nextLevel","isNumber","desc","getOwnPropertyDescriptor","hyperscriptVnode","normalizeChildren","selectorParser","selectorCache","isEmpty","compileSelector","classes","attrValue","execSelector","newAttrs","currentRedraw","$doc","nameSpace","svg","math","getNameSpace","xmlns","checkState","callHook","createNodes","vnodes","ns","createNode","initLifecycle","dom","insertNode","createText","createHTML","domSize","createFragment","createElementNS","setAttr","setAttrs","maybeSetContentEditable","normalized","setLateSelectAttrs","$$reentrantLock$$","normalize","initComponent","createComponent","possibleParents","updateNodes","removeNodes","isOldKeyed","isKeyed","oldStart","oe","ve","topSibling","oldEnd","updateNode","getNextSibling","moveNodes","lisIndices","originalNextSibling","vnodesLength","oldIndices","getKeyMap","oldIndex","il","lisTemp","makeLisIndices","commonLength","removeNode","oldTag","force","shouldNotUpdate","updateLifecycle","updateText","removeHTML","updateHTML","updateFragment","updateAttrs","updateElement","updateComponent","frag","moveChildToFrag","contenteditable","contentEditable","stateResult","attrsResult","mask","reallyRemove","isLifecycleMethod","isFormAttribute","updateEvent","setAttributeNS","updateStyle","hasPropertyKey","nsLastIndex","uppercaseRegex","capital","normalizeKey","removeProperty","EventDict","ev","prevRedraw","oncompletion","callbackCount","PromiseProxy","makeRequest","background","hasHeader","__proto__","replacedAbort","assumeJSON","FormData","extract","aborted","user","deserialize","withCredentials","config","stringify","callbackKey","Stream","lift","streams","scan","origin","stream","combine","scanMerge","changed","warnedHalt","dependentStreams","dependentFns","_changing","_state","createEnd","_parents","_unregisterChild","_map","ignoreInitial","s1","s2","childIndex","every","mappers","endStream","mapper","log","maxInt","regexPunycode","regexNonASCII","regexSeparators","errors","stringFromCharCode","RangeError","mapDomain","encoded","ucs2decode","output","counter","ucs2encode","fromCodePoint","digitToBasic","digit","adapt","numPoints","firstTime","baseMinusTMin","decode","codePoint","inputLength","bias","basic","lastIndexOf","oldi","baseMinusT","out","encode","basicLength","handledCPCount","handledCPCountPlusOne","q","qMinusT","toUnicode","toASCII","isBrowser","isFirefox","mozInnerScreenX","getCaretCoordinates","querySelector","currentStyle","isInput","whiteSpace","wordWrap","lineHeight","coordinates","offsetLeft","backgroundColor","___EXPOSE_LOADER_IMPORT___","___EXPOSE_LOADER_GLOBAL_THIS___","arr2","__esModule","_defineProperties","descriptor","protoProps","staticProps","_getPrototypeOf","setPrototypeOf","subClass","superClass","_s","_e","_arr","_n","_d","_typeof","assertThisInitialized","_regeneratorRuntime","Op","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","Context","makeInvokeMethod","tryCatch","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","NativeIteratorPrototype","Gp","defineIteratorMethods","_invoke","AsyncIterator","PromiseImpl","invoke","record","__await","unwrapped","previousPromise","callInvokeWithMethodAndArg","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","info","resultName","nextLoc","pushTryEntry","locs","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","iterable","iteratorMethod","doneResult","displayName","isGeneratorFunction","genFun","ctor","mark","awrap","iter","skipTempReset","rootRecord","rval","exception","loc","caught","hasCatch","hasFinally","finallyEntry","thrown","delegateYield","_setPrototypeOf","arrayWithHoles","iterableToArrayLimit","unsupportedIterableToArray","nonIterableRest","arrayLikeToArray","minLen","runtime","regeneratorRuntime","accidentalStrictMode","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","definition","bidi","multi","onchange","selectedOptions","oninput","ctrl","patchMithril","defaultMithril","modifiedMithril","Proxy","Reflect","app","dayjs","localizedFormat","tooltipGen","_assertThisInitialized","_inheritsLoose","_extends","setRouteWithForcedRefresh","newOptions","caller","includes","History","getCurrent","getPrevious","secondTop","canGoBack","back","home","backUrl","Pane","pinnedKey","pinned","localStorage","getItem","showing","hideTimeout","onmouseleave","togglePinned","setItem","Component","componentAttrs","initAttrs","subclassOf","B","PageState","Page","bodyClass","scrollTopOnCreate","useBrowserScrollRestoration","previous","routeName","drawer","modal","close","scrollRestoration","_createClass","isObject","Item","priority","ItemList","_items","getPriority","setPriority","otherList","keepPrimitives","createItemContentProxy","toObject","itemName","property","receiver","Separator","isListItem","isVnode","isSeparator","listItems","rawItems","customTag","items","prevItem","newItems","Tag","itemClassName","classList","DiscussionHero","discussion","badges","_objectWithoutPropertiesLoose","excluded","sourceKeys","SluggingMode","external","avatar","loading","hasTitle","avatarUrl","alt","slug","mode","ALPHANUMERIC","UTF8","getPlainContent","removeSelectors","innerText","ucfirst","substr","camelCaseToSnakeCase","str","generateRandomString","Uint8Array","crypto","getRandomValues","dec","padStart","highlight","phrase","highlighted","icon","fontClass","extractText","vdom","humanTime","translator","trans","abbreviateNumber","number","toFixed","buttonClassName","menuClassName","label","caretIcon","accessibleToggleLabel","renderItems","lazyDraw","getButton","getMenu","onshow","$menu","isRight","windowSrollTop","windowHeight","windowScrollLeft","windowWidth","onhide","getButtonContent","datetime","full","ago","humanTimeUtil","pubdate","TerminalPost","lastPost","replyCount","SubtreeRetainer","callbacks","needsRebuild","invalidate","LoadingIndicator","containerClassName","completeClassName","completeContainerClassName","role","containerAttrs","ConfirmDocumentUnload","boundHandler","fireDebugWarning","forum","attribute","fireDeprecationWarning","githubId","removedFrom","repo","Button","ariaLabel","iconName","_class","buttonAttrs","hasIcon","canInsertText","insertText","textarea","selectionStart","selectionEnd","originalSelectionStart","execCommand","endsWith","dispatchEvent","CustomEvent","setSelectionRange","BasicEditorDriver","build","placeholder","callInputListeners","inputListeners","listener","onkeyup","keyHandlers","onsubmit","moveCursorTo","getSelectionRange","getLastNChars","insertAtCursor","insertAt","insertBetween","cursorPos","replaceBeforeCursor","relCoords","childDomNode","oldText","oldVisibility","shouldRecreateTooltip","shouldChangeTooltipVisibility","tooltipVisible","showOnFocus","ignoreTitleWarning","realText","getRealText","checkDomNodeChanged","recreateTooltip","createTooltip","updateVisibility","domNode","isSameNode","TextEditor","controlItems","toolbarItems","composer","editor","buildEditor","newDisabled","buildEditorParams","submitLabel","preview","ComposerBody","confirmExit","preventClosingWhen","hasChanges","fields","originalContent","headerItems","jumpToPreview","loaded","minimizeComposerIfFullScreen","ReplyComposer","relationships","save","post","goToNumber","alert","viewButton","controls","Alert","dismissible","ondismiss","dismissControl","iconHelper","Modal","alertAttrs","missingMethods","animateShow","onready","dismissibleOptions","viaCloseButton","animateHide","pointer","isDismissible","isDismissibleViaCloseButton","viaEscKey","isDismissibleViaEscKey","viaBackdropClick","isDismissibleViaBackdropClick","ForgotPasswordModal","email","emailLabel","requestParams","errorHandler","LogInButtons","SignUpModal","footer","isProvided","field","provided","usernameLabel","passwordLabel","autocomplete","logIn","identification","LogInModal","submitData","reload","authData","remember","identificationLabel","forgotPassword","signUp","loginParams","RenameDiscussionModal","currentTitle","newTitle","section","userControls","DiscussionPage","canReply","replyAction","moderationControls","canRename","renameAction","destructiveControls","isHidden","canHide","restoreAction","canDelete","deleteAction","hideAction","goToLast","forceRefresh","pushData","hiddenAt","hiddenUser","confirm","slidable","$underneathLeft","$underneathRight","startX","startY","couldBeSliding","isSliding","animatePos","newPos","newX","newY","$underneath","side","activate","specialChars","escapeRegExp","DiscussionListItem","subtree","highlightRegExp","freshness","elementAttrs","Slidable","viewItems","DiscussionControls","controlsView","slidableUnderneathView","contentView","isUnread","markAsRead","isRead","unread","read","contentItems","authorAvatarView","badgesView","mainView","replyCountItem","createdAt","jumpTo","getJumpTo","mainItems","infoItems","mostRelevantPost","lastPostNumber","lastReadPostNumber","slidableInstance","showFirstPost","showRepliesCount","firstPost","excerpt","contentPlain","unreadCount","Placeholder","DiscussionList","getParams","isLoading","isInitialLoading","isLoadingNext","hasNext","loadNext","pageSize","isSearchResults","getPages","pg","pageNum","itemNum","hotEdge","DiscussionListPane","hasItems","enoughSpace","$list","pane","$discussion","listTop","listBottom","outerHeight","discussionTop","discussionBottom","ScrollListener","ticking","passive","LoadingPost","ComposerPostPreview","surround","updatePreview","isVisible","s9e","TextFormatter","updateInterval","setInterval","clearInterval","ReplyPlaceholder","anchorPreview","anchorToBottom","PostStream","scrollListener","onscroll","lastTime","viewingEnd","posts","postIds","postFadeIn","visibleStart","PostComponent","dt","period","postStreamElement","afterFirstPostItems","visibleEnd","endItems","pagesLoading","triggerScroll","calculatePositionTimeout","needsScroll","targetPost","scrollToNumber","animateScroll","scrollToIndex","reply","paused","updateScrubber","loadPostsIfNeeded","calculatePosition","getMarginTop","viewportHeight","viewportTop","$item","loadPrevious","indexFromViewPort","visibleTop","visiblePost","description","startNumber","endNumber","onPositionChange","headerId","scrollToItem","flashItem","$container","itemTop","itemBottom","scrollBottom","updateScrubberHeight","forceUpdateScrubber","loadPromise","itemOffset","$placeholder","formatNumber","Intl","NumberFormat","PostStreamScrubber","updateScrubberValues","fromScroll","forceHeightChange","viewing","formattedCount","unreadPercent","styleUnread","newStyle","oldStyle","goToFirst","firstPostLabel","unreadLabel","lastPostLabel","onresize","resize","dragging","mouseStart","indexStart","onmousedown","onmousemove","onmouseup","percentPerPost","$scrubber","sanitizeIndex","heights","adjustingHeight","animationPromises","part","$part","scrubber","scrollbar","deltaIndex","newIndex","intIndex","goToIndex","$scrollbar","offsetPercent","offsetIndex","minPercentVisible","percentPerVisiblePost","SplitDropdown","getFirstChild","noTrailing","debounceMode","timeoutID","cancelled","lastExec","clearExistingTimeout","wrapper","arguments_","elapsed","cancel","atBegin","throttle","anchorScroll","relativeScroll","PostStreamState","includedPosts","loadPageTimeouts","_loadNext","_loadPrevious","loadRange","noAnimation","resultPromise","loadNearNumber","loadNearIndex","page","near","loadCount","twoPagesAway","loadPage","backwards","loadIds","canEdit","newPosts","pageContent","loadingItems","sidebar","sidebarItems","hero","mainContent","positionChanged","preloadedDiscussion","bySlug","included","discussionId","rawNearParam","nearParam","HeaderPrimary","LinkButton","SessionDropdown","SelectDropdown","activeChild","defaultLabel","Model","store","exists","getIdentifier","relationship","pushAttributes","model","oldData","copyData","meta","apiEndpoint","pushPayload","rawRelationship","transform","hasOne","relationshipData","hasMany","transformDate","computedValue","compute","dependentValues","recompute","isDark","hexcolor","hexnumbers","textContrastClass","Keys","Badge","iconChild","badgeAttrs","badgeNode","Discussion","lastPostedAt","lastPostedUser","commentCount","lastReadAt","session","removePost","markedAllAsReadAt","link","NotificationList","markAllAsRead","deleteAll","discussions","notification","subject","notifications","group","NotificationComponent","$notifications","$scrollParent","inPanel","boundScrollHandler","scrollHandler","scrollParent","atBottom","clientHeight","NotificationsDropdown","newNotifications","getNewCount","getUnreadCount","menuClick","goToRoute","KeyboardNavigatable","Map","whenCallback","onUp","ArrowUp","onDown","ArrowDown","onSelect","ignoreTabPress","Tab","Enter","onTab","onCancel","Escape","onRemove","Backspace","KeyboardEvent","HTMLInputElement","bindTo","navigate","keyCallback","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","DiscussionsSearchItem","discussionTitle","mostRelevantPostContent","DiscussionsSearchSource","queryString","setQueryString","limit","include","queryMutators","UsersSearchResults","localeCompare","Search","searchState","sources","loadingSources","navigator","searchTimeout","updateMaxHeightHandler","currentSearch","getInitialSearch","sourceItems","searchLabel","shouldShowResults","getValue","shouldShowClearButton","focused","setValue","onfocus","onblur","updateMaxHeight","maxHeight","innerHeight","setIndex","getCurrentNumericIndex","selectableItems","$input","selectResult","isCached","MIN_SEARCH_LEN","selectedUrl","UsersSearchSource","$dropdown","fixedIndex","dropdownScroll","dropdownTop","dropdownBottom","HeaderSecondary","locales","cookie","ComposerButton","ComposerState","Position","HIDDEN","componentClass","preventExit","onExit","NORMAL","FULLSCREEN","minimize","MINIMIZED","fullScreen","exitFullScreen","bodyMatches","isFullScreen","composingReplyTo","minimumHeight","maximumHeight","computedHeight","Composer","prevPosition","normal","minimized","showIfMinimized","configHandle","updateHeight","animatePositionChange","initializeHeight","mousedown","heightStart","deltaPixels","changeHeight","updateBodyPadding","$flexible","headerHeight","paddingBottom","footerHeight","animateHeightChange","$composer","oldHeight","newHeight","showBackdrop","$backdrop","hideBackdrop","scrollElement","topOfViewport","defaultHeight","Notification","fromUser","unreadNotificationCount","DiscussionRenamedNotification","postNumber","EditPostComposer","editedContent","editAction","Post","PostControls","footerItems","actionItems","$actions","$controls","existing","GroupBadge","nameSingular","Group","namePlural","ADMINISTRATOR_ID","GUEST_ID","MEMBER_ID","EditUserModal","isEmailConfirmed","setPassword","userGroups","canEditCredentials","nonAdminEditingAdmin","userIsAdmin","canEditGroups","AffixedSidebar","boundOnresize","$sidebar","$header","$footer","$affixElement","UserPage","UserCard","editable","controlsButtonClassName","loadUser","lowercaseUsername","joinTime","navItems","isActor","discussionCount","showDeletionAlert","AvatarEditor","isDraggedOver","quickUpload","ondragover","enableDragover","ondragenter","ondragleave","disableDragover","ondragend","ondrop","dropUpload","openPicker","upload","dataTransfer","files","failure","avatarColor","UserControls","lastSeenAt","online","isOnline","userOnline","PostUser","cardVisible","showCard","hideCard","oncardshow","oncardhide","fullTime","IPAddress","ip","PostMeta","getPermalink","selectPermalink","metaItems","touch","permalink","ipAddress","PostEdited","editedUser","editedInfo","editedAt","CommentPost","revealContent","isEditing","bodyItems","contentHtml","refreshContent","renderFailed","isEdited","editing","toggleContent","EventPost","usernameHelper","descriptionData","descriptionKey","DiscussionRenamedPost","renamed","oldTitle","new","LOCAL_STORAGE_KEY","WelcomeHero","DiscussionComposer","titlePlaceholder","onkeydown","IndexPage","lastDiscussion","setTitle","oldHeroHeight","heroHeight","indexTop","indexBottom","discussionOffset","canStartDiscussion","newDiscussionAction","sortMap","sortOptions","sortId","providesInitialSearch","PostsUserPage","moreResults","loadLimit","loadMore","refresh","loadResults","parseResults","author","PaginatedListState","pages","initialLoading","loadingPrev","loadingNext","loadPrev","getLocation","getPrevPageNumber","getNextPageNumber","links","hasPrev","reqParams","refreshParams","newParams","paramsChanged","isLoadingPrev","getAllItems","EventEmitter","emit","globalEventEmitter","DiscussionListState","extraDiscussions","eventEmitter","deleteDiscussion","preloadedDiscussions","relevance","latest","newest","oldest","removeDiscussion","addDiscussion","DiscussionsUserPage","cb","Checkbox","withAttr","getDisplay","Switch","FieldSet","NotificationGrid","methods","notificationMethods","notificationTypes","preferences","toggleMethod","toggleType","preferenceKey","ChangePasswordModal","requestBody","ChangeEmailModal","requestAttributes","SettingsPage","discloseOnlineLoading","settingsItems","sectionItems","accountItems","notificationsItems","privacyItems","discloseOnline","savePreferences","NotificationsPage","DefaultResolver","makeKey","makeAttrs","requestedPath","DiscussionPageResolver","canonicalizeDiscussionSlug","scrollToPostNumber","LabelValue","AccessTokensList","showingTokens","tokenView","isCurrent","tokenViewItems","tokenInfoItems","tokenActionItems","device","generateTokenTitle","lastActivityAt","lastIpAddress","deleteKey","developer_token","displayKey","revokeButton","revoke","ondelete","tokenValueDisplay","obfuscatedName","fill","NewAccessTokenModal","titleInput","titleLabel","onsuccess","UserSecurityPageState","loadingTerminateSessions","loadingGlobalLogout","hasLoadedTokens","getTokens","setTokens","pushToken","removeToken","getSessionTokens","isSessionToken","getDeveloperTokens","getOtherSessionTokens","hasOtherActiveSessions","removeOtherSessionTokens","UserSecurityPage","routeUsername","loadTokens","developerTokensItems","sessionsItems","globalLogout","hideTokens","terminateAllOthersButton","terminateAllOtherSessions","resolverClass","alertEmailConfirmation","ResendButton","ContainedAlert","candidateSelectors","candidateSelector","NoElement","Element","getCandidates","includeContainer","candidates","getCandidatesIteratively","elementsToCheck","assigned","assignedElements","nestedCandidates","flatten","shadowRoot","getShadowRoot","validShadowRoot","shadowRootFilter","getTabindex","isScope","isContentEditable","sortOrderedTabbables","documentOrder","isZeroArea","isNodeMatchingSelectorFocusable","isHiddenInput","_ref","displayCheck","nodeUnderDetails","parentElement","nodeRootHost","nodeIsAttached","originalNode","rootNode","assignedSlot","isDetailsWithSummary","isDisabledFromFieldset","isNodeMatchingSelectorTabbable","isRadio","radioSet","radioScope","form","queryRadios","CSS","getCheckedRadio","isTabbableRadio","isNonTabbableRadio","isValidShadowRootTabbable","shadowHostNode","sortByOrder","regularTabbables","orderedTabbables","candidateTabindex","sortable","tabbable","isTabbable","focusableCandidateSelector","isFocusable","trapQueue","activeFocusTraps","activateTrap","trap","activeTrap","pause","trapIndex","deactivateTrap","unpause","findIndex","valueOrHandler","getActualTarget","composedPath","createFocusTrap","userOptions","returnFocusOnDeactivate","escapeDeactivates","delayInitialFocus","containers","containerGroups","tabbableGroups","nodeFocusedBeforeActivation","mostRecentlyFocusedNode","delayInitialFocusTimer","getOption","configOverrideOptions","optionName","configOptionName","findContainerIndex","tabbableNodes","getNodeForOption","optionValue","getInitialFocusNode","firstTabbableGroup","firstTabbableNode","updateTabbableNodes","tabbableOptions","focusableNodes","lastTabbableNode","nextTabbableNode","nodeIdx","tryFocus","preventScroll","isSelectableInput","getReturnFocusNode","previousActiveElement","checkPointerDown","clickOutsideDeactivates","deactivate","returnFocus","allowOutsideClick","checkFocusIn","targetContained","Document","checkKey","isEscapeEvent","isTabEvent","destinationNode","containerIndex","containerGroup","startOfGroupIndex","destinationGroupIndex","lastOfGroupIndex","checkTab","checkClick","addListeners","capture","removeListeners","activateOptions","onActivate","onPostActivate","checkCanFocusTrap","finishActivation","deactivateOptions","onDeactivate","onPostDeactivate","checkCanReturnFocus","finishDeactivation","updateContainerElements","containerElements","elementsAsArray","_createFocusTrap","hasPassiveEvents","passiveTestOptions","pluralFormatter","isIosDevice","platform","maxTouchPoints","locks","documentListenerAdded","initialClientY","previousBodyOverflowSetting","previousBodyPosition","previousBodyPaddingRight","allowTouchMove","rawEvent","clearAllBodyScrollLocks","targetElement","ontouchstart","ontouchmove","restorePositionSetting","paddingRight","ModalManager","focusTrap","lastSetFocusTrap","modalClosing","keyUpListener","modalList","handlePossibleBackdropClick","backdropShown","ontransitionend","onBackdropTransitionEnd","handleEscPress","isModalOpen","dialogKey","activeDialogElement","_toConsumableArray","_window","scrollY","scrollX","bottomBarHeight","_reserveScrollBarGap","reserveScrollBarGap","scrollBarGap","innerWidth","clientWidth","computedBodyPaddingRight","setOverflowHidden","isTargetElementTotallyScrolled","handleScroll","disableBodyScroll","activeDialogManagerElement","readyCallback","closedCallback","dismissibleState","propertyName","AlertManager","activeAlerts","getActiveAlerts","urgent","dismiss","RequestErrorModal","formattedError","accumulator","memoize","parseCases","isWhitespace","cases","currTermStart","latestTerm","inTerm","caseBody","branchEndIndex","findClosingBracket","fromIndex","char","splitFormattedArgument","block","separator","indexOfDelimiter","tail","keyCounter","OTHER","replaceNumberSign","numBraces","numberValues","keyParam","pluralTypeHandler","intValue","startsWith","keywordPossibilities","resolvedOptions","PluralRules","pluralKeyword","keyword","selectTypeHandler","replaceRichTags","dontUnescapeIndices","onTagClose","segment","currTagIsClosing","currTag","currTagStart","break","endingLocation","findClosingTag","entireTagInSegment","segmentIndex","segmentContainingClosingTag","tagContents","segmentStart","segmentEnd","processedSegment","newSegmentIndex","traverseMessageTags","unEscapeHtml","startIndex","startSegmentIndex","exit","startI","startJ","inTag","instructions","sanitizeValues","recSanitizeArr","defaultRichHandler","RichMessageFormatter","typeHandlers","richHandler","_classCallCheck","_this","cleanedValues","formatted","sym","fakeValues","fromEntries","_ref2","formattedFake","replaceFake","originalTemplateSegmentIndices","MessageFormatter","_defineProperty","blockStartIndex","blockEndIndex","_splitFormattedArgume2","typeHandler","mithrilRichHandler","Translator","translations","formatter","formatterTypeHandlers","setLocale","getLocale","addTranslations","plural","preprocessParameters","parameters","translation","rich","payloadIsPlural","Store","models","pushObject","allowUnregistered","curr","createRecord","idOrParams","getBy","records","Session","csrfToken","login","logout","Drawer","appElement","resizeHandler","isOpen","drawerAvailableMediaQuery","matchMedia","removeListener","$drawer","addListener","mapRoutes","basePath","resolver","RequestError","updateHumanTimes","liveHumanTimes","override","newMethod","Forum","stringToColor","rgb","hsvToRgb","User","isAdmin","newNotificationCount","calculateAvatarColor","Image","colorThief","crossOrigin","newPreferences","ModalManagerState","stackModal","invalidModalWarning","AlertManagerState","alertId","arg1","arg2","arg3","fireApplicationError","userTitle","consoleTitle","groupEnd","alerts","AccessToken","userId","Application","initializers","forums","users","booted","refs","fontawesome","_title","_titleCount","requestErrorAlert","initialRoute","boot","caughtInitializationErrors","initializer","extension","resources","bootExtensions","extensions","Infinity","appEl","appHeaderEl","preloadedApiDocument","apiDocument","screen","updateTitle","setTitleCount","titleCount","onHomepage","pageTitle","forumName","pageNumber","parser","transformRequestOptions","flarumOptions","modifyText","tmpOptions","originalExtract","requestErrorCatch","customErrorHandler","formattedErrors","decodeURI","requestWasCrossOrigin","isDebug","showDebug","requestErrorDefaultHandler","URL","baseURI","Navigation","onmouseenter","getBackButton","getPaneButton","getDrawerButton","NotificationListState","SearchState","cachedSearches","Set","GlobalSearchState","initialValueSet","currPageProvidesSearch","intializeValue","clearInitialSearch","stickyParams","changeSort","isSafariMobile","vendor","userAgent","ForumApplication","notificationComponents","discussionRenamed","postComponents","comment","makeRouteHelpers","defaultAction","viewingDiscussion","authenticationComplete","loggedIn","ActualModel","PostTypes","Routes","helpers","helper","deprecatedNotice","deprecationIssueId","getHandlers","blockPrefix","blockSuffix","multiline","replaceNext","prefixSpace","scanFor","surroundWithNewlines","orderedList","unorderedList","trimFirst","isMultipleLines","repeat","newlinesToSurroundSelectedText","newlinesToAppend","newlinesToPrepend","beforeSelection","afterSelection","breaksBefore","breaksAfter","newlinesBeforeSelection","newlinesAfterSelection","undoOrderedListStyle","lines","orderedListRegex","shouldUndoOrderedList","line","processed","undoUnorderedListStyle","shouldUndoUnorderedList","makePrefix","proxifyCompat","compat","strings","regex","fileExt","Select","wrapperAttrs","wrapperClassName","wrapperClass","domAttrs","ColorPreviewInput","TextEditorButton","originalView","tooltipText","extenders","evented","Parent","Mixed","mixins","styleArgs","noInitialSelection","lineLength","expandSelectionToLine","selectedText","undoResultOpositeList","undoResult","pristineText","clearExistingListStyle","prefixedLines","totalPrefixLength","previousValue","_currentValue","currentIndex","totalPrefixLengthOpositeList","listStyle","prefixToUse","suffixToUse","multilineStyle","originalSelectionEnd","wordSelectionStart","breakpoint","wordSelectionEnd","expandedSelectionStart","expandedSelectionEnd","beginsWithPrefix","endsWithSuffix","expandSelectedText","hasReplaceNext","ref","replacementText","whitespaceEdges","leadingWhitespace","trailingWhitespace","blockStyle","EditorDriverInterface","ThrottleDebounce","FocusTrap","Fragment","originalOnCreate","humanTimeHelper","third","LogInButton","PostPreview","compatObj"],"sourceRoot":""}
\ No newline at end of file

From 92b2b4aad11a756bc225441b1482928002c436cc Mon Sep 17 00:00:00 2001
From: Davide Iadeluca <146922689+DavideIadeluca@users.noreply.github.com>
Date: Tue, 22 Oct 2024 11:14:06 +0200
Subject: [PATCH 6/7] [1.x] chore: resolve node deprecation warnings in
 workflows (#4081)

* chore: update frontend workflow

Backport of https://github.com/flarum/framework/commit/356f97641ed8d087dd1252e4cc2180484d8590cd

* chore: bump default node version and `flarum/action-build`

* fix

* dummy commit
---
 .github/workflows/REUSABLE_frontend.yml | 9 +++++----
 js-packages/tsconfig/tsconfig.json      | 1 +
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/REUSABLE_frontend.yml b/.github/workflows/REUSABLE_frontend.yml
index f6a9d7d1bb..dbb5988fdb 100644
--- a/.github/workflows/REUSABLE_frontend.yml
+++ b/.github/workflows/REUSABLE_frontend.yml
@@ -74,7 +74,7 @@ on:
         description: The node version to use for the workflow.
         type: number
         required: false
-        default: 16
+        default: 20
 
       js_package_manager:
         description: "Enable TypeScript?"
@@ -105,6 +105,7 @@ env:
   ci_script: ${{ inputs.js_package_manager == 'yarn' && 'yarn install --immutable' || 'npm ci' }}
   cache_dependency_path: ${{ inputs.cache_dependency_path || format(inputs.js_package_manager == 'yarn' && '{0}/yarn.lock' || '{0}/package-lock.json', inputs.frontend_directory) }}
   COMPOSER_AUTH: ${{ secrets.composer_auth }}
+  DISABLE_V8_COMPILE_CACHE: 1
 
 jobs:
   build:
@@ -116,10 +117,10 @@ jobs:
 
     steps:
       - name: Check out code
-        uses: actions/checkout@v3
+        uses: actions/checkout@v4
 
       - name: Set up Node
-        uses: actions/setup-node@v3
+        uses: actions/setup-node@v4
         with:
           node-version: ${{ inputs.node_version }}
           cache: ${{ inputs.js_package_manager }}
@@ -142,7 +143,7 @@ jobs:
         working-directory: ${{ inputs.frontend_directory }}
 
       - name: JS Checks & Production Build
-        uses: flarum/action-build@v3
+        uses: flarum/action-build@v4
         with:
           github_token: ${{ secrets.GITHUB_TOKEN }}
           build_script: ${{ inputs.build_script }}
diff --git a/js-packages/tsconfig/tsconfig.json b/js-packages/tsconfig/tsconfig.json
index 92bc9ec883..7ad380af48 100644
--- a/js-packages/tsconfig/tsconfig.json
+++ b/js-packages/tsconfig/tsconfig.json
@@ -1,5 +1,6 @@
 {
   "compilerOptions": {
+    "skipLibCheck": true,
     "allowUmdGlobalAccess": true,
     "sourceMap": true,
     "strict": true,

From 0694651fe94911d921061296311c7e5036f2b4d7 Mon Sep 17 00:00:00 2001
From: flarum-bot <bot@flarum.org>
Date: Tue, 22 Oct 2024 09:18:09 +0000
Subject: [PATCH 7/7] Bundled output for commit
 92b2b4aad11a756bc225441b1482928002c436cc Includes transpiled JS/TS, and
 Typescript declaration files (typings).

[skip ci]
---
 extensions/flags/js/dist-typings/forum/extend.d.ts              | 2 +-
 extensions/package-manager/js/dist-typings/models/Task.d.ts     | 2 +-
 extensions/tags/js/dist-typings/forum/extend.d.ts               | 2 +-
 .../core/js/dist-typings/admin/components/SessionDropdown.d.ts  | 2 +-
 .../core/js/dist-typings/forum/components/SessionDropdown.d.ts  | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/extensions/flags/js/dist-typings/forum/extend.d.ts b/extensions/flags/js/dist-typings/forum/extend.d.ts
index 28e9d3b2fe..25835b4db0 100644
--- a/extensions/flags/js/dist-typings/forum/extend.d.ts
+++ b/extensions/flags/js/dist-typings/forum/extend.d.ts
@@ -1,2 +1,2 @@
-declare const _default: (import("flarum/common/extenders/Model").default | import("flarum/common/extenders/Routes").default | import("flarum/common/extenders/Store").default)[];
+declare const _default: (import("flarum/common/extenders/Routes").default | import("flarum/common/extenders/Store").default | import("flarum/common/extenders/Model").default)[];
 export default _default;
diff --git a/extensions/package-manager/js/dist-typings/models/Task.d.ts b/extensions/package-manager/js/dist-typings/models/Task.d.ts
index 32dee88eb1..19144e6017 100644
--- a/extensions/package-manager/js/dist-typings/models/Task.d.ts
+++ b/extensions/package-manager/js/dist-typings/models/Task.d.ts
@@ -1,7 +1,7 @@
 import Model from 'flarum/common/Model';
 export declare type TaskOperations = 'extension_install' | 'extension_remove' | 'extension_update' | 'update_global' | 'update_minor' | 'update_major' | 'update_check' | 'why_not';
 export default class Task extends Model {
-    status(): "running" | "pending" | "success" | "failure";
+    status(): "pending" | "running" | "failure" | "success";
     operation(): TaskOperations;
     command(): string;
     package(): string;
diff --git a/extensions/tags/js/dist-typings/forum/extend.d.ts b/extensions/tags/js/dist-typings/forum/extend.d.ts
index 3bf01b829b..2afb40e4d3 100644
--- a/extensions/tags/js/dist-typings/forum/extend.d.ts
+++ b/extensions/tags/js/dist-typings/forum/extend.d.ts
@@ -1,2 +1,2 @@
-declare const _default: (import("flarum/common/extenders/Model").default | import("flarum/common/extenders/PostTypes").default | import("flarum/common/extenders/Routes").default | import("flarum/common/extenders/Store").default)[];
+declare const _default: (import("flarum/common/extenders/Store").default | import("flarum/common/extenders/Routes").default | import("flarum/common/extenders/PostTypes").default | import("flarum/common/extenders/Model").default)[];
 export default _default;
diff --git a/framework/core/js/dist-typings/admin/components/SessionDropdown.d.ts b/framework/core/js/dist-typings/admin/components/SessionDropdown.d.ts
index 0078994d93..67e660ef2c 100644
--- a/framework/core/js/dist-typings/admin/components/SessionDropdown.d.ts
+++ b/framework/core/js/dist-typings/admin/components/SessionDropdown.d.ts
@@ -10,7 +10,7 @@ export interface ISessionDropdownAttrs extends IDropdownAttrs {
 export default class SessionDropdown<CustomAttrs extends ISessionDropdownAttrs = ISessionDropdownAttrs> extends Dropdown<CustomAttrs> {
     static initAttrs(attrs: ISessionDropdownAttrs): void;
     view(vnode: Mithril.Vnode<CustomAttrs, this>): JSX.Element;
-    getButtonContent(): (string | JSX.Element)[];
+    getButtonContent(): (string | Mithril.Vnode<{}, {}>)[];
     /**
      * Build an item list for the contents of the dropdown menu.
      */
diff --git a/framework/core/js/dist-typings/forum/components/SessionDropdown.d.ts b/framework/core/js/dist-typings/forum/components/SessionDropdown.d.ts
index 0078994d93..67e660ef2c 100644
--- a/framework/core/js/dist-typings/forum/components/SessionDropdown.d.ts
+++ b/framework/core/js/dist-typings/forum/components/SessionDropdown.d.ts
@@ -10,7 +10,7 @@ export interface ISessionDropdownAttrs extends IDropdownAttrs {
 export default class SessionDropdown<CustomAttrs extends ISessionDropdownAttrs = ISessionDropdownAttrs> extends Dropdown<CustomAttrs> {
     static initAttrs(attrs: ISessionDropdownAttrs): void;
     view(vnode: Mithril.Vnode<CustomAttrs, this>): JSX.Element;
-    getButtonContent(): (string | JSX.Element)[];
+    getButtonContent(): (string | Mithril.Vnode<{}, {}>)[];
     /**
      * Build an item list for the contents of the dropdown menu.
      */